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