blob: df2239ed2867e4cb7b3f2df1c5a490d512896e56 [file] [log] [blame]
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="drive_v3.html">Drive API</a> . <a href="drive_v3.permissions.html">permissions</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#create">create(fileId, body=None, moveToNewOwnersRoot=None, enforceSingleParent=None, sendNotificationEmail=None, supportsTeamDrives=None, supportsAllDrives=None, transferOwnership=None, emailMessage=None, useDomainAdminAccess=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Creates a permission for a file or shared drive.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080080<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070081 <code><a href="#delete">delete(fileId, permissionId, supportsTeamDrives=None, supportsAllDrives=None, useDomainAdminAccess=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080082<p class="firstline">Deletes a permission.</p>
83<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070084 <code><a href="#get">get(fileId, permissionId, supportsTeamDrives=None, supportsAllDrives=None, useDomainAdminAccess=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080085<p class="firstline">Gets a permission by ID.</p>
86<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087 <code><a href="#list">list(fileId, pageSize=None, pageToken=None, supportsTeamDrives=None, supportsAllDrives=None, useDomainAdminAccess=None)</a></code></p>
88<p class="firstline">Lists a file's or shared drive's permissions.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080089<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070090 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#update">update(fileId, permissionId, body=None, removeExpiration=None, supportsTeamDrives=None, supportsAllDrives=None, useDomainAdminAccess=None, transferOwnership=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080094<p class="firstline">Updates a permission with patch semantics.</p>
95<h3>Method Details</h3>
96<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070097 <code class="details" id="create">create(fileId, body=None, moveToNewOwnersRoot=None, enforceSingleParent=None, sendNotificationEmail=None, supportsTeamDrives=None, supportsAllDrives=None, transferOwnership=None, emailMessage=None, useDomainAdminAccess=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070098 <pre>Creates a permission for a file or shared drive.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080099
100Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700101 fileId: string, The ID of the file or shared drive. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800103 The object takes the form of:
104
105{ # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
106 "domain": "A String", # The domain to which this permission refers.
Dan O'Mearadd494642020-05-01 07:42:23 -0700107 "displayName": "A String", # The "pretty" name of the value of the permission. The following is a list of examples for each type of permission:
108 # - user - User's full name, as defined for their Google account, such as "Joe Smith."
109 # - group - Name of the Google Group, such as "The Company Administrators."
110 # - domain - String domain name, such as "thecompany.com."
111 # - anyone - No displayName is present.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
113 {
114 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
115 "role": "A String", # Deprecated - use permissionDetails/role instead.
116 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
117 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
118 },
119 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800120 "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700121 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700122 "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission".
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800123 "emailAddress": "A String", # The email address of the user or group to which this permission refers.
124 "photoLink": "A String", # A link to the user's profile photo, if available.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700125 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
126 {
127 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
128 # - organizer
129 # - fileOrganizer
130 # - writer
131 # - commenter
132 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -0700133 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700134 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
135 # - file
136 # - member
137 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
138 },
139 ],
140 "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
141 # - They can only be set on user and group permissions
142 # - The time must be in the future
143 # - The time cannot be more than a year in the future
144 "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800145 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700146 # - organizer
147 # - fileOrganizer
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800148 # - writer
149 # - commenter
150 # - reader
151 "type": "A String", # The type of the grantee. Valid values are:
152 # - user
153 # - group
154 # - domain
Dan O'Mearadd494642020-05-01 07:42:23 -0700155 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for a anyone type.
156 "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800157}
158
Dan O'Mearadd494642020-05-01 07:42:23 -0700159 moveToNewOwnersRoot: boolean, This parameter only takes effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. When set to true, the item is moved to the new owner's My Drive root folder and all prior parents removed. If set to false, when enforceSingleParent=true, parents are not changed. If set to false, when enforceSingleParent=false, existing parents are not changed; however, the file will be added to the new owner's My Drive root folder, unless it is already in the new owner's My Drive.
160 enforceSingleParent: boolean, Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter only takes effect if the item is not in a shared drive. See moveToNewOwnersRoot for details.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800161 sendNotificationEmail: boolean, Whether to send a notification email when sharing to users or groups. This defaults to true for users and groups, and is not allowed for other requests. It must not be disabled for ownership transfers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700162 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
163 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800164 transferOwnership: boolean, Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700165 emailMessage: string, A plain text custom message to include in the notification email.
166 useDomainAdminAccess: boolean, Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800167
168Returns:
169 An object of the form:
170
171 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
172 "domain": "A String", # The domain to which this permission refers.
Dan O'Mearadd494642020-05-01 07:42:23 -0700173 "displayName": "A String", # The "pretty" name of the value of the permission. The following is a list of examples for each type of permission:
174 # - user - User's full name, as defined for their Google account, such as "Joe Smith."
175 # - group - Name of the Google Group, such as "The Company Administrators."
176 # - domain - String domain name, such as "thecompany.com."
177 # - anyone - No displayName is present.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700178 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
179 {
180 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
181 "role": "A String", # Deprecated - use permissionDetails/role instead.
182 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
183 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
184 },
185 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800186 "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700187 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700188 "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission".
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800189 "emailAddress": "A String", # The email address of the user or group to which this permission refers.
190 "photoLink": "A String", # A link to the user's profile photo, if available.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700191 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
192 {
193 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
194 # - organizer
195 # - fileOrganizer
196 # - writer
197 # - commenter
198 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -0700199 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700200 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
201 # - file
202 # - member
203 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
204 },
205 ],
206 "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
207 # - They can only be set on user and group permissions
208 # - The time must be in the future
209 # - The time cannot be more than a year in the future
210 "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800211 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700212 # - organizer
213 # - fileOrganizer
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800214 # - writer
215 # - commenter
216 # - reader
217 "type": "A String", # The type of the grantee. Valid values are:
218 # - user
219 # - group
220 # - domain
Dan O'Mearadd494642020-05-01 07:42:23 -0700221 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for a anyone type.
222 "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800223 }</pre>
224</div>
225
226<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700227 <code class="details" id="delete">delete(fileId, permissionId, supportsTeamDrives=None, supportsAllDrives=None, useDomainAdminAccess=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800228 <pre>Deletes a permission.
229
230Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700231 fileId: string, The ID of the file or shared drive. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800232 permissionId: string, The ID of the permission. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700233 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
234 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
235 useDomainAdminAccess: boolean, Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800236</pre>
237</div>
238
239<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700240 <code class="details" id="get">get(fileId, permissionId, supportsTeamDrives=None, supportsAllDrives=None, useDomainAdminAccess=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800241 <pre>Gets a permission by ID.
242
243Args:
244 fileId: string, The ID of the file. (required)
245 permissionId: string, The ID of the permission. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700246 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
247 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
248 useDomainAdminAccess: boolean, Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800249
250Returns:
251 An object of the form:
252
253 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
254 "domain": "A String", # The domain to which this permission refers.
Dan O'Mearadd494642020-05-01 07:42:23 -0700255 "displayName": "A String", # The "pretty" name of the value of the permission. The following is a list of examples for each type of permission:
256 # - user - User's full name, as defined for their Google account, such as "Joe Smith."
257 # - group - Name of the Google Group, such as "The Company Administrators."
258 # - domain - String domain name, such as "thecompany.com."
259 # - anyone - No displayName is present.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700260 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
261 {
262 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
263 "role": "A String", # Deprecated - use permissionDetails/role instead.
264 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
265 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
266 },
267 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800268 "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700269 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700270 "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission".
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800271 "emailAddress": "A String", # The email address of the user or group to which this permission refers.
272 "photoLink": "A String", # A link to the user's profile photo, if available.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700273 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
274 {
275 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
276 # - organizer
277 # - fileOrganizer
278 # - writer
279 # - commenter
280 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -0700281 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700282 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
283 # - file
284 # - member
285 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
286 },
287 ],
288 "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
289 # - They can only be set on user and group permissions
290 # - The time must be in the future
291 # - The time cannot be more than a year in the future
292 "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800293 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700294 # - organizer
295 # - fileOrganizer
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800296 # - writer
297 # - commenter
298 # - reader
299 "type": "A String", # The type of the grantee. Valid values are:
300 # - user
301 # - group
302 # - domain
Dan O'Mearadd494642020-05-01 07:42:23 -0700303 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for a anyone type.
304 "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800305 }</pre>
306</div>
307
308<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700309 <code class="details" id="list">list(fileId, pageSize=None, pageToken=None, supportsTeamDrives=None, supportsAllDrives=None, useDomainAdminAccess=None)</code>
310 <pre>Lists a file's or shared drive's permissions.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800311
312Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700313 fileId: string, The ID of the file or shared drive. (required)
314 pageSize: integer, The maximum number of permissions to return per page. When not set for files in a shared drive, at most 100 results will be returned. When not set for files that are not in a shared drive, the entire list will be returned.
315 pageToken: string, The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.
316 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
317 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
318 useDomainAdminAccess: boolean, Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800319
320Returns:
321 An object of the form:
322
323 { # A list of permissions for a file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700324 "nextPageToken": "A String", # The page token for the next page of permissions. This field will be absent if the end of the permissions list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700325 "kind": "drive#permissionList", # Identifies what kind of resource this is. Value: the fixed string "drive#permissionList".
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700326 "permissions": [ # The list of permissions. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800327 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
328 "domain": "A String", # The domain to which this permission refers.
Dan O'Mearadd494642020-05-01 07:42:23 -0700329 "displayName": "A String", # The "pretty" name of the value of the permission. The following is a list of examples for each type of permission:
330 # - user - User's full name, as defined for their Google account, such as "Joe Smith."
331 # - group - Name of the Google Group, such as "The Company Administrators."
332 # - domain - String domain name, such as "thecompany.com."
333 # - anyone - No displayName is present.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700334 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
335 {
336 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
337 "role": "A String", # Deprecated - use permissionDetails/role instead.
338 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
339 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
340 },
341 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800342 "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700343 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700344 "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission".
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800345 "emailAddress": "A String", # The email address of the user or group to which this permission refers.
346 "photoLink": "A String", # A link to the user's profile photo, if available.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700347 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
348 {
349 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
350 # - organizer
351 # - fileOrganizer
352 # - writer
353 # - commenter
354 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -0700355 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700356 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
357 # - file
358 # - member
359 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
360 },
361 ],
362 "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
363 # - They can only be set on user and group permissions
364 # - The time must be in the future
365 # - The time cannot be more than a year in the future
366 "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800367 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700368 # - organizer
369 # - fileOrganizer
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800370 # - writer
371 # - commenter
372 # - reader
373 "type": "A String", # The type of the grantee. Valid values are:
374 # - user
375 # - group
376 # - domain
Dan O'Mearadd494642020-05-01 07:42:23 -0700377 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for a anyone type.
378 "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800379 },
380 ],
381 }</pre>
382</div>
383
384<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700385 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
386 <pre>Retrieves the next page of results.
387
388Args:
389 previous_request: The request for the previous page. (required)
390 previous_response: The response from the request for the previous page. (required)
391
392Returns:
393 A request object that you can call 'execute()' on to request the next
394 page. Returns None if there are no more items in the collection.
395 </pre>
396</div>
397
398<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700399 <code class="details" id="update">update(fileId, permissionId, body=None, removeExpiration=None, supportsTeamDrives=None, supportsAllDrives=None, useDomainAdminAccess=None, transferOwnership=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800400 <pre>Updates a permission with patch semantics.
401
402Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700403 fileId: string, The ID of the file or shared drive. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800404 permissionId: string, The ID of the permission. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700405 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800406 The object takes the form of:
407
408{ # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
409 "domain": "A String", # The domain to which this permission refers.
Dan O'Mearadd494642020-05-01 07:42:23 -0700410 "displayName": "A String", # The "pretty" name of the value of the permission. The following is a list of examples for each type of permission:
411 # - user - User's full name, as defined for their Google account, such as "Joe Smith."
412 # - group - Name of the Google Group, such as "The Company Administrators."
413 # - domain - String domain name, such as "thecompany.com."
414 # - anyone - No displayName is present.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700415 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
416 {
417 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
418 "role": "A String", # Deprecated - use permissionDetails/role instead.
419 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
420 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
421 },
422 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800423 "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700424 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700425 "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission".
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800426 "emailAddress": "A String", # The email address of the user or group to which this permission refers.
427 "photoLink": "A String", # A link to the user's profile photo, if available.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700428 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
429 {
430 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
431 # - organizer
432 # - fileOrganizer
433 # - writer
434 # - commenter
435 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -0700436 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700437 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
438 # - file
439 # - member
440 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
441 },
442 ],
443 "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
444 # - They can only be set on user and group permissions
445 # - The time must be in the future
446 # - The time cannot be more than a year in the future
447 "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800448 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700449 # - organizer
450 # - fileOrganizer
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800451 # - writer
452 # - commenter
453 # - reader
454 "type": "A String", # The type of the grantee. Valid values are:
455 # - user
456 # - group
457 # - domain
Dan O'Mearadd494642020-05-01 07:42:23 -0700458 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for a anyone type.
459 "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800460}
461
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700462 removeExpiration: boolean, Whether to remove the expiration date.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700463 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
464 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
465 useDomainAdminAccess: boolean, Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800466 transferOwnership: boolean, Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect.
467
468Returns:
469 An object of the form:
470
471 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
472 "domain": "A String", # The domain to which this permission refers.
Dan O'Mearadd494642020-05-01 07:42:23 -0700473 "displayName": "A String", # The "pretty" name of the value of the permission. The following is a list of examples for each type of permission:
474 # - user - User's full name, as defined for their Google account, such as "Joe Smith."
475 # - group - Name of the Google Group, such as "The Company Administrators."
476 # - domain - String domain name, such as "thecompany.com."
477 # - anyone - No displayName is present.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700478 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
479 {
480 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
481 "role": "A String", # Deprecated - use permissionDetails/role instead.
482 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
483 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
484 },
485 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800486 "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700487 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700488 "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission".
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800489 "emailAddress": "A String", # The email address of the user or group to which this permission refers.
490 "photoLink": "A String", # A link to the user's profile photo, if available.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700491 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
492 {
493 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
494 # - organizer
495 # - fileOrganizer
496 # - writer
497 # - commenter
498 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -0700499 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700500 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
501 # - file
502 # - member
503 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
504 },
505 ],
506 "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
507 # - They can only be set on user and group permissions
508 # - The time must be in the future
509 # - The time cannot be more than a year in the future
510 "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800511 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700512 # - organizer
513 # - fileOrganizer
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800514 # - writer
515 # - commenter
516 # - reader
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800517 "type": "A String", # The type of the grantee. Valid values are:
518 # - user
519 # - group
520 # - domain
Dan O'Mearadd494642020-05-01 07:42:23 -0700521 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for a anyone type.
522 "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800523 }</pre>
524</div>
525
526</body></html>