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 Drive (v3).
24 *
25 * <p>
26 * Manages files in Drive including uploading, downloading, searching, detecting
27 * changes, and updating sharing permissions.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://developers.google.com/drive/" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class Drive extends \Google\Service
37{
38  /** See, edit, create, and delete all of your Google Drive files. */
39  const DRIVE =
40      "https://www.googleapis.com/auth/drive";
41  /** See, create, and delete its own configuration data in your Google Drive. */
42  const DRIVE_APPDATA =
43      "https://www.googleapis.com/auth/drive.appdata";
44  /** See, edit, create, and delete only the specific Google Drive files you use with this app. */
45  const DRIVE_FILE =
46      "https://www.googleapis.com/auth/drive.file";
47  /** View and manage metadata of files in your Google Drive. */
48  const DRIVE_METADATA =
49      "https://www.googleapis.com/auth/drive.metadata";
50  /** See information about your Google Drive files. */
51  const DRIVE_METADATA_READONLY =
52      "https://www.googleapis.com/auth/drive.metadata.readonly";
53  /** View the photos, videos and albums in your Google Photos. */
54  const DRIVE_PHOTOS_READONLY =
55      "https://www.googleapis.com/auth/drive.photos.readonly";
56  /** See and download all your Google Drive files. */
57  const DRIVE_READONLY =
58      "https://www.googleapis.com/auth/drive.readonly";
59  /** Modify your Google Apps Script scripts' behavior. */
60  const DRIVE_SCRIPTS =
61      "https://www.googleapis.com/auth/drive.scripts";
62
63  public $about;
64  public $changes;
65  public $channels;
66  public $comments;
67  public $drives;
68  public $files;
69  public $permissions;
70  public $replies;
71  public $revisions;
72  public $teamdrives;
73
74  /**
75   * Constructs the internal representation of the Drive service.
76   *
77   * @param Client|array $clientOrConfig The client used to deliver requests, or a
78   *                                     config array to pass to a new Client instance.
79   * @param string $rootUrl The root URL used for requests to the service.
80   */
81  public function __construct($clientOrConfig = [], $rootUrl = null)
82  {
83    parent::__construct($clientOrConfig);
84    $this->rootUrl = $rootUrl ?: 'https://www.googleapis.com/';
85    $this->servicePath = 'drive/v3/';
86    $this->batchPath = 'batch/drive/v3';
87    $this->version = 'v3';
88    $this->serviceName = 'drive';
89
90    $this->about = new Drive\Resource\About(
91        $this,
92        $this->serviceName,
93        'about',
94        [
95          'methods' => [
96            'get' => [
97              'path' => 'about',
98              'httpMethod' => 'GET',
99              'parameters' => [],
100            ],
101          ]
102        ]
103    );
104    $this->changes = new Drive\Resource\Changes(
105        $this,
106        $this->serviceName,
107        'changes',
108        [
109          'methods' => [
110            'getStartPageToken' => [
111              'path' => 'changes/startPageToken',
112              'httpMethod' => 'GET',
113              'parameters' => [
114                'driveId' => [
115                  'location' => 'query',
116                  'type' => 'string',
117                ],
118                'supportsAllDrives' => [
119                  'location' => 'query',
120                  'type' => 'boolean',
121                ],
122                'supportsTeamDrives' => [
123                  'location' => 'query',
124                  'type' => 'boolean',
125                ],
126                'teamDriveId' => [
127                  'location' => 'query',
128                  'type' => 'string',
129                ],
130              ],
131            ],'list' => [
132              'path' => 'changes',
133              'httpMethod' => 'GET',
134              'parameters' => [
135                'pageToken' => [
136                  'location' => 'query',
137                  'type' => 'string',
138                  'required' => true,
139                ],
140                'driveId' => [
141                  'location' => 'query',
142                  'type' => 'string',
143                ],
144                'includeCorpusRemovals' => [
145                  'location' => 'query',
146                  'type' => 'boolean',
147                ],
148                'includeItemsFromAllDrives' => [
149                  'location' => 'query',
150                  'type' => 'boolean',
151                ],
152                'includePermissionsForView' => [
153                  'location' => 'query',
154                  'type' => 'string',
155                ],
156                'includeRemoved' => [
157                  'location' => 'query',
158                  'type' => 'boolean',
159                ],
160                'includeTeamDriveItems' => [
161                  'location' => 'query',
162                  'type' => 'boolean',
163                ],
164                'pageSize' => [
165                  'location' => 'query',
166                  'type' => 'integer',
167                ],
168                'restrictToMyDrive' => [
169                  'location' => 'query',
170                  'type' => 'boolean',
171                ],
172                'spaces' => [
173                  'location' => 'query',
174                  'type' => 'string',
175                ],
176                'supportsAllDrives' => [
177                  'location' => 'query',
178                  'type' => 'boolean',
179                ],
180                'supportsTeamDrives' => [
181                  'location' => 'query',
182                  'type' => 'boolean',
183                ],
184                'teamDriveId' => [
185                  'location' => 'query',
186                  'type' => 'string',
187                ],
188              ],
189            ],'watch' => [
190              'path' => 'changes/watch',
191              'httpMethod' => 'POST',
192              'parameters' => [
193                'pageToken' => [
194                  'location' => 'query',
195                  'type' => 'string',
196                  'required' => true,
197                ],
198                'driveId' => [
199                  'location' => 'query',
200                  'type' => 'string',
201                ],
202                'includeCorpusRemovals' => [
203                  'location' => 'query',
204                  'type' => 'boolean',
205                ],
206                'includeItemsFromAllDrives' => [
207                  'location' => 'query',
208                  'type' => 'boolean',
209                ],
210                'includePermissionsForView' => [
211                  'location' => 'query',
212                  'type' => 'string',
213                ],
214                'includeRemoved' => [
215                  'location' => 'query',
216                  'type' => 'boolean',
217                ],
218                'includeTeamDriveItems' => [
219                  'location' => 'query',
220                  'type' => 'boolean',
221                ],
222                'pageSize' => [
223                  'location' => 'query',
224                  'type' => 'integer',
225                ],
226                'restrictToMyDrive' => [
227                  'location' => 'query',
228                  'type' => 'boolean',
229                ],
230                'spaces' => [
231                  'location' => 'query',
232                  'type' => 'string',
233                ],
234                'supportsAllDrives' => [
235                  'location' => 'query',
236                  'type' => 'boolean',
237                ],
238                'supportsTeamDrives' => [
239                  'location' => 'query',
240                  'type' => 'boolean',
241                ],
242                'teamDriveId' => [
243                  'location' => 'query',
244                  'type' => 'string',
245                ],
246              ],
247            ],
248          ]
249        ]
250    );
251    $this->channels = new Drive\Resource\Channels(
252        $this,
253        $this->serviceName,
254        'channels',
255        [
256          'methods' => [
257            'stop' => [
258              'path' => 'channels/stop',
259              'httpMethod' => 'POST',
260              'parameters' => [],
261            ],
262          ]
263        ]
264    );
265    $this->comments = new Drive\Resource\Comments(
266        $this,
267        $this->serviceName,
268        'comments',
269        [
270          'methods' => [
271            'create' => [
272              'path' => 'files/{fileId}/comments',
273              'httpMethod' => 'POST',
274              'parameters' => [
275                'fileId' => [
276                  'location' => 'path',
277                  'type' => 'string',
278                  'required' => true,
279                ],
280              ],
281            ],'delete' => [
282              'path' => 'files/{fileId}/comments/{commentId}',
283              'httpMethod' => 'DELETE',
284              'parameters' => [
285                'fileId' => [
286                  'location' => 'path',
287                  'type' => 'string',
288                  'required' => true,
289                ],
290                'commentId' => [
291                  'location' => 'path',
292                  'type' => 'string',
293                  'required' => true,
294                ],
295              ],
296            ],'get' => [
297              'path' => 'files/{fileId}/comments/{commentId}',
298              'httpMethod' => 'GET',
299              'parameters' => [
300                'fileId' => [
301                  'location' => 'path',
302                  'type' => 'string',
303                  'required' => true,
304                ],
305                'commentId' => [
306                  'location' => 'path',
307                  'type' => 'string',
308                  'required' => true,
309                ],
310                'includeDeleted' => [
311                  'location' => 'query',
312                  'type' => 'boolean',
313                ],
314              ],
315            ],'list' => [
316              'path' => 'files/{fileId}/comments',
317              'httpMethod' => 'GET',
318              'parameters' => [
319                'fileId' => [
320                  'location' => 'path',
321                  'type' => 'string',
322                  'required' => true,
323                ],
324                'includeDeleted' => [
325                  'location' => 'query',
326                  'type' => 'boolean',
327                ],
328                'pageSize' => [
329                  'location' => 'query',
330                  'type' => 'integer',
331                ],
332                'pageToken' => [
333                  'location' => 'query',
334                  'type' => 'string',
335                ],
336                'startModifiedTime' => [
337                  'location' => 'query',
338                  'type' => 'string',
339                ],
340              ],
341            ],'update' => [
342              'path' => 'files/{fileId}/comments/{commentId}',
343              'httpMethod' => 'PATCH',
344              'parameters' => [
345                'fileId' => [
346                  'location' => 'path',
347                  'type' => 'string',
348                  'required' => true,
349                ],
350                'commentId' => [
351                  'location' => 'path',
352                  'type' => 'string',
353                  'required' => true,
354                ],
355              ],
356            ],
357          ]
358        ]
359    );
360    $this->drives = new Drive\Resource\Drives(
361        $this,
362        $this->serviceName,
363        'drives',
364        [
365          'methods' => [
366            'create' => [
367              'path' => 'drives',
368              'httpMethod' => 'POST',
369              'parameters' => [
370                'requestId' => [
371                  'location' => 'query',
372                  'type' => 'string',
373                  'required' => true,
374                ],
375              ],
376            ],'delete' => [
377              'path' => 'drives/{driveId}',
378              'httpMethod' => 'DELETE',
379              'parameters' => [
380                'driveId' => [
381                  'location' => 'path',
382                  'type' => 'string',
383                  'required' => true,
384                ],
385                'allowItemDeletion' => [
386                  'location' => 'query',
387                  'type' => 'boolean',
388                ],
389                'useDomainAdminAccess' => [
390                  'location' => 'query',
391                  'type' => 'boolean',
392                ],
393              ],
394            ],'get' => [
395              'path' => 'drives/{driveId}',
396              'httpMethod' => 'GET',
397              'parameters' => [
398                'driveId' => [
399                  'location' => 'path',
400                  'type' => 'string',
401                  'required' => true,
402                ],
403                'useDomainAdminAccess' => [
404                  'location' => 'query',
405                  'type' => 'boolean',
406                ],
407              ],
408            ],'hide' => [
409              'path' => 'drives/{driveId}/hide',
410              'httpMethod' => 'POST',
411              'parameters' => [
412                'driveId' => [
413                  'location' => 'path',
414                  'type' => 'string',
415                  'required' => true,
416                ],
417              ],
418            ],'list' => [
419              'path' => 'drives',
420              'httpMethod' => 'GET',
421              'parameters' => [
422                'pageSize' => [
423                  'location' => 'query',
424                  'type' => 'integer',
425                ],
426                'pageToken' => [
427                  'location' => 'query',
428                  'type' => 'string',
429                ],
430                'q' => [
431                  'location' => 'query',
432                  'type' => 'string',
433                ],
434                'useDomainAdminAccess' => [
435                  'location' => 'query',
436                  'type' => 'boolean',
437                ],
438              ],
439            ],'unhide' => [
440              'path' => 'drives/{driveId}/unhide',
441              'httpMethod' => 'POST',
442              'parameters' => [
443                'driveId' => [
444                  'location' => 'path',
445                  'type' => 'string',
446                  'required' => true,
447                ],
448              ],
449            ],'update' => [
450              'path' => 'drives/{driveId}',
451              'httpMethod' => 'PATCH',
452              'parameters' => [
453                'driveId' => [
454                  'location' => 'path',
455                  'type' => 'string',
456                  'required' => true,
457                ],
458                'useDomainAdminAccess' => [
459                  'location' => 'query',
460                  'type' => 'boolean',
461                ],
462              ],
463            ],
464          ]
465        ]
466    );
467    $this->files = new Drive\Resource\Files(
468        $this,
469        $this->serviceName,
470        'files',
471        [
472          'methods' => [
473            'copy' => [
474              'path' => 'files/{fileId}/copy',
475              'httpMethod' => 'POST',
476              'parameters' => [
477                'fileId' => [
478                  'location' => 'path',
479                  'type' => 'string',
480                  'required' => true,
481                ],
482                'enforceSingleParent' => [
483                  'location' => 'query',
484                  'type' => 'boolean',
485                ],
486                'ignoreDefaultVisibility' => [
487                  'location' => 'query',
488                  'type' => 'boolean',
489                ],
490                'includePermissionsForView' => [
491                  'location' => 'query',
492                  'type' => 'string',
493                ],
494                'keepRevisionForever' => [
495                  'location' => 'query',
496                  'type' => 'boolean',
497                ],
498                'ocrLanguage' => [
499                  'location' => 'query',
500                  'type' => 'string',
501                ],
502                'supportsAllDrives' => [
503                  'location' => 'query',
504                  'type' => 'boolean',
505                ],
506                'supportsTeamDrives' => [
507                  'location' => 'query',
508                  'type' => 'boolean',
509                ],
510              ],
511            ],'create' => [
512              'path' => 'files',
513              'httpMethod' => 'POST',
514              'parameters' => [
515                'enforceSingleParent' => [
516                  'location' => 'query',
517                  'type' => 'boolean',
518                ],
519                'ignoreDefaultVisibility' => [
520                  'location' => 'query',
521                  'type' => 'boolean',
522                ],
523                'includePermissionsForView' => [
524                  'location' => 'query',
525                  'type' => 'string',
526                ],
527                'keepRevisionForever' => [
528                  'location' => 'query',
529                  'type' => 'boolean',
530                ],
531                'ocrLanguage' => [
532                  'location' => 'query',
533                  'type' => 'string',
534                ],
535                'supportsAllDrives' => [
536                  'location' => 'query',
537                  'type' => 'boolean',
538                ],
539                'supportsTeamDrives' => [
540                  'location' => 'query',
541                  'type' => 'boolean',
542                ],
543                'useContentAsIndexableText' => [
544                  'location' => 'query',
545                  'type' => 'boolean',
546                ],
547              ],
548            ],'delete' => [
549              'path' => 'files/{fileId}',
550              'httpMethod' => 'DELETE',
551              'parameters' => [
552                'fileId' => [
553                  'location' => 'path',
554                  'type' => 'string',
555                  'required' => true,
556                ],
557                'enforceSingleParent' => [
558                  'location' => 'query',
559                  'type' => 'boolean',
560                ],
561                'supportsAllDrives' => [
562                  'location' => 'query',
563                  'type' => 'boolean',
564                ],
565                'supportsTeamDrives' => [
566                  'location' => 'query',
567                  'type' => 'boolean',
568                ],
569              ],
570            ],'emptyTrash' => [
571              'path' => 'files/trash',
572              'httpMethod' => 'DELETE',
573              'parameters' => [
574                'enforceSingleParent' => [
575                  'location' => 'query',
576                  'type' => 'boolean',
577                ],
578              ],
579            ],'export' => [
580              'path' => 'files/{fileId}/export',
581              'httpMethod' => 'GET',
582              'parameters' => [
583                'fileId' => [
584                  'location' => 'path',
585                  'type' => 'string',
586                  'required' => true,
587                ],
588                'mimeType' => [
589                  'location' => 'query',
590                  'type' => 'string',
591                  'required' => true,
592                ],
593              ],
594            ],'generateIds' => [
595              'path' => 'files/generateIds',
596              'httpMethod' => 'GET',
597              'parameters' => [
598                'count' => [
599                  'location' => 'query',
600                  'type' => 'integer',
601                ],
602                'space' => [
603                  'location' => 'query',
604                  'type' => 'string',
605                ],
606                'type' => [
607                  'location' => 'query',
608                  'type' => 'string',
609                ],
610              ],
611            ],'get' => [
612              'path' => 'files/{fileId}',
613              'httpMethod' => 'GET',
614              'parameters' => [
615                'fileId' => [
616                  'location' => 'path',
617                  'type' => 'string',
618                  'required' => true,
619                ],
620                'acknowledgeAbuse' => [
621                  'location' => 'query',
622                  'type' => 'boolean',
623                ],
624                'includePermissionsForView' => [
625                  'location' => 'query',
626                  'type' => 'string',
627                ],
628                'supportsAllDrives' => [
629                  'location' => 'query',
630                  'type' => 'boolean',
631                ],
632                'supportsTeamDrives' => [
633                  'location' => 'query',
634                  'type' => 'boolean',
635                ],
636              ],
637            ],'list' => [
638              'path' => 'files',
639              'httpMethod' => 'GET',
640              'parameters' => [
641                'corpora' => [
642                  'location' => 'query',
643                  'type' => 'string',
644                ],
645                'corpus' => [
646                  'location' => 'query',
647                  'type' => 'string',
648                ],
649                'driveId' => [
650                  'location' => 'query',
651                  'type' => 'string',
652                ],
653                'includeItemsFromAllDrives' => [
654                  'location' => 'query',
655                  'type' => 'boolean',
656                ],
657                'includePermissionsForView' => [
658                  'location' => 'query',
659                  'type' => 'string',
660                ],
661                'includeTeamDriveItems' => [
662                  'location' => 'query',
663                  'type' => 'boolean',
664                ],
665                'orderBy' => [
666                  'location' => 'query',
667                  'type' => 'string',
668                ],
669                'pageSize' => [
670                  'location' => 'query',
671                  'type' => 'integer',
672                ],
673                'pageToken' => [
674                  'location' => 'query',
675                  'type' => 'string',
676                ],
677                'q' => [
678                  'location' => 'query',
679                  'type' => 'string',
680                ],
681                'spaces' => [
682                  'location' => 'query',
683                  'type' => 'string',
684                ],
685                'supportsAllDrives' => [
686                  'location' => 'query',
687                  'type' => 'boolean',
688                ],
689                'supportsTeamDrives' => [
690                  'location' => 'query',
691                  'type' => 'boolean',
692                ],
693                'teamDriveId' => [
694                  'location' => 'query',
695                  'type' => 'string',
696                ],
697              ],
698            ],'update' => [
699              'path' => 'files/{fileId}',
700              'httpMethod' => 'PATCH',
701              'parameters' => [
702                'fileId' => [
703                  'location' => 'path',
704                  'type' => 'string',
705                  'required' => true,
706                ],
707                'addParents' => [
708                  'location' => 'query',
709                  'type' => 'string',
710                ],
711                'enforceSingleParent' => [
712                  'location' => 'query',
713                  'type' => 'boolean',
714                ],
715                'includePermissionsForView' => [
716                  'location' => 'query',
717                  'type' => 'string',
718                ],
719                'keepRevisionForever' => [
720                  'location' => 'query',
721                  'type' => 'boolean',
722                ],
723                'ocrLanguage' => [
724                  'location' => 'query',
725                  'type' => 'string',
726                ],
727                'removeParents' => [
728                  'location' => 'query',
729                  'type' => 'string',
730                ],
731                'supportsAllDrives' => [
732                  'location' => 'query',
733                  'type' => 'boolean',
734                ],
735                'supportsTeamDrives' => [
736                  'location' => 'query',
737                  'type' => 'boolean',
738                ],
739                'useContentAsIndexableText' => [
740                  'location' => 'query',
741                  'type' => 'boolean',
742                ],
743              ],
744            ],'watch' => [
745              'path' => 'files/{fileId}/watch',
746              'httpMethod' => 'POST',
747              'parameters' => [
748                'fileId' => [
749                  'location' => 'path',
750                  'type' => 'string',
751                  'required' => true,
752                ],
753                'acknowledgeAbuse' => [
754                  'location' => 'query',
755                  'type' => 'boolean',
756                ],
757                'includePermissionsForView' => [
758                  'location' => 'query',
759                  'type' => 'string',
760                ],
761                'supportsAllDrives' => [
762                  'location' => 'query',
763                  'type' => 'boolean',
764                ],
765                'supportsTeamDrives' => [
766                  'location' => 'query',
767                  'type' => 'boolean',
768                ],
769              ],
770            ],
771          ]
772        ]
773    );
774    $this->permissions = new Drive\Resource\Permissions(
775        $this,
776        $this->serviceName,
777        'permissions',
778        [
779          'methods' => [
780            'create' => [
781              'path' => 'files/{fileId}/permissions',
782              'httpMethod' => 'POST',
783              'parameters' => [
784                'fileId' => [
785                  'location' => 'path',
786                  'type' => 'string',
787                  'required' => true,
788                ],
789                'emailMessage' => [
790                  'location' => 'query',
791                  'type' => 'string',
792                ],
793                'enforceSingleParent' => [
794                  'location' => 'query',
795                  'type' => 'boolean',
796                ],
797                'moveToNewOwnersRoot' => [
798                  'location' => 'query',
799                  'type' => 'boolean',
800                ],
801                'sendNotificationEmail' => [
802                  'location' => 'query',
803                  'type' => 'boolean',
804                ],
805                'supportsAllDrives' => [
806                  'location' => 'query',
807                  'type' => 'boolean',
808                ],
809                'supportsTeamDrives' => [
810                  'location' => 'query',
811                  'type' => 'boolean',
812                ],
813                'transferOwnership' => [
814                  'location' => 'query',
815                  'type' => 'boolean',
816                ],
817                'useDomainAdminAccess' => [
818                  'location' => 'query',
819                  'type' => 'boolean',
820                ],
821              ],
822            ],'delete' => [
823              'path' => 'files/{fileId}/permissions/{permissionId}',
824              'httpMethod' => 'DELETE',
825              'parameters' => [
826                'fileId' => [
827                  'location' => 'path',
828                  'type' => 'string',
829                  'required' => true,
830                ],
831                'permissionId' => [
832                  'location' => 'path',
833                  'type' => 'string',
834                  'required' => true,
835                ],
836                'supportsAllDrives' => [
837                  'location' => 'query',
838                  'type' => 'boolean',
839                ],
840                'supportsTeamDrives' => [
841                  'location' => 'query',
842                  'type' => 'boolean',
843                ],
844                'useDomainAdminAccess' => [
845                  'location' => 'query',
846                  'type' => 'boolean',
847                ],
848              ],
849            ],'get' => [
850              'path' => 'files/{fileId}/permissions/{permissionId}',
851              'httpMethod' => 'GET',
852              'parameters' => [
853                'fileId' => [
854                  'location' => 'path',
855                  'type' => 'string',
856                  'required' => true,
857                ],
858                'permissionId' => [
859                  'location' => 'path',
860                  'type' => 'string',
861                  'required' => true,
862                ],
863                'supportsAllDrives' => [
864                  'location' => 'query',
865                  'type' => 'boolean',
866                ],
867                'supportsTeamDrives' => [
868                  'location' => 'query',
869                  'type' => 'boolean',
870                ],
871                'useDomainAdminAccess' => [
872                  'location' => 'query',
873                  'type' => 'boolean',
874                ],
875              ],
876            ],'list' => [
877              'path' => 'files/{fileId}/permissions',
878              'httpMethod' => 'GET',
879              'parameters' => [
880                'fileId' => [
881                  'location' => 'path',
882                  'type' => 'string',
883                  'required' => true,
884                ],
885                'includePermissionsForView' => [
886                  'location' => 'query',
887                  'type' => 'string',
888                ],
889                'pageSize' => [
890                  'location' => 'query',
891                  'type' => 'integer',
892                ],
893                'pageToken' => [
894                  'location' => 'query',
895                  'type' => 'string',
896                ],
897                'supportsAllDrives' => [
898                  'location' => 'query',
899                  'type' => 'boolean',
900                ],
901                'supportsTeamDrives' => [
902                  'location' => 'query',
903                  'type' => 'boolean',
904                ],
905                'useDomainAdminAccess' => [
906                  'location' => 'query',
907                  'type' => 'boolean',
908                ],
909              ],
910            ],'update' => [
911              'path' => 'files/{fileId}/permissions/{permissionId}',
912              'httpMethod' => 'PATCH',
913              'parameters' => [
914                'fileId' => [
915                  'location' => 'path',
916                  'type' => 'string',
917                  'required' => true,
918                ],
919                'permissionId' => [
920                  'location' => 'path',
921                  'type' => 'string',
922                  'required' => true,
923                ],
924                'removeExpiration' => [
925                  'location' => 'query',
926                  'type' => 'boolean',
927                ],
928                'supportsAllDrives' => [
929                  'location' => 'query',
930                  'type' => 'boolean',
931                ],
932                'supportsTeamDrives' => [
933                  'location' => 'query',
934                  'type' => 'boolean',
935                ],
936                'transferOwnership' => [
937                  'location' => 'query',
938                  'type' => 'boolean',
939                ],
940                'useDomainAdminAccess' => [
941                  'location' => 'query',
942                  'type' => 'boolean',
943                ],
944              ],
945            ],
946          ]
947        ]
948    );
949    $this->replies = new Drive\Resource\Replies(
950        $this,
951        $this->serviceName,
952        'replies',
953        [
954          'methods' => [
955            'create' => [
956              'path' => 'files/{fileId}/comments/{commentId}/replies',
957              'httpMethod' => 'POST',
958              'parameters' => [
959                'fileId' => [
960                  'location' => 'path',
961                  'type' => 'string',
962                  'required' => true,
963                ],
964                'commentId' => [
965                  'location' => 'path',
966                  'type' => 'string',
967                  'required' => true,
968                ],
969              ],
970            ],'delete' => [
971              'path' => 'files/{fileId}/comments/{commentId}/replies/{replyId}',
972              'httpMethod' => 'DELETE',
973              'parameters' => [
974                'fileId' => [
975                  'location' => 'path',
976                  'type' => 'string',
977                  'required' => true,
978                ],
979                'commentId' => [
980                  'location' => 'path',
981                  'type' => 'string',
982                  'required' => true,
983                ],
984                'replyId' => [
985                  'location' => 'path',
986                  'type' => 'string',
987                  'required' => true,
988                ],
989              ],
990            ],'get' => [
991              'path' => 'files/{fileId}/comments/{commentId}/replies/{replyId}',
992              'httpMethod' => 'GET',
993              'parameters' => [
994                'fileId' => [
995                  'location' => 'path',
996                  'type' => 'string',
997                  'required' => true,
998                ],
999                'commentId' => [
1000                  'location' => 'path',
1001                  'type' => 'string',
1002                  'required' => true,
1003                ],
1004                'replyId' => [
1005                  'location' => 'path',
1006                  'type' => 'string',
1007                  'required' => true,
1008                ],
1009                'includeDeleted' => [
1010                  'location' => 'query',
1011                  'type' => 'boolean',
1012                ],
1013              ],
1014            ],'list' => [
1015              'path' => 'files/{fileId}/comments/{commentId}/replies',
1016              'httpMethod' => 'GET',
1017              'parameters' => [
1018                'fileId' => [
1019                  'location' => 'path',
1020                  'type' => 'string',
1021                  'required' => true,
1022                ],
1023                'commentId' => [
1024                  'location' => 'path',
1025                  'type' => 'string',
1026                  'required' => true,
1027                ],
1028                'includeDeleted' => [
1029                  'location' => 'query',
1030                  'type' => 'boolean',
1031                ],
1032                'pageSize' => [
1033                  'location' => 'query',
1034                  'type' => 'integer',
1035                ],
1036                'pageToken' => [
1037                  'location' => 'query',
1038                  'type' => 'string',
1039                ],
1040              ],
1041            ],'update' => [
1042              'path' => 'files/{fileId}/comments/{commentId}/replies/{replyId}',
1043              'httpMethod' => 'PATCH',
1044              'parameters' => [
1045                'fileId' => [
1046                  'location' => 'path',
1047                  'type' => 'string',
1048                  'required' => true,
1049                ],
1050                'commentId' => [
1051                  'location' => 'path',
1052                  'type' => 'string',
1053                  'required' => true,
1054                ],
1055                'replyId' => [
1056                  'location' => 'path',
1057                  'type' => 'string',
1058                  'required' => true,
1059                ],
1060              ],
1061            ],
1062          ]
1063        ]
1064    );
1065    $this->revisions = new Drive\Resource\Revisions(
1066        $this,
1067        $this->serviceName,
1068        'revisions',
1069        [
1070          'methods' => [
1071            'delete' => [
1072              'path' => 'files/{fileId}/revisions/{revisionId}',
1073              'httpMethod' => 'DELETE',
1074              'parameters' => [
1075                'fileId' => [
1076                  'location' => 'path',
1077                  'type' => 'string',
1078                  'required' => true,
1079                ],
1080                'revisionId' => [
1081                  'location' => 'path',
1082                  'type' => 'string',
1083                  'required' => true,
1084                ],
1085              ],
1086            ],'get' => [
1087              'path' => 'files/{fileId}/revisions/{revisionId}',
1088              'httpMethod' => 'GET',
1089              'parameters' => [
1090                'fileId' => [
1091                  'location' => 'path',
1092                  'type' => 'string',
1093                  'required' => true,
1094                ],
1095                'revisionId' => [
1096                  'location' => 'path',
1097                  'type' => 'string',
1098                  'required' => true,
1099                ],
1100                'acknowledgeAbuse' => [
1101                  'location' => 'query',
1102                  'type' => 'boolean',
1103                ],
1104              ],
1105            ],'list' => [
1106              'path' => 'files/{fileId}/revisions',
1107              'httpMethod' => 'GET',
1108              'parameters' => [
1109                'fileId' => [
1110                  'location' => 'path',
1111                  'type' => 'string',
1112                  'required' => true,
1113                ],
1114                'pageSize' => [
1115                  'location' => 'query',
1116                  'type' => 'integer',
1117                ],
1118                'pageToken' => [
1119                  'location' => 'query',
1120                  'type' => 'string',
1121                ],
1122              ],
1123            ],'update' => [
1124              'path' => 'files/{fileId}/revisions/{revisionId}',
1125              'httpMethod' => 'PATCH',
1126              'parameters' => [
1127                'fileId' => [
1128                  'location' => 'path',
1129                  'type' => 'string',
1130                  'required' => true,
1131                ],
1132                'revisionId' => [
1133                  'location' => 'path',
1134                  'type' => 'string',
1135                  'required' => true,
1136                ],
1137              ],
1138            ],
1139          ]
1140        ]
1141    );
1142    $this->teamdrives = new Drive\Resource\Teamdrives(
1143        $this,
1144        $this->serviceName,
1145        'teamdrives',
1146        [
1147          'methods' => [
1148            'create' => [
1149              'path' => 'teamdrives',
1150              'httpMethod' => 'POST',
1151              'parameters' => [
1152                'requestId' => [
1153                  'location' => 'query',
1154                  'type' => 'string',
1155                  'required' => true,
1156                ],
1157              ],
1158            ],'delete' => [
1159              'path' => 'teamdrives/{teamDriveId}',
1160              'httpMethod' => 'DELETE',
1161              'parameters' => [
1162                'teamDriveId' => [
1163                  'location' => 'path',
1164                  'type' => 'string',
1165                  'required' => true,
1166                ],
1167              ],
1168            ],'get' => [
1169              'path' => 'teamdrives/{teamDriveId}',
1170              'httpMethod' => 'GET',
1171              'parameters' => [
1172                'teamDriveId' => [
1173                  'location' => 'path',
1174                  'type' => 'string',
1175                  'required' => true,
1176                ],
1177                'useDomainAdminAccess' => [
1178                  'location' => 'query',
1179                  'type' => 'boolean',
1180                ],
1181              ],
1182            ],'list' => [
1183              'path' => 'teamdrives',
1184              'httpMethod' => 'GET',
1185              'parameters' => [
1186                'pageSize' => [
1187                  'location' => 'query',
1188                  'type' => 'integer',
1189                ],
1190                'pageToken' => [
1191                  'location' => 'query',
1192                  'type' => 'string',
1193                ],
1194                'q' => [
1195                  'location' => 'query',
1196                  'type' => 'string',
1197                ],
1198                'useDomainAdminAccess' => [
1199                  'location' => 'query',
1200                  'type' => 'boolean',
1201                ],
1202              ],
1203            ],'update' => [
1204              'path' => 'teamdrives/{teamDriveId}',
1205              'httpMethod' => 'PATCH',
1206              'parameters' => [
1207                'teamDriveId' => [
1208                  'location' => 'path',
1209                  'type' => 'string',
1210                  'required' => true,
1211                ],
1212                'useDomainAdminAccess' => [
1213                  'location' => 'query',
1214                  'type' => 'boolean',
1215                ],
1216              ],
1217            ],
1218          ]
1219        ]
1220    );
1221  }
1222}
1223
1224// Adding a class alias for backwards compatibility with the previous class name.
1225class_alias(Drive::class, 'Google_Service_Drive');
1226