blob: 24f4acb8f3cd4022123b4f6f6fdbaf93b433aa20 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<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_v2.html">Drive API</a> . <a href="drive_v2.permissions.html">permissions</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070081 <code><a href="#delete">delete(fileId, permissionId, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Deletes a permission from a file or shared drive.</p>
John Asmuth614db982014-04-24 15:46:26 -040083<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070084 <code><a href="#get">get(fileId, permissionId, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040085<p class="firstline">Gets a permission by ID.</p>
86<p class="toc_element">
87 <code><a href="#getIdForEmail">getIdForEmail(email)</a></code></p>
88<p class="firstline">Returns the permission ID for an email address.</p>
89<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070090 <code><a href="#insert">insert(fileId, body=None, emailMessage=None, enforceSingleParent=None, moveToNewOwnersRoot=None, sendNotificationEmails=None, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Inserts a permission for a file or shared drive.</p>
John Asmuth614db982014-04-24 15:46:26 -040092<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070093 <code><a href="#list">list(fileId, includePermissionsForView=None, maxResults=None, pageToken=None, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Lists a file's or shared drive's permissions.</p>
John Asmuth614db982014-04-24 15:46:26 -040095<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040096 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070099 <code><a href="#patch">patch(fileId, permissionId, body=None, removeExpiration=None, supportsAllDrives=None, supportsTeamDrives=None, transferOwnership=None, useDomainAdminAccess=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700100<p class="firstline">Updates a permission using patch semantics.</p>
John Asmuth614db982014-04-24 15:46:26 -0400101<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700102 <code><a href="#update">update(fileId, permissionId, body=None, removeExpiration=None, supportsAllDrives=None, supportsTeamDrives=None, transferOwnership=None, useDomainAdminAccess=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400103<p class="firstline">Updates a permission.</p>
104<h3>Method Details</h3>
105<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700106 <code class="details" id="close">close()</code>
107 <pre>Close httplib2 connections.</pre>
108</div>
109
110<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700111 <code class="details" id="delete">delete(fileId, permissionId, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112 <pre>Deletes a permission from a file or shared drive.
John Asmuth614db982014-04-24 15:46:26 -0400113
114Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700115 fileId: string, The ID for the file or shared drive. (required)
John Asmuth614db982014-04-24 15:46:26 -0400116 permissionId: string, The ID for the permission. (required)
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700117 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700118 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700119 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.
John Asmuth614db982014-04-24 15:46:26 -0400120</pre>
121</div>
122
123<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700124 <code class="details" id="get">get(fileId, permissionId, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400125 <pre>Gets a permission by ID.
126
127Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700128 fileId: string, The ID for the file or shared drive. (required)
John Asmuth614db982014-04-24 15:46:26 -0400129 permissionId: string, The ID for the permission. (required)
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700130 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700131 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700132 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.
John Asmuth614db982014-04-24 15:46:26 -0400133
134Returns:
135 An object of the form:
136
137 { # A permission for a file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800138 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
139 &quot;A String&quot;,
140 ],
141 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
142 &quot;deleted&quot;: True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
143 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
144 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
145 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
146 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
147 # - They cannot be set on shared drive items
148 # - They can only be set on user and group permissions
149 # - The date must be in the future
150 # - The date cannot be more than a year in the future
151 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
152 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
153 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
154 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
155 &quot;permissionDetails&quot;: [ # 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.
156 {
157 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
158 &quot;A String&quot;,
159 ],
160 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
161 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
162 &quot;permissionType&quot;: &quot;A String&quot;, # The permission type for this user. While new values may be added in future, the following are currently possible:
163 # - file
164 # - member
165 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
166 # - organizer
167 # - fileOrganizer
168 # - writer
169 # - reader
170 },
171 ],
172 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
173 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
174 # - owner
175 # - organizer
176 # - fileOrganizer
177 # - writer
178 # - reader
179 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
180 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
181 {
182 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
183 &quot;A String&quot;,
184 ],
185 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
186 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
187 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
188 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
189 },
190 ],
191 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
192 # - user
193 # - group
194 # - domain
195 # - anyone
196 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
197 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
198 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
199}</pre>
John Asmuth614db982014-04-24 15:46:26 -0400200</div>
201
202<div class="method">
203 <code class="details" id="getIdForEmail">getIdForEmail(email)</code>
204 <pre>Returns the permission ID for an email address.
205
206Args:
207 email: string, The email address for which to return a permission ID (required)
208
209Returns:
210 An object of the form:
211
212 { # An ID for a user or group as seen in Permission items.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800213 &quot;id&quot;: &quot;A String&quot;, # The permission ID.
214 &quot;kind&quot;: &quot;drive#permissionId&quot;, # This is always drive#permissionId.
215}</pre>
John Asmuth614db982014-04-24 15:46:26 -0400216</div>
217
218<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700219 <code class="details" id="insert">insert(fileId, body=None, emailMessage=None, enforceSingleParent=None, moveToNewOwnersRoot=None, sendNotificationEmails=None, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700220 <pre>Inserts a permission for a file or shared drive.
John Asmuth614db982014-04-24 15:46:26 -0400221
222Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700223 fileId: string, The ID for the file or shared drive. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700224 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400225 The object takes the form of:
226
227{ # A permission for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700228 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
229 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400230 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700231 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
232 &quot;deleted&quot;: True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
233 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
234 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
235 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
236 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -0700237 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400238 # - They can only be set on user and group permissions
239 # - The date must be in the future
240 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700241 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -0700242 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
243 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
244 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
245 &quot;permissionDetails&quot;: [ # 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.
246 {
247 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
248 &quot;A String&quot;,
249 ],
250 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
251 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
252 &quot;permissionType&quot;: &quot;A String&quot;, # The permission type for this user. While new values may be added in future, the following are currently possible:
253 # - file
254 # - member
255 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
256 # - organizer
257 # - fileOrganizer
258 # - writer
259 # - reader
260 },
261 ],
262 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
263 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -0400264 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700265 # - organizer
266 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -0400267 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700268 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700269 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
270 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
271 {
272 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
273 &quot;A String&quot;,
274 ],
275 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
276 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
277 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
278 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
279 },
280 ],
281 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -0400282 # - user
283 # - group
284 # - domain
285 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -0700286 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700287 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim65020912020-05-20 12:08:20 -0700288 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -0400289}
290
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700291 emailMessage: string, A plain text custom message to include in notification emails.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800292 enforceSingleParent: boolean, Deprecated. See moveToNewOwnersRoot for details.
293 moveToNewOwnersRoot: boolean, This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. If set to true, the item will be moved to the new owner&#x27;s My Drive root folder and all prior parents removed. If set to false, parents are not changed.
Bu Sun Kim65020912020-05-20 12:08:20 -0700294 sendNotificationEmails: boolean, Whether to send notification emails when sharing to users or groups. This parameter is ignored and an email is sent if the role is owner.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700295 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700296 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700297 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.
John Asmuth614db982014-04-24 15:46:26 -0400298
299Returns:
300 An object of the form:
301
302 { # A permission for a file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800303 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
304 &quot;A String&quot;,
305 ],
306 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
307 &quot;deleted&quot;: True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
308 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
309 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
310 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
311 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
312 # - They cannot be set on shared drive items
313 # - They can only be set on user and group permissions
314 # - The date must be in the future
315 # - The date cannot be more than a year in the future
316 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
317 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
318 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
319 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
320 &quot;permissionDetails&quot;: [ # 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.
321 {
322 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
323 &quot;A String&quot;,
324 ],
325 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
326 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
327 &quot;permissionType&quot;: &quot;A String&quot;, # The permission type for this user. While new values may be added in future, the following are currently possible:
328 # - file
329 # - member
330 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
331 # - organizer
332 # - fileOrganizer
333 # - writer
334 # - reader
335 },
336 ],
337 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
338 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
339 # - owner
340 # - organizer
341 # - fileOrganizer
342 # - writer
343 # - reader
344 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
345 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
346 {
347 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
348 &quot;A String&quot;,
349 ],
350 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
351 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
352 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
353 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
354 },
355 ],
356 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
357 # - user
358 # - group
359 # - domain
360 # - anyone
361 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
362 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
363 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
364}</pre>
John Asmuth614db982014-04-24 15:46:26 -0400365</div>
366
367<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700368 <code class="details" id="list">list(fileId, includePermissionsForView=None, maxResults=None, pageToken=None, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700369 <pre>Lists a file&#x27;s or shared drive&#x27;s permissions.
John Asmuth614db982014-04-24 15:46:26 -0400370
371Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700372 fileId: string, The ID for the file or shared drive. (required)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700373 includePermissionsForView: string, Specifies which additional view&#x27;s permissions to include in the response. Only &#x27;published&#x27; is supported.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700374 maxResults: 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700375 pageToken: string, The token for continuing a previous list request on the next page. This should be set to the value of &#x27;nextPageToken&#x27; from the previous response.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700376 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700377 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
378 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.
John Asmuth614db982014-04-24 15:46:26 -0400379
380Returns:
381 An object of the form:
382
383 { # A list of permissions associated with a file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800384 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the list.
385 &quot;items&quot;: [ # The list of permissions.
386 { # A permission for a file.
387 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
388 &quot;A String&quot;,
389 ],
390 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
391 &quot;deleted&quot;: True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
392 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
393 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
394 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
395 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
396 # - They cannot be set on shared drive items
397 # - They can only be set on user and group permissions
398 # - The date must be in the future
399 # - The date cannot be more than a year in the future
400 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
401 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
402 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
403 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
404 &quot;permissionDetails&quot;: [ # 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.
405 {
406 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
407 &quot;A String&quot;,
408 ],
409 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
410 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
411 &quot;permissionType&quot;: &quot;A String&quot;, # The permission type for this user. While new values may be added in future, the following are currently possible:
412 # - file
413 # - member
414 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
415 # - organizer
416 # - fileOrganizer
417 # - writer
418 # - reader
419 },
420 ],
421 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
422 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
423 # - owner
424 # - organizer
425 # - fileOrganizer
426 # - writer
427 # - reader
428 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
429 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
430 {
431 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
432 &quot;A String&quot;,
433 ],
434 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
435 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
436 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
437 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
438 },
439 ],
440 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
441 # - user
442 # - group
443 # - domain
444 # - anyone
445 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
446 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
447 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
448 },
449 ],
450 &quot;kind&quot;: &quot;drive#permissionList&quot;, # This is always drive#permissionList.
451 &quot;nextPageToken&quot;: &quot;A String&quot;, # 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.
452 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this list.
453}</pre>
John Asmuth614db982014-04-24 15:46:26 -0400454</div>
455
456<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400457 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
458 <pre>Retrieves the next page of results.
459
460Args:
461 previous_request: The request for the previous page. (required)
462 previous_response: The response from the request for the previous page. (required)
463
464Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700465 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400466 page. Returns None if there are no more items in the collection.
467 </pre>
468</div>
469
470<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700471 <code class="details" id="patch">patch(fileId, permissionId, body=None, removeExpiration=None, supportsAllDrives=None, supportsTeamDrives=None, transferOwnership=None, useDomainAdminAccess=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700472 <pre>Updates a permission using patch semantics.
John Asmuth614db982014-04-24 15:46:26 -0400473
474Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700475 fileId: string, The ID for the file or shared drive. (required)
John Asmuth614db982014-04-24 15:46:26 -0400476 permissionId: string, The ID for the permission. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700477 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400478 The object takes the form of:
479
480{ # A permission for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700481 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
482 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400483 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700484 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
485 &quot;deleted&quot;: True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
486 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
487 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
488 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
489 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -0700490 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400491 # - They can only be set on user and group permissions
492 # - The date must be in the future
493 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700494 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -0700495 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
496 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
497 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
498 &quot;permissionDetails&quot;: [ # 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.
499 {
500 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
501 &quot;A String&quot;,
502 ],
503 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
504 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
505 &quot;permissionType&quot;: &quot;A String&quot;, # The permission type for this user. While new values may be added in future, the following are currently possible:
506 # - file
507 # - member
508 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
509 # - organizer
510 # - fileOrganizer
511 # - writer
512 # - reader
513 },
514 ],
515 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
516 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -0400517 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700518 # - organizer
519 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -0400520 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700521 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700522 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
523 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
524 {
525 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
526 &quot;A String&quot;,
527 ],
528 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
529 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
530 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
531 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
532 },
533 ],
534 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -0400535 # - user
536 # - group
537 # - domain
538 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -0700539 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700540 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim65020912020-05-20 12:08:20 -0700541 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -0400542}
543
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700544 removeExpiration: boolean, Whether to remove the expiration date.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700545 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700546 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
547 transferOwnership: boolean, Whether changing a role to &#x27;owner&#x27; downgrades the current owners to writers. Does nothing if the specified role is not &#x27;owner&#x27;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700548 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.
John Asmuth614db982014-04-24 15:46:26 -0400549
550Returns:
551 An object of the form:
552
553 { # A permission for a file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800554 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
555 &quot;A String&quot;,
556 ],
557 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
558 &quot;deleted&quot;: True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
559 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
560 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
561 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
562 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
563 # - They cannot be set on shared drive items
564 # - They can only be set on user and group permissions
565 # - The date must be in the future
566 # - The date cannot be more than a year in the future
567 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
568 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
569 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
570 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
571 &quot;permissionDetails&quot;: [ # 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.
572 {
573 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
574 &quot;A String&quot;,
575 ],
576 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
577 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
578 &quot;permissionType&quot;: &quot;A String&quot;, # The permission type for this user. While new values may be added in future, the following are currently possible:
579 # - file
580 # - member
581 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
582 # - organizer
583 # - fileOrganizer
584 # - writer
585 # - reader
586 },
587 ],
588 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
589 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
590 # - owner
591 # - organizer
592 # - fileOrganizer
593 # - writer
594 # - reader
595 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
596 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
597 {
598 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
599 &quot;A String&quot;,
600 ],
601 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
602 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
603 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
604 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
605 },
606 ],
607 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
608 # - user
609 # - group
610 # - domain
611 # - anyone
612 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
613 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
614 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
615}</pre>
John Asmuth614db982014-04-24 15:46:26 -0400616</div>
617
618<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700619 <code class="details" id="update">update(fileId, permissionId, body=None, removeExpiration=None, supportsAllDrives=None, supportsTeamDrives=None, transferOwnership=None, useDomainAdminAccess=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400620 <pre>Updates a permission.
621
622Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700623 fileId: string, The ID for the file or shared drive. (required)
John Asmuth614db982014-04-24 15:46:26 -0400624 permissionId: string, The ID for the permission. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700625 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400626 The object takes the form of:
627
628{ # A permission for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700629 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
630 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400631 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700632 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
633 &quot;deleted&quot;: True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
634 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
635 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
636 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
637 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -0700638 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400639 # - They can only be set on user and group permissions
640 # - The date must be in the future
641 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700642 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -0700643 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
644 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
645 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
646 &quot;permissionDetails&quot;: [ # 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.
647 {
648 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
649 &quot;A String&quot;,
650 ],
651 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
652 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
653 &quot;permissionType&quot;: &quot;A String&quot;, # The permission type for this user. While new values may be added in future, the following are currently possible:
654 # - file
655 # - member
656 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
657 # - organizer
658 # - fileOrganizer
659 # - writer
660 # - reader
661 },
662 ],
663 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
664 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -0400665 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700666 # - organizer
667 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -0400668 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700669 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700670 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
671 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
672 {
673 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
674 &quot;A String&quot;,
675 ],
676 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
677 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
678 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
679 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
680 },
681 ],
682 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -0400683 # - user
684 # - group
685 # - domain
686 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -0700687 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700688 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim65020912020-05-20 12:08:20 -0700689 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -0400690}
691
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700692 removeExpiration: boolean, Whether to remove the expiration date.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700693 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700694 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
yoshi-code-bot1a4514d2021-07-13 00:20:24 -0700695 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. File owners can only transfer ownership of files existing on My Drive. Files existing in a shared drive are owned by the organization that owns that shared drive. Ownership transfers are not supported for files and folders in shared drives. Organizers of a shared drive can move items from that shared drive into their My Drive which transfers the ownership to them.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700696 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.
John Asmuth614db982014-04-24 15:46:26 -0400697
698Returns:
699 An object of the form:
700
701 { # A permission for a file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800702 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
703 &quot;A String&quot;,
704 ],
705 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
706 &quot;deleted&quot;: True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
707 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
708 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
709 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
710 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
711 # - They cannot be set on shared drive items
712 # - They can only be set on user and group permissions
713 # - The date must be in the future
714 # - The date cannot be more than a year in the future
715 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
716 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
717 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
718 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
719 &quot;permissionDetails&quot;: [ # 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.
720 {
721 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
722 &quot;A String&quot;,
723 ],
724 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
725 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
726 &quot;permissionType&quot;: &quot;A String&quot;, # The permission type for this user. While new values may be added in future, the following are currently possible:
727 # - file
728 # - member
729 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
730 # - organizer
731 # - fileOrganizer
732 # - writer
733 # - reader
734 },
735 ],
736 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
737 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
738 # - owner
739 # - organizer
740 # - fileOrganizer
741 # - writer
742 # - reader
743 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
744 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
745 {
746 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
747 &quot;A String&quot;,
748 ],
749 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
750 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
751 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
752 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
753 },
754 ],
755 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
756 # - user
757 # - group
758 # - domain
759 # - anyone
760 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
761 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
762 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
763}</pre>
John Asmuth614db982014-04-24 15:46:26 -0400764</div>
765
766</body></html>