forked from googleapis/google-api-php-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBigquery.php
More file actions
3392 lines (2929 loc) · 77.8 KB
/
Bigquery.php
File metadata and controls
3392 lines (2929 loc) · 77.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
/*
* Copyright 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
/**
* Service definition for Bigquery (v2).
*
* <p>
* A data platform for customers to create, manage, share and query data.
* </p>
*
* <p>
* For more information about this service, see the API
* <a href="https://developers.google.com/bigquery/docs/overview" target="_blank">Documentation</a>
* </p>
*
* @author Google, Inc.
*/
class Google_Service_Bigquery extends Google_Service
{
/** View and manage your data in Google BigQuery. */
const BIGQUERY = "https://www.googleapis.com/auth/bigquery";
/** Insert data into Google BigQuery. */
const BIGQUERY_INSERTDATA = "https://www.googleapis.com/auth/bigquery.insertdata";
/** View and manage your data across Google Cloud Platform services. */
const CLOUD_PLATFORM = "https://www.googleapis.com/auth/cloud-platform";
/** Manage your data and permissions in Google Cloud Storage. */
const DEVSTORAGE_FULL_CONTROL = "https://www.googleapis.com/auth/devstorage.full_control";
/** View your data in Google Cloud Storage. */
const DEVSTORAGE_READ_ONLY = "https://www.googleapis.com/auth/devstorage.read_only";
/** Manage your data in Google Cloud Storage. */
const DEVSTORAGE_READ_WRITE = "https://www.googleapis.com/auth/devstorage.read_write";
public $datasets;
public $jobs;
public $projects;
public $tabledata;
public $tables;
/**
* Constructs the internal representation of the Bigquery service.
*
* @param Google_Client $client
*/
public function __construct(Google_Client $client)
{
parent::__construct($client);
$this->servicePath = 'bigquery/v2/';
$this->version = 'v2';
$this->serviceName = 'bigquery';
$this->datasets = new Google_Service_Bigquery_Datasets_Resource(
$this,
$this->serviceName,
'datasets',
array(
'methods' => array(
'delete' => array(
'path' => 'projects/{projectId}/datasets/{datasetId}',
'httpMethod' => 'DELETE',
'parameters' => array(
'projectId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'datasetId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'deleteContents' => array(
'location' => 'query',
'type' => 'boolean',
),
),
),'get' => array(
'path' => 'projects/{projectId}/datasets/{datasetId}',
'httpMethod' => 'GET',
'parameters' => array(
'projectId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'datasetId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'insert' => array(
'path' => 'projects/{projectId}/datasets',
'httpMethod' => 'POST',
'parameters' => array(
'projectId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'list' => array(
'path' => 'projects/{projectId}/datasets',
'httpMethod' => 'GET',
'parameters' => array(
'projectId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'pageToken' => array(
'location' => 'query',
'type' => 'string',
),
'all' => array(
'location' => 'query',
'type' => 'boolean',
),
'maxResults' => array(
'location' => 'query',
'type' => 'integer',
),
),
),'patch' => array(
'path' => 'projects/{projectId}/datasets/{datasetId}',
'httpMethod' => 'PATCH',
'parameters' => array(
'projectId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'datasetId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'update' => array(
'path' => 'projects/{projectId}/datasets/{datasetId}',
'httpMethod' => 'PUT',
'parameters' => array(
'projectId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'datasetId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),
)
)
);
$this->jobs = new Google_Service_Bigquery_Jobs_Resource(
$this,
$this->serviceName,
'jobs',
array(
'methods' => array(
'get' => array(
'path' => 'projects/{projectId}/jobs/{jobId}',
'httpMethod' => 'GET',
'parameters' => array(
'projectId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'jobId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'getQueryResults' => array(
'path' => 'projects/{projectId}/queries/{jobId}',
'httpMethod' => 'GET',
'parameters' => array(
'projectId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'jobId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'timeoutMs' => array(
'location' => 'query',
'type' => 'integer',
),
'maxResults' => array(
'location' => 'query',
'type' => 'integer',
),
'pageToken' => array(
'location' => 'query',
'type' => 'string',
),
'startIndex' => array(
'location' => 'query',
'type' => 'string',
),
),
),'insert' => array(
'path' => 'projects/{projectId}/jobs',
'httpMethod' => 'POST',
'parameters' => array(
'projectId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'list' => array(
'path' => 'projects/{projectId}/jobs',
'httpMethod' => 'GET',
'parameters' => array(
'projectId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'projection' => array(
'location' => 'query',
'type' => 'string',
),
'stateFilter' => array(
'location' => 'query',
'type' => 'string',
'repeated' => true,
),
'allUsers' => array(
'location' => 'query',
'type' => 'boolean',
),
'maxResults' => array(
'location' => 'query',
'type' => 'integer',
),
'pageToken' => array(
'location' => 'query',
'type' => 'string',
),
),
),'query' => array(
'path' => 'projects/{projectId}/queries',
'httpMethod' => 'POST',
'parameters' => array(
'projectId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),
)
)
);
$this->projects = new Google_Service_Bigquery_Projects_Resource(
$this,
$this->serviceName,
'projects',
array(
'methods' => array(
'list' => array(
'path' => 'projects',
'httpMethod' => 'GET',
'parameters' => array(
'pageToken' => array(
'location' => 'query',
'type' => 'string',
),
'maxResults' => array(
'location' => 'query',
'type' => 'integer',
),
),
),
)
)
);
$this->tabledata = new Google_Service_Bigquery_Tabledata_Resource(
$this,
$this->serviceName,
'tabledata',
array(
'methods' => array(
'insertAll' => array(
'path' => 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}/insertAll',
'httpMethod' => 'POST',
'parameters' => array(
'projectId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'datasetId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'tableId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'list' => array(
'path' => 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}/data',
'httpMethod' => 'GET',
'parameters' => array(
'projectId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'datasetId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'tableId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'maxResults' => array(
'location' => 'query',
'type' => 'integer',
),
'pageToken' => array(
'location' => 'query',
'type' => 'string',
),
'startIndex' => array(
'location' => 'query',
'type' => 'string',
),
),
),
)
)
);
$this->tables = new Google_Service_Bigquery_Tables_Resource(
$this,
$this->serviceName,
'tables',
array(
'methods' => array(
'delete' => array(
'path' => 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}',
'httpMethod' => 'DELETE',
'parameters' => array(
'projectId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'datasetId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'tableId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'get' => array(
'path' => 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}',
'httpMethod' => 'GET',
'parameters' => array(
'projectId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'datasetId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'tableId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'insert' => array(
'path' => 'projects/{projectId}/datasets/{datasetId}/tables',
'httpMethod' => 'POST',
'parameters' => array(
'projectId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'datasetId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'list' => array(
'path' => 'projects/{projectId}/datasets/{datasetId}/tables',
'httpMethod' => 'GET',
'parameters' => array(
'projectId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'datasetId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'pageToken' => array(
'location' => 'query',
'type' => 'string',
),
'maxResults' => array(
'location' => 'query',
'type' => 'integer',
),
),
),'patch' => array(
'path' => 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}',
'httpMethod' => 'PATCH',
'parameters' => array(
'projectId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'datasetId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'tableId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),'update' => array(
'path' => 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}',
'httpMethod' => 'PUT',
'parameters' => array(
'projectId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'datasetId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
'tableId' => array(
'location' => 'path',
'type' => 'string',
'required' => true,
),
),
),
)
)
);
}
}
/**
* The "datasets" collection of methods.
* Typical usage is:
* <code>
* $bigqueryService = new Google_Service_Bigquery(...);
* $datasets = $bigqueryService->datasets;
* </code>
*/
class Google_Service_Bigquery_Datasets_Resource extends Google_Service_Resource
{
/**
* Deletes the dataset specified by the datasetId value. Before you can delete a
* dataset, you must delete all its tables, either manually or by specifying
* deleteContents. Immediately after deletion, you can create another dataset
* with the same name. (datasets.delete)
*
* @param string $projectId
* Project ID of the dataset being deleted
* @param string $datasetId
* Dataset ID of dataset being deleted
* @param array $optParams Optional parameters.
*
* @opt_param bool deleteContents
* If True, delete all the tables in the dataset. If False and the dataset contains tables, the
* request will fail. Default is False
*/
public function delete($projectId, $datasetId, $optParams = array())
{
$params = array('projectId' => $projectId, 'datasetId' => $datasetId);
$params = array_merge($params, $optParams);
return $this->call('delete', array($params));
}
/**
* Returns the dataset specified by datasetID. (datasets.get)
*
* @param string $projectId
* Project ID of the requested dataset
* @param string $datasetId
* Dataset ID of the requested dataset
* @param array $optParams Optional parameters.
* @return Google_Service_Bigquery_Dataset
*/
public function get($projectId, $datasetId, $optParams = array())
{
$params = array('projectId' => $projectId, 'datasetId' => $datasetId);
$params = array_merge($params, $optParams);
return $this->call('get', array($params), "Google_Service_Bigquery_Dataset");
}
/**
* Creates a new empty dataset. (datasets.insert)
*
* @param string $projectId
* Project ID of the new dataset
* @param Google_Dataset $postBody
* @param array $optParams Optional parameters.
* @return Google_Service_Bigquery_Dataset
*/
public function insert($projectId, Google_Service_Bigquery_Dataset $postBody, $optParams = array())
{
$params = array('projectId' => $projectId, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('insert', array($params), "Google_Service_Bigquery_Dataset");
}
/**
* Lists all the datasets in the specified project to which the caller has read
* access; however, a project owner can list (but not necessarily get) all
* datasets in his project. (datasets.listDatasets)
*
* @param string $projectId
* Project ID of the datasets to be listed
* @param array $optParams Optional parameters.
*
* @opt_param string pageToken
* Page token, returned by a previous call, to request the next page of results
* @opt_param bool all
* Whether to list all datasets, including hidden ones
* @opt_param string maxResults
* The maximum number of results to return
* @return Google_Service_Bigquery_DatasetList
*/
public function listDatasets($projectId, $optParams = array())
{
$params = array('projectId' => $projectId);
$params = array_merge($params, $optParams);
return $this->call('list', array($params), "Google_Service_Bigquery_DatasetList");
}
/**
* Updates information in an existing dataset. The update method replaces the
* entire dataset resource, whereas the patch method only replaces fields that
* are provided in the submitted dataset resource. This method supports patch
* semantics. (datasets.patch)
*
* @param string $projectId
* Project ID of the dataset being updated
* @param string $datasetId
* Dataset ID of the dataset being updated
* @param Google_Dataset $postBody
* @param array $optParams Optional parameters.
* @return Google_Service_Bigquery_Dataset
*/
public function patch($projectId, $datasetId, Google_Service_Bigquery_Dataset $postBody, $optParams = array())
{
$params = array('projectId' => $projectId, 'datasetId' => $datasetId, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('patch', array($params), "Google_Service_Bigquery_Dataset");
}
/**
* Updates information in an existing dataset. The update method replaces the
* entire dataset resource, whereas the patch method only replaces fields that
* are provided in the submitted dataset resource. (datasets.update)
*
* @param string $projectId
* Project ID of the dataset being updated
* @param string $datasetId
* Dataset ID of the dataset being updated
* @param Google_Dataset $postBody
* @param array $optParams Optional parameters.
* @return Google_Service_Bigquery_Dataset
*/
public function update($projectId, $datasetId, Google_Service_Bigquery_Dataset $postBody, $optParams = array())
{
$params = array('projectId' => $projectId, 'datasetId' => $datasetId, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('update', array($params), "Google_Service_Bigquery_Dataset");
}
}
/**
* The "jobs" collection of methods.
* Typical usage is:
* <code>
* $bigqueryService = new Google_Service_Bigquery(...);
* $jobs = $bigqueryService->jobs;
* </code>
*/
class Google_Service_Bigquery_Jobs_Resource extends Google_Service_Resource
{
/**
* Retrieves the specified job by ID. (jobs.get)
*
* @param string $projectId
* Project ID of the requested job
* @param string $jobId
* Job ID of the requested job
* @param array $optParams Optional parameters.
* @return Google_Service_Bigquery_Job
*/
public function get($projectId, $jobId, $optParams = array())
{
$params = array('projectId' => $projectId, 'jobId' => $jobId);
$params = array_merge($params, $optParams);
return $this->call('get', array($params), "Google_Service_Bigquery_Job");
}
/**
* Retrieves the results of a query job. (jobs.getQueryResults)
*
* @param string $projectId
* Project ID of the query job
* @param string $jobId
* Job ID of the query job
* @param array $optParams Optional parameters.
*
* @opt_param string timeoutMs
* How long to wait for the query to complete, in milliseconds, before returning. Default is to
* return immediately. If the timeout passes before the job completes, the request will fail with a
* TIMEOUT error
* @opt_param string maxResults
* Maximum number of results to read
* @opt_param string pageToken
* Page token, returned by a previous call, to request the next page of results
* @opt_param string startIndex
* Zero-based index of the starting row
* @return Google_Service_Bigquery_GetQueryResultsResponse
*/
public function getQueryResults($projectId, $jobId, $optParams = array())
{
$params = array('projectId' => $projectId, 'jobId' => $jobId);
$params = array_merge($params, $optParams);
return $this->call('getQueryResults', array($params), "Google_Service_Bigquery_GetQueryResultsResponse");
}
/**
* Starts a new asynchronous job. (jobs.insert)
*
* @param string $projectId
* Project ID of the project that will be billed for the job
* @param Google_Job $postBody
* @param array $optParams Optional parameters.
* @return Google_Service_Bigquery_Job
*/
public function insert($projectId, Google_Service_Bigquery_Job $postBody, $optParams = array())
{
$params = array('projectId' => $projectId, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('insert', array($params), "Google_Service_Bigquery_Job");
}
/**
* Lists all the Jobs in the specified project that were started by the user.
* (jobs.listJobs)
*
* @param string $projectId
* Project ID of the jobs to list
* @param array $optParams Optional parameters.
*
* @opt_param string projection
* Restrict information returned to a set of selected fields
* @opt_param string stateFilter
* Filter for job state
* @opt_param bool allUsers
* Whether to display jobs owned by all users in the project. Default false
* @opt_param string maxResults
* Maximum number of results to return
* @opt_param string pageToken
* Page token, returned by a previous call, to request the next page of results
* @return Google_Service_Bigquery_JobList
*/
public function listJobs($projectId, $optParams = array())
{
$params = array('projectId' => $projectId);
$params = array_merge($params, $optParams);
return $this->call('list', array($params), "Google_Service_Bigquery_JobList");
}
/**
* Runs a BigQuery SQL query synchronously and returns query results if the
* query completes within a specified timeout. (jobs.query)
*
* @param string $projectId
* Project ID of the project billed for the query
* @param Google_QueryRequest $postBody
* @param array $optParams Optional parameters.
* @return Google_Service_Bigquery_QueryResponse
*/
public function query($projectId, Google_Service_Bigquery_QueryRequest $postBody, $optParams = array())
{
$params = array('projectId' => $projectId, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('query', array($params), "Google_Service_Bigquery_QueryResponse");
}
}
/**
* The "projects" collection of methods.
* Typical usage is:
* <code>
* $bigqueryService = new Google_Service_Bigquery(...);
* $projects = $bigqueryService->projects;
* </code>
*/
class Google_Service_Bigquery_Projects_Resource extends Google_Service_Resource
{
/**
* Lists the projects to which you have at least read access.
* (projects.listProjects)
*
* @param array $optParams Optional parameters.
*
* @opt_param string pageToken
* Page token, returned by a previous call, to request the next page of results
* @opt_param string maxResults
* Maximum number of results to return
* @return Google_Service_Bigquery_ProjectList
*/
public function listProjects($optParams = array())
{
$params = array();
$params = array_merge($params, $optParams);
return $this->call('list', array($params), "Google_Service_Bigquery_ProjectList");
}
}
/**
* The "tabledata" collection of methods.
* Typical usage is:
* <code>
* $bigqueryService = new Google_Service_Bigquery(...);
* $tabledata = $bigqueryService->tabledata;
* </code>
*/
class Google_Service_Bigquery_Tabledata_Resource extends Google_Service_Resource
{
/**
* Inserts the supplied rows into the table. (tabledata.insertAll)
*
* @param string $projectId
* Project ID of the destination table.
* @param string $datasetId
* Dataset ID of the destination table.
* @param string $tableId
* Table ID of the destination table.
* @param Google_TableDataInsertAllRequest $postBody
* @param array $optParams Optional parameters.
* @return Google_Service_Bigquery_TableDataInsertAllResponse
*/
public function insertAll($projectId, $datasetId, $tableId, Google_Service_Bigquery_TableDataInsertAllRequest $postBody, $optParams = array())
{
$params = array('projectId' => $projectId, 'datasetId' => $datasetId, 'tableId' => $tableId, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('insertAll', array($params), "Google_Service_Bigquery_TableDataInsertAllResponse");
}
/**
* Retrieves table data from a specified set of rows. (tabledata.listTabledata)
*
* @param string $projectId
* Project ID of the table to read
* @param string $datasetId
* Dataset ID of the table to read
* @param string $tableId
* Table ID of the table to read
* @param array $optParams Optional parameters.
*
* @opt_param string maxResults
* Maximum number of results to return
* @opt_param string pageToken
* Page token, returned by a previous call, identifying the result set
* @opt_param string startIndex
* Zero-based index of the starting row to read
* @return Google_Service_Bigquery_TableDataList
*/
public function listTabledata($projectId, $datasetId, $tableId, $optParams = array())
{
$params = array('projectId' => $projectId, 'datasetId' => $datasetId, 'tableId' => $tableId);
$params = array_merge($params, $optParams);
return $this->call('list', array($params), "Google_Service_Bigquery_TableDataList");
}
}
/**
* The "tables" collection of methods.
* Typical usage is:
* <code>
* $bigqueryService = new Google_Service_Bigquery(...);
* $tables = $bigqueryService->tables;
* </code>
*/
class Google_Service_Bigquery_Tables_Resource extends Google_Service_Resource
{
/**
* Deletes the table specified by tableId from the dataset. If the table
* contains data, all the data will be deleted. (tables.delete)
*
* @param string $projectId
* Project ID of the table to delete
* @param string $datasetId
* Dataset ID of the table to delete
* @param string $tableId
* Table ID of the table to delete
* @param array $optParams Optional parameters.
*/
public function delete($projectId, $datasetId, $tableId, $optParams = array())
{
$params = array('projectId' => $projectId, 'datasetId' => $datasetId, 'tableId' => $tableId);
$params = array_merge($params, $optParams);
return $this->call('delete', array($params));
}
/**
* Gets the specified table resource by table ID. This method does not return
* the data in the table, it only returns the table resource, which describes
* the structure of this table. (tables.get)
*
* @param string $projectId
* Project ID of the requested table
* @param string $datasetId
* Dataset ID of the requested table
* @param string $tableId
* Table ID of the requested table
* @param array $optParams Optional parameters.
* @return Google_Service_Bigquery_Table
*/
public function get($projectId, $datasetId, $tableId, $optParams = array())
{
$params = array('projectId' => $projectId, 'datasetId' => $datasetId, 'tableId' => $tableId);
$params = array_merge($params, $optParams);
return $this->call('get', array($params), "Google_Service_Bigquery_Table");
}
/**
* Creates a new, empty table in the dataset. (tables.insert)
*
* @param string $projectId
* Project ID of the new table
* @param string $datasetId
* Dataset ID of the new table
* @param Google_Table $postBody
* @param array $optParams Optional parameters.
* @return Google_Service_Bigquery_Table
*/
public function insert($projectId, $datasetId, Google_Service_Bigquery_Table $postBody, $optParams = array())
{
$params = array('projectId' => $projectId, 'datasetId' => $datasetId, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('insert', array($params), "Google_Service_Bigquery_Table");
}
/**
* Lists all tables in the specified dataset. (tables.listTables)
*
* @param string $projectId
* Project ID of the tables to list
* @param string $datasetId
* Dataset ID of the tables to list
* @param array $optParams Optional parameters.
*
* @opt_param string pageToken
* Page token, returned by a previous call, to request the next page of results
* @opt_param string maxResults
* Maximum number of results to return
* @return Google_Service_Bigquery_TableList
*/
public function listTables($projectId, $datasetId, $optParams = array())
{
$params = array('projectId' => $projectId, 'datasetId' => $datasetId);
$params = array_merge($params, $optParams);
return $this->call('list', array($params), "Google_Service_Bigquery_TableList");
}
/**
* Updates information in an existing table. The update method replaces the
* entire table resource, whereas the patch method only replaces fields that are
* provided in the submitted table resource. This method supports patch
* semantics. (tables.patch)
*
* @param string $projectId
* Project ID of the table to update
* @param string $datasetId
* Dataset ID of the table to update
* @param string $tableId
* Table ID of the table to update
* @param Google_Table $postBody
* @param array $optParams Optional parameters.
* @return Google_Service_Bigquery_Table
*/
public function patch($projectId, $datasetId, $tableId, Google_Service_Bigquery_Table $postBody, $optParams = array())
{
$params = array('projectId' => $projectId, 'datasetId' => $datasetId, 'tableId' => $tableId, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('patch', array($params), "Google_Service_Bigquery_Table");
}
/**
* Updates information in an existing table. The update method replaces the
* entire table resource, whereas the patch method only replaces fields that are
* provided in the submitted table resource. (tables.update)
*
* @param string $projectId
* Project ID of the table to update
* @param string $datasetId
* Dataset ID of the table to update
* @param string $tableId
* Table ID of the table to update
* @param Google_Table $postBody
* @param array $optParams Optional parameters.
* @return Google_Service_Bigquery_Table
*/
public function update($projectId, $datasetId, $tableId, Google_Service_Bigquery_Table $postBody, $optParams = array())
{
$params = array('projectId' => $projectId, 'datasetId' => $datasetId, 'tableId' => $tableId, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('update', array($params), "Google_Service_Bigquery_Table");
}
}
class Google_Service_Bigquery_Dataset extends Google_Collection
{
protected $accessType = 'Google_Service_Bigquery_DatasetAccess';
protected $accessDataType = 'array';
public $creationTime;
protected $datasetReferenceType = 'Google_Service_Bigquery_DatasetReference';
protected $datasetReferenceDataType = '';
public $description;
public $etag;
public $friendlyName;
public $id;
public $kind;
public $lastModifiedTime;
public $selfLink;
public function setAccess($access)
{
$this->access = $access;
}
public function getAccess()
{
return $this->access;
}
public function setCreationTime($creationTime)
{
$this->creationTime = $creationTime;
}
public function getCreationTime()
{
return $this->creationTime;
}
public function setDatasetReference(Google_Service_Bigquery_DatasetReference $datasetReference)
{
$this->datasetReference = $datasetReference;
}
public function getDatasetReference()