PageRenderTime 59ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 1ms

/lib/google/src/Google/Service/Drive.php

https://bitbucket.org/moodle/moodle
PHP | 5775 lines | 4719 code | 209 blank | 847 comment | 0 complexity | ad6db14b18940915d03c426efb07e51d MD5 | raw file
Possible License(s): Apache-2.0, LGPL-2.1, BSD-3-Clause, MIT, GPL-3.0

Large files files are truncated, but you can click here to view the full file

  1. <?php
  2. /*
  3. * Copyright 2010 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. /**
  18. * Service definition for Drive (v2).
  19. *
  20. * <p>
  21. * The API to interact with Drive.</p>
  22. *
  23. * <p>
  24. * For more information about this service, see the API
  25. * <a href="https://developers.google.com/drive/" target="_blank">Documentation</a>
  26. * </p>
  27. *
  28. * @author Google, Inc.
  29. */
  30. class Google_Service_Drive extends Google_Service
  31. {
  32. /** View and manage the files in your Google Drive. */
  33. const DRIVE =
  34. "https://www.googleapis.com/auth/drive";
  35. /** View and manage its own configuration data in your Google Drive. */
  36. const DRIVE_APPDATA =
  37. "https://www.googleapis.com/auth/drive.appdata";
  38. /** View your Google Drive apps. */
  39. const DRIVE_APPS_READONLY =
  40. "https://www.googleapis.com/auth/drive.apps.readonly";
  41. /** View and manage Google Drive files and folders that you have opened or created with this app. */
  42. const DRIVE_FILE =
  43. "https://www.googleapis.com/auth/drive.file";
  44. /** View and manage metadata of files in your Google Drive. */
  45. const DRIVE_METADATA =
  46. "https://www.googleapis.com/auth/drive.metadata";
  47. /** View metadata for files in your Google Drive. */
  48. const DRIVE_METADATA_READONLY =
  49. "https://www.googleapis.com/auth/drive.metadata.readonly";
  50. /** View the photos, videos and albums in your Google Photos. */
  51. const DRIVE_PHOTOS_READONLY =
  52. "https://www.googleapis.com/auth/drive.photos.readonly";
  53. /** View the files in your Google Drive. */
  54. const DRIVE_READONLY =
  55. "https://www.googleapis.com/auth/drive.readonly";
  56. /** Modify your Google Apps Script scripts' behavior. */
  57. const DRIVE_SCRIPTS =
  58. "https://www.googleapis.com/auth/drive.scripts";
  59. public $about;
  60. public $apps;
  61. public $changes;
  62. public $channels;
  63. public $children;
  64. public $comments;
  65. public $files;
  66. public $parents;
  67. public $permissions;
  68. public $properties;
  69. public $realtime;
  70. public $replies;
  71. public $revisions;
  72. /**
  73. * Constructs the internal representation of the Drive service.
  74. *
  75. * @param Google_Client $client
  76. */
  77. public function __construct(Google_Client $client)
  78. {
  79. parent::__construct($client);
  80. $this->rootUrl = 'https://www.googleapis.com/';
  81. $this->servicePath = 'drive/v2/';
  82. $this->version = 'v2';
  83. $this->serviceName = 'drive';
  84. $this->about = new Google_Service_Drive_About_Resource(
  85. $this,
  86. $this->serviceName,
  87. 'about',
  88. array(
  89. 'methods' => array(
  90. 'get' => array(
  91. 'path' => 'about',
  92. 'httpMethod' => 'GET',
  93. 'parameters' => array(
  94. 'includeSubscribed' => array(
  95. 'location' => 'query',
  96. 'type' => 'boolean',
  97. ),
  98. 'maxChangeIdCount' => array(
  99. 'location' => 'query',
  100. 'type' => 'string',
  101. ),
  102. 'startChangeId' => array(
  103. 'location' => 'query',
  104. 'type' => 'string',
  105. ),
  106. ),
  107. ),
  108. )
  109. )
  110. );
  111. $this->apps = new Google_Service_Drive_Apps_Resource(
  112. $this,
  113. $this->serviceName,
  114. 'apps',
  115. array(
  116. 'methods' => array(
  117. 'get' => array(
  118. 'path' => 'apps/{appId}',
  119. 'httpMethod' => 'GET',
  120. 'parameters' => array(
  121. 'appId' => array(
  122. 'location' => 'path',
  123. 'type' => 'string',
  124. 'required' => true,
  125. ),
  126. ),
  127. ),'list' => array(
  128. 'path' => 'apps',
  129. 'httpMethod' => 'GET',
  130. 'parameters' => array(
  131. 'languageCode' => array(
  132. 'location' => 'query',
  133. 'type' => 'string',
  134. ),
  135. 'appFilterExtensions' => array(
  136. 'location' => 'query',
  137. 'type' => 'string',
  138. ),
  139. 'appFilterMimeTypes' => array(
  140. 'location' => 'query',
  141. 'type' => 'string',
  142. ),
  143. ),
  144. ),
  145. )
  146. )
  147. );
  148. $this->changes = new Google_Service_Drive_Changes_Resource(
  149. $this,
  150. $this->serviceName,
  151. 'changes',
  152. array(
  153. 'methods' => array(
  154. 'get' => array(
  155. 'path' => 'changes/{changeId}',
  156. 'httpMethod' => 'GET',
  157. 'parameters' => array(
  158. 'changeId' => array(
  159. 'location' => 'path',
  160. 'type' => 'string',
  161. 'required' => true,
  162. ),
  163. ),
  164. ),'list' => array(
  165. 'path' => 'changes',
  166. 'httpMethod' => 'GET',
  167. 'parameters' => array(
  168. 'includeSubscribed' => array(
  169. 'location' => 'query',
  170. 'type' => 'boolean',
  171. ),
  172. 'includeDeleted' => array(
  173. 'location' => 'query',
  174. 'type' => 'boolean',
  175. ),
  176. 'maxResults' => array(
  177. 'location' => 'query',
  178. 'type' => 'integer',
  179. ),
  180. 'pageToken' => array(
  181. 'location' => 'query',
  182. 'type' => 'string',
  183. ),
  184. 'spaces' => array(
  185. 'location' => 'query',
  186. 'type' => 'string',
  187. ),
  188. 'startChangeId' => array(
  189. 'location' => 'query',
  190. 'type' => 'string',
  191. ),
  192. ),
  193. ),'watch' => array(
  194. 'path' => 'changes/watch',
  195. 'httpMethod' => 'POST',
  196. 'parameters' => array(
  197. 'includeSubscribed' => array(
  198. 'location' => 'query',
  199. 'type' => 'boolean',
  200. ),
  201. 'includeDeleted' => array(
  202. 'location' => 'query',
  203. 'type' => 'boolean',
  204. ),
  205. 'maxResults' => array(
  206. 'location' => 'query',
  207. 'type' => 'integer',
  208. ),
  209. 'pageToken' => array(
  210. 'location' => 'query',
  211. 'type' => 'string',
  212. ),
  213. 'spaces' => array(
  214. 'location' => 'query',
  215. 'type' => 'string',
  216. ),
  217. 'startChangeId' => array(
  218. 'location' => 'query',
  219. 'type' => 'string',
  220. ),
  221. ),
  222. ),
  223. )
  224. )
  225. );
  226. $this->channels = new Google_Service_Drive_Channels_Resource(
  227. $this,
  228. $this->serviceName,
  229. 'channels',
  230. array(
  231. 'methods' => array(
  232. 'stop' => array(
  233. 'path' => 'channels/stop',
  234. 'httpMethod' => 'POST',
  235. 'parameters' => array(),
  236. ),
  237. )
  238. )
  239. );
  240. $this->children = new Google_Service_Drive_Children_Resource(
  241. $this,
  242. $this->serviceName,
  243. 'children',
  244. array(
  245. 'methods' => array(
  246. 'delete' => array(
  247. 'path' => 'files/{folderId}/children/{childId}',
  248. 'httpMethod' => 'DELETE',
  249. 'parameters' => array(
  250. 'folderId' => array(
  251. 'location' => 'path',
  252. 'type' => 'string',
  253. 'required' => true,
  254. ),
  255. 'childId' => array(
  256. 'location' => 'path',
  257. 'type' => 'string',
  258. 'required' => true,
  259. ),
  260. ),
  261. ),'get' => array(
  262. 'path' => 'files/{folderId}/children/{childId}',
  263. 'httpMethod' => 'GET',
  264. 'parameters' => array(
  265. 'folderId' => array(
  266. 'location' => 'path',
  267. 'type' => 'string',
  268. 'required' => true,
  269. ),
  270. 'childId' => array(
  271. 'location' => 'path',
  272. 'type' => 'string',
  273. 'required' => true,
  274. ),
  275. ),
  276. ),'insert' => array(
  277. 'path' => 'files/{folderId}/children',
  278. 'httpMethod' => 'POST',
  279. 'parameters' => array(
  280. 'folderId' => array(
  281. 'location' => 'path',
  282. 'type' => 'string',
  283. 'required' => true,
  284. ),
  285. ),
  286. ),'list' => array(
  287. 'path' => 'files/{folderId}/children',
  288. 'httpMethod' => 'GET',
  289. 'parameters' => array(
  290. 'folderId' => array(
  291. 'location' => 'path',
  292. 'type' => 'string',
  293. 'required' => true,
  294. ),
  295. 'orderBy' => array(
  296. 'location' => 'query',
  297. 'type' => 'string',
  298. ),
  299. 'pageToken' => array(
  300. 'location' => 'query',
  301. 'type' => 'string',
  302. ),
  303. 'q' => array(
  304. 'location' => 'query',
  305. 'type' => 'string',
  306. ),
  307. 'maxResults' => array(
  308. 'location' => 'query',
  309. 'type' => 'integer',
  310. ),
  311. ),
  312. ),
  313. )
  314. )
  315. );
  316. $this->comments = new Google_Service_Drive_Comments_Resource(
  317. $this,
  318. $this->serviceName,
  319. 'comments',
  320. array(
  321. 'methods' => array(
  322. 'delete' => array(
  323. 'path' => 'files/{fileId}/comments/{commentId}',
  324. 'httpMethod' => 'DELETE',
  325. 'parameters' => array(
  326. 'fileId' => array(
  327. 'location' => 'path',
  328. 'type' => 'string',
  329. 'required' => true,
  330. ),
  331. 'commentId' => array(
  332. 'location' => 'path',
  333. 'type' => 'string',
  334. 'required' => true,
  335. ),
  336. ),
  337. ),'get' => array(
  338. 'path' => 'files/{fileId}/comments/{commentId}',
  339. 'httpMethod' => 'GET',
  340. 'parameters' => array(
  341. 'fileId' => array(
  342. 'location' => 'path',
  343. 'type' => 'string',
  344. 'required' => true,
  345. ),
  346. 'commentId' => array(
  347. 'location' => 'path',
  348. 'type' => 'string',
  349. 'required' => true,
  350. ),
  351. 'includeDeleted' => array(
  352. 'location' => 'query',
  353. 'type' => 'boolean',
  354. ),
  355. ),
  356. ),'insert' => array(
  357. 'path' => 'files/{fileId}/comments',
  358. 'httpMethod' => 'POST',
  359. 'parameters' => array(
  360. 'fileId' => array(
  361. 'location' => 'path',
  362. 'type' => 'string',
  363. 'required' => true,
  364. ),
  365. ),
  366. ),'list' => array(
  367. 'path' => 'files/{fileId}/comments',
  368. 'httpMethod' => 'GET',
  369. 'parameters' => array(
  370. 'fileId' => array(
  371. 'location' => 'path',
  372. 'type' => 'string',
  373. 'required' => true,
  374. ),
  375. 'pageToken' => array(
  376. 'location' => 'query',
  377. 'type' => 'string',
  378. ),
  379. 'updatedMin' => array(
  380. 'location' => 'query',
  381. 'type' => 'string',
  382. ),
  383. 'includeDeleted' => array(
  384. 'location' => 'query',
  385. 'type' => 'boolean',
  386. ),
  387. 'maxResults' => array(
  388. 'location' => 'query',
  389. 'type' => 'integer',
  390. ),
  391. ),
  392. ),'patch' => array(
  393. 'path' => 'files/{fileId}/comments/{commentId}',
  394. 'httpMethod' => 'PATCH',
  395. 'parameters' => array(
  396. 'fileId' => array(
  397. 'location' => 'path',
  398. 'type' => 'string',
  399. 'required' => true,
  400. ),
  401. 'commentId' => array(
  402. 'location' => 'path',
  403. 'type' => 'string',
  404. 'required' => true,
  405. ),
  406. ),
  407. ),'update' => array(
  408. 'path' => 'files/{fileId}/comments/{commentId}',
  409. 'httpMethod' => 'PUT',
  410. 'parameters' => array(
  411. 'fileId' => array(
  412. 'location' => 'path',
  413. 'type' => 'string',
  414. 'required' => true,
  415. ),
  416. 'commentId' => array(
  417. 'location' => 'path',
  418. 'type' => 'string',
  419. 'required' => true,
  420. ),
  421. ),
  422. ),
  423. )
  424. )
  425. );
  426. $this->files = new Google_Service_Drive_Files_Resource(
  427. $this,
  428. $this->serviceName,
  429. 'files',
  430. array(
  431. 'methods' => array(
  432. 'copy' => array(
  433. 'path' => 'files/{fileId}/copy',
  434. 'httpMethod' => 'POST',
  435. 'parameters' => array(
  436. 'fileId' => array(
  437. 'location' => 'path',
  438. 'type' => 'string',
  439. 'required' => true,
  440. ),
  441. 'convert' => array(
  442. 'location' => 'query',
  443. 'type' => 'boolean',
  444. ),
  445. 'ocrLanguage' => array(
  446. 'location' => 'query',
  447. 'type' => 'string',
  448. ),
  449. 'visibility' => array(
  450. 'location' => 'query',
  451. 'type' => 'string',
  452. ),
  453. 'pinned' => array(
  454. 'location' => 'query',
  455. 'type' => 'boolean',
  456. ),
  457. 'ocr' => array(
  458. 'location' => 'query',
  459. 'type' => 'boolean',
  460. ),
  461. 'timedTextTrackName' => array(
  462. 'location' => 'query',
  463. 'type' => 'string',
  464. ),
  465. 'timedTextLanguage' => array(
  466. 'location' => 'query',
  467. 'type' => 'string',
  468. ),
  469. ),
  470. ),'delete' => array(
  471. 'path' => 'files/{fileId}',
  472. 'httpMethod' => 'DELETE',
  473. 'parameters' => array(
  474. 'fileId' => array(
  475. 'location' => 'path',
  476. 'type' => 'string',
  477. 'required' => true,
  478. ),
  479. ),
  480. ),'emptyTrash' => array(
  481. 'path' => 'files/trash',
  482. 'httpMethod' => 'DELETE',
  483. 'parameters' => array(),
  484. ),'generateIds' => array(
  485. 'path' => 'files/generateIds',
  486. 'httpMethod' => 'GET',
  487. 'parameters' => array(
  488. 'maxResults' => array(
  489. 'location' => 'query',
  490. 'type' => 'integer',
  491. ),
  492. 'space' => array(
  493. 'location' => 'query',
  494. 'type' => 'string',
  495. ),
  496. ),
  497. ),'get' => array(
  498. 'path' => 'files/{fileId}',
  499. 'httpMethod' => 'GET',
  500. 'parameters' => array(
  501. 'fileId' => array(
  502. 'location' => 'path',
  503. 'type' => 'string',
  504. 'required' => true,
  505. ),
  506. 'acknowledgeAbuse' => array(
  507. 'location' => 'query',
  508. 'type' => 'boolean',
  509. ),
  510. 'updateViewedDate' => array(
  511. 'location' => 'query',
  512. 'type' => 'boolean',
  513. ),
  514. 'revisionId' => array(
  515. 'location' => 'query',
  516. 'type' => 'string',
  517. ),
  518. 'projection' => array(
  519. 'location' => 'query',
  520. 'type' => 'string',
  521. ),
  522. ),
  523. ),'insert' => array(
  524. 'path' => 'files',
  525. 'httpMethod' => 'POST',
  526. 'parameters' => array(
  527. 'convert' => array(
  528. 'location' => 'query',
  529. 'type' => 'boolean',
  530. ),
  531. 'useContentAsIndexableText' => array(
  532. 'location' => 'query',
  533. 'type' => 'boolean',
  534. ),
  535. 'ocrLanguage' => array(
  536. 'location' => 'query',
  537. 'type' => 'string',
  538. ),
  539. 'visibility' => array(
  540. 'location' => 'query',
  541. 'type' => 'string',
  542. ),
  543. 'pinned' => array(
  544. 'location' => 'query',
  545. 'type' => 'boolean',
  546. ),
  547. 'ocr' => array(
  548. 'location' => 'query',
  549. 'type' => 'boolean',
  550. ),
  551. 'timedTextTrackName' => array(
  552. 'location' => 'query',
  553. 'type' => 'string',
  554. ),
  555. 'timedTextLanguage' => array(
  556. 'location' => 'query',
  557. 'type' => 'string',
  558. ),
  559. ),
  560. ),'list' => array(
  561. 'path' => 'files',
  562. 'httpMethod' => 'GET',
  563. 'parameters' => array(
  564. 'orderBy' => array(
  565. 'location' => 'query',
  566. 'type' => 'string',
  567. ),
  568. 'projection' => array(
  569. 'location' => 'query',
  570. 'type' => 'string',
  571. ),
  572. 'maxResults' => array(
  573. 'location' => 'query',
  574. 'type' => 'integer',
  575. ),
  576. 'q' => array(
  577. 'location' => 'query',
  578. 'type' => 'string',
  579. ),
  580. 'pageToken' => array(
  581. 'location' => 'query',
  582. 'type' => 'string',
  583. ),
  584. 'spaces' => array(
  585. 'location' => 'query',
  586. 'type' => 'string',
  587. ),
  588. 'corpus' => array(
  589. 'location' => 'query',
  590. 'type' => 'string',
  591. ),
  592. ),
  593. ),'patch' => array(
  594. 'path' => 'files/{fileId}',
  595. 'httpMethod' => 'PATCH',
  596. 'parameters' => array(
  597. 'fileId' => array(
  598. 'location' => 'path',
  599. 'type' => 'string',
  600. 'required' => true,
  601. ),
  602. 'addParents' => array(
  603. 'location' => 'query',
  604. 'type' => 'string',
  605. ),
  606. 'modifiedDateBehavior' => array(
  607. 'location' => 'query',
  608. 'type' => 'string',
  609. ),
  610. 'removeParents' => array(
  611. 'location' => 'query',
  612. 'type' => 'string',
  613. ),
  614. 'updateViewedDate' => array(
  615. 'location' => 'query',
  616. 'type' => 'boolean',
  617. ),
  618. 'setModifiedDate' => array(
  619. 'location' => 'query',
  620. 'type' => 'boolean',
  621. ),
  622. 'useContentAsIndexableText' => array(
  623. 'location' => 'query',
  624. 'type' => 'boolean',
  625. ),
  626. 'convert' => array(
  627. 'location' => 'query',
  628. 'type' => 'boolean',
  629. ),
  630. 'ocrLanguage' => array(
  631. 'location' => 'query',
  632. 'type' => 'string',
  633. ),
  634. 'pinned' => array(
  635. 'location' => 'query',
  636. 'type' => 'boolean',
  637. ),
  638. 'newRevision' => array(
  639. 'location' => 'query',
  640. 'type' => 'boolean',
  641. ),
  642. 'ocr' => array(
  643. 'location' => 'query',
  644. 'type' => 'boolean',
  645. ),
  646. 'timedTextLanguage' => array(
  647. 'location' => 'query',
  648. 'type' => 'string',
  649. ),
  650. 'timedTextTrackName' => array(
  651. 'location' => 'query',
  652. 'type' => 'string',
  653. ),
  654. ),
  655. ),'touch' => array(
  656. 'path' => 'files/{fileId}/touch',
  657. 'httpMethod' => 'POST',
  658. 'parameters' => array(
  659. 'fileId' => array(
  660. 'location' => 'path',
  661. 'type' => 'string',
  662. 'required' => true,
  663. ),
  664. ),
  665. ),'trash' => array(
  666. 'path' => 'files/{fileId}/trash',
  667. 'httpMethod' => 'POST',
  668. 'parameters' => array(
  669. 'fileId' => array(
  670. 'location' => 'path',
  671. 'type' => 'string',
  672. 'required' => true,
  673. ),
  674. ),
  675. ),'untrash' => array(
  676. 'path' => 'files/{fileId}/untrash',
  677. 'httpMethod' => 'POST',
  678. 'parameters' => array(
  679. 'fileId' => array(
  680. 'location' => 'path',
  681. 'type' => 'string',
  682. 'required' => true,
  683. ),
  684. ),
  685. ),'update' => array(
  686. 'path' => 'files/{fileId}',
  687. 'httpMethod' => 'PUT',
  688. 'parameters' => array(
  689. 'fileId' => array(
  690. 'location' => 'path',
  691. 'type' => 'string',
  692. 'required' => true,
  693. ),
  694. 'addParents' => array(
  695. 'location' => 'query',
  696. 'type' => 'string',
  697. ),
  698. 'modifiedDateBehavior' => array(
  699. 'location' => 'query',
  700. 'type' => 'string',
  701. ),
  702. 'removeParents' => array(
  703. 'location' => 'query',
  704. 'type' => 'string',
  705. ),
  706. 'updateViewedDate' => array(
  707. 'location' => 'query',
  708. 'type' => 'boolean',
  709. ),
  710. 'setModifiedDate' => array(
  711. 'location' => 'query',
  712. 'type' => 'boolean',
  713. ),
  714. 'useContentAsIndexableText' => array(
  715. 'location' => 'query',
  716. 'type' => 'boolean',
  717. ),
  718. 'convert' => array(
  719. 'location' => 'query',
  720. 'type' => 'boolean',
  721. ),
  722. 'ocrLanguage' => array(
  723. 'location' => 'query',
  724. 'type' => 'string',
  725. ),
  726. 'pinned' => array(
  727. 'location' => 'query',
  728. 'type' => 'boolean',
  729. ),
  730. 'newRevision' => array(
  731. 'location' => 'query',
  732. 'type' => 'boolean',
  733. ),
  734. 'ocr' => array(
  735. 'location' => 'query',
  736. 'type' => 'boolean',
  737. ),
  738. 'timedTextLanguage' => array(
  739. 'location' => 'query',
  740. 'type' => 'string',
  741. ),
  742. 'timedTextTrackName' => array(
  743. 'location' => 'query',
  744. 'type' => 'string',
  745. ),
  746. ),
  747. ),'watch' => array(
  748. 'path' => 'files/{fileId}/watch',
  749. 'httpMethod' => 'POST',
  750. 'parameters' => array(
  751. 'fileId' => array(
  752. 'location' => 'path',
  753. 'type' => 'string',
  754. 'required' => true,
  755. ),
  756. 'acknowledgeAbuse' => array(
  757. 'location' => 'query',
  758. 'type' => 'boolean',
  759. ),
  760. 'updateViewedDate' => array(
  761. 'location' => 'query',
  762. 'type' => 'boolean',
  763. ),
  764. 'revisionId' => array(
  765. 'location' => 'query',
  766. 'type' => 'string',
  767. ),
  768. 'projection' => array(
  769. 'location' => 'query',
  770. 'type' => 'string',
  771. ),
  772. ),
  773. ),
  774. )
  775. )
  776. );
  777. $this->parents = new Google_Service_Drive_Parents_Resource(
  778. $this,
  779. $this->serviceName,
  780. 'parents',
  781. array(
  782. 'methods' => array(
  783. 'delete' => array(
  784. 'path' => 'files/{fileId}/parents/{parentId}',
  785. 'httpMethod' => 'DELETE',
  786. 'parameters' => array(
  787. 'fileId' => array(
  788. 'location' => 'path',
  789. 'type' => 'string',
  790. 'required' => true,
  791. ),
  792. 'parentId' => array(
  793. 'location' => 'path',
  794. 'type' => 'string',
  795. 'required' => true,
  796. ),
  797. ),
  798. ),'get' => array(
  799. 'path' => 'files/{fileId}/parents/{parentId}',
  800. 'httpMethod' => 'GET',
  801. 'parameters' => array(
  802. 'fileId' => array(
  803. 'location' => 'path',
  804. 'type' => 'string',
  805. 'required' => true,
  806. ),
  807. 'parentId' => array(
  808. 'location' => 'path',
  809. 'type' => 'string',
  810. 'required' => true,
  811. ),
  812. ),
  813. ),'insert' => array(
  814. 'path' => 'files/{fileId}/parents',
  815. 'httpMethod' => 'POST',
  816. 'parameters' => array(
  817. 'fileId' => array(
  818. 'location' => 'path',
  819. 'type' => 'string',
  820. 'required' => true,
  821. ),
  822. ),
  823. ),'list' => array(
  824. 'path' => 'files/{fileId}/parents',
  825. 'httpMethod' => 'GET',
  826. 'parameters' => array(
  827. 'fileId' => array(
  828. 'location' => 'path',
  829. 'type' => 'string',
  830. 'required' => true,
  831. ),
  832. ),
  833. ),
  834. )
  835. )
  836. );
  837. $this->permissions = new Google_Service_Drive_Permissions_Resource(
  838. $this,
  839. $this->serviceName,
  840. 'permissions',
  841. array(
  842. 'methods' => array(
  843. 'delete' => array(
  844. 'path' => 'files/{fileId}/permissions/{permissionId}',
  845. 'httpMethod' => 'DELETE',
  846. 'parameters' => array(
  847. 'fileId' => array(
  848. 'location' => 'path',
  849. 'type' => 'string',
  850. 'required' => true,
  851. ),
  852. 'permissionId' => array(
  853. 'location' => 'path',
  854. 'type' => 'string',
  855. 'required' => true,
  856. ),
  857. ),
  858. ),'get' => array(
  859. 'path' => 'files/{fileId}/permissions/{permissionId}',
  860. 'httpMethod' => 'GET',
  861. 'parameters' => array(
  862. 'fileId' => array(
  863. 'location' => 'path',
  864. 'type' => 'string',
  865. 'required' => true,
  866. ),
  867. 'permissionId' => array(
  868. 'location' => 'path',
  869. 'type' => 'string',
  870. 'required' => true,
  871. ),
  872. ),
  873. ),'getIdForEmail' => array(
  874. 'path' => 'permissionIds/{email}',
  875. 'httpMethod' => 'GET',
  876. 'parameters' => array(
  877. 'email' => array(
  878. 'location' => 'path',
  879. 'type' => 'string',
  880. 'required' => true,
  881. ),
  882. ),
  883. ),'insert' => array(
  884. 'path' => 'files/{fileId}/permissions',
  885. 'httpMethod' => 'POST',
  886. 'parameters' => array(
  887. 'fileId' => array(
  888. 'location' => 'path',
  889. 'type' => 'string',
  890. 'required' => true,
  891. ),
  892. 'emailMessage' => array(
  893. 'location' => 'query',
  894. 'type' => 'string',
  895. ),
  896. 'sendNotificationEmails' => array(
  897. 'location' => 'query',
  898. 'type' => 'boolean',
  899. ),
  900. ),
  901. ),'list' => array(
  902. 'path' => 'files/{fileId}/permissions',
  903. 'httpMethod' => 'GET',
  904. 'parameters' => array(
  905. 'fileId' => array(
  906. 'location' => 'path',
  907. 'type' => 'string',
  908. 'required' => true,
  909. ),
  910. ),
  911. ),'patch' => array(
  912. 'path' => 'files/{fileId}/permissions/{permissionId}',
  913. 'httpMethod' => 'PATCH',
  914. 'parameters' => array(
  915. 'fileId' => array(
  916. 'location' => 'path',
  917. 'type' => 'string',
  918. 'required' => true,
  919. ),
  920. 'permissionId' => array(
  921. 'location' => 'path',
  922. 'type' => 'string',
  923. 'required' => true,
  924. ),
  925. 'transferOwnership' => array(
  926. 'location' => 'query',
  927. 'type' => 'boolean',
  928. ),
  929. ),
  930. ),'update' => array(
  931. 'path' => 'files/{fileId}/permissions/{permissionId}',
  932. 'httpMethod' => 'PUT',
  933. 'parameters' => array(
  934. 'fileId' => array(
  935. 'location' => 'path',
  936. 'type' => 'string',
  937. 'required' => true,
  938. ),
  939. 'permissionId' => array(
  940. 'location' => 'path',
  941. 'type' => 'string',
  942. 'required' => true,
  943. ),
  944. 'transferOwnership' => array(
  945. 'location' => 'query',
  946. 'type' => 'boolean',
  947. ),
  948. ),
  949. ),
  950. )
  951. )
  952. );
  953. $this->properties = new Google_Service_Drive_Properties_Resource(
  954. $this,
  955. $this->serviceName,
  956. 'properties',
  957. array(
  958. 'methods' => array(
  959. 'delete' => array(
  960. 'path' => 'files/{fileId}/properties/{propertyKey}',
  961. 'httpMethod' => 'DELETE',
  962. 'parameters' => array(
  963. 'fileId' => array(
  964. 'location' => 'path',
  965. 'type' => 'string',
  966. 'required' => true,
  967. ),
  968. 'propertyKey' => array(
  969. 'location' => 'path',
  970. 'type' => 'string',
  971. 'required' => true,
  972. ),
  973. 'visibility' => array(
  974. 'location' => 'query',
  975. 'type' => 'string',
  976. ),
  977. ),
  978. ),'get' => array(
  979. 'path' => 'files/{fileId}/properties/{propertyKey}',
  980. 'httpMethod' => 'GET',
  981. 'parameters' => array(
  982. 'fileId' => array(
  983. 'location' => 'path',
  984. 'type' => 'string',
  985. 'required' => true,
  986. ),
  987. 'propertyKey' => array(
  988. 'location' => 'path',
  989. 'type' => 'string',
  990. 'required' => true,
  991. ),
  992. 'visibility' => array(
  993. 'location' => 'query',
  994. 'type' => 'string',
  995. ),
  996. ),
  997. ),'insert' => array(
  998. 'path' => 'files/{fileId}/properties',
  999. 'httpMethod' => 'POST',
  1000. 'parameters' => array(
  1001. 'fileId' => array(
  1002. 'location' => 'path',
  1003. 'type' => 'string',
  1004. 'required' => true,
  1005. ),
  1006. ),
  1007. ),'list' => array(
  1008. 'path' => 'files/{fileId}/properties',
  1009. 'httpMethod' => 'GET',
  1010. 'parameters' => array(
  1011. 'fileId' => array(
  1012. 'location' => 'path',
  1013. 'type' => 'string',
  1014. 'required' => true,
  1015. ),
  1016. ),
  1017. ),'patch' => array(
  1018. 'path' => 'files/{fileId}/properties/{propertyKey}',
  1019. 'httpMethod' => 'PATCH',
  1020. 'parameters' => array(
  1021. 'fileId' => array(
  1022. 'location' => 'path',
  1023. 'type' => 'string',
  1024. 'required' => true,
  1025. ),
  1026. 'propertyKey' => array(
  1027. 'location' => 'path',
  1028. 'type' => 'string',
  1029. 'required' => true,
  1030. ),
  1031. 'visibility' => array(
  1032. 'location' => 'query',
  1033. 'type' => 'string',
  1034. ),
  1035. ),
  1036. ),'update' => array(
  1037. 'path' => 'files/{fileId}/properties/{propertyKey}',
  1038. 'httpMethod' => 'PUT',
  1039. 'parameters' => array(
  1040. 'fileId' => array(
  1041. 'location' => 'path',
  1042. 'type' => 'string',
  1043. 'required' => true,
  1044. ),
  1045. 'propertyKey' => array(
  1046. 'location' => 'path',
  1047. 'type' => 'string',
  1048. 'required' => true,
  1049. ),
  1050. 'visibility' => array(
  1051. 'location' => 'query',
  1052. 'type' => 'string',
  1053. ),
  1054. ),
  1055. ),
  1056. )
  1057. )
  1058. );
  1059. $this->realtime = new Google_Service_Drive_Realtime_Resource(
  1060. $this,
  1061. $this->serviceName,
  1062. 'realtime',
  1063. array(
  1064. 'methods' => array(
  1065. 'get' => array(
  1066. 'path' => 'files/{fileId}/realtime',
  1067. 'httpMethod' => 'GET',
  1068. 'parameters' => array(
  1069. 'fileId' => array(
  1070. 'location' => 'path',
  1071. 'type' => 'string',
  1072. 'required' => true,
  1073. ),
  1074. 'revision' => array(
  1075. 'location' => 'query',
  1076. 'type' => 'integer',
  1077. ),
  1078. ),
  1079. ),'update' => array(
  1080. 'path' => 'files/{fileId}/realtime',
  1081. 'httpMethod' => 'PUT',
  1082. 'parameters' => array(
  1083. 'fileId' => array(
  1084. 'location' => 'path',
  1085. 'type' => 'string',
  1086. 'required' => true,
  1087. ),
  1088. 'baseRevision' => array(
  1089. 'location' => 'query',
  1090. 'type' => 'string',
  1091. ),
  1092. ),
  1093. ),
  1094. )
  1095. )
  1096. );
  1097. $this->replies = new Google_Service_Drive_Replies_Resource(
  1098. $this,
  1099. $this->serviceName,
  1100. 'replies',
  1101. array(
  1102. 'methods' => array(
  1103. 'delete' => array(
  1104. 'path' => 'files/{fileId}/comments/{commentId}/replies/{replyId}',
  1105. 'httpMethod' => 'DELETE',
  1106. 'parameters' => array(
  1107. 'fileId' => array(
  1108. 'location' => 'path',
  1109. 'type' => 'string',
  1110. 'required' => true,
  1111. ),
  1112. 'commentId' => array(
  1113. 'location' => 'path',
  1114. 'type' => 'string',
  1115. 'required' => true,
  1116. ),
  1117. 'replyId' => array(
  1118. 'location' => 'path',
  1119. 'type' => 'string',
  1120. 'required' => true,
  1121. ),
  1122. ),
  1123. ),'get' => array(
  1124. 'path' => 'files/{fileId}/comments/{commentId}/replies/{replyId}',
  1125. 'httpMethod' => 'GET',
  1126. 'parameters' => array(
  1127. 'fileId' => array(
  1128. 'location' => 'path',
  1129. 'type' => 'string',
  1130. 'required' => true,
  1131. ),
  1132. 'commentId' => array(
  1133. 'location' => 'path',
  1134. 'type' => 'string',
  1135. 'required' => true,
  1136. ),
  1137. 'replyId' => array(
  1138. 'location' => 'path',
  1139. 'type' => 'string',
  1140. 'required' => true,
  1141. ),
  1142. 'includeDeleted' => array(
  1143. 'location' => 'query',
  1144. 'type' => 'boolean',
  1145. ),
  1146. ),
  1147. ),'insert' => array(
  1148. 'path' => 'files/{fileId}/comments/{commentId}/replies',
  1149. 'httpMethod' => 'POST',
  1150. 'parameters' => array(
  1151. 'fileId' => array(
  1152. 'location' => 'path',
  1153. 'type' => 'string',
  1154. 'required' => true,
  1155. ),
  1156. 'commentId' => array(
  1157. 'location' => 'path',
  1158. 'type' => 'string',
  1159. 'required' => true,
  1160. ),
  1161. ),
  1162. ),'list' => array(
  1163. 'path' => 'files/{fileId}/comments/{commentId}/replies',
  1164. 'httpMethod' => 'GET',
  1165. 'parameters' => array(
  1166. 'fileId' => array(
  1167. 'location' => 'path',
  1168. 'type' => 'string',
  1169. 'required' => true,
  1170. ),
  1171. 'commentId' => array(
  1172. 'location' => 'path',
  1173. 'type' => 'string',
  1174. 'required' => true,
  1175. ),
  1176. 'pageToken' => array(
  1177. 'location' => 'query',
  1178. 'type' => 'string',
  1179. ),
  1180. 'includeDeleted' => array(
  1181. 'location' => 'query',
  1182. 'type' => 'boolean',
  1183. ),
  1184. 'maxResults' => array(
  1185. 'location' => 'query',
  1186. 'type' => 'integer',
  1187. ),
  1188. ),
  1189. ),'patch' => array(
  1190. 'path' => 'files/{fileId}/comments/{commentId}/replies/{replyId}',
  1191. 'httpMethod' => 'PATCH',
  1192. 'parameters' => array(
  1193. 'fileId' => array(
  1194. 'location' => 'path',
  1195. 'type' => 'string',
  1196. 'required' => true,
  1197. ),
  1198. 'commentId' => array(
  1199. 'location' => 'path',
  1200. 'type' => 'string',
  1201. 'required' => true,
  1202. ),
  1203. 'replyId' => array(
  1204. 'location' => 'path',
  1205. 'type' => 'string',
  1206. 'required' => true,
  1207. ),
  1208. ),
  1209. ),'update' => array(
  1210. 'path' => 'files/{fileId}/comments/{commentId}/replies/{replyId}',
  1211. 'httpMethod' => 'PUT',
  1212. 'parameters' => array(
  1213. 'fileId' => array(
  1214. 'location' => 'path',
  1215. 'type' => 'string',
  1216. 'required' => true,
  1217. ),
  1218. 'commentId' => array(
  1219. 'location' => 'path',
  1220. 'type' => 'string',
  1221. 'required' => true,
  1222. ),
  1223. 'replyId' => array(
  1224. 'location' => 'path',
  1225. 'type' => 'string',
  1226. 'required' => true,
  1227. ),
  1228. ),
  1229. ),
  1230. )
  1231. )
  1232. );
  1233. $this->revisions = new Google_Service_Drive_Revisions_Resource(
  1234. $this,
  1235. $this->serviceName,
  1236. 'revisions',
  1237. array(
  1238. 'methods' => array(
  1239. 'delete' => array(
  1240. 'path' => 'files/{fileId}/revisions/{revisionId}',
  1241. 'httpMethod' => 'DELETE',
  1242. 'parameters' => array(
  1243. 'fileId' => array(
  1244. 'location' => 'path',
  1245. 'type' => 'string',
  1246. 'required' => true,
  1247. ),
  1248. 'revisionId' => array(
  1249. 'location' => 'path',
  1250. 'type' => 'string',
  1251. 'required' => true,
  1252. ),
  1253. ),
  1254. ),'get' => array(
  1255. 'path' => 'files/{fileId}/revisions/{revisionId}',
  1256. 'httpMethod' => 'GET',
  1257. 'parameters' => array(
  1258. 'fileId' => array(
  1259. 'location' => 'path',
  1260. 'type' => 'string',
  1261. 'required' => true,
  1262. ),
  1263. 'revisionId' => array(
  1264. 'location' => 'path',
  1265. 'type' => 'string',
  1266. 'required' => true,
  1267. ),
  1268. ),
  1269. ),'list' => array(
  1270. 'path' => 'files/{fileId}/revisions',
  1271. 'httpMethod' => 'GET',
  1272. 'parameters' => array(
  1273. 'fileId' => array(
  1274. 'location' => 'path',
  1275. 'type' => 'string',
  1276. 'required' => true,
  1277. ),
  1278. ),
  1279. ),'patch' => array(
  1280. 'path' => 'files/{fileId}/revisions/{revisionId}',
  1281. 'httpMethod' => 'PATCH',
  1282. 'parameters' => array(
  1283. 'fileId' => array(
  1284. 'location' => 'path',
  1285. 'type' => 'string',
  1286. 'required' => true,
  1287. ),
  1288. 'revisionId' => array(
  1289. 'location' => 'path',
  1290. 'type' => 'string',
  1291. 'required' => true,
  1292. ),
  1293. ),
  1294. ),'update' => array(
  1295. 'path' => 'files/{fileId}/revisions/{revisionId}',
  1296. 'httpMethod' => 'PUT',
  1297. 'parameters' => array(
  1298. 'fileId' => array(
  1299. 'location' => 'path',
  1300. 'type' => 'string',
  1301. 'required' => true,
  1302. ),
  1303. 'revisionId' => array(
  1304. 'location' => 'path',
  1305. 'type' => 'string',
  1306. 'required' => true,
  1307. ),
  1308. ),
  1309. ),
  1310. )
  1311. )
  1312. );
  1313. }
  1314. }
  1315. /**
  1316. * The "about" collection of methods.
  1317. * Typical usage is:
  1318. * <code>
  1319. * $driveService = new Google_Service_Drive(...);
  1320. * $about = $driveService->about;
  1321. * </code>
  1322. */
  1323. class Google_Service_Drive_About_Resource extends Google_Service_Resource
  1324. {
  1325. /**
  1326. * Gets the information about the current user along with Drive API settings
  1327. * (about.get)
  1328. *
  1329. * @param array $optParams Optional parameters.
  1330. *
  1331. * @opt_param bool includeSubscribed When calculating the number of remaining
  1332. * change IDs, whether to include public files the user has opened and shared
  1333. * files. When set to false, this counts only change IDs for owned files and any
  1334. * shared or public files that the user has explicitly added to a folder they
  1335. * own.
  1336. * @opt_param string maxChangeIdCount Maximum number of remaining change IDs to
  1337. * count
  1338. * @opt_param string startChangeId Change ID to start counting from when
  1339. * calculating number of remaining change IDs
  1340. * @return Google_Service_Drive_About
  1341. */
  1342. public function get($optParams = array())
  1343. {
  1344. $params = array();
  1345. $params = array_merge($params, $optParams);
  1346. return $this->call('get', array($params), "Google_Service_Drive_About");
  1347. }
  1348. }
  1349. /**
  1350. * The "apps" collection of methods.
  1351. * Typical usage is:
  1352. * <code>
  1353. * $driveService = new Google_Service_Drive(...);
  1354. * $apps = $driveService->apps;
  1355. * </code>
  1356. */
  1357. class Google_Service_Drive_Apps_Resource extends Google_Service_Resource
  1358. {
  1359. /**
  1360. * Gets a specific app. (apps.get)
  1361. *
  1362. * @param string $appId The ID of the app.
  1363. * @param array $optParams Optional parameters.
  1364. * @return Google_Service_Drive_App
  1365. */
  1366. public function get($appId, $optParams = array())
  1367. {
  1368. $params = array('appId' => $appId);
  1369. $params = array_merge($params, $optParams);
  1370. return $this->call('get', array($params), "Google_Service_Drive_App");
  1371. }
  1372. /**
  1373. * Lists a user's installed apps. (apps.listApps)
  1374. *
  1375. * @param array $optParams Optional parameters.
  1376. *
  1377. * @opt_param string languageCode A language or locale code, as defined by BCP
  1378. * 47, with some extensions from Unicode's LDML format
  1379. * (http://www.unicode.org/reports/tr35/).
  1380. * @opt_param string appFilterExtensions A comma-separated list of file
  1381. * extensions for open with filtering. All apps within the given app query scope
  1382. * which can open any of the given file extensions will be included in the
  1383. * response. If appFilterMimeTypes are provided as well, the result is a union
  1384. * of the two resulting app lists.
  1385. * @opt_param string appFilterMimeTypes A comma-separated list of MIME types for
  1386. * open with filtering. All apps within the given app query scope which can open
  1387. * any of the given MIME types will be included in the response. If
  1388. * appFilterExtensions are provided as well, the result is a union of the two
  1389. * resulting app lists.
  1390. * @return Google_Service_Drive_AppList
  1391. */
  1392. public function listApps($optParams = array())
  1393. {
  1394. $params = array();
  1395. $params = array_merge($params, $optParams);
  1396. return $this->call('list', array($params), "Google_Service_Drive_AppList");
  1397. }
  1398. }
  1399. /**
  1400. * The "changes" collection of methods.
  1401. * Typical usage is:
  1402. * <code>
  1403. * $driveService = new Google_Service_Drive(...);
  1404. * $changes = $driveService->changes;
  1405. * </code>
  1406. */
  1407. class Google_Service_Drive_Changes_Resource extends Google_Service_Resource
  1408. {
  1409. /**
  1410. * Gets a specific change. (changes.get)
  1411. *
  1412. * @param string $changeId The ID of the change.
  1413. * @param array $optParams Optional parameters.
  1414. * @return Google_Service_Drive_Change
  1415. */
  1416. public function get($changeId, $optParams = array())
  1417. {
  1418. $params = array('changeId' => $changeId);
  1419. $params = array_merge($params, $optParams);
  1420. return $this->call('get', array($params), "Google_Service_Drive_Change");
  1421. }
  1422. /**
  1423. * Lists the changes for a user. (changes.listChanges)
  1424. *
  1425. * @param array $optParams Optional parameters.
  1426. *
  1427. * @opt_param bool includeSubscribed Whether to include public files the user
  1428. * has opened and shared files. When set to false, the list only includes owned
  1429. * files plus any shared or public files the user has explicitly added to a
  1430. * folder they own.
  1431. * @opt_param bool includeDeleted Whether to include deleted items.
  1432. * @opt_param int maxResults Maximum number of changes to return.
  1433. * @opt_param string pageToken Page token for changes.
  1434. * @opt_param string spaces A comma-separated list of spaces to query. Supported
  1435. * values are 'drive', 'appDataFolder' and 'photos'.
  1436. * @opt_param string startChangeId Change ID to start listing changes from.
  1437. * @return Google_Service_Drive_ChangeList
  1438. */
  1439. public function listChanges($optParams = array())
  1440. {
  1441. $params = array();
  1442. $params = array_merge($params, $optParams);
  1443. return $this->call('list', array($params), "Google_Service_Drive_ChangeList");
  1444. }
  1445. /**
  1446. * Subscribe to changes for a user. (changes.watch)
  1447. *
  1448. * @param Google_Channel $postBody
  1449. * @param array $optParams Optional parameters.
  1450. *
  1451. * @opt_param bool includeSubscribed Whether to include public files the user
  1452. * has opened and shared files. When set to false, the list only includes owned
  1453. * files plus any shared or public files the user has explicitly added to a
  1454. * folder they own.
  1455. * @opt_param bool includeDeleted Whether to include deleted items.
  1456. * @opt_param int maxResults Maximum number of changes to return.
  1457. * @opt_param string pageToken Page token for changes.
  1458. * @opt_param string spaces A comma-separated list of spaces to query. Supported
  1459. * values are 'drive', 'appDataFolder' and 'photos'.
  1460. * @opt_param string startChangeId Change ID to start listing changes from.
  1461. * @return Google_Service_Drive_Channel
  1462. */
  1463. public function watch(Google_Service_Drive_Channel $postBody, $optParams = array())
  1464. {
  1465. $params = array('postBody' => $postBody);
  1466. $params = array_merge($params, $optPara

Large files files are truncated, but you can click here to view the full file