Debian Codegraph @

docs/dyn/drive_v2.permissions.html

raw
1 <html><body>
2 <style>
3
4 body, 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
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, 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">Google Drive API</a> . <a href="drive_v2.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="#delete">delete(fileId, permissionId, enforceExpansiveAccess=None, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None, x__xgafv=None)</a></code></p>
82 <p class="firstline">Deletes a permission from a file or shared drive. **Warning:** Concurrent permissions operations on the same file are not supported; only the last update is applied.</p>
83 <p class="toc_element">
84 <code><a href="#get">get(fileId, permissionId, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None, x__xgafv=None)</a></code></p>
85 <p class="firstline">Gets a permission by ID.</p>
86 <p class="toc_element">
87 <code><a href="#getIdForEmail">getIdForEmail(email, x__xgafv=None)</a></code></p>
88 <p class="firstline">Returns the permission ID for an email address.</p>
89 <p class="toc_element">
90 <code><a href="#insert">insert(fileId, body=None, emailMessage=None, enforceExpansiveAccess=None, enforceSingleParent=None, moveToNewOwnersRoot=None, sendNotificationEmails=None, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None, x__xgafv=None)</a></code></p>
91 <p class="firstline">Inserts a permission for a file or shared drive. **Warning:** Concurrent permissions operations on the same file are not supported; only the last update is applied.</p>
92 <p class="toc_element">
93 <code><a href="#list">list(fileId, includePermissionsForView=None, maxResults=None, pageToken=None, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None, x__xgafv=None)</a></code></p>
94 <p class="firstline">Lists a file's or shared drive's permissions.</p>
95 <p class="toc_element">
96 <code><a href="#list_next">list_next()</a></code></p>
97 <p class="firstline">Retrieves the next page of results.</p>
98 <p class="toc_element">
99 <code><a href="#patch">patch(fileId, permissionId, body=None, enforceExpansiveAccess=None, removeExpiration=None, supportsAllDrives=None, supportsTeamDrives=None, transferOwnership=None, useDomainAdminAccess=None, x__xgafv=None)</a></code></p>
100 <p class="firstline">Updates a permission using patch semantics. **Warning:** Concurrent permissions operations on the same file are not supported; only the last update is applied.</p>
101 <p class="toc_element">
102 <code><a href="#update">update(fileId, permissionId, body=None, enforceExpansiveAccess=None, removeExpiration=None, supportsAllDrives=None, supportsTeamDrives=None, transferOwnership=None, useDomainAdminAccess=None, x__xgafv=None)</a></code></p>
103 <p class="firstline">Updates a permission. **Warning:** Concurrent permissions operations on the same file are not supported; only the last update is applied.</p>
104 <h3>Method Details</h3>
105 <div class="method">
106 <code class="details" id="close">close()</code>
107 <pre>Close httplib2 connections.</pre>
108 </div>
109
110 <div class="method">
111 <code class="details" id="delete">delete(fileId, permissionId, enforceExpansiveAccess=None, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None, x__xgafv=None)</code>
112 <pre>Deletes a permission from a file or shared drive. **Warning:** Concurrent permissions operations on the same file are not supported; only the last update is applied.
113
114 Args:
115 fileId: string, The ID for the file or shared drive. (required)
116 permissionId: string, The ID for the permission. (required)
117 enforceExpansiveAccess: boolean, Deprecated: All requests use the expansive access rules.
118 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
119 supportsTeamDrives: boolean, Deprecated: Use `supportsAllDrives` instead.
120 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.
121 x__xgafv: string, V1 error format.
122 Allowed values
123 1 - v1 error format
124 2 - v2 error format
125 </pre>
126 </div>
127
128 <div class="method">
129 <code class="details" id="get">get(fileId, permissionId, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None, x__xgafv=None)</code>
130 <pre>Gets a permission by ID.
131
132 Args:
133 fileId: string, The ID for the file or shared drive. (required)
134 permissionId: string, The ID for the permission. (required)
135 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
136 supportsTeamDrives: boolean, Deprecated: Use `supportsAllDrives` instead.
137 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.
138 x__xgafv: string, V1 error format.
139 Allowed values
140 1 - v1 error format
141 2 - v2 error format
142
143 Returns:
144 An object of the form:
145
146 { # A permission for a file. A permission grants a user, group, domain, or the world access to a file or a folder hierarchy. Some resource methods (such as `permissions.update`) require a `permissionId`. Use the `permissions.list` method to retrieve the ID for a file, folder, or shared drive.
147 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only `commenter` is currently allowed, though more may be supported in the future.
148 &quot;A String&quot;,
149 ],
150 &quot;authKey&quot;: &quot;A String&quot;, # Output only. Deprecated.
151 &quot;deleted&quot;: True or False, # Output only. Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
152 &quot;domain&quot;: &quot;A String&quot;, # Output only. 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`.
153 &quot;emailAddress&quot;: &quot;A String&quot;, # Output only. 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`.
154 &quot;etag&quot;: &quot;A String&quot;, # Output only. The ETag of the permission.
155 &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: - They can only be set on user and group permissions - The date must be in the future - The date cannot be more than a year in the future - The date can only be set on drive.permissions.update or drive.permissions.patch requests
156 &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.
157 &quot;inheritedPermissionsDisabled&quot;: True or False, # When true, only organizers, owners, and users with permissions added directly on the item can access it.
158 &quot;kind&quot;: &quot;drive#permission&quot;, # Output only. This is always `drive#permission`.
159 &quot;name&quot;: &quot;A String&quot;, # Output only. The name for this permission.
160 &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.
161 &quot;permissionDetails&quot;: [ # Output only. Details of whether the permissions on this item are inherited or directly on this item.
162 {
163 &quot;additionalRoles&quot;: [ # Output only. Additional roles for this user. Only `commenter` is currently possible, though more may be supported in the future.
164 &quot;A String&quot;,
165 ],
166 &quot;inherited&quot;: True or False, # Output only. Whether this permission is inherited. This field is always populated.
167 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Output only. The ID of the item from which this permission is inherited. This is only populated for items in shared drives.
168 &quot;permissionType&quot;: &quot;A String&quot;, # Output only. The permission type for this user. While new values may be added in future, the following are currently possible: * `file` * `member`
169 &quot;role&quot;: &quot;A String&quot;, # Output only. The primary role for this user. While new values may be added in the future, the following are currently possible: * `organizer` * `fileOrganizer` * `writer` * `reader`
170 },
171 ],
172 &quot;photoLink&quot;: &quot;A String&quot;, # Output only. 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: * `owner` * `organizer` * `fileOrganizer` * `writer` * `reader`
174 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. A link back to this permission.
175 &quot;teamDrivePermissionDetails&quot;: [ # Output only. Deprecated: Use `permissionDetails` instead.
176 {
177 &quot;additionalRoles&quot;: [ # Output only. Deprecated: Use `permissionDetails/additionalRoles` instead.
178 &quot;A String&quot;,
179 ],
180 &quot;inherited&quot;: True or False, # Output only. Deprecated: Use `permissionDetails/inherited` instead.
181 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `permissionDetails/inheritedFrom` instead.
182 &quot;role&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `permissionDetails/role` instead.
183 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `permissionDetails/permissionType` instead.
184 },
185 ],
186 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are: * `user` * `group` * `domain` * `anyone`
187 &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.
188 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published and metadata are the only supported values. - published: The permission&#x27;s role is published_reader. - metadata: The item is only visible to the metadata view because the item has limited access and the scope has at least read access to the parent. Note: The metadata view is currently only supported on folders.
189 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
190 }</pre>
191 </div>
192
193 <div class="method">
194 <code class="details" id="getIdForEmail">getIdForEmail(email, x__xgafv=None)</code>
195 <pre>Returns the permission ID for an email address.
196
197 Args:
198 email: string, The email address for which to return a permission ID (required)
199 x__xgafv: string, V1 error format.
200 Allowed values
201 1 - v1 error format
202 2 - v2 error format
203
204 Returns:
205 An object of the form:
206
207 { # An ID for a user or group as seen in Permission items.
208 &quot;id&quot;: &quot;A String&quot;, # The permission ID.
209 &quot;kind&quot;: &quot;drive#permissionId&quot;, # This is always `drive#permissionId`.
210 }</pre>
211 </div>
212
213 <div class="method">
214 <code class="details" id="insert">insert(fileId, body=None, emailMessage=None, enforceExpansiveAccess=None, enforceSingleParent=None, moveToNewOwnersRoot=None, sendNotificationEmails=None, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None, x__xgafv=None)</code>
215 <pre>Inserts a permission for a file or shared drive. **Warning:** Concurrent permissions operations on the same file are not supported; only the last update is applied.
216
217 Args:
218 fileId: string, The ID for the file or shared drive. (required)
219 body: object, The request body.
220 The object takes the form of:
221
222 { # A permission for a file. A permission grants a user, group, domain, or the world access to a file or a folder hierarchy. Some resource methods (such as `permissions.update`) require a `permissionId`. Use the `permissions.list` method to retrieve the ID for a file, folder, or shared drive.
223 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only `commenter` is currently allowed, though more may be supported in the future.
224 &quot;A String&quot;,
225 ],
226 &quot;authKey&quot;: &quot;A String&quot;, # Output only. Deprecated.
227 &quot;deleted&quot;: True or False, # Output only. Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
228 &quot;domain&quot;: &quot;A String&quot;, # Output only. 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`.
229 &quot;emailAddress&quot;: &quot;A String&quot;, # Output only. 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`.
230 &quot;etag&quot;: &quot;A String&quot;, # Output only. The ETag of the permission.
231 &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: - They can only be set on user and group permissions - The date must be in the future - The date cannot be more than a year in the future - The date can only be set on drive.permissions.update or drive.permissions.patch requests
232 &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.
233 &quot;inheritedPermissionsDisabled&quot;: True or False, # When true, only organizers, owners, and users with permissions added directly on the item can access it.
234 &quot;kind&quot;: &quot;drive#permission&quot;, # Output only. This is always `drive#permission`.
235 &quot;name&quot;: &quot;A String&quot;, # Output only. The name for this permission.
236 &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.
237 &quot;permissionDetails&quot;: [ # Output only. Details of whether the permissions on this item are inherited or directly on this item.
238 {
239 &quot;additionalRoles&quot;: [ # Output only. Additional roles for this user. Only `commenter` is currently possible, though more may be supported in the future.
240 &quot;A String&quot;,
241 ],
242 &quot;inherited&quot;: True or False, # Output only. Whether this permission is inherited. This field is always populated.
243 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Output only. The ID of the item from which this permission is inherited. This is only populated for items in shared drives.
244 &quot;permissionType&quot;: &quot;A String&quot;, # Output only. The permission type for this user. While new values may be added in future, the following are currently possible: * `file` * `member`
245 &quot;role&quot;: &quot;A String&quot;, # Output only. The primary role for this user. While new values may be added in the future, the following are currently possible: * `organizer` * `fileOrganizer` * `writer` * `reader`
246 },
247 ],
248 &quot;photoLink&quot;: &quot;A String&quot;, # Output only. A link to the profile photo, if available.
249 &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: * `owner` * `organizer` * `fileOrganizer` * `writer` * `reader`
250 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. A link back to this permission.
251 &quot;teamDrivePermissionDetails&quot;: [ # Output only. Deprecated: Use `permissionDetails` instead.
252 {
253 &quot;additionalRoles&quot;: [ # Output only. Deprecated: Use `permissionDetails/additionalRoles` instead.
254 &quot;A String&quot;,
255 ],
256 &quot;inherited&quot;: True or False, # Output only. Deprecated: Use `permissionDetails/inherited` instead.
257 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `permissionDetails/inheritedFrom` instead.
258 &quot;role&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `permissionDetails/role` instead.
259 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `permissionDetails/permissionType` instead.
260 },
261 ],
262 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are: * `user` * `group` * `domain` * `anyone`
263 &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.
264 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published and metadata are the only supported values. - published: The permission&#x27;s role is published_reader. - metadata: The item is only visible to the metadata view because the item has limited access and the scope has at least read access to the parent. Note: The metadata view is currently only supported on folders.
265 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
266 }
267
268 emailMessage: string, A plain text custom message to include in notification emails.
269 enforceExpansiveAccess: boolean, Deprecated: All requests use the expansive access rules.
270 enforceSingleParent: boolean, Deprecated: See `moveToNewOwnersRoot` for details.
271 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.
272 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`.
273 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
274 supportsTeamDrives: boolean, Deprecated: Use `supportsAllDrives` instead.
275 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.
276 x__xgafv: string, V1 error format.
277 Allowed values
278 1 - v1 error format
279 2 - v2 error format
280
281 Returns:
282 An object of the form:
283
284 { # A permission for a file. A permission grants a user, group, domain, or the world access to a file or a folder hierarchy. Some resource methods (such as `permissions.update`) require a `permissionId`. Use the `permissions.list` method to retrieve the ID for a file, folder, or shared drive.
285 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only `commenter` is currently allowed, though more may be supported in the future.
286 &quot;A String&quot;,
287 ],
288 &quot;authKey&quot;: &quot;A String&quot;, # Output only. Deprecated.
289 &quot;deleted&quot;: True or False, # Output only. Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
290 &quot;domain&quot;: &quot;A String&quot;, # Output only. 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`.
291 &quot;emailAddress&quot;: &quot;A String&quot;, # Output only. 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`.
292 &quot;etag&quot;: &quot;A String&quot;, # Output only. The ETag of the permission.
293 &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: - They can only be set on user and group permissions - The date must be in the future - The date cannot be more than a year in the future - The date can only be set on drive.permissions.update or drive.permissions.patch requests
294 &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.
295 &quot;inheritedPermissionsDisabled&quot;: True or False, # When true, only organizers, owners, and users with permissions added directly on the item can access it.
296 &quot;kind&quot;: &quot;drive#permission&quot;, # Output only. This is always `drive#permission`.
297 &quot;name&quot;: &quot;A String&quot;, # Output only. The name for this permission.
298 &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.
299 &quot;permissionDetails&quot;: [ # Output only. Details of whether the permissions on this item are inherited or directly on this item.
300 {
301 &quot;additionalRoles&quot;: [ # Output only. Additional roles for this user. Only `commenter` is currently possible, though more may be supported in the future.
302 &quot;A String&quot;,
303 ],
304 &quot;inherited&quot;: True or False, # Output only. Whether this permission is inherited. This field is always populated.
305 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Output only. The ID of the item from which this permission is inherited. This is only populated for items in shared drives.
306 &quot;permissionType&quot;: &quot;A String&quot;, # Output only. The permission type for this user. While new values may be added in future, the following are currently possible: * `file` * `member`
307 &quot;role&quot;: &quot;A String&quot;, # Output only. The primary role for this user. While new values may be added in the future, the following are currently possible: * `organizer` * `fileOrganizer` * `writer` * `reader`
308 },
309 ],
310 &quot;photoLink&quot;: &quot;A String&quot;, # Output only. A link to the profile photo, if available.
311 &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: * `owner` * `organizer` * `fileOrganizer` * `writer` * `reader`
312 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. A link back to this permission.
313 &quot;teamDrivePermissionDetails&quot;: [ # Output only. Deprecated: Use `permissionDetails` instead.
314 {
315 &quot;additionalRoles&quot;: [ # Output only. Deprecated: Use `permissionDetails/additionalRoles` instead.
316 &quot;A String&quot;,
317 ],
318 &quot;inherited&quot;: True or False, # Output only. Deprecated: Use `permissionDetails/inherited` instead.
319 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `permissionDetails/inheritedFrom` instead.
320 &quot;role&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `permissionDetails/role` instead.
321 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `permissionDetails/permissionType` instead.
322 },
323 ],
324 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are: * `user` * `group` * `domain` * `anyone`
325 &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.
326 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published and metadata are the only supported values. - published: The permission&#x27;s role is published_reader. - metadata: The item is only visible to the metadata view because the item has limited access and the scope has at least read access to the parent. Note: The metadata view is currently only supported on folders.
327 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
328 }</pre>
329 </div>
330
331 <div class="method">
332 <code class="details" id="list">list(fileId, includePermissionsForView=None, maxResults=None, pageToken=None, supportsAllDrives=None, supportsTeamDrives=None, useDomainAdminAccess=None, x__xgafv=None)</code>
333 <pre>Lists a file&#x27;s or shared drive&#x27;s permissions.
334
335 Args:
336 fileId: string, The ID for the file or shared drive. (required)
337 includePermissionsForView: string, Specifies which additional view&#x27;s permissions to include in the response. Only `published` is supported.
338 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.
339 pageToken: string, The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from the previous response.
340 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
341 supportsTeamDrives: boolean, Deprecated: Use `supportsAllDrives` instead.
342 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.
343 x__xgafv: string, V1 error format.
344 Allowed values
345 1 - v1 error format
346 2 - v2 error format
347
348 Returns:
349 An object of the form:
350
351 { # A list of permissions associated with a file.
352 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the list.
353 &quot;items&quot;: [ # The list of permissions.
354 { # A permission for a file. A permission grants a user, group, domain, or the world access to a file or a folder hierarchy. Some resource methods (such as `permissions.update`) require a `permissionId`. Use the `permissions.list` method to retrieve the ID for a file, folder, or shared drive.
355 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only `commenter` is currently allowed, though more may be supported in the future.
356 &quot;A String&quot;,
357 ],
358 &quot;authKey&quot;: &quot;A String&quot;, # Output only. Deprecated.
359 &quot;deleted&quot;: True or False, # Output only. Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
360 &quot;domain&quot;: &quot;A String&quot;, # Output only. 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`.
361 &quot;emailAddress&quot;: &quot;A String&quot;, # Output only. 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`.
362 &quot;etag&quot;: &quot;A String&quot;, # Output only. The ETag of the permission.
363 &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: - They can only be set on user and group permissions - The date must be in the future - The date cannot be more than a year in the future - The date can only be set on drive.permissions.update or drive.permissions.patch requests
364 &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.
365 &quot;inheritedPermissionsDisabled&quot;: True or False, # When true, only organizers, owners, and users with permissions added directly on the item can access it.
366 &quot;kind&quot;: &quot;drive#permission&quot;, # Output only. This is always `drive#permission`.
367 &quot;name&quot;: &quot;A String&quot;, # Output only. The name for this permission.
368 &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.
369 &quot;permissionDetails&quot;: [ # Output only. Details of whether the permissions on this item are inherited or directly on this item.
370 {
371 &quot;additionalRoles&quot;: [ # Output only. Additional roles for this user. Only `commenter` is currently possible, though more may be supported in the future.
372 &quot;A String&quot;,
373 ],
374 &quot;inherited&quot;: True or False, # Output only. Whether this permission is inherited. This field is always populated.
375 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Output only. The ID of the item from which this permission is inherited. This is only populated for items in shared drives.
376 &quot;permissionType&quot;: &quot;A String&quot;, # Output only. The permission type for this user. While new values may be added in future, the following are currently possible: * `file` * `member`
377 &quot;role&quot;: &quot;A String&quot;, # Output only. The primary role for this user. While new values may be added in the future, the following are currently possible: * `organizer` * `fileOrganizer` * `writer` * `reader`
378 },
379 ],
380 &quot;photoLink&quot;: &quot;A String&quot;, # Output only. A link to the profile photo, if available.
381 &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: * `owner` * `organizer` * `fileOrganizer` * `writer` * `reader`
382 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. A link back to this permission.
383 &quot;teamDrivePermissionDetails&quot;: [ # Output only. Deprecated: Use `permissionDetails` instead.
384 {
385 &quot;additionalRoles&quot;: [ # Output only. Deprecated: Use `permissionDetails/additionalRoles` instead.
386 &quot;A String&quot;,
387 ],
388 &quot;inherited&quot;: True or False, # Output only. Deprecated: Use `permissionDetails/inherited` instead.
389 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `permissionDetails/inheritedFrom` instead.
390 &quot;role&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `permissionDetails/role` instead.
391 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `permissionDetails/permissionType` instead.
392 },
393 ],
394 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are: * `user` * `group` * `domain` * `anyone`
395 &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.
396 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published and metadata are the only supported values. - published: The permission&#x27;s role is published_reader. - metadata: The item is only visible to the metadata view because the item has limited access and the scope has at least read access to the parent. Note: The metadata view is currently only supported on folders.
397 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
398 },
399 ],
400 &quot;kind&quot;: &quot;drive#permissionList&quot;, # This is always `drive#permissionList`.
401 &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.
402 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this list.
403 }</pre>
404 </div>
405
406 <div class="method">
407 <code class="details" id="list_next">list_next()</code>
408 <pre>Retrieves the next page of results.
409
410 Args:
411 previous_request: The request for the previous page. (required)
412 previous_response: The response from the request for the previous page. (required)
413
414 Returns:
415 A request object that you can call &#x27;execute()&#x27; on to request the next
416 page. Returns None if there are no more items in the collection.
417 </pre>
418 </div>
419
420 <div class="method">
421 <code class="details" id="patch">patch(fileId, permissionId, body=None, enforceExpansiveAccess=None, removeExpiration=None, supportsAllDrives=None, supportsTeamDrives=None, transferOwnership=None, useDomainAdminAccess=None, x__xgafv=None)</code>
422 <pre>Updates a permission using patch semantics. **Warning:** Concurrent permissions operations on the same file are not supported; only the last update is applied.
423
424 Args:
425 fileId: string, The ID for the file or shared drive. (required)
426 permissionId: string, The ID for the permission. (required)
427 body: object, The request body.
428 The object takes the form of:
429
430 { # A permission for a file. A permission grants a user, group, domain, or the world access to a file or a folder hierarchy. Some resource methods (such as `permissions.update`) require a `permissionId`. Use the `permissions.list` method to retrieve the ID for a file, folder, or shared drive.
431 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only `commenter` is currently allowed, though more may be supported in the future.
432 &quot;A String&quot;,
433 ],
434 &quot;authKey&quot;: &quot;A String&quot;, # Output only. Deprecated.
435 &quot;deleted&quot;: True or False, # Output only. Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
436 &quot;domain&quot;: &quot;A String&quot;, # Output only. 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`.
437 &quot;emailAddress&quot;: &quot;A String&quot;, # Output only. 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`.
438 &quot;etag&quot;: &quot;A String&quot;, # Output only. The ETag of the permission.
439 &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: - They can only be set on user and group permissions - The date must be in the future - The date cannot be more than a year in the future - The date can only be set on drive.permissions.update or drive.permissions.patch requests
440 &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.
441 &quot;inheritedPermissionsDisabled&quot;: True or False, # When true, only organizers, owners, and users with permissions added directly on the item can access it.
442 &quot;kind&quot;: &quot;drive#permission&quot;, # Output only. This is always `drive#permission`.
443 &quot;name&quot;: &quot;A String&quot;, # Output only. The name for this permission.
444 &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.
445 &quot;permissionDetails&quot;: [ # Output only. Details of whether the permissions on this item are inherited or directly on this item.
446 {
447 &quot;additionalRoles&quot;: [ # Output only. Additional roles for this user. Only `commenter` is currently possible, though more may be supported in the future.
448 &quot;A String&quot;,
449 ],
450 &quot;inherited&quot;: True or False, # Output only. Whether this permission is inherited. This field is always populated.
451 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Output only. The ID of the item from which this permission is inherited. This is only populated for items in shared drives.
452 &quot;permissionType&quot;: &quot;A String&quot;, # Output only. The permission type for this user. While new values may be added in future, the following are currently possible: * `file` * `member`
453 &quot;role&quot;: &quot;A String&quot;, # Output only. The primary role for this user. While new values may be added in the future, the following are currently possible: * `organizer` * `fileOrganizer` * `writer` * `reader`
454 },
455 ],
456 &quot;photoLink&quot;: &quot;A String&quot;, # Output only. A link to the profile photo, if available.
457 &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: * `owner` * `organizer` * `fileOrganizer` * `writer` * `reader`
458 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. A link back to this permission.
459 &quot;teamDrivePermissionDetails&quot;: [ # Output only. Deprecated: Use `permissionDetails` instead.
460 {
461 &quot;additionalRoles&quot;: [ # Output only. Deprecated: Use `permissionDetails/additionalRoles` instead.
462 &quot;A String&quot;,
463 ],
464 &quot;inherited&quot;: True or False, # Output only. Deprecated: Use `permissionDetails/inherited` instead.
465 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `permissionDetails/inheritedFrom` instead.
466 &quot;role&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `permissionDetails/role` instead.
467 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `permissionDetails/permissionType` instead.
468 },
469 ],
470 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are: * `user` * `group` * `domain` * `anyone`
471 &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.
472 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published and metadata are the only supported values. - published: The permission&#x27;s role is published_reader. - metadata: The item is only visible to the metadata view because the item has limited access and the scope has at least read access to the parent. Note: The metadata view is currently only supported on folders.
473 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
474 }
475
476 enforceExpansiveAccess: boolean, Deprecated: All requests use the expansive access rules.
477 removeExpiration: boolean, Whether to remove the expiration date.
478 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
479 supportsTeamDrives: boolean, Deprecated: Use `supportsAllDrives` instead.
480 transferOwnership: boolean, Whether changing a role to `owner` downgrades the current owners to writers. Does nothing if the specified role is not `owner`.
481 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.
482 x__xgafv: string, V1 error format.
483 Allowed values
484 1 - v1 error format
485 2 - v2 error format
486
487 Returns:
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. Some resource methods (such as `permissions.update`) require a `permissionId`. Use the `permissions.list` method to retrieve the ID for a file, folder, or shared drive.
491 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only `commenter` is currently allowed, though more may be supported in the future.
492 &quot;A String&quot;,
493 ],
494 &quot;authKey&quot;: &quot;A String&quot;, # Output only. Deprecated.
495 &quot;deleted&quot;: True or False, # Output only. Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
496 &quot;domain&quot;: &quot;A String&quot;, # Output only. 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`.
497 &quot;emailAddress&quot;: &quot;A String&quot;, # Output only. 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`.
498 &quot;etag&quot;: &quot;A String&quot;, # Output only. The ETag of the permission.
499 &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: - They can only be set on user and group permissions - The date must be in the future - The date cannot be more than a year in the future - The date can only be set on drive.permissions.update or drive.permissions.patch requests
500 &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.
501 &quot;inheritedPermissionsDisabled&quot;: True or False, # When true, only organizers, owners, and users with permissions added directly on the item can access it.
502 &quot;kind&quot;: &quot;drive#permission&quot;, # Output only. This is always `drive#permission`.
503 &quot;name&quot;: &quot;A String&quot;, # Output only. The name for this permission.
504 &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.
505 &quot;permissionDetails&quot;: [ # Output only. Details of whether the permissions on this item are inherited or directly on this item.
506 {
507 &quot;additionalRoles&quot;: [ # Output only. Additional roles for this user. Only `commenter` is currently possible, though more may be supported in the future.
508 &quot;A String&quot;,
509 ],
510 &quot;inherited&quot;: True or False, # Output only. Whether this permission is inherited. This field is always populated.
511 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Output only. The ID of the item from which this permission is inherited. This is only populated for items in shared drives.
512 &quot;permissionType&quot;: &quot;A String&quot;, # Output only. The permission type for this user. While new values may be added in future, the following are currently possible: * `file` * `member`
513 &quot;role&quot;: &quot;A String&quot;, # Output only. The primary role for this user. While new values may be added in the future, the following are currently possible: * `organizer` * `fileOrganizer` * `writer` * `reader`
514 },
515 ],
516 &quot;photoLink&quot;: &quot;A String&quot;, # Output only. A link to the profile photo, if available.
517 &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: * `owner` * `organizer` * `fileOrganizer` * `writer` * `reader`
518 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. A link back to this permission.
519 &quot;teamDrivePermissionDetails&quot;: [ # Output only. Deprecated: Use `permissionDetails` instead.
520 {
521 &quot;additionalRoles&quot;: [ # Output only. Deprecated: Use `permissionDetails/additionalRoles` instead.
522 &quot;A String&quot;,
523 ],
524 &quot;inherited&quot;: True or False, # Output only. Deprecated: Use `permissionDetails/inherited` instead.
525 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `permissionDetails/inheritedFrom` instead.
526 &quot;role&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `permissionDetails/role` instead.
527 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `permissionDetails/permissionType` instead.
528 },
529 ],
530 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are: * `user` * `group` * `domain` * `anyone`
531 &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.
532 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published and metadata are the only supported values. - published: The permission&#x27;s role is published_reader. - metadata: The item is only visible to the metadata view because the item has limited access and the scope has at least read access to the parent. Note: The metadata view is currently only supported on folders.
533 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
534 }</pre>
535 </div>
536
537 <div class="method">
538 <code class="details" id="update">update(fileId, permissionId, body=None, enforceExpansiveAccess=None, removeExpiration=None, supportsAllDrives=None, supportsTeamDrives=None, transferOwnership=None, useDomainAdminAccess=None, x__xgafv=None)</code>
539 <pre>Updates a permission. **Warning:** Concurrent permissions operations on the same file are not supported; only the last update is applied.
540
541 Args:
542 fileId: string, The ID for the file or shared drive. (required)
543 permissionId: string, The ID for the permission. (required)
544 body: object, The request body.
545 The object takes the form of:
546
547 { # A permission for a file. A permission grants a user, group, domain, or the world access to a file or a folder hierarchy. Some resource methods (such as `permissions.update`) require a `permissionId`. Use the `permissions.list` method to retrieve the ID for a file, folder, or shared drive.
548 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only `commenter` is currently allowed, though more may be supported in the future.
549 &quot;A String&quot;,
550 ],
551 &quot;authKey&quot;: &quot;A String&quot;, # Output only. Deprecated.
552 &quot;deleted&quot;: True or False, # Output only. Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
553 &quot;domain&quot;: &quot;A String&quot;, # Output only. 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`.
554 &quot;emailAddress&quot;: &quot;A String&quot;, # Output only. 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`.
555 &quot;etag&quot;: &quot;A String&quot;, # Output only. The ETag of the permission.
556 &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: - They can only be set on user and group permissions - The date must be in the future - The date cannot be more than a year in the future - The date can only be set on drive.permissions.update or drive.permissions.patch requests
557 &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.
558 &quot;inheritedPermissionsDisabled&quot;: True or False, # When true, only organizers, owners, and users with permissions added directly on the item can access it.
559 &quot;kind&quot;: &quot;drive#permission&quot;, # Output only. This is always `drive#permission`.
560 &quot;name&quot;: &quot;A String&quot;, # Output only. The name for this permission.
561 &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.
562 &quot;permissionDetails&quot;: [ # Output only. Details of whether the permissions on this item are inherited or directly on this item.
563 {
564 &quot;additionalRoles&quot;: [ # Output only. Additional roles for this user. Only `commenter` is currently possible, though more may be supported in the future.
565 &quot;A String&quot;,
566 ],
567 &quot;inherited&quot;: True or False, # Output only. Whether this permission is inherited. This field is always populated.
568 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Output only. The ID of the item from which this permission is inherited. This is only populated for items in shared drives.
569 &quot;permissionType&quot;: &quot;A String&quot;, # Output only. The permission type for this user. While new values may be added in future, the following are currently possible: * `file` * `member`
570 &quot;role&quot;: &quot;A String&quot;, # Output only. The primary role for this user. While new values may be added in the future, the following are currently possible: * `organizer` * `fileOrganizer` * `writer` * `reader`
571 },
572 ],
573 &quot;photoLink&quot;: &quot;A String&quot;, # Output only. A link to the profile photo, if available.
574 &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: * `owner` * `organizer` * `fileOrganizer` * `writer` * `reader`
575 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. A link back to this permission.
576 &quot;teamDrivePermissionDetails&quot;: [ # Output only. Deprecated: Use `permissionDetails` instead.
577 {
578 &quot;additionalRoles&quot;: [ # Output only. Deprecated: Use `permissionDetails/additionalRoles` instead.
579 &quot;A String&quot;,
580 ],
581 &quot;inherited&quot;: True or False, # Output only. Deprecated: Use `permissionDetails/inherited` instead.
582 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `permissionDetails/inheritedFrom` instead.
583 &quot;role&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `permissionDetails/role` instead.
584 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `permissionDetails/permissionType` instead.
585 },
586 ],
587 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are: * `user` * `group` * `domain` * `anyone`
588 &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.
589 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published and metadata are the only supported values. - published: The permission&#x27;s role is published_reader. - metadata: The item is only visible to the metadata view because the item has limited access and the scope has at least read access to the parent. Note: The metadata view is currently only supported on folders.
590 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
591 }
592
593 enforceExpansiveAccess: boolean, Deprecated: All requests use the expansive access rules.
594 removeExpiration: boolean, Whether to remove the expiration date.
595 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
596 supportsTeamDrives: boolean, Deprecated: Use `supportsAllDrives` instead.
597 transferOwnership: boolean, Whether changing a role to `owner` downgrades the current owners to writers. Does nothing if the specified role is not `owner`.
598 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.
599 x__xgafv: string, V1 error format.
600 Allowed values
601 1 - v1 error format
602 2 - v2 error format
603
604 Returns:
605 An object of the form:
606
607 { # A permission for a file. A permission grants a user, group, domain, or the world access to a file or a folder hierarchy. Some resource methods (such as `permissions.update`) require a `permissionId`. Use the `permissions.list` method to retrieve the ID for a file, folder, or shared drive.
608 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only `commenter` is currently allowed, though more may be supported in the future.
609 &quot;A String&quot;,
610 ],
611 &quot;authKey&quot;: &quot;A String&quot;, # Output only. Deprecated.
612 &quot;deleted&quot;: True or False, # Output only. Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
613 &quot;domain&quot;: &quot;A String&quot;, # Output only. 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`.
614 &quot;emailAddress&quot;: &quot;A String&quot;, # Output only. 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`.
615 &quot;etag&quot;: &quot;A String&quot;, # Output only. The ETag of the permission.
616 &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: - They can only be set on user and group permissions - The date must be in the future - The date cannot be more than a year in the future - The date can only be set on drive.permissions.update or drive.permissions.patch requests
617 &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.
618 &quot;inheritedPermissionsDisabled&quot;: True or False, # When true, only organizers, owners, and users with permissions added directly on the item can access it.
619 &quot;kind&quot;: &quot;drive#permission&quot;, # Output only. This is always `drive#permission`.
620 &quot;name&quot;: &quot;A String&quot;, # Output only. The name for this permission.
621 &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.
622 &quot;permissionDetails&quot;: [ # Output only. Details of whether the permissions on this item are inherited or directly on this item.
623 {
624 &quot;additionalRoles&quot;: [ # Output only. Additional roles for this user. Only `commenter` is currently possible, though more may be supported in the future.
625 &quot;A String&quot;,
626 ],
627 &quot;inherited&quot;: True or False, # Output only. Whether this permission is inherited. This field is always populated.
628 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Output only. The ID of the item from which this permission is inherited. This is only populated for items in shared drives.
629 &quot;permissionType&quot;: &quot;A String&quot;, # Output only. The permission type for this user. While new values may be added in future, the following are currently possible: * `file` * `member`
630 &quot;role&quot;: &quot;A String&quot;, # Output only. The primary role for this user. While new values may be added in the future, the following are currently possible: * `organizer` * `fileOrganizer` * `writer` * `reader`
631 },
632 ],
633 &quot;photoLink&quot;: &quot;A String&quot;, # Output only. A link to the profile photo, if available.
634 &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: * `owner` * `organizer` * `fileOrganizer` * `writer` * `reader`
635 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. A link back to this permission.
636 &quot;teamDrivePermissionDetails&quot;: [ # Output only. Deprecated: Use `permissionDetails` instead.
637 {
638 &quot;additionalRoles&quot;: [ # Output only. Deprecated: Use `permissionDetails/additionalRoles` instead.
639 &quot;A String&quot;,
640 ],
641 &quot;inherited&quot;: True or False, # Output only. Deprecated: Use `permissionDetails/inherited` instead.
642 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `permissionDetails/inheritedFrom` instead.
643 &quot;role&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `permissionDetails/role` instead.
644 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `permissionDetails/permissionType` instead.
645 },
646 ],
647 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are: * `user` * `group` * `domain` * `anyone`
648 &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.
649 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published and metadata are the only supported values. - published: The permission&#x27;s role is published_reader. - metadata: The item is only visible to the metadata view because the item has limited access and the scope has at least read access to the parent. Note: The metadata view is currently only supported on folders.
650 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
651 }</pre>
652 </div>
653
654 </body></html>