Google_PermissionsServiceResource

The "permissions" collection of methods.

Defined (1)

The class is defined in the following location(s).

/inc/google-api-php-client/src/contrib/Google_DriveService.php  
  1. class Google_PermissionsServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Inserts a permission for a file. (permissions.insert) 
  6. * @param string $fileId The ID for the file. 
  7. * @param Google_Permission $postBody 
  8. * @param array $optParams Optional parameters. 
  9. * @opt_param bool sendNotificationEmails Whether to send notification emails. 
  10. * @return Google_Permission 
  11. */ 
  12. public function insert($fileId, Google_Permission $postBody, $optParams = array()) { 
  13. $params = array('fileId' => $fileId, 'postBody' => $postBody); 
  14. $params = array_merge($params, $optParams); 
  15. $data = $this->__call('insert', array($params)); 
  16. if ($this->useObjects()) { 
  17. return new Google_Permission($data); 
  18. } else { 
  19. return $data; 
  20. /** 
  21. * Gets a permission by ID. (permissions.get) 
  22. * @param string $fileId The ID for the file. 
  23. * @param string $permissionId The ID for the permission. 
  24. * @param array $optParams Optional parameters. 
  25. * @return Google_Permission 
  26. */ 
  27. public function get($fileId, $permissionId, $optParams = array()) { 
  28. $params = array('fileId' => $fileId, 'permissionId' => $permissionId); 
  29. $params = array_merge($params, $optParams); 
  30. $data = $this->__call('get', array($params)); 
  31. if ($this->useObjects()) { 
  32. return new Google_Permission($data); 
  33. } else { 
  34. return $data; 
  35. /** 
  36. * Lists a file's permissions. (permissions.list) 
  37. * @param string $fileId The ID for the file. 
  38. * @param array $optParams Optional parameters. 
  39. * @return Google_PermissionList 
  40. */ 
  41. public function listPermissions($fileId, $optParams = array()) { 
  42. $params = array('fileId' => $fileId); 
  43. $params = array_merge($params, $optParams); 
  44. $data = $this->__call('list', array($params)); 
  45. if ($this->useObjects()) { 
  46. return new Google_PermissionList($data); 
  47. } else { 
  48. return $data; 
  49. /** 
  50. * Updates a permission. (permissions.update) 
  51. * @param string $fileId The ID for the file. 
  52. * @param string $permissionId The ID for the permission. 
  53. * @param Google_Permission $postBody 
  54. * @param array $optParams Optional parameters. 
  55. * @return Google_Permission 
  56. */ 
  57. public function update($fileId, $permissionId, Google_Permission $postBody, $optParams = array()) { 
  58. $params = array('fileId' => $fileId, 'permissionId' => $permissionId, 'postBody' => $postBody); 
  59. $params = array_merge($params, $optParams); 
  60. $data = $this->__call('update', array($params)); 
  61. if ($this->useObjects()) { 
  62. return new Google_Permission($data); 
  63. } else { 
  64. return $data; 
  65. /** 
  66. * Updates a permission. This method supports patch semantics. (permissions.patch) 
  67. * @param string $fileId The ID for the file. 
  68. * @param string $permissionId The ID for the permission. 
  69. * @param Google_Permission $postBody 
  70. * @param array $optParams Optional parameters. 
  71. * @return Google_Permission 
  72. */ 
  73. public function patch($fileId, $permissionId, Google_Permission $postBody, $optParams = array()) { 
  74. $params = array('fileId' => $fileId, 'permissionId' => $permissionId, 'postBody' => $postBody); 
  75. $params = array_merge($params, $optParams); 
  76. $data = $this->__call('patch', array($params)); 
  77. if ($this->useObjects()) { 
  78. return new Google_Permission($data); 
  79. } else { 
  80. return $data; 
  81. /** 
  82. * Deletes a permission from a file. (permissions.delete) 
  83. * @param string $fileId The ID for the file. 
  84. * @param string $permissionId The ID for the permission. 
  85. * @param array $optParams Optional parameters. 
  86. */ 
  87. public function delete($fileId, $permissionId, $optParams = array()) { 
  88. $params = array('fileId' => $fileId, 'permissionId' => $permissionId); 
  89. $params = array_merge($params, $optParams); 
  90. $data = $this->__call('delete', array($params)); 
  91. return $data;