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 BigtableAdmin (v2).
24 *
25 * <p>
26 * Administer your Cloud Bigtable tables and instances.</p>
27 *
28 * <p>
29 * For more information about this service, see the API
30 * <a href="https://cloud.google.com/bigtable/" target="_blank">Documentation</a>
31 * </p>
32 *
33 * @author Google, Inc.
34 */
35class BigtableAdmin extends \Google\Service
36{
37  /** Administer your Cloud Bigtable tables and clusters. */
38  const BIGTABLE_ADMIN =
39      "https://www.googleapis.com/auth/bigtable.admin";
40  /** Administer your Cloud Bigtable clusters. */
41  const BIGTABLE_ADMIN_CLUSTER =
42      "https://www.googleapis.com/auth/bigtable.admin.cluster";
43  /** Administer your Cloud Bigtable clusters. */
44  const BIGTABLE_ADMIN_INSTANCE =
45      "https://www.googleapis.com/auth/bigtable.admin.instance";
46  /** Administer your Cloud Bigtable tables. */
47  const BIGTABLE_ADMIN_TABLE =
48      "https://www.googleapis.com/auth/bigtable.admin.table";
49  /** Administer your Cloud Bigtable tables and clusters. */
50  const CLOUD_BIGTABLE_ADMIN =
51      "https://www.googleapis.com/auth/cloud-bigtable.admin";
52  /** Administer your Cloud Bigtable clusters. */
53  const CLOUD_BIGTABLE_ADMIN_CLUSTER =
54      "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster";
55  /** Administer your Cloud Bigtable tables. */
56  const CLOUD_BIGTABLE_ADMIN_TABLE =
57      "https://www.googleapis.com/auth/cloud-bigtable.admin.table";
58  /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
59  const CLOUD_PLATFORM =
60      "https://www.googleapis.com/auth/cloud-platform";
61  /** View your data across Google Cloud services and see the email address of your Google Account. */
62  const CLOUD_PLATFORM_READ_ONLY =
63      "https://www.googleapis.com/auth/cloud-platform.read-only";
64
65  public $operations;
66  public $operations_projects_operations;
67  public $projects_instances;
68  public $projects_instances_appProfiles;
69  public $projects_instances_clusters;
70  public $projects_instances_clusters_backups;
71  public $projects_instances_clusters_hotTablets;
72  public $projects_instances_tables;
73  public $projects_locations;
74
75  /**
76   * Constructs the internal representation of the BigtableAdmin service.
77   *
78   * @param Client|array $clientOrConfig The client used to deliver requests, or a
79   *                                     config array to pass to a new Client instance.
80   * @param string $rootUrl The root URL used for requests to the service.
81   */
82  public function __construct($clientOrConfig = [], $rootUrl = null)
83  {
84    parent::__construct($clientOrConfig);
85    $this->rootUrl = $rootUrl ?: 'https://bigtableadmin.googleapis.com/';
86    $this->servicePath = '';
87    $this->batchPath = 'batch';
88    $this->version = 'v2';
89    $this->serviceName = 'bigtableadmin';
90
91    $this->operations = new BigtableAdmin\Resource\Operations(
92        $this,
93        $this->serviceName,
94        'operations',
95        [
96          'methods' => [
97            'cancel' => [
98              'path' => 'v2/{+name}:cancel',
99              'httpMethod' => 'POST',
100              'parameters' => [
101                'name' => [
102                  'location' => 'path',
103                  'type' => 'string',
104                  'required' => true,
105                ],
106              ],
107            ],'delete' => [
108              'path' => 'v2/{+name}',
109              'httpMethod' => 'DELETE',
110              'parameters' => [
111                'name' => [
112                  'location' => 'path',
113                  'type' => 'string',
114                  'required' => true,
115                ],
116              ],
117            ],'get' => [
118              'path' => 'v2/{+name}',
119              'httpMethod' => 'GET',
120              'parameters' => [
121                'name' => [
122                  'location' => 'path',
123                  'type' => 'string',
124                  'required' => true,
125                ],
126              ],
127            ],
128          ]
129        ]
130    );
131    $this->operations_projects_operations = new BigtableAdmin\Resource\OperationsProjectsOperations(
132        $this,
133        $this->serviceName,
134        'operations',
135        [
136          'methods' => [
137            'list' => [
138              'path' => 'v2/{+name}/operations',
139              'httpMethod' => 'GET',
140              'parameters' => [
141                'name' => [
142                  'location' => 'path',
143                  'type' => 'string',
144                  'required' => true,
145                ],
146                'filter' => [
147                  'location' => 'query',
148                  'type' => 'string',
149                ],
150                'pageSize' => [
151                  'location' => 'query',
152                  'type' => 'integer',
153                ],
154                'pageToken' => [
155                  'location' => 'query',
156                  'type' => 'string',
157                ],
158              ],
159            ],
160          ]
161        ]
162    );
163    $this->projects_instances = new BigtableAdmin\Resource\ProjectsInstances(
164        $this,
165        $this->serviceName,
166        'instances',
167        [
168          'methods' => [
169            'create' => [
170              'path' => 'v2/{+parent}/instances',
171              'httpMethod' => 'POST',
172              'parameters' => [
173                'parent' => [
174                  'location' => 'path',
175                  'type' => 'string',
176                  'required' => true,
177                ],
178              ],
179            ],'delete' => [
180              'path' => 'v2/{+name}',
181              'httpMethod' => 'DELETE',
182              'parameters' => [
183                'name' => [
184                  'location' => 'path',
185                  'type' => 'string',
186                  'required' => true,
187                ],
188              ],
189            ],'get' => [
190              'path' => 'v2/{+name}',
191              'httpMethod' => 'GET',
192              'parameters' => [
193                'name' => [
194                  'location' => 'path',
195                  'type' => 'string',
196                  'required' => true,
197                ],
198              ],
199            ],'getIamPolicy' => [
200              'path' => 'v2/{+resource}:getIamPolicy',
201              'httpMethod' => 'POST',
202              'parameters' => [
203                'resource' => [
204                  'location' => 'path',
205                  'type' => 'string',
206                  'required' => true,
207                ],
208              ],
209            ],'list' => [
210              'path' => 'v2/{+parent}/instances',
211              'httpMethod' => 'GET',
212              'parameters' => [
213                'parent' => [
214                  'location' => 'path',
215                  'type' => 'string',
216                  'required' => true,
217                ],
218                'pageToken' => [
219                  'location' => 'query',
220                  'type' => 'string',
221                ],
222              ],
223            ],'partialUpdateInstance' => [
224              'path' => 'v2/{+name}',
225              'httpMethod' => 'PATCH',
226              'parameters' => [
227                'name' => [
228                  'location' => 'path',
229                  'type' => 'string',
230                  'required' => true,
231                ],
232                'updateMask' => [
233                  'location' => 'query',
234                  'type' => 'string',
235                ],
236              ],
237            ],'setIamPolicy' => [
238              'path' => 'v2/{+resource}:setIamPolicy',
239              'httpMethod' => 'POST',
240              'parameters' => [
241                'resource' => [
242                  'location' => 'path',
243                  'type' => 'string',
244                  'required' => true,
245                ],
246              ],
247            ],'testIamPermissions' => [
248              'path' => 'v2/{+resource}:testIamPermissions',
249              'httpMethod' => 'POST',
250              'parameters' => [
251                'resource' => [
252                  'location' => 'path',
253                  'type' => 'string',
254                  'required' => true,
255                ],
256              ],
257            ],'update' => [
258              'path' => 'v2/{+name}',
259              'httpMethod' => 'PUT',
260              'parameters' => [
261                'name' => [
262                  'location' => 'path',
263                  'type' => 'string',
264                  'required' => true,
265                ],
266              ],
267            ],
268          ]
269        ]
270    );
271    $this->projects_instances_appProfiles = new BigtableAdmin\Resource\ProjectsInstancesAppProfiles(
272        $this,
273        $this->serviceName,
274        'appProfiles',
275        [
276          'methods' => [
277            'create' => [
278              'path' => 'v2/{+parent}/appProfiles',
279              'httpMethod' => 'POST',
280              'parameters' => [
281                'parent' => [
282                  'location' => 'path',
283                  'type' => 'string',
284                  'required' => true,
285                ],
286                'appProfileId' => [
287                  'location' => 'query',
288                  'type' => 'string',
289                ],
290                'ignoreWarnings' => [
291                  'location' => 'query',
292                  'type' => 'boolean',
293                ],
294              ],
295            ],'delete' => [
296              'path' => 'v2/{+name}',
297              'httpMethod' => 'DELETE',
298              'parameters' => [
299                'name' => [
300                  'location' => 'path',
301                  'type' => 'string',
302                  'required' => true,
303                ],
304                'ignoreWarnings' => [
305                  'location' => 'query',
306                  'type' => 'boolean',
307                ],
308              ],
309            ],'get' => [
310              'path' => 'v2/{+name}',
311              'httpMethod' => 'GET',
312              'parameters' => [
313                'name' => [
314                  'location' => 'path',
315                  'type' => 'string',
316                  'required' => true,
317                ],
318              ],
319            ],'list' => [
320              'path' => 'v2/{+parent}/appProfiles',
321              'httpMethod' => 'GET',
322              'parameters' => [
323                'parent' => [
324                  'location' => 'path',
325                  'type' => 'string',
326                  'required' => true,
327                ],
328                'pageSize' => [
329                  'location' => 'query',
330                  'type' => 'integer',
331                ],
332                'pageToken' => [
333                  'location' => 'query',
334                  'type' => 'string',
335                ],
336              ],
337            ],'patch' => [
338              'path' => 'v2/{+name}',
339              'httpMethod' => 'PATCH',
340              'parameters' => [
341                'name' => [
342                  'location' => 'path',
343                  'type' => 'string',
344                  'required' => true,
345                ],
346                'ignoreWarnings' => [
347                  'location' => 'query',
348                  'type' => 'boolean',
349                ],
350                'updateMask' => [
351                  'location' => 'query',
352                  'type' => 'string',
353                ],
354              ],
355            ],
356          ]
357        ]
358    );
359    $this->projects_instances_clusters = new BigtableAdmin\Resource\ProjectsInstancesClusters(
360        $this,
361        $this->serviceName,
362        'clusters',
363        [
364          'methods' => [
365            'create' => [
366              'path' => 'v2/{+parent}/clusters',
367              'httpMethod' => 'POST',
368              'parameters' => [
369                'parent' => [
370                  'location' => 'path',
371                  'type' => 'string',
372                  'required' => true,
373                ],
374                'clusterId' => [
375                  'location' => 'query',
376                  'type' => 'string',
377                ],
378              ],
379            ],'delete' => [
380              'path' => 'v2/{+name}',
381              'httpMethod' => 'DELETE',
382              'parameters' => [
383                'name' => [
384                  'location' => 'path',
385                  'type' => 'string',
386                  'required' => true,
387                ],
388              ],
389            ],'get' => [
390              'path' => 'v2/{+name}',
391              'httpMethod' => 'GET',
392              'parameters' => [
393                'name' => [
394                  'location' => 'path',
395                  'type' => 'string',
396                  'required' => true,
397                ],
398              ],
399            ],'list' => [
400              'path' => 'v2/{+parent}/clusters',
401              'httpMethod' => 'GET',
402              'parameters' => [
403                'parent' => [
404                  'location' => 'path',
405                  'type' => 'string',
406                  'required' => true,
407                ],
408                'pageToken' => [
409                  'location' => 'query',
410                  'type' => 'string',
411                ],
412              ],
413            ],'partialUpdateCluster' => [
414              'path' => 'v2/{+name}',
415              'httpMethod' => 'PATCH',
416              'parameters' => [
417                'name' => [
418                  'location' => 'path',
419                  'type' => 'string',
420                  'required' => true,
421                ],
422                'updateMask' => [
423                  'location' => 'query',
424                  'type' => 'string',
425                ],
426              ],
427            ],'update' => [
428              'path' => 'v2/{+name}',
429              'httpMethod' => 'PUT',
430              'parameters' => [
431                'name' => [
432                  'location' => 'path',
433                  'type' => 'string',
434                  'required' => true,
435                ],
436              ],
437            ],
438          ]
439        ]
440    );
441    $this->projects_instances_clusters_backups = new BigtableAdmin\Resource\ProjectsInstancesClustersBackups(
442        $this,
443        $this->serviceName,
444        'backups',
445        [
446          'methods' => [
447            'create' => [
448              'path' => 'v2/{+parent}/backups',
449              'httpMethod' => 'POST',
450              'parameters' => [
451                'parent' => [
452                  'location' => 'path',
453                  'type' => 'string',
454                  'required' => true,
455                ],
456                'backupId' => [
457                  'location' => 'query',
458                  'type' => 'string',
459                ],
460              ],
461            ],'delete' => [
462              'path' => 'v2/{+name}',
463              'httpMethod' => 'DELETE',
464              'parameters' => [
465                'name' => [
466                  'location' => 'path',
467                  'type' => 'string',
468                  'required' => true,
469                ],
470              ],
471            ],'get' => [
472              'path' => 'v2/{+name}',
473              'httpMethod' => 'GET',
474              'parameters' => [
475                'name' => [
476                  'location' => 'path',
477                  'type' => 'string',
478                  'required' => true,
479                ],
480              ],
481            ],'getIamPolicy' => [
482              'path' => 'v2/{+resource}:getIamPolicy',
483              'httpMethod' => 'POST',
484              'parameters' => [
485                'resource' => [
486                  'location' => 'path',
487                  'type' => 'string',
488                  'required' => true,
489                ],
490              ],
491            ],'list' => [
492              'path' => 'v2/{+parent}/backups',
493              'httpMethod' => 'GET',
494              'parameters' => [
495                'parent' => [
496                  'location' => 'path',
497                  'type' => 'string',
498                  'required' => true,
499                ],
500                'filter' => [
501                  'location' => 'query',
502                  'type' => 'string',
503                ],
504                'orderBy' => [
505                  'location' => 'query',
506                  'type' => 'string',
507                ],
508                'pageSize' => [
509                  'location' => 'query',
510                  'type' => 'integer',
511                ],
512                'pageToken' => [
513                  'location' => 'query',
514                  'type' => 'string',
515                ],
516              ],
517            ],'patch' => [
518              'path' => 'v2/{+name}',
519              'httpMethod' => 'PATCH',
520              'parameters' => [
521                'name' => [
522                  'location' => 'path',
523                  'type' => 'string',
524                  'required' => true,
525                ],
526                'updateMask' => [
527                  'location' => 'query',
528                  'type' => 'string',
529                ],
530              ],
531            ],'setIamPolicy' => [
532              'path' => 'v2/{+resource}:setIamPolicy',
533              'httpMethod' => 'POST',
534              'parameters' => [
535                'resource' => [
536                  'location' => 'path',
537                  'type' => 'string',
538                  'required' => true,
539                ],
540              ],
541            ],'testIamPermissions' => [
542              'path' => 'v2/{+resource}:testIamPermissions',
543              'httpMethod' => 'POST',
544              'parameters' => [
545                'resource' => [
546                  'location' => 'path',
547                  'type' => 'string',
548                  'required' => true,
549                ],
550              ],
551            ],
552          ]
553        ]
554    );
555    $this->projects_instances_clusters_hotTablets = new BigtableAdmin\Resource\ProjectsInstancesClustersHotTablets(
556        $this,
557        $this->serviceName,
558        'hotTablets',
559        [
560          'methods' => [
561            'list' => [
562              'path' => 'v2/{+parent}/hotTablets',
563              'httpMethod' => 'GET',
564              'parameters' => [
565                'parent' => [
566                  'location' => 'path',
567                  'type' => 'string',
568                  'required' => true,
569                ],
570                'endTime' => [
571                  'location' => 'query',
572                  'type' => 'string',
573                ],
574                'pageSize' => [
575                  'location' => 'query',
576                  'type' => 'integer',
577                ],
578                'pageToken' => [
579                  'location' => 'query',
580                  'type' => 'string',
581                ],
582                'startTime' => [
583                  'location' => 'query',
584                  'type' => 'string',
585                ],
586              ],
587            ],
588          ]
589        ]
590    );
591    $this->projects_instances_tables = new BigtableAdmin\Resource\ProjectsInstancesTables(
592        $this,
593        $this->serviceName,
594        'tables',
595        [
596          'methods' => [
597            'checkConsistency' => [
598              'path' => 'v2/{+name}:checkConsistency',
599              'httpMethod' => 'POST',
600              'parameters' => [
601                'name' => [
602                  'location' => 'path',
603                  'type' => 'string',
604                  'required' => true,
605                ],
606              ],
607            ],'create' => [
608              'path' => 'v2/{+parent}/tables',
609              'httpMethod' => 'POST',
610              'parameters' => [
611                'parent' => [
612                  'location' => 'path',
613                  'type' => 'string',
614                  'required' => true,
615                ],
616              ],
617            ],'delete' => [
618              'path' => 'v2/{+name}',
619              'httpMethod' => 'DELETE',
620              'parameters' => [
621                'name' => [
622                  'location' => 'path',
623                  'type' => 'string',
624                  'required' => true,
625                ],
626              ],
627            ],'dropRowRange' => [
628              'path' => 'v2/{+name}:dropRowRange',
629              'httpMethod' => 'POST',
630              'parameters' => [
631                'name' => [
632                  'location' => 'path',
633                  'type' => 'string',
634                  'required' => true,
635                ],
636              ],
637            ],'generateConsistencyToken' => [
638              'path' => 'v2/{+name}:generateConsistencyToken',
639              'httpMethod' => 'POST',
640              'parameters' => [
641                'name' => [
642                  'location' => 'path',
643                  'type' => 'string',
644                  'required' => true,
645                ],
646              ],
647            ],'get' => [
648              'path' => 'v2/{+name}',
649              'httpMethod' => 'GET',
650              'parameters' => [
651                'name' => [
652                  'location' => 'path',
653                  'type' => 'string',
654                  'required' => true,
655                ],
656                'view' => [
657                  'location' => 'query',
658                  'type' => 'string',
659                ],
660              ],
661            ],'getIamPolicy' => [
662              'path' => 'v2/{+resource}:getIamPolicy',
663              'httpMethod' => 'POST',
664              'parameters' => [
665                'resource' => [
666                  'location' => 'path',
667                  'type' => 'string',
668                  'required' => true,
669                ],
670              ],
671            ],'list' => [
672              'path' => 'v2/{+parent}/tables',
673              'httpMethod' => 'GET',
674              'parameters' => [
675                'parent' => [
676                  'location' => 'path',
677                  'type' => 'string',
678                  'required' => true,
679                ],
680                'pageSize' => [
681                  'location' => 'query',
682                  'type' => 'integer',
683                ],
684                'pageToken' => [
685                  'location' => 'query',
686                  'type' => 'string',
687                ],
688                'view' => [
689                  'location' => 'query',
690                  'type' => 'string',
691                ],
692              ],
693            ],'modifyColumnFamilies' => [
694              'path' => 'v2/{+name}:modifyColumnFamilies',
695              'httpMethod' => 'POST',
696              'parameters' => [
697                'name' => [
698                  'location' => 'path',
699                  'type' => 'string',
700                  'required' => true,
701                ],
702              ],
703            ],'restore' => [
704              'path' => 'v2/{+parent}/tables:restore',
705              'httpMethod' => 'POST',
706              'parameters' => [
707                'parent' => [
708                  'location' => 'path',
709                  'type' => 'string',
710                  'required' => true,
711                ],
712              ],
713            ],'setIamPolicy' => [
714              'path' => 'v2/{+resource}:setIamPolicy',
715              'httpMethod' => 'POST',
716              'parameters' => [
717                'resource' => [
718                  'location' => 'path',
719                  'type' => 'string',
720                  'required' => true,
721                ],
722              ],
723            ],'testIamPermissions' => [
724              'path' => 'v2/{+resource}:testIamPermissions',
725              'httpMethod' => 'POST',
726              'parameters' => [
727                'resource' => [
728                  'location' => 'path',
729                  'type' => 'string',
730                  'required' => true,
731                ],
732              ],
733            ],
734          ]
735        ]
736    );
737    $this->projects_locations = new BigtableAdmin\Resource\ProjectsLocations(
738        $this,
739        $this->serviceName,
740        'locations',
741        [
742          'methods' => [
743            'get' => [
744              'path' => 'v2/{+name}',
745              'httpMethod' => 'GET',
746              'parameters' => [
747                'name' => [
748                  'location' => 'path',
749                  'type' => 'string',
750                  'required' => true,
751                ],
752              ],
753            ],'list' => [
754              'path' => 'v2/{+name}/locations',
755              'httpMethod' => 'GET',
756              'parameters' => [
757                'name' => [
758                  'location' => 'path',
759                  'type' => 'string',
760                  'required' => true,
761                ],
762                'filter' => [
763                  'location' => 'query',
764                  'type' => 'string',
765                ],
766                'pageSize' => [
767                  'location' => 'query',
768                  'type' => 'integer',
769                ],
770                'pageToken' => [
771                  'location' => 'query',
772                  'type' => 'string',
773                ],
774              ],
775            ],
776          ]
777        ]
778    );
779  }
780}
781
782// Adding a class alias for backwards compatibility with the previous class name.
783class_alias(BigtableAdmin::class, 'Google_Service_BigtableAdmin');
784