1<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">
78  <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
81  <code><a href="#create">create(fileId, body=None, emailMessage=None, enforceSingleParent=None, moveToNewOwnersRoot=None, sendNotificationEmail=None, supportsAllDrives=None, supportsTeamDrives=None, transferOwnership=None, useDomainAdminAccess=None)</a></code></p>
82<p class="firstline">Creates a permission for a file or shared drive.</p>
83<p class="toc_element">
84  <code><a href="#delete">delete(fileId, permissionId, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</a></code></p>
85<p class="firstline">Deletes a permission.</p>
86<p class="toc_element">
87  <code><a href="#get">get(fileId, permissionId, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</a></code></p>
88<p class="firstline">Gets a permission by ID.</p>
89<p class="toc_element">
90  <code><a href="#list">list(fileId, includePermissionsForView=None, pageSize=None, pageToken=None, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</a></code></p>
91<p class="firstline">Lists a file's or shared drive's permissions.</p>
92<p class="toc_element">
93  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
96  <code><a href="#update">update(fileId, permissionId, body=None, removeExpiration=None, supportsAllDrives=None, supportsTeamDrives=None, transferOwnership=None, useDomainAdminAccess=None)</a></code></p>
97<p class="firstline">Updates a permission with patch semantics.</p>
98<h3>Method Details</h3>
99<div class="method">
100    <code class="details" id="close">close()</code>
101  <pre>Close httplib2 connections.</pre>
102</div>
103
104<div class="method">
105    <code class="details" id="create">create(fileId, body=None, emailMessage=None, enforceSingleParent=None, moveToNewOwnersRoot=None, sendNotificationEmail=None, supportsAllDrives=None, supportsTeamDrives=None, transferOwnership=None, useDomainAdminAccess=None)</code>
106  <pre>Creates a permission for a file or shared drive.
107
108Args:
109  fileId: string, The ID of the file or shared drive. (required)
110  body: object, The request body.
111    The object takes the form of:
112
113{ # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
114  &quot;allowFileDiscovery&quot;: 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.
115  &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.
116  &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
117      # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
118      # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
119      # - domain - String domain name, such as &quot;thecompany.com.&quot;
120      # - anyone - No displayName is present.
121  &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
122  &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
123  &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
124      # - They can only be set on user and group permissions
125      # - The time must be in the future
126      # - The time cannot be more than a year in the future
127  &quot;id&quot;: &quot;A String&quot;, # 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.
128  &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
129  &quot;pendingOwner&quot;: True or False, # Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that are not in a shared drive.
130  &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.
131    {
132      &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
133      &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
134      &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:
135          # - file
136          # - member
137      &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:
138          # - organizer
139          # - fileOrganizer
140          # - writer
141          # - commenter
142          # - reader
143    },
144  ],
145  &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
146  &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
147      # - owner
148      # - organizer
149      # - fileOrganizer
150      # - writer
151      # - commenter
152      # - reader
153  &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
154    {
155      &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
156      &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
157      &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
158      &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
159    },
160  ],
161  &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
162      # - user
163      # - group
164      # - domain
165      # - 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&#x27;t extra information required for a anyone type.
166  &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.
167}
168
169  emailMessage: string, A plain text custom message to include in the notification email.
170  enforceSingleParent: boolean, Deprecated. See moveToNewOwnersRoot for details.
171  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.
172  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.
173  supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
174  supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
175  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.
176  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.
177
178Returns:
179  An object of the form:
180
181    { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
182  &quot;allowFileDiscovery&quot;: 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.
183  &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.
184  &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
185      # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
186      # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
187      # - domain - String domain name, such as &quot;thecompany.com.&quot;
188      # - anyone - No displayName is present.
189  &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
190  &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
191  &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
192      # - They can only be set on user and group permissions
193      # - The time must be in the future
194      # - The time cannot be more than a year in the future
195  &quot;id&quot;: &quot;A String&quot;, # 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.
196  &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
197  &quot;pendingOwner&quot;: True or False, # Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that are not in a shared drive.
198  &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.
199    {
200      &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
201      &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
202      &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:
203          # - file
204          # - member
205      &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:
206          # - organizer
207          # - fileOrganizer
208          # - writer
209          # - commenter
210          # - reader
211    },
212  ],
213  &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
214  &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
215      # - owner
216      # - organizer
217      # - fileOrganizer
218      # - writer
219      # - commenter
220      # - reader
221  &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
222    {
223      &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
224      &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
225      &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
226      &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
227    },
228  ],
229  &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
230      # - user
231      # - group
232      # - domain
233      # - 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&#x27;t extra information required for a anyone type.
234  &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.
235}</pre>
236</div>
237
238<div class="method">
239    <code class="details" id="delete">delete(fileId, permissionId, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</code>
240  <pre>Deletes a permission.
241
242Args:
243  fileId: string, The ID of the file or shared drive. (required)
244  permissionId: string, The ID of the permission. (required)
245  supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
246  supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
247  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.
248</pre>
249</div>
250
251<div class="method">
252    <code class="details" id="get">get(fileId, permissionId, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</code>
253  <pre>Gets a permission by ID.
254
255Args:
256  fileId: string, The ID of the file. (required)
257  permissionId: string, The ID of the permission. (required)
258  supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
259  supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
260  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.
261
262Returns:
263  An object of the form:
264
265    { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
266  &quot;allowFileDiscovery&quot;: 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.
267  &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.
268  &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
269      # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
270      # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
271      # - domain - String domain name, such as &quot;thecompany.com.&quot;
272      # - anyone - No displayName is present.
273  &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
274  &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
275  &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
276      # - They can only be set on user and group permissions
277      # - The time must be in the future
278      # - The time cannot be more than a year in the future
279  &quot;id&quot;: &quot;A String&quot;, # 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.
280  &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
281  &quot;pendingOwner&quot;: True or False, # Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that are not in a shared drive.
282  &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.
283    {
284      &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
285      &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
286      &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:
287          # - file
288          # - member
289      &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:
290          # - organizer
291          # - fileOrganizer
292          # - writer
293          # - commenter
294          # - reader
295    },
296  ],
297  &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
298  &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
299      # - owner
300      # - organizer
301      # - fileOrganizer
302      # - writer
303      # - commenter
304      # - reader
305  &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
306    {
307      &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
308      &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
309      &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
310      &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
311    },
312  ],
313  &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
314      # - user
315      # - group
316      # - domain
317      # - 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&#x27;t extra information required for a anyone type.
318  &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.
319}</pre>
320</div>
321
322<div class="method">
323    <code class="details" id="list">list(fileId, includePermissionsForView=None, pageSize=None, pageToken=None, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None)</code>
324  <pre>Lists a file&#x27;s or shared drive&#x27;s permissions.
325
326Args:
327  fileId: string, The ID of the file or shared drive. (required)
328  includePermissionsForView: string, Specifies which additional view&#x27;s permissions to include in the response. Only &#x27;published&#x27; is supported.
329  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.
330  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.
331  supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
332  supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
333  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.
334
335Returns:
336  An object of the form:
337
338    { # A list of permissions for a file.
339  &quot;kind&quot;: &quot;drive#permissionList&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permissionList&quot;.
340  &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.
341  &quot;permissions&quot;: [ # The list of permissions. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.
342    { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
343      &quot;allowFileDiscovery&quot;: 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.
344      &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.
345      &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
346          # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
347          # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
348          # - domain - String domain name, such as &quot;thecompany.com.&quot;
349          # - anyone - No displayName is present.
350      &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
351      &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
352      &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
353          # - They can only be set on user and group permissions
354          # - The time must be in the future
355          # - The time cannot be more than a year in the future
356      &quot;id&quot;: &quot;A String&quot;, # 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.
357      &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
358      &quot;pendingOwner&quot;: True or False, # Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that are not in a shared drive.
359      &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.
360        {
361          &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
362          &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
363          &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:
364              # - file
365              # - member
366          &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:
367              # - organizer
368              # - fileOrganizer
369              # - writer
370              # - commenter
371              # - reader
372        },
373      ],
374      &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
375      &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
376          # - owner
377          # - organizer
378          # - fileOrganizer
379          # - writer
380          # - commenter
381          # - reader
382      &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
383        {
384          &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
385          &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
386          &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
387          &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
388        },
389      ],
390      &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
391          # - user
392          # - group
393          # - domain
394          # - 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&#x27;t extra information required for a anyone type.
395      &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.
396    },
397  ],
398}</pre>
399</div>
400
401<div class="method">
402    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
403  <pre>Retrieves the next page of results.
404
405Args:
406  previous_request: The request for the previous page. (required)
407  previous_response: The response from the request for the previous page. (required)
408
409Returns:
410  A request object that you can call &#x27;execute()&#x27; on to request the next
411  page. Returns None if there are no more items in the collection.
412    </pre>
413</div>
414
415<div class="method">
416    <code class="details" id="update">update(fileId, permissionId, body=None, removeExpiration=None, supportsAllDrives=None, supportsTeamDrives=None, transferOwnership=None, useDomainAdminAccess=None)</code>
417  <pre>Updates a permission with patch semantics.
418
419Args:
420  fileId: string, The ID of the file or shared drive. (required)
421  permissionId: string, The ID of the permission. (required)
422  body: object, The request body.
423    The object takes the form of:
424
425{ # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
426  &quot;allowFileDiscovery&quot;: 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.
427  &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.
428  &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
429      # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
430      # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
431      # - domain - String domain name, such as &quot;thecompany.com.&quot;
432      # - anyone - No displayName is present.
433  &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
434  &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
435  &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
436      # - They can only be set on user and group permissions
437      # - The time must be in the future
438      # - The time cannot be more than a year in the future
439  &quot;id&quot;: &quot;A String&quot;, # 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.
440  &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
441  &quot;pendingOwner&quot;: True or False, # Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that are not in a shared drive.
442  &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.
443    {
444      &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
445      &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
446      &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:
447          # - file
448          # - member
449      &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:
450          # - organizer
451          # - fileOrganizer
452          # - writer
453          # - commenter
454          # - reader
455    },
456  ],
457  &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
458  &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
459      # - owner
460      # - organizer
461      # - fileOrganizer
462      # - writer
463      # - commenter
464      # - reader
465  &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
466    {
467      &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
468      &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
469      &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
470      &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
471    },
472  ],
473  &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
474      # - user
475      # - group
476      # - domain
477      # - 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&#x27;t extra information required for a anyone type.
478  &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.
479}
480
481  removeExpiration: boolean, Whether to remove the expiration date.
482  supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
483  supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
484  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.
485  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.
486
487Returns:
488  An object of the form:
489
490    { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
491  &quot;allowFileDiscovery&quot;: 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.
492  &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.
493  &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
494      # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
495      # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
496      # - domain - String domain name, such as &quot;thecompany.com.&quot;
497      # - anyone - No displayName is present.
498  &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
499  &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
500  &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
501      # - They can only be set on user and group permissions
502      # - The time must be in the future
503      # - The time cannot be more than a year in the future
504  &quot;id&quot;: &quot;A String&quot;, # 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.
505  &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
506  &quot;pendingOwner&quot;: True or False, # Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that are not in a shared drive.
507  &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.
508    {
509      &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
510      &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
511      &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:
512          # - file
513          # - member
514      &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:
515          # - organizer
516          # - fileOrganizer
517          # - writer
518          # - commenter
519          # - reader
520    },
521  ],
522  &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
523  &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
524      # - owner
525      # - organizer
526      # - fileOrganizer
527      # - writer
528      # - commenter
529      # - reader
530  &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
531    {
532      &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
533      &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
534      &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
535      &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
536    },
537  ],
538  &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
539      # - user
540      # - group
541      # - domain
542      # - 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&#x27;t extra information required for a anyone type.
543  &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.
544}</pre>
545</div>
546
547</body></html>