blob: 175a2528d4526e50b35326a32a2277dd52c76cc9 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="drive_v2.html">Drive API</a> . <a href="drive_v2.files.html">files</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
81 <code><a href="#copy">copy(fileId, body=None, convert=None, enforceSingleParent=None, includePermissionsForView=None, ocr=None, ocrLanguage=None, pinned=None, supportsAllDrives=None, supportsTeamDrives=None, timedTextLanguage=None, timedTextTrackName=None, visibility=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070082<p class="firstline">Creates a copy of the specified file. Folders cannot be copied.</p>
John Asmuth614db982014-04-24 15:46:26 -040083<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070084 <code><a href="#delete">delete(fileId, enforceSingleParent=None, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070085<p class="firstline">Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file or be an organizer on the parent for shared drive files.</p>
John Asmuth614db982014-04-24 15:46:26 -040086<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070087 <code><a href="#emptyTrash">emptyTrash(enforceSingleParent=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070088<p class="firstline">Permanently deletes all of the user's trashed files.</p>
89<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070090 <code><a href="#export">export(fileId, mimeType)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070092<p class="toc_element">
93 <code><a href="#export_media">export_media(fileId, mimeType)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070095<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070096 <code><a href="#generateIds">generateIds(maxResults=None, space=None)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -070097<p class="firstline">Generates a set of file IDs which can be provided in insert or copy requests.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070098<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070099 <code><a href="#get">get(fileId, acknowledgeAbuse=None, includePermissionsForView=None, projection=None, revisionId=None, supportsAllDrives=None, supportsTeamDrives=None, updateViewedDate=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800100<p class="firstline">Gets a file's metadata by ID.</p>
101<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700102 <code><a href="#get_media">get_media(fileId, acknowledgeAbuse=None, includePermissionsForView=None, projection=None, revisionId=None, supportsAllDrives=None, supportsTeamDrives=None, updateViewedDate=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400103<p class="firstline">Gets a file's metadata by ID.</p>
104<p class="toc_element">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800105 <code><a href="#insert">insert(body=None, convert=None, enforceSingleParent=None, includePermissionsForView=None, media_body=None, media_mime_type=None, ocr=None, ocrLanguage=None, pinned=None, supportsAllDrives=None, supportsTeamDrives=None, timedTextLanguage=None, timedTextTrackName=None, useContentAsIndexableText=None, visibility=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400106<p class="firstline">Insert a new file.</p>
107<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700108 <code><a href="#list">list(corpora=None, corpus=None, driveId=None, includeItemsFromAllDrives=None, includePermissionsForView=None, includeTeamDriveItems=None, maxResults=None, orderBy=None, pageToken=None, projection=None, q=None, spaces=None, supportsAllDrives=None, supportsTeamDrives=None, teamDriveId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400109<p class="firstline">Lists the user's files.</p>
110<p class="toc_element">
111 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
112<p class="firstline">Retrieves the next page of results.</p>
113<p class="toc_element">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800114 <code><a href="#patch">patch(fileId, addParents=None, body=None, convert=None, enforceSingleParent=None, includePermissionsForView=None, modifiedDateBehavior=None, newRevision=None, ocr=None, ocrLanguage=None, pinned=None, removeParents=None, setModifiedDate=None, supportsAllDrives=None, supportsTeamDrives=None, timedTextLanguage=None, timedTextTrackName=None, updateViewedDate=None, useContentAsIndexableText=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400115<p class="firstline">Updates file metadata and/or content. This method supports patch semantics.</p>
116<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700117 <code><a href="#touch">touch(fileId, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400118<p class="firstline">Set the file's updated time to the current server time.</p>
119<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700120 <code><a href="#trash">trash(fileId, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700121<p class="firstline">Moves a file to the trash. The currently authenticated user must own the file or be at least a fileOrganizer on the parent for shared drive files. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.</p>
John Asmuth614db982014-04-24 15:46:26 -0400122<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700123 <code><a href="#untrash">untrash(fileId, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700124<p class="firstline">Restores a file from the trash. The currently authenticated user must own the file or be at least a fileOrganizer on the parent for shared drive files. Only the owner may untrash a file.</p>
John Asmuth614db982014-04-24 15:46:26 -0400125<p class="toc_element">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800126 <code><a href="#update">update(fileId, addParents=None, body=None, convert=None, enforceSingleParent=None, includePermissionsForView=None, media_body=None, media_mime_type=None, modifiedDateBehavior=None, newRevision=None, ocr=None, ocrLanguage=None, pinned=None, removeParents=None, setModifiedDate=None, supportsAllDrives=None, supportsTeamDrives=None, timedTextLanguage=None, timedTextTrackName=None, updateViewedDate=None, useContentAsIndexableText=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400127<p class="firstline">Updates file metadata and/or content.</p>
128<p class="toc_element">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800129 <code><a href="#watch">watch(fileId, acknowledgeAbuse=None, body=None, includePermissionsForView=None, projection=None, revisionId=None, supportsAllDrives=None, supportsTeamDrives=None, updateViewedDate=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800130<p class="firstline">Subscribe to changes on a file</p>
131<p class="toc_element">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800132 <code><a href="#watch_media">watch_media(fileId, acknowledgeAbuse=None, body=None, includePermissionsForView=None, projection=None, revisionId=None, supportsAllDrives=None, supportsTeamDrives=None, updateViewedDate=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400133<p class="firstline">Subscribe to changes on a file</p>
134<h3>Method Details</h3>
135<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700136 <code class="details" id="close">close()</code>
137 <pre>Close httplib2 connections.</pre>
138</div>
139
140<div class="method">
141 <code class="details" id="copy">copy(fileId, body=None, convert=None, enforceSingleParent=None, includePermissionsForView=None, ocr=None, ocrLanguage=None, pinned=None, supportsAllDrives=None, supportsTeamDrives=None, timedTextLanguage=None, timedTextTrackName=None, visibility=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700142 <pre>Creates a copy of the specified file. Folders cannot be copied.
John Asmuth614db982014-04-24 15:46:26 -0400143
144Args:
145 fileId: string, The ID of the file to copy. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700146 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400147 The object takes the form of:
148
149{ # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700150 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
151 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
152 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
153 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
154 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
155 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700156 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700157 &quot;canAddMyDriveParent&quot;: True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
158 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
159 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
160 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
161 &quot;canCopy&quot;: True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
162 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
163 &quot;canDeleteChildren&quot;: True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
164 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
165 &quot;canEdit&quot;: True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent.
166 &quot;canListChildren&quot;: True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
167 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700168 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700169 &quot;canMoveChildrenOutOfDrive&quot;: True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
170 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700171 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user&#x27;s access to the child and to the destination folder.
Bu Sun Kim65020912020-05-20 12:08:20 -0700172 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
173 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
174 &quot;canMoveItemOutOfDrive&quot;: True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
175 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700176 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed.
Bu Sun Kim65020912020-05-20 12:08:20 -0700177 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
178 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
179 &quot;canReadDrive&quot;: True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
180 &quot;canReadRevisions&quot;: True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
181 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
182 &quot;canRemoveChildren&quot;: True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
183 &quot;canRemoveMyDriveParent&quot;: True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
184 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
185 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
186 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
187 &quot;canTrashChildren&quot;: True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
188 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -0400189 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700190 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
191 { # A restriction for accessing the content of the file.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700192 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700193 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
194 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
195 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
196 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
197 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
198 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
199 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
200 &quot;picture&quot;: { # The user&#x27;s profile picture.
201 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
202 },
203 },
204 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
205 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
206 },
207 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700208 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
209 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
210 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
211 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
212 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700213 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
Bu Sun Kim65020912020-05-20 12:08:20 -0700214 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
215 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
216 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
217 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
218 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700219 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
Bu Sun Kim65020912020-05-20 12:08:20 -0700220 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -0400221 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700222 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
223 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is populated for files with content stored in Google Drive and for files in Docs Editors; it is not populated for shortcut files.
Bu Sun Kim65020912020-05-20 12:08:20 -0700224 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700225 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
Bu Sun Kim65020912020-05-20 12:08:20 -0700226 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
227 &quot;hasThumbnail&quot;: True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700228 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
Bu Sun Kim65020912020-05-20 12:08:20 -0700229 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
230 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
231 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
232 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
233 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
234 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
235 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
236 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
237 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
238 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
239 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
240 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
241 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
242 &quot;height&quot;: 42, # The height of the image in pixels.
243 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
244 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
245 &quot;location&quot;: { # Geographic location information stored in the image.
246 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
247 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
248 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
249 },
250 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
251 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
252 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
253 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
254 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
255 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
256 &quot;width&quot;: 42, # The width of the image in pixels.
257 },
258 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
259 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
260 },
261 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
262 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
263 &quot;labels&quot;: { # A group of labels for the file.
264 &quot;hidden&quot;: True or False, # Deprecated.
265 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
266 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
267 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700268 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700269 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
270 },
271 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
272 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
273 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
274 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
275 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
276 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
277 &quot;picture&quot;: { # The user&#x27;s profile picture.
278 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
279 },
280 },
281 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
282 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
283 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700284 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
Bu Sun Kim65020912020-05-20 12:08:20 -0700285 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
286 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
287 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
288 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
289 &quot;a_key&quot;: &quot;A String&quot;,
290 },
291 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
292 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
293 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
294 &quot;A String&quot;,
295 ],
296 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700297 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700298 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
299 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
300 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
301 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
302 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
303 &quot;picture&quot;: { # The user&#x27;s profile picture.
304 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -0400305 },
John Asmuth614db982014-04-24 15:46:26 -0400306 },
307 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700308 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
309 # If not specified as part of an insert request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
310 { # A reference to a file&#x27;s parent.
311 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
312 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
313 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
314 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
315 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -0400316 },
317 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700318 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
319 &quot;A String&quot;,
320 ],
321 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
322 { # A permission for a file.
323 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
324 &quot;A String&quot;,
325 ],
326 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
327 &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.
328 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
329 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
330 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
331 &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:
332 # - They cannot be set on shared drive items
333 # - They can only be set on user and group permissions
334 # - The date must be in the future
335 # - The date cannot be more than a year in the future
336 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
337 &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.
338 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
339 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
340 &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.
341 {
342 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
343 &quot;A String&quot;,
344 ],
345 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
346 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
347 &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:
348 # - file
349 # - member
350 &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:
351 # - organizer
352 # - fileOrganizer
353 # - writer
354 # - reader
355 },
356 ],
357 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
358 &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:
359 # - owner
360 # - organizer
361 # - fileOrganizer
362 # - writer
363 # - reader
364 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
365 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
366 {
367 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
368 &quot;A String&quot;,
369 ],
370 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
371 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
372 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
373 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
374 },
375 ],
376 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
377 # - user
378 # - group
379 # - domain
380 # - anyone
381 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700382 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim65020912020-05-20 12:08:20 -0700383 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -0400384 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700385 ],
386 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000387 { # A key-value pair attached to a file that is either public or private to an application.
388 # The following limits apply to file properties:
389 # - Maximum of 100 properties total per file
390 # - Maximum of 30 private properties per app
391 # - Maximum of 30 public properties
392 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
Bu Sun Kim65020912020-05-20 12:08:20 -0700393 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
394 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
395 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
396 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
397 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
yoshi-code-bot69706592021-03-03 03:54:02 -0800398 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE). Private properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.
John Asmuth614db982014-04-24 15:46:26 -0400399 },
400 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700401 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
402 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
403 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
404 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
405 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
406 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
407 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
408 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
409 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
410 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
411 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
412 &quot;picture&quot;: { # The user&#x27;s profile picture.
413 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
414 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700415 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700416 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
417 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
418 &quot;targetMimeType&quot;: &quot;A String&quot;, # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target&#x27;s MIME type, captured when the shortcut is created.
419 },
420 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
421 &quot;A String&quot;,
422 ],
423 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
424 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
425 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
426 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
427 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700428 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content. If the file isn&#x27;t shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700429 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
430 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
431 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
432 &quot;trashingUser&quot;: { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
433 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
434 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
435 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
436 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
437 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
438 &quot;picture&quot;: { # The user&#x27;s profile picture.
439 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
440 },
441 },
442 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
443 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
444 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400445 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700446 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
447 &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.
448 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
449 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
450 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
451 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -0700452 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400453 # - They can only be set on user and group permissions
454 # - The date must be in the future
455 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700456 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -0700457 &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.
458 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
459 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
460 &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.
461 {
462 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
463 &quot;A String&quot;,
464 ],
465 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
466 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
467 &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:
468 # - file
469 # - member
470 &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:
471 # - organizer
472 # - fileOrganizer
473 # - writer
474 # - reader
475 },
476 ],
477 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
478 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -0400479 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700480 # - organizer
481 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -0400482 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700483 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700484 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
485 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
486 {
487 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
488 &quot;A String&quot;,
489 ],
490 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
491 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
492 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
493 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
494 },
495 ],
496 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -0400497 # - user
498 # - group
499 # - domain
500 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -0700501 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700502 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim65020912020-05-20 12:08:20 -0700503 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -0400504 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700505 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
506 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
507 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
508 &quot;height&quot;: 42, # The height of the video in pixels.
509 &quot;width&quot;: 42, # The width of the video in pixels.
510 },
511 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
512 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
513 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -0400514}
515
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700516 convert: boolean, Whether to convert this file to the corresponding Docs Editors format.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800517 enforceSingleParent: boolean, Deprecated. Copying files into multiple folders is no longer supported. Use shortcuts instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700518 includePermissionsForView: string, Specifies which additional view&#x27;s permissions to include in the response. Only &#x27;published&#x27; is supported.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700519 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Bu Sun Kim65020912020-05-20 12:08:20 -0700520 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
521 pinned: boolean, Whether to pin the head revision of the new copy. A file can have a maximum of 200 pinned revisions.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700522 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700523 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
524 timedTextLanguage: string, The language of the timed text.
525 timedTextTrackName: string, The timed text track name.
John Asmuth614db982014-04-24 15:46:26 -0400526 visibility: string, The visibility of the new file. This parameter is only relevant when the source is not a native Google Doc and convert=false.
527 Allowed values
Bu Sun Kim65020912020-05-20 12:08:20 -0700528 DEFAULT - The visibility of the new file is determined by the user&#x27;s default visibility/sharing policies.
John Asmuth614db982014-04-24 15:46:26 -0400529 PRIVATE - The new file will be visible to only the owner.
John Asmuth614db982014-04-24 15:46:26 -0400530
531Returns:
532 An object of the form:
533
534 { # The metadata for a file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800535 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
536 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
537 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
538 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
539 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
540 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
541 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
542 &quot;canAddMyDriveParent&quot;: True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
543 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
544 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
545 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
546 &quot;canCopy&quot;: True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
547 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
548 &quot;canDeleteChildren&quot;: True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
549 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
550 &quot;canEdit&quot;: True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent.
551 &quot;canListChildren&quot;: True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
552 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
553 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
554 &quot;canMoveChildrenOutOfDrive&quot;: True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
555 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
556 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user&#x27;s access to the child and to the destination folder.
557 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
558 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
559 &quot;canMoveItemOutOfDrive&quot;: True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
560 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
561 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed.
562 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
563 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
564 &quot;canReadDrive&quot;: True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
565 &quot;canReadRevisions&quot;: True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
566 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
567 &quot;canRemoveChildren&quot;: True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
568 &quot;canRemoveMyDriveParent&quot;: True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
569 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
570 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
571 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
572 &quot;canTrashChildren&quot;: True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
573 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
574 },
575 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
576 { # A restriction for accessing the content of the file.
577 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified.
578 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
579 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700580 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
581 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
582 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
583 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
584 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
585 &quot;picture&quot;: { # The user&#x27;s profile picture.
586 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -0400587 },
John Asmuth614db982014-04-24 15:46:26 -0400588 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800589 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
590 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
591 },
592 ],
593 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
594 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
595 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
596 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
597 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
598 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
599 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
600 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
601 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
602 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
603 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
604 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
605 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
606 },
607 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
608 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is populated for files with content stored in Google Drive and for files in Docs Editors; it is not populated for shortcut files.
609 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
610 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
611 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
612 &quot;hasThumbnail&quot;: True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
613 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
614 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
615 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
616 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
617 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
618 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
619 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
620 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
621 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
622 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
623 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
624 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
625 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
626 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
627 &quot;height&quot;: 42, # The height of the image in pixels.
628 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
629 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
630 &quot;location&quot;: { # Geographic location information stored in the image.
631 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
632 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
633 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
634 },
635 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
636 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
637 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
638 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
639 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
640 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
641 &quot;width&quot;: 42, # The width of the image in pixels.
642 },
643 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
644 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
645 },
646 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
647 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
648 &quot;labels&quot;: { # A group of labels for the file.
649 &quot;hidden&quot;: True or False, # Deprecated.
650 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
651 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
652 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
653 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
654 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
655 },
656 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
657 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
658 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
659 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
660 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
661 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
662 &quot;picture&quot;: { # The user&#x27;s profile picture.
663 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
664 },
665 },
666 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
667 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
668 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
669 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
670 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
671 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
672 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
673 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
674 &quot;a_key&quot;: &quot;A String&quot;,
675 },
676 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
677 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
678 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
679 &quot;A String&quot;,
680 ],
681 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
682 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700683 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
684 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
685 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
686 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
687 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
688 &quot;picture&quot;: { # The user&#x27;s profile picture.
689 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
690 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700691 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800692 ],
693 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
694 # If not specified as part of an insert request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
695 { # A reference to a file&#x27;s parent.
696 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
697 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
698 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
699 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
700 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
Bu Sun Kim65020912020-05-20 12:08:20 -0700701 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800702 ],
703 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
704 &quot;A String&quot;,
705 ],
706 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
707 { # A permission for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700708 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
709 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400710 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700711 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
712 &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.
713 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
714 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
715 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
716 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -0700717 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400718 # - They can only be set on user and group permissions
719 # - The date must be in the future
720 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700721 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -0700722 &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.
723 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
724 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
725 &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.
726 {
727 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
728 &quot;A String&quot;,
729 ],
730 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
731 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
732 &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:
733 # - file
734 # - member
735 &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:
736 # - organizer
737 # - fileOrganizer
738 # - writer
739 # - reader
740 },
741 ],
742 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
743 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -0400744 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700745 # - organizer
746 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -0400747 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700748 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700749 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
750 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
751 {
752 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
753 &quot;A String&quot;,
754 ],
755 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
756 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
757 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
758 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
759 },
760 ],
761 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -0400762 # - user
763 # - group
764 # - domain
765 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -0700766 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700767 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim65020912020-05-20 12:08:20 -0700768 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -0400769 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800770 ],
771 &quot;properties&quot;: [ # The list of properties.
772 { # A key-value pair attached to a file that is either public or private to an application.
773 # The following limits apply to file properties:
774 # - Maximum of 100 properties total per file
775 # - Maximum of 30 private properties per app
776 # - Maximum of 30 public properties
777 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
778 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
779 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
780 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
781 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
782 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
yoshi-code-bot69706592021-03-03 03:54:02 -0800783 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE). Private properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.
Bu Sun Kim65020912020-05-20 12:08:20 -0700784 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800785 ],
786 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
787 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
788 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
789 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
790 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
791 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
792 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
793 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
794 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
795 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
796 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
797 &quot;picture&quot;: { # The user&#x27;s profile picture.
798 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
799 },
800 },
801 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
802 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
803 &quot;targetMimeType&quot;: &quot;A String&quot;, # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target&#x27;s MIME type, captured when the shortcut is created.
804 },
805 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
806 &quot;A String&quot;,
807 ],
808 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
809 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
810 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
811 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
812 },
813 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content. If the file isn&#x27;t shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request.
814 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
815 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
816 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
817 &quot;trashingUser&quot;: { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
818 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
819 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
820 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
821 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
822 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
823 &quot;picture&quot;: { # The user&#x27;s profile picture.
824 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
825 },
826 },
827 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
828 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
829 &quot;A String&quot;,
830 ],
831 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
832 &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.
833 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
834 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
835 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
836 &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:
837 # - They cannot be set on shared drive items
838 # - They can only be set on user and group permissions
839 # - The date must be in the future
840 # - The date cannot be more than a year in the future
841 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
842 &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.
843 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
844 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
845 &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.
846 {
847 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
848 &quot;A String&quot;,
849 ],
850 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
851 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
852 &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:
853 # - file
854 # - member
855 &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:
856 # - organizer
857 # - fileOrganizer
858 # - writer
859 # - reader
860 },
861 ],
862 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
863 &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:
864 # - owner
865 # - organizer
866 # - fileOrganizer
867 # - writer
868 # - reader
869 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
870 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
871 {
872 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
873 &quot;A String&quot;,
874 ],
875 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
876 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
877 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
878 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
879 },
880 ],
881 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
882 # - user
883 # - group
884 # - domain
885 # - anyone
886 &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.
887 &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.
888 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
889 },
890 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
891 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
892 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
893 &quot;height&quot;: 42, # The height of the video in pixels.
894 &quot;width&quot;: 42, # The width of the video in pixels.
895 },
896 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
897 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
898 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
899}</pre>
John Asmuth614db982014-04-24 15:46:26 -0400900</div>
901
902<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700903 <code class="details" id="delete">delete(fileId, enforceSingleParent=None, supportsAllDrives=None, supportsTeamDrives=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700904 <pre>Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file or be an organizer on the parent for shared drive files.
John Asmuth614db982014-04-24 15:46:26 -0400905
906Args:
907 fileId: string, The ID of the file to delete. (required)
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800908 enforceSingleParent: boolean, Deprecated. If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner&#x27;s root.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700909 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700910 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
John Asmuth614db982014-04-24 15:46:26 -0400911</pre>
912</div>
913
914<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700915 <code class="details" id="emptyTrash">emptyTrash(enforceSingleParent=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700916 <pre>Permanently deletes all of the user&#x27;s trashed files.
Craig Citro065b5302014-08-14 00:47:23 -0700917
918Args:
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800919 enforceSingleParent: boolean, Deprecated. If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner&#x27;s root.
Craig Citro065b5302014-08-14 00:47:23 -0700920</pre>
921</div>
922
923<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700924 <code class="details" id="export">export(fileId, mimeType)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700925 <pre>Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700926
927Args:
928 fileId: string, The ID of the file. (required)
929 mimeType: string, The MIME type of the format requested for this export. (required)
930</pre>
931</div>
932
933<div class="method">
934 <code class="details" id="export_media">export_media(fileId, mimeType)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700935 <pre>Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700936
937Args:
938 fileId: string, The ID of the file. (required)
939 mimeType: string, The MIME type of the format requested for this export. (required)
940</pre>
941</div>
942
943<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700944 <code class="details" id="generateIds">generateIds(maxResults=None, space=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -0700945 <pre>Generates a set of file IDs which can be provided in insert or copy requests.
Takashi Matsuo06694102015-09-11 13:55:40 -0700946
947Args:
Takashi Matsuo06694102015-09-11 13:55:40 -0700948 maxResults: integer, Maximum number of IDs to return.
Bu Sun Kim65020912020-05-20 12:08:20 -0700949 space: string, The space in which the IDs can be used to create new files. Supported values are &#x27;drive&#x27; and &#x27;appDataFolder&#x27;.
Takashi Matsuo06694102015-09-11 13:55:40 -0700950
951Returns:
952 An object of the form:
953
954 { # A list of generated IDs which can be provided in insert requests
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800955 &quot;ids&quot;: [ # The IDs generated for the requesting user in the specified space.
956 &quot;A String&quot;,
957 ],
958 &quot;kind&quot;: &quot;drive#generatedIds&quot;, # This is always drive#generatedIds
959 &quot;space&quot;: &quot;A String&quot;, # The type of file that can be created with these IDs.
960}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -0700961</div>
962
963<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700964 <code class="details" id="get">get(fileId, acknowledgeAbuse=None, includePermissionsForView=None, projection=None, revisionId=None, supportsAllDrives=None, supportsTeamDrives=None, updateViewedDate=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700965 <pre>Gets a file&#x27;s metadata by ID.
John Asmuth614db982014-04-24 15:46:26 -0400966
967Args:
968 fileId: string, The ID for the file in question. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700969 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700970 includePermissionsForView: string, Specifies which additional view&#x27;s permissions to include in the response. Only &#x27;published&#x27; is supported.
John Asmuth614db982014-04-24 15:46:26 -0400971 projection: string, This parameter is deprecated and has no function.
972 Allowed values
973 BASIC - Deprecated
974 FULL - Deprecated
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000975 revisionId: string, Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700976 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700977 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700978 updateViewedDate: boolean, Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
John Asmuth614db982014-04-24 15:46:26 -0400979
980Returns:
981 An object of the form:
982
983 { # The metadata for a file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800984 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
985 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
986 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
987 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
988 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
989 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
990 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
991 &quot;canAddMyDriveParent&quot;: True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
992 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
993 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
994 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
995 &quot;canCopy&quot;: True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
996 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
997 &quot;canDeleteChildren&quot;: True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
998 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
999 &quot;canEdit&quot;: True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent.
1000 &quot;canListChildren&quot;: True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
1001 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
1002 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
1003 &quot;canMoveChildrenOutOfDrive&quot;: True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
1004 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
1005 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user&#x27;s access to the child and to the destination folder.
1006 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1007 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1008 &quot;canMoveItemOutOfDrive&quot;: True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
1009 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1010 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed.
1011 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
1012 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1013 &quot;canReadDrive&quot;: True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
1014 &quot;canReadRevisions&quot;: True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
1015 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
1016 &quot;canRemoveChildren&quot;: True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
1017 &quot;canRemoveMyDriveParent&quot;: True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
1018 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
1019 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
1020 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
1021 &quot;canTrashChildren&quot;: True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
1022 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
1023 },
1024 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
1025 { # A restriction for accessing the content of the file.
1026 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified.
1027 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
1028 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001029 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1030 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1031 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1032 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1033 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1034 &quot;picture&quot;: { # The user&#x27;s profile picture.
1035 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -04001036 },
John Asmuth614db982014-04-24 15:46:26 -04001037 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001038 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
1039 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
1040 },
1041 ],
1042 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1043 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
1044 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
1045 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
1046 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
1047 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
1048 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1049 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
1050 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
1051 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
1052 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
1053 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
1054 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
1055 },
1056 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
1057 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is populated for files with content stored in Google Drive and for files in Docs Editors; it is not populated for shortcut files.
1058 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
1059 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
1060 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1061 &quot;hasThumbnail&quot;: True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
1062 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
1063 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
1064 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1065 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
1066 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1067 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1068 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1069 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1070 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
1071 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1072 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1073 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1074 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1075 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1076 &quot;height&quot;: 42, # The height of the image in pixels.
1077 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1078 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1079 &quot;location&quot;: { # Geographic location information stored in the image.
1080 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1081 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1082 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1083 },
1084 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1085 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1086 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1087 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1088 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1089 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1090 &quot;width&quot;: 42, # The width of the image in pixels.
1091 },
1092 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
1093 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
1094 },
1095 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1096 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
1097 &quot;labels&quot;: { # A group of labels for the file.
1098 &quot;hidden&quot;: True or False, # Deprecated.
1099 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
1100 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
1101 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
1102 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
1103 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
1104 },
1105 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
1106 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1107 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1108 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1109 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1110 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1111 &quot;picture&quot;: { # The user&#x27;s profile picture.
1112 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1113 },
1114 },
1115 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
1116 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1117 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
1118 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
1119 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
1120 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
1121 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
1122 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
1123 &quot;a_key&quot;: &quot;A String&quot;,
1124 },
1125 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
1126 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
1127 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
1128 &quot;A String&quot;,
1129 ],
1130 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
1131 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001132 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1133 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1134 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1135 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1136 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1137 &quot;picture&quot;: { # The user&#x27;s profile picture.
1138 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1139 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001140 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001141 ],
1142 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
1143 # If not specified as part of an insert request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
1144 { # A reference to a file&#x27;s parent.
1145 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
1146 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
1147 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
1148 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
1149 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
Bu Sun Kim65020912020-05-20 12:08:20 -07001150 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001151 ],
1152 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1153 &quot;A String&quot;,
1154 ],
1155 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
1156 { # A permission for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001157 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
1158 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001159 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001160 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
1161 &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.
1162 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
1163 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
1164 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
1165 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -07001166 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001167 # - They can only be set on user and group permissions
1168 # - The date must be in the future
1169 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001170 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07001171 &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.
1172 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
1173 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
1174 &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.
1175 {
1176 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1177 &quot;A String&quot;,
1178 ],
1179 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1180 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1181 &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:
1182 # - file
1183 # - member
1184 &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:
1185 # - organizer
1186 # - fileOrganizer
1187 # - writer
1188 # - reader
1189 },
1190 ],
1191 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
1192 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04001193 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001194 # - organizer
1195 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04001196 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001197 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07001198 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
1199 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1200 {
1201 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
1202 &quot;A String&quot;,
1203 ],
1204 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1205 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1206 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1207 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1208 },
1209 ],
1210 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04001211 # - user
1212 # - group
1213 # - domain
1214 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07001215 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001216 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim65020912020-05-20 12:08:20 -07001217 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04001218 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001219 ],
1220 &quot;properties&quot;: [ # The list of properties.
1221 { # A key-value pair attached to a file that is either public or private to an application.
1222 # The following limits apply to file properties:
1223 # - Maximum of 100 properties total per file
1224 # - Maximum of 30 private properties per app
1225 # - Maximum of 30 public properties
1226 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
1227 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
1228 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
1229 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
1230 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
1231 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
yoshi-code-bot69706592021-03-03 03:54:02 -08001232 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE). Private properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.
Bu Sun Kim65020912020-05-20 12:08:20 -07001233 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001234 ],
1235 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
1236 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
1237 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
1238 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
1239 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
1240 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
1241 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1242 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1243 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1244 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1245 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1246 &quot;picture&quot;: { # The user&#x27;s profile picture.
1247 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1248 },
1249 },
1250 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
1251 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
1252 &quot;targetMimeType&quot;: &quot;A String&quot;, # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target&#x27;s MIME type, captured when the shortcut is created.
1253 },
1254 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
1255 &quot;A String&quot;,
1256 ],
1257 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
1258 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
1259 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
1260 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
1261 },
1262 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content. If the file isn&#x27;t shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request.
1263 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
1264 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
1265 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
1266 &quot;trashingUser&quot;: { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
1267 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1268 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1269 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1270 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1271 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1272 &quot;picture&quot;: { # The user&#x27;s profile picture.
1273 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1274 },
1275 },
1276 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
1277 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
1278 &quot;A String&quot;,
1279 ],
1280 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
1281 &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.
1282 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
1283 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
1284 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
1285 &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:
1286 # - They cannot be set on shared drive items
1287 # - They can only be set on user and group permissions
1288 # - The date must be in the future
1289 # - The date cannot be more than a year in the future
1290 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
1291 &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.
1292 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
1293 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
1294 &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.
1295 {
1296 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1297 &quot;A String&quot;,
1298 ],
1299 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1300 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1301 &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:
1302 # - file
1303 # - member
1304 &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:
1305 # - organizer
1306 # - fileOrganizer
1307 # - writer
1308 # - reader
1309 },
1310 ],
1311 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
1312 &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:
1313 # - owner
1314 # - organizer
1315 # - fileOrganizer
1316 # - writer
1317 # - reader
1318 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
1319 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1320 {
1321 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
1322 &quot;A String&quot;,
1323 ],
1324 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1325 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1326 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1327 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1328 },
1329 ],
1330 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
1331 # - user
1332 # - group
1333 # - domain
1334 # - anyone
1335 &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.
1336 &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.
1337 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
1338 },
1339 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
1340 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
1341 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
1342 &quot;height&quot;: 42, # The height of the video in pixels.
1343 &quot;width&quot;: 42, # The width of the video in pixels.
1344 },
1345 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
1346 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
1347 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
1348}</pre>
John Asmuth614db982014-04-24 15:46:26 -04001349</div>
1350
1351<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001352 <code class="details" id="get_media">get_media(fileId, acknowledgeAbuse=None, includePermissionsForView=None, projection=None, revisionId=None, supportsAllDrives=None, supportsTeamDrives=None, updateViewedDate=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07001353 <pre>Gets a file&#x27;s metadata by ID.
Craig Citroe633be12015-03-02 13:40:36 -08001354
1355Args:
1356 fileId: string, The ID for the file in question. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -07001357 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001358 includePermissionsForView: string, Specifies which additional view&#x27;s permissions to include in the response. Only &#x27;published&#x27; is supported.
Craig Citroe633be12015-03-02 13:40:36 -08001359 projection: string, This parameter is deprecated and has no function.
1360 Allowed values
1361 BASIC - Deprecated
1362 FULL - Deprecated
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001363 revisionId: string, Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001364 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001365 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001366 updateViewedDate: boolean, Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
Craig Citroe633be12015-03-02 13:40:36 -08001367
1368Returns:
1369 The media object as a string.
1370
1371 </pre>
1372</div>
1373
1374<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001375 <code class="details" id="insert">insert(body=None, convert=None, enforceSingleParent=None, includePermissionsForView=None, media_body=None, media_mime_type=None, ocr=None, ocrLanguage=None, pinned=None, supportsAllDrives=None, supportsTeamDrives=None, timedTextLanguage=None, timedTextTrackName=None, useContentAsIndexableText=None, visibility=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04001376 <pre>Insert a new file.
1377
1378Args:
1379 body: object, The request body.
1380 The object takes the form of:
1381
1382{ # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001383 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
1384 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
1385 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
1386 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
1387 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
1388 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001389 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001390 &quot;canAddMyDriveParent&quot;: True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
1391 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1392 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
1393 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
1394 &quot;canCopy&quot;: True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
1395 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
1396 &quot;canDeleteChildren&quot;: True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
1397 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
1398 &quot;canEdit&quot;: True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent.
1399 &quot;canListChildren&quot;: True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
1400 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001401 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001402 &quot;canMoveChildrenOutOfDrive&quot;: True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
1403 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001404 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user&#x27;s access to the child and to the destination folder.
Bu Sun Kim65020912020-05-20 12:08:20 -07001405 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1406 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1407 &quot;canMoveItemOutOfDrive&quot;: True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
1408 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001409 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed.
Bu Sun Kim65020912020-05-20 12:08:20 -07001410 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
1411 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1412 &quot;canReadDrive&quot;: True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
1413 &quot;canReadRevisions&quot;: True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
1414 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
1415 &quot;canRemoveChildren&quot;: True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
1416 &quot;canRemoveMyDriveParent&quot;: True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
1417 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
1418 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
1419 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
1420 &quot;canTrashChildren&quot;: True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
1421 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -04001422 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001423 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
1424 { # A restriction for accessing the content of the file.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001425 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001426 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
1427 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
1428 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1429 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1430 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1431 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1432 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1433 &quot;picture&quot;: { # The user&#x27;s profile picture.
1434 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1435 },
1436 },
1437 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
1438 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
1439 },
1440 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001441 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1442 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
1443 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
1444 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
1445 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001446 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
Bu Sun Kim65020912020-05-20 12:08:20 -07001447 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1448 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
1449 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
1450 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
1451 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001452 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
Bu Sun Kim65020912020-05-20 12:08:20 -07001453 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -04001454 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001455 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
1456 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is populated for files with content stored in Google Drive and for files in Docs Editors; it is not populated for shortcut files.
Bu Sun Kim65020912020-05-20 12:08:20 -07001457 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001458 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
Bu Sun Kim65020912020-05-20 12:08:20 -07001459 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1460 &quot;hasThumbnail&quot;: True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001461 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
Bu Sun Kim65020912020-05-20 12:08:20 -07001462 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
1463 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1464 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
1465 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1466 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1467 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1468 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1469 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
1470 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1471 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1472 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1473 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1474 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1475 &quot;height&quot;: 42, # The height of the image in pixels.
1476 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1477 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1478 &quot;location&quot;: { # Geographic location information stored in the image.
1479 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1480 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1481 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1482 },
1483 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1484 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1485 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1486 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1487 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1488 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1489 &quot;width&quot;: 42, # The width of the image in pixels.
1490 },
1491 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
1492 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
1493 },
1494 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1495 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
1496 &quot;labels&quot;: { # A group of labels for the file.
1497 &quot;hidden&quot;: True or False, # Deprecated.
1498 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
1499 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
1500 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001501 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001502 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
1503 },
1504 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
1505 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1506 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1507 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1508 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1509 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1510 &quot;picture&quot;: { # The user&#x27;s profile picture.
1511 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1512 },
1513 },
1514 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
1515 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1516 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001517 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
Bu Sun Kim65020912020-05-20 12:08:20 -07001518 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
1519 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
1520 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
1521 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
1522 &quot;a_key&quot;: &quot;A String&quot;,
1523 },
1524 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
1525 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
1526 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
1527 &quot;A String&quot;,
1528 ],
1529 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001530 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001531 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1532 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1533 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1534 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1535 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1536 &quot;picture&quot;: { # The user&#x27;s profile picture.
1537 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -04001538 },
John Asmuth614db982014-04-24 15:46:26 -04001539 },
1540 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001541 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
1542 # If not specified as part of an insert request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
1543 { # A reference to a file&#x27;s parent.
1544 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
1545 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
1546 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
1547 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
1548 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04001549 },
1550 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001551 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1552 &quot;A String&quot;,
1553 ],
1554 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
1555 { # A permission for a file.
1556 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
1557 &quot;A String&quot;,
1558 ],
1559 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
1560 &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.
1561 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
1562 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
1563 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
1564 &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:
1565 # - They cannot be set on shared drive items
1566 # - They can only be set on user and group permissions
1567 # - The date must be in the future
1568 # - The date cannot be more than a year in the future
1569 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
1570 &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.
1571 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
1572 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
1573 &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.
1574 {
1575 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1576 &quot;A String&quot;,
1577 ],
1578 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1579 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1580 &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:
1581 # - file
1582 # - member
1583 &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:
1584 # - organizer
1585 # - fileOrganizer
1586 # - writer
1587 # - reader
1588 },
1589 ],
1590 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
1591 &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:
1592 # - owner
1593 # - organizer
1594 # - fileOrganizer
1595 # - writer
1596 # - reader
1597 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
1598 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1599 {
1600 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
1601 &quot;A String&quot;,
1602 ],
1603 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1604 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1605 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1606 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1607 },
1608 ],
1609 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
1610 # - user
1611 # - group
1612 # - domain
1613 # - anyone
1614 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001615 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim65020912020-05-20 12:08:20 -07001616 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04001617 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001618 ],
1619 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001620 { # A key-value pair attached to a file that is either public or private to an application.
1621 # The following limits apply to file properties:
1622 # - Maximum of 100 properties total per file
1623 # - Maximum of 30 private properties per app
1624 # - Maximum of 30 public properties
1625 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
Bu Sun Kim65020912020-05-20 12:08:20 -07001626 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
1627 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
1628 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
1629 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
1630 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
yoshi-code-bot69706592021-03-03 03:54:02 -08001631 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE). Private properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.
John Asmuth614db982014-04-24 15:46:26 -04001632 },
1633 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001634 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
1635 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
1636 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
1637 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
1638 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
1639 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
1640 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1641 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1642 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1643 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1644 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1645 &quot;picture&quot;: { # The user&#x27;s profile picture.
1646 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1647 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001648 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001649 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
1650 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
1651 &quot;targetMimeType&quot;: &quot;A String&quot;, # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target&#x27;s MIME type, captured when the shortcut is created.
1652 },
1653 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
1654 &quot;A String&quot;,
1655 ],
1656 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
1657 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
1658 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
1659 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
1660 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001661 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content. If the file isn&#x27;t shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request.
Bu Sun Kim65020912020-05-20 12:08:20 -07001662 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
1663 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
1664 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
1665 &quot;trashingUser&quot;: { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
1666 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1667 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1668 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1669 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1670 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1671 &quot;picture&quot;: { # The user&#x27;s profile picture.
1672 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1673 },
1674 },
1675 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
1676 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
1677 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001678 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001679 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
1680 &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.
1681 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
1682 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
1683 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
1684 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -07001685 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001686 # - They can only be set on user and group permissions
1687 # - The date must be in the future
1688 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001689 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07001690 &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.
1691 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
1692 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
1693 &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.
1694 {
1695 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1696 &quot;A String&quot;,
1697 ],
1698 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1699 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1700 &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:
1701 # - file
1702 # - member
1703 &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:
1704 # - organizer
1705 # - fileOrganizer
1706 # - writer
1707 # - reader
1708 },
1709 ],
1710 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
1711 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04001712 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001713 # - organizer
1714 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04001715 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001716 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07001717 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
1718 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1719 {
1720 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
1721 &quot;A String&quot;,
1722 ],
1723 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1724 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1725 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1726 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1727 },
1728 ],
1729 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04001730 # - user
1731 # - group
1732 # - domain
1733 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07001734 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001735 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim65020912020-05-20 12:08:20 -07001736 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04001737 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001738 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
1739 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
1740 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
1741 &quot;height&quot;: 42, # The height of the video in pixels.
1742 &quot;width&quot;: 42, # The width of the video in pixels.
1743 },
1744 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
1745 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
1746 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04001747}
1748
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001749 convert: boolean, Whether to convert this file to the corresponding Docs Editors format.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001750 enforceSingleParent: boolean, Deprecated. Creating files in multiple folders is no longer supported.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001751 includePermissionsForView: string, Specifies which additional view&#x27;s permissions to include in the response. Only &#x27;published&#x27; is supported.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001752 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
1753 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001754 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Bu Sun Kim65020912020-05-20 12:08:20 -07001755 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001756 pinned: boolean, Whether to pin the head revision of the uploaded file. A file can have a maximum of 200 pinned revisions.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001757 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001758 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
1759 timedTextLanguage: string, The language of the timed text.
1760 timedTextTrackName: string, The timed text track name.
1761 useContentAsIndexableText: boolean, Whether to use the content as indexable text.
John Asmuth614db982014-04-24 15:46:26 -04001762 visibility: string, The visibility of the new file. This parameter is only relevant when convert=false.
1763 Allowed values
Bu Sun Kim65020912020-05-20 12:08:20 -07001764 DEFAULT - The visibility of the new file is determined by the user&#x27;s default visibility/sharing policies.
John Asmuth614db982014-04-24 15:46:26 -04001765 PRIVATE - The new file will be visible to only the owner.
John Asmuth614db982014-04-24 15:46:26 -04001766
1767Returns:
1768 An object of the form:
1769
1770 { # The metadata for a file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001771 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
1772 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
1773 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
1774 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
1775 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
1776 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
1777 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
1778 &quot;canAddMyDriveParent&quot;: True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
1779 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1780 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
1781 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
1782 &quot;canCopy&quot;: True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
1783 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
1784 &quot;canDeleteChildren&quot;: True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
1785 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
1786 &quot;canEdit&quot;: True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent.
1787 &quot;canListChildren&quot;: True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
1788 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
1789 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
1790 &quot;canMoveChildrenOutOfDrive&quot;: True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
1791 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
1792 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user&#x27;s access to the child and to the destination folder.
1793 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1794 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1795 &quot;canMoveItemOutOfDrive&quot;: True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
1796 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1797 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed.
1798 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
1799 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1800 &quot;canReadDrive&quot;: True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
1801 &quot;canReadRevisions&quot;: True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
1802 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
1803 &quot;canRemoveChildren&quot;: True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
1804 &quot;canRemoveMyDriveParent&quot;: True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
1805 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
1806 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
1807 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
1808 &quot;canTrashChildren&quot;: True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
1809 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
1810 },
1811 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
1812 { # A restriction for accessing the content of the file.
1813 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified.
1814 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
1815 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001816 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1817 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1818 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1819 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1820 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1821 &quot;picture&quot;: { # The user&#x27;s profile picture.
1822 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -04001823 },
John Asmuth614db982014-04-24 15:46:26 -04001824 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001825 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
1826 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
1827 },
1828 ],
1829 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1830 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
1831 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
1832 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
1833 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
1834 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
1835 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1836 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
1837 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
1838 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
1839 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
1840 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
1841 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
1842 },
1843 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
1844 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is populated for files with content stored in Google Drive and for files in Docs Editors; it is not populated for shortcut files.
1845 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
1846 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
1847 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1848 &quot;hasThumbnail&quot;: True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
1849 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
1850 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
1851 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1852 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
1853 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1854 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1855 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1856 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1857 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
1858 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1859 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1860 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1861 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1862 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1863 &quot;height&quot;: 42, # The height of the image in pixels.
1864 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1865 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1866 &quot;location&quot;: { # Geographic location information stored in the image.
1867 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1868 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1869 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1870 },
1871 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1872 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1873 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1874 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1875 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1876 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1877 &quot;width&quot;: 42, # The width of the image in pixels.
1878 },
1879 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
1880 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
1881 },
1882 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1883 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
1884 &quot;labels&quot;: { # A group of labels for the file.
1885 &quot;hidden&quot;: True or False, # Deprecated.
1886 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
1887 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
1888 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
1889 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
1890 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
1891 },
1892 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
1893 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1894 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1895 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1896 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1897 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1898 &quot;picture&quot;: { # The user&#x27;s profile picture.
1899 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1900 },
1901 },
1902 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
1903 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1904 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
1905 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
1906 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
1907 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
1908 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
1909 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
1910 &quot;a_key&quot;: &quot;A String&quot;,
1911 },
1912 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
1913 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
1914 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
1915 &quot;A String&quot;,
1916 ],
1917 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
1918 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001919 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1920 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1921 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1922 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1923 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1924 &quot;picture&quot;: { # The user&#x27;s profile picture.
1925 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1926 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001927 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001928 ],
1929 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
1930 # If not specified as part of an insert request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
1931 { # A reference to a file&#x27;s parent.
1932 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
1933 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
1934 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
1935 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
1936 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
Bu Sun Kim65020912020-05-20 12:08:20 -07001937 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001938 ],
1939 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1940 &quot;A String&quot;,
1941 ],
1942 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
1943 { # A permission for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001944 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
1945 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001946 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001947 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
1948 &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.
1949 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
1950 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
1951 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
1952 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -07001953 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001954 # - They can only be set on user and group permissions
1955 # - The date must be in the future
1956 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001957 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07001958 &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.
1959 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
1960 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
1961 &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.
1962 {
1963 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1964 &quot;A String&quot;,
1965 ],
1966 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1967 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1968 &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:
1969 # - file
1970 # - member
1971 &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:
1972 # - organizer
1973 # - fileOrganizer
1974 # - writer
1975 # - reader
1976 },
1977 ],
1978 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
1979 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04001980 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001981 # - organizer
1982 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04001983 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001984 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07001985 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
1986 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1987 {
1988 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
1989 &quot;A String&quot;,
1990 ],
1991 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1992 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1993 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1994 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1995 },
1996 ],
1997 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04001998 # - user
1999 # - group
2000 # - domain
2001 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07002002 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002003 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim65020912020-05-20 12:08:20 -07002004 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04002005 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002006 ],
2007 &quot;properties&quot;: [ # The list of properties.
2008 { # A key-value pair attached to a file that is either public or private to an application.
2009 # The following limits apply to file properties:
2010 # - Maximum of 100 properties total per file
2011 # - Maximum of 30 private properties per app
2012 # - Maximum of 30 public properties
2013 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
2014 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
2015 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
2016 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
2017 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
2018 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
yoshi-code-bot69706592021-03-03 03:54:02 -08002019 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE). Private properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.
Bu Sun Kim65020912020-05-20 12:08:20 -07002020 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002021 ],
2022 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
2023 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
2024 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
2025 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
2026 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
2027 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
2028 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2029 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2030 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2031 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2032 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2033 &quot;picture&quot;: { # The user&#x27;s profile picture.
2034 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2035 },
2036 },
2037 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
2038 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
2039 &quot;targetMimeType&quot;: &quot;A String&quot;, # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target&#x27;s MIME type, captured when the shortcut is created.
2040 },
2041 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
2042 &quot;A String&quot;,
2043 ],
2044 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
2045 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
2046 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
2047 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
2048 },
2049 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content. If the file isn&#x27;t shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request.
2050 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
2051 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
2052 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
2053 &quot;trashingUser&quot;: { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
2054 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2055 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2056 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2057 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2058 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2059 &quot;picture&quot;: { # The user&#x27;s profile picture.
2060 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2061 },
2062 },
2063 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
2064 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
2065 &quot;A String&quot;,
2066 ],
2067 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
2068 &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.
2069 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
2070 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
2071 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
2072 &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:
2073 # - They cannot be set on shared drive items
2074 # - They can only be set on user and group permissions
2075 # - The date must be in the future
2076 # - The date cannot be more than a year in the future
2077 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
2078 &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.
2079 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
2080 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
2081 &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.
2082 {
2083 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2084 &quot;A String&quot;,
2085 ],
2086 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2087 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
2088 &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:
2089 # - file
2090 # - member
2091 &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:
2092 # - organizer
2093 # - fileOrganizer
2094 # - writer
2095 # - reader
2096 },
2097 ],
2098 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
2099 &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:
2100 # - owner
2101 # - organizer
2102 # - fileOrganizer
2103 # - writer
2104 # - reader
2105 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
2106 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
2107 {
2108 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
2109 &quot;A String&quot;,
2110 ],
2111 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
2112 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
2113 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
2114 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
2115 },
2116 ],
2117 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
2118 # - user
2119 # - group
2120 # - domain
2121 # - anyone
2122 &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.
2123 &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.
2124 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
2125 },
2126 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
2127 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
2128 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
2129 &quot;height&quot;: 42, # The height of the video in pixels.
2130 &quot;width&quot;: 42, # The width of the video in pixels.
2131 },
2132 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
2133 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
2134 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
2135}</pre>
John Asmuth614db982014-04-24 15:46:26 -04002136</div>
2137
2138<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002139 <code class="details" id="list">list(corpora=None, corpus=None, driveId=None, includeItemsFromAllDrives=None, includePermissionsForView=None, includeTeamDriveItems=None, maxResults=None, orderBy=None, pageToken=None, projection=None, q=None, spaces=None, supportsAllDrives=None, supportsTeamDrives=None, teamDriveId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07002140 <pre>Lists the user&#x27;s files.
John Asmuth614db982014-04-24 15:46:26 -04002141
2142Args:
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002143 corpora: string, Groupings of files to which the query applies. Supported groupings are: &#x27;user&#x27; (files created by, opened by, or shared directly with the user), &#x27;drive&#x27; (files in the specified shared drive as indicated by the &#x27;driveId&#x27;), &#x27;domain&#x27; (files shared to the user&#x27;s domain), and &#x27;allDrives&#x27; (A combination of &#x27;user&#x27; and &#x27;drive&#x27; for all drives where the user is a member). When able, use &#x27;user&#x27; or &#x27;drive&#x27;, instead of &#x27;allDrives&#x27;, for efficiency.
Bu Sun Kim65020912020-05-20 12:08:20 -07002144 corpus: string, The body of items (files/documents) to which the query applies. Deprecated: use &#x27;corpora&#x27; instead.
2145 Allowed values
2146 DEFAULT - The items that the user has accessed.
2147 DOMAIN - Items shared to the user&#x27;s domain.
2148 driveId: string, ID of the shared drive to search.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002149 includeItemsFromAllDrives: boolean, Whether both My Drive and shared drive items should be included in results.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002150 includePermissionsForView: string, Specifies which additional view&#x27;s permissions to include in the response. Only &#x27;published&#x27; is supported.
Bu Sun Kim65020912020-05-20 12:08:20 -07002151 includeTeamDriveItems: boolean, Deprecated use includeItemsFromAllDrives instead.
2152 maxResults: integer, The maximum number of files to return per page. Partial or empty result pages are possible even before the end of the files list has been reached.
2153 orderBy: string, A comma-separated list of sort keys. Valid keys are &#x27;createdDate&#x27;, &#x27;folder&#x27;, &#x27;lastViewedByMeDate&#x27;, &#x27;modifiedByMeDate&#x27;, &#x27;modifiedDate&#x27;, &#x27;quotaBytesUsed&#x27;, &#x27;recency&#x27;, &#x27;sharedWithMeDate&#x27;, &#x27;starred&#x27;, &#x27;title&#x27;, and &#x27;title_natural&#x27;. Each key sorts ascending by default, but may be reversed with the &#x27;desc&#x27; modifier. Example usage: ?orderBy=folder,modifiedDate desc,title. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.
2154 pageToken: string, Page token for files.
John Asmuth614db982014-04-24 15:46:26 -04002155 projection: string, This parameter is deprecated and has no function.
2156 Allowed values
2157 BASIC - Deprecated
2158 FULL - Deprecated
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002159 q: string, Query string for searching files.
Bu Sun Kim65020912020-05-20 12:08:20 -07002160 spaces: string, A comma-separated list of spaces to query. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002161 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07002162 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
2163 teamDriveId: string, Deprecated use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04002164
2165Returns:
2166 An object of the form:
2167
2168 { # A list of files.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002169 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the list.
2170 &quot;incompleteSearch&quot;: True or False, # Whether the search process was incomplete. If true, then some search results may be missing, since all documents were not searched. This may occur when searching multiple drives with the &quot;allDrives&quot; corpora, but all corpora could not be searched. When this happens, it is suggested that clients narrow their query by choosing a different corpus such as &quot;default&quot; or &quot;drive&quot;.
2171 &quot;items&quot;: [ # The list of files. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.
2172 { # The metadata for a file.
2173 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
2174 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
2175 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
2176 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
2177 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
2178 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
2179 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
2180 &quot;canAddMyDriveParent&quot;: True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
2181 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
2182 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
2183 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
2184 &quot;canCopy&quot;: True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
2185 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
2186 &quot;canDeleteChildren&quot;: True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
2187 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
2188 &quot;canEdit&quot;: True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent.
2189 &quot;canListChildren&quot;: True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
2190 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
2191 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
2192 &quot;canMoveChildrenOutOfDrive&quot;: True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
2193 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
2194 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user&#x27;s access to the child and to the destination folder.
2195 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
2196 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2197 &quot;canMoveItemOutOfDrive&quot;: True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
2198 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2199 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed.
2200 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
2201 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
2202 &quot;canReadDrive&quot;: True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
2203 &quot;canReadRevisions&quot;: True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
2204 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
2205 &quot;canRemoveChildren&quot;: True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
2206 &quot;canRemoveMyDriveParent&quot;: True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
2207 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
2208 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
2209 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
2210 &quot;canTrashChildren&quot;: True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
2211 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
2212 },
2213 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
2214 { # A restriction for accessing the content of the file.
2215 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified.
2216 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
2217 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002218 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2219 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2220 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2221 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2222 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2223 &quot;picture&quot;: { # The user&#x27;s profile picture.
2224 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -04002225 },
John Asmuth614db982014-04-24 15:46:26 -04002226 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002227 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
2228 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
2229 },
2230 ],
2231 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
2232 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
2233 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
2234 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
2235 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
2236 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
2237 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
2238 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
2239 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
2240 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
2241 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
2242 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
2243 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
2244 },
2245 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
2246 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is populated for files with content stored in Google Drive and for files in Docs Editors; it is not populated for shortcut files.
2247 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
2248 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
2249 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
2250 &quot;hasThumbnail&quot;: True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
2251 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
2252 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
2253 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
2254 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
2255 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
2256 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
2257 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
2258 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
2259 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
2260 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
2261 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
2262 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
2263 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
2264 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
2265 &quot;height&quot;: 42, # The height of the image in pixels.
2266 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
2267 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
2268 &quot;location&quot;: { # Geographic location information stored in the image.
2269 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
2270 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
2271 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
2272 },
2273 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
2274 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
2275 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
2276 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
2277 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
2278 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
2279 &quot;width&quot;: 42, # The width of the image in pixels.
2280 },
2281 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
2282 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
2283 },
2284 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
2285 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
2286 &quot;labels&quot;: { # A group of labels for the file.
2287 &quot;hidden&quot;: True or False, # Deprecated.
2288 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
2289 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
2290 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
2291 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
2292 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
2293 },
2294 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
2295 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2296 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2297 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2298 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2299 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2300 &quot;picture&quot;: { # The user&#x27;s profile picture.
2301 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2302 },
2303 },
2304 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
2305 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
2306 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
2307 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
2308 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
2309 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
2310 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
2311 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
2312 &quot;a_key&quot;: &quot;A String&quot;,
2313 },
2314 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
2315 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
2316 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
2317 &quot;A String&quot;,
2318 ],
2319 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
2320 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07002321 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2322 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2323 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2324 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2325 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2326 &quot;picture&quot;: { # The user&#x27;s profile picture.
2327 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2328 },
Takashi Matsuo06694102015-09-11 13:55:40 -07002329 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002330 ],
2331 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
2332 # If not specified as part of an insert request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
2333 { # A reference to a file&#x27;s parent.
2334 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
2335 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
2336 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
2337 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
2338 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
Bu Sun Kim65020912020-05-20 12:08:20 -07002339 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002340 ],
2341 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
2342 &quot;A String&quot;,
2343 ],
2344 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
2345 { # A permission for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07002346 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
2347 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002348 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002349 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
2350 &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.
2351 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
2352 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
2353 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
2354 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -07002355 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002356 # - They can only be set on user and group permissions
2357 # - The date must be in the future
2358 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002359 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07002360 &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.
2361 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
2362 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
2363 &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.
2364 {
2365 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2366 &quot;A String&quot;,
2367 ],
2368 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2369 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
2370 &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:
2371 # - file
2372 # - member
2373 &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:
2374 # - organizer
2375 # - fileOrganizer
2376 # - writer
2377 # - reader
2378 },
2379 ],
2380 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
2381 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04002382 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002383 # - organizer
2384 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04002385 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002386 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07002387 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
2388 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
2389 {
2390 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
2391 &quot;A String&quot;,
2392 ],
2393 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
2394 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
2395 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
2396 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
2397 },
2398 ],
2399 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04002400 # - user
2401 # - group
2402 # - domain
2403 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07002404 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002405 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim65020912020-05-20 12:08:20 -07002406 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04002407 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002408 ],
2409 &quot;properties&quot;: [ # The list of properties.
2410 { # A key-value pair attached to a file that is either public or private to an application.
2411 # The following limits apply to file properties:
2412 # - Maximum of 100 properties total per file
2413 # - Maximum of 30 private properties per app
2414 # - Maximum of 30 public properties
2415 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
2416 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
2417 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
2418 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
2419 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
2420 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
yoshi-code-bot69706592021-03-03 03:54:02 -08002421 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE). Private properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.
Bu Sun Kim65020912020-05-20 12:08:20 -07002422 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002423 ],
2424 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
2425 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
2426 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
2427 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
2428 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
2429 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
2430 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2431 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2432 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2433 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2434 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2435 &quot;picture&quot;: { # The user&#x27;s profile picture.
2436 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2437 },
John Asmuth614db982014-04-24 15:46:26 -04002438 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002439 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
2440 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
2441 &quot;targetMimeType&quot;: &quot;A String&quot;, # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target&#x27;s MIME type, captured when the shortcut is created.
2442 },
2443 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
2444 &quot;A String&quot;,
2445 ],
2446 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
2447 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
2448 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
2449 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
2450 },
2451 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content. If the file isn&#x27;t shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request.
2452 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
2453 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
2454 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
2455 &quot;trashingUser&quot;: { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
2456 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2457 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2458 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2459 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2460 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2461 &quot;picture&quot;: { # The user&#x27;s profile picture.
2462 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2463 },
2464 },
2465 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
2466 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
2467 &quot;A String&quot;,
2468 ],
2469 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
2470 &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.
2471 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
2472 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
2473 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
2474 &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:
2475 # - They cannot be set on shared drive items
2476 # - They can only be set on user and group permissions
2477 # - The date must be in the future
2478 # - The date cannot be more than a year in the future
2479 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
2480 &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.
2481 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
2482 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
2483 &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.
2484 {
2485 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2486 &quot;A String&quot;,
2487 ],
2488 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2489 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
2490 &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:
2491 # - file
2492 # - member
2493 &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:
2494 # - organizer
2495 # - fileOrganizer
2496 # - writer
2497 # - reader
2498 },
2499 ],
2500 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
2501 &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:
2502 # - owner
2503 # - organizer
2504 # - fileOrganizer
2505 # - writer
2506 # - reader
2507 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
2508 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
2509 {
2510 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
2511 &quot;A String&quot;,
2512 ],
2513 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
2514 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
2515 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
2516 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
2517 },
2518 ],
2519 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
2520 # - user
2521 # - group
2522 # - domain
2523 # - anyone
2524 &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.
2525 &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.
2526 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
2527 },
2528 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
2529 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
2530 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
2531 &quot;height&quot;: 42, # The height of the video in pixels.
2532 &quot;width&quot;: 42, # The width of the video in pixels.
2533 },
2534 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
2535 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
2536 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
2537 },
2538 ],
2539 &quot;kind&quot;: &quot;drive#fileList&quot;, # This is always drive#fileList.
2540 &quot;nextLink&quot;: &quot;A String&quot;, # A link to the next page of files.
2541 &quot;nextPageToken&quot;: &quot;A String&quot;, # The page token for the next page of files. This will be absent if the end of the files 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.
2542 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this list.
2543}</pre>
John Asmuth614db982014-04-24 15:46:26 -04002544</div>
2545
2546<div class="method">
2547 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2548 <pre>Retrieves the next page of results.
2549
2550Args:
2551 previous_request: The request for the previous page. (required)
2552 previous_response: The response from the request for the previous page. (required)
2553
2554Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07002555 A request object that you can call &#x27;execute()&#x27; on to request the next
John Asmuth614db982014-04-24 15:46:26 -04002556 page. Returns None if there are no more items in the collection.
2557 </pre>
2558</div>
2559
2560<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002561 <code class="details" id="patch">patch(fileId, addParents=None, body=None, convert=None, enforceSingleParent=None, includePermissionsForView=None, modifiedDateBehavior=None, newRevision=None, ocr=None, ocrLanguage=None, pinned=None, removeParents=None, setModifiedDate=None, supportsAllDrives=None, supportsTeamDrives=None, timedTextLanguage=None, timedTextTrackName=None, updateViewedDate=None, useContentAsIndexableText=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04002562 <pre>Updates file metadata and/or content. This method supports patch semantics.
2563
2564Args:
2565 fileId: string, The ID of the file to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002566 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04002567 The object takes the form of:
2568
2569{ # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07002570 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
2571 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
2572 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
2573 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
2574 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
2575 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002576 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07002577 &quot;canAddMyDriveParent&quot;: True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
2578 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
2579 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
2580 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
2581 &quot;canCopy&quot;: True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
2582 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
2583 &quot;canDeleteChildren&quot;: True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
2584 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
2585 &quot;canEdit&quot;: True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent.
2586 &quot;canListChildren&quot;: True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
2587 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002588 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
Bu Sun Kim65020912020-05-20 12:08:20 -07002589 &quot;canMoveChildrenOutOfDrive&quot;: True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
2590 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002591 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user&#x27;s access to the child and to the destination folder.
Bu Sun Kim65020912020-05-20 12:08:20 -07002592 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
2593 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2594 &quot;canMoveItemOutOfDrive&quot;: True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
2595 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002596 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed.
Bu Sun Kim65020912020-05-20 12:08:20 -07002597 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
2598 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
2599 &quot;canReadDrive&quot;: True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
2600 &quot;canReadRevisions&quot;: True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
2601 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
2602 &quot;canRemoveChildren&quot;: True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
2603 &quot;canRemoveMyDriveParent&quot;: True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
2604 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
2605 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
2606 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
2607 &quot;canTrashChildren&quot;: True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
2608 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -04002609 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002610 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
2611 { # A restriction for accessing the content of the file.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002612 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002613 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
2614 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
2615 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2616 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2617 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2618 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2619 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2620 &quot;picture&quot;: { # The user&#x27;s profile picture.
2621 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2622 },
2623 },
2624 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
2625 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
2626 },
2627 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002628 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
2629 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
2630 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
2631 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
2632 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002633 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
Bu Sun Kim65020912020-05-20 12:08:20 -07002634 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
2635 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
2636 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
2637 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
2638 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002639 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
Bu Sun Kim65020912020-05-20 12:08:20 -07002640 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -04002641 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002642 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
2643 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is populated for files with content stored in Google Drive and for files in Docs Editors; it is not populated for shortcut files.
Bu Sun Kim65020912020-05-20 12:08:20 -07002644 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002645 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
Bu Sun Kim65020912020-05-20 12:08:20 -07002646 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
2647 &quot;hasThumbnail&quot;: True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002648 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
Bu Sun Kim65020912020-05-20 12:08:20 -07002649 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
2650 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
2651 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
2652 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
2653 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
2654 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
2655 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
2656 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
2657 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
2658 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
2659 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
2660 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
2661 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
2662 &quot;height&quot;: 42, # The height of the image in pixels.
2663 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
2664 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
2665 &quot;location&quot;: { # Geographic location information stored in the image.
2666 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
2667 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
2668 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
2669 },
2670 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
2671 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
2672 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
2673 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
2674 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
2675 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
2676 &quot;width&quot;: 42, # The width of the image in pixels.
2677 },
2678 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
2679 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
2680 },
2681 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
2682 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
2683 &quot;labels&quot;: { # A group of labels for the file.
2684 &quot;hidden&quot;: True or False, # Deprecated.
2685 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
2686 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
2687 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002688 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07002689 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
2690 },
2691 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
2692 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2693 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2694 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2695 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2696 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2697 &quot;picture&quot;: { # The user&#x27;s profile picture.
2698 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2699 },
2700 },
2701 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
2702 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
2703 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002704 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
Bu Sun Kim65020912020-05-20 12:08:20 -07002705 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
2706 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
2707 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
2708 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
2709 &quot;a_key&quot;: &quot;A String&quot;,
2710 },
2711 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
2712 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
2713 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
2714 &quot;A String&quot;,
2715 ],
2716 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002717 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07002718 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2719 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2720 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2721 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2722 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2723 &quot;picture&quot;: { # The user&#x27;s profile picture.
2724 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -04002725 },
John Asmuth614db982014-04-24 15:46:26 -04002726 },
2727 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002728 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
2729 # If not specified as part of an insert request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
2730 { # A reference to a file&#x27;s parent.
2731 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
2732 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
2733 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
2734 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
2735 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04002736 },
2737 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002738 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
2739 &quot;A String&quot;,
2740 ],
2741 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
2742 { # A permission for a file.
2743 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
2744 &quot;A String&quot;,
2745 ],
2746 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
2747 &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.
2748 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
2749 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
2750 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
2751 &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:
2752 # - They cannot be set on shared drive items
2753 # - They can only be set on user and group permissions
2754 # - The date must be in the future
2755 # - The date cannot be more than a year in the future
2756 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
2757 &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.
2758 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
2759 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
2760 &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.
2761 {
2762 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2763 &quot;A String&quot;,
2764 ],
2765 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2766 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
2767 &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:
2768 # - file
2769 # - member
2770 &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:
2771 # - organizer
2772 # - fileOrganizer
2773 # - writer
2774 # - reader
2775 },
2776 ],
2777 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
2778 &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:
2779 # - owner
2780 # - organizer
2781 # - fileOrganizer
2782 # - writer
2783 # - reader
2784 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
2785 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
2786 {
2787 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
2788 &quot;A String&quot;,
2789 ],
2790 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
2791 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
2792 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
2793 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
2794 },
2795 ],
2796 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
2797 # - user
2798 # - group
2799 # - domain
2800 # - anyone
2801 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002802 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim65020912020-05-20 12:08:20 -07002803 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04002804 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002805 ],
2806 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002807 { # A key-value pair attached to a file that is either public or private to an application.
2808 # The following limits apply to file properties:
2809 # - Maximum of 100 properties total per file
2810 # - Maximum of 30 private properties per app
2811 # - Maximum of 30 public properties
2812 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
Bu Sun Kim65020912020-05-20 12:08:20 -07002813 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
2814 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
2815 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
2816 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
2817 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
yoshi-code-bot69706592021-03-03 03:54:02 -08002818 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE). Private properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.
John Asmuth614db982014-04-24 15:46:26 -04002819 },
2820 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002821 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
2822 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
2823 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
2824 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
2825 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
2826 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
2827 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2828 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2829 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2830 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2831 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2832 &quot;picture&quot;: { # The user&#x27;s profile picture.
2833 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2834 },
Takashi Matsuo06694102015-09-11 13:55:40 -07002835 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002836 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
2837 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
2838 &quot;targetMimeType&quot;: &quot;A String&quot;, # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target&#x27;s MIME type, captured when the shortcut is created.
2839 },
2840 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
2841 &quot;A String&quot;,
2842 ],
2843 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
2844 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
2845 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
2846 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
2847 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002848 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content. If the file isn&#x27;t shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request.
Bu Sun Kim65020912020-05-20 12:08:20 -07002849 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
2850 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
2851 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
2852 &quot;trashingUser&quot;: { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
2853 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2854 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2855 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2856 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2857 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2858 &quot;picture&quot;: { # The user&#x27;s profile picture.
2859 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2860 },
2861 },
2862 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
2863 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
2864 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002865 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002866 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
2867 &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.
2868 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
2869 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
2870 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
2871 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -07002872 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002873 # - They can only be set on user and group permissions
2874 # - The date must be in the future
2875 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002876 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07002877 &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.
2878 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
2879 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
2880 &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.
2881 {
2882 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2883 &quot;A String&quot;,
2884 ],
2885 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2886 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
2887 &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:
2888 # - file
2889 # - member
2890 &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:
2891 # - organizer
2892 # - fileOrganizer
2893 # - writer
2894 # - reader
2895 },
2896 ],
2897 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
2898 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04002899 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002900 # - organizer
2901 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04002902 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002903 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07002904 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
2905 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
2906 {
2907 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
2908 &quot;A String&quot;,
2909 ],
2910 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
2911 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
2912 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
2913 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
2914 },
2915 ],
2916 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04002917 # - user
2918 # - group
2919 # - domain
2920 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07002921 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002922 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim65020912020-05-20 12:08:20 -07002923 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04002924 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002925 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
2926 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
2927 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
2928 &quot;height&quot;: 42, # The height of the video in pixels.
2929 &quot;width&quot;: 42, # The width of the video in pixels.
2930 },
2931 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
2932 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
2933 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04002934}
2935
Bu Sun Kim65020912020-05-20 12:08:20 -07002936 addParents: string, Comma-separated list of parent IDs to add.
2937 convert: boolean, This parameter is deprecated and has no function.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002938 enforceSingleParent: boolean, Deprecated. Adding files to multiple folders is no longer supported. Use shortcuts instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002939 includePermissionsForView: string, Specifies which additional view&#x27;s permissions to include in the response. Only &#x27;published&#x27; is supported.
Takashi Matsuo06694102015-09-11 13:55:40 -07002940 modifiedDateBehavior: string, Determines the behavior in which modifiedDate is updated. This overrides setModifiedDate.
2941 Allowed values
2942 fromBody - Set modifiedDate to the value provided in the body of the request. No change if no value was provided.
2943 fromBodyIfNeeded - Set modifiedDate to the value provided in the body of the request depending on other contents of the update.
2944 fromBodyOrNow - Set modifiedDate to the value provided in the body of the request, or to the current time if no value was provided.
2945 noChange - Maintain the previous value of modifiedDate.
2946 now - Set modifiedDate to the current time.
2947 nowIfNeeded - Set modifiedDate to the current time depending on contents of the update.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002948 newRevision: boolean, Whether a blob upload should create a new revision. If false, the blob data in the current head revision is replaced. If true or not set, a new blob is created as head revision, and previous unpinned revisions are preserved for a short period of time. Pinned revisions are stored indefinitely, using additional storage quota, up to a maximum of 200 revisions. For details on how revisions are retained, see the Drive Help Center. Note that this field is ignored if there is no payload in the request.
Bu Sun Kim65020912020-05-20 12:08:20 -07002949 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002950 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002951 pinned: boolean, Whether to pin the new revision. A file can have a maximum of 200 pinned revisions. Note that this field is ignored if there is no payload in the request.
Craig Citro065b5302014-08-14 00:47:23 -07002952 removeParents: string, Comma-separated list of parent IDs to remove.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002953 setModifiedDate: boolean, Whether to set the modified date using the value supplied in the request body. Setting this field to true is equivalent to modifiedDateBehavior=fromBodyOrNow, and false is equivalent to modifiedDateBehavior=now. To prevent any changes to the modified date set modifiedDateBehavior=noChange.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002954 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07002955 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
John Asmuth614db982014-04-24 15:46:26 -04002956 timedTextLanguage: string, The language of the timed text.
Bu Sun Kim65020912020-05-20 12:08:20 -07002957 timedTextTrackName: string, The timed text track name.
2958 updateViewedDate: boolean, Whether to update the view date after successfully updating the file.
2959 useContentAsIndexableText: boolean, Whether to use the content as indexable text.
John Asmuth614db982014-04-24 15:46:26 -04002960
2961Returns:
2962 An object of the form:
2963
2964 { # The metadata for a file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002965 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
2966 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
2967 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
2968 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
2969 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
2970 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
2971 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
2972 &quot;canAddMyDriveParent&quot;: True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
2973 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
2974 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
2975 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
2976 &quot;canCopy&quot;: True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
2977 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
2978 &quot;canDeleteChildren&quot;: True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
2979 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
2980 &quot;canEdit&quot;: True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent.
2981 &quot;canListChildren&quot;: True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
2982 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
2983 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
2984 &quot;canMoveChildrenOutOfDrive&quot;: True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
2985 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
2986 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user&#x27;s access to the child and to the destination folder.
2987 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
2988 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2989 &quot;canMoveItemOutOfDrive&quot;: True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
2990 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2991 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed.
2992 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
2993 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
2994 &quot;canReadDrive&quot;: True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
2995 &quot;canReadRevisions&quot;: True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
2996 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
2997 &quot;canRemoveChildren&quot;: True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
2998 &quot;canRemoveMyDriveParent&quot;: True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
2999 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
3000 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
3001 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
3002 &quot;canTrashChildren&quot;: True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
3003 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
3004 },
3005 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
3006 { # A restriction for accessing the content of the file.
3007 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified.
3008 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
3009 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003010 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3011 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3012 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3013 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3014 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3015 &quot;picture&quot;: { # The user&#x27;s profile picture.
3016 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -04003017 },
John Asmuth614db982014-04-24 15:46:26 -04003018 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003019 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
3020 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
3021 },
3022 ],
3023 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
3024 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
3025 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
3026 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
3027 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
3028 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
3029 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
3030 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
3031 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
3032 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
3033 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
3034 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
3035 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
3036 },
3037 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
3038 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is populated for files with content stored in Google Drive and for files in Docs Editors; it is not populated for shortcut files.
3039 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
3040 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
3041 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
3042 &quot;hasThumbnail&quot;: True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
3043 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
3044 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
3045 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
3046 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
3047 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
3048 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
3049 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
3050 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
3051 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
3052 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
3053 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
3054 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
3055 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
3056 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
3057 &quot;height&quot;: 42, # The height of the image in pixels.
3058 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
3059 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
3060 &quot;location&quot;: { # Geographic location information stored in the image.
3061 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
3062 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
3063 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
3064 },
3065 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
3066 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
3067 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
3068 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
3069 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
3070 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
3071 &quot;width&quot;: 42, # The width of the image in pixels.
3072 },
3073 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
3074 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
3075 },
3076 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
3077 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
3078 &quot;labels&quot;: { # A group of labels for the file.
3079 &quot;hidden&quot;: True or False, # Deprecated.
3080 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
3081 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
3082 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
3083 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
3084 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
3085 },
3086 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
3087 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3088 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3089 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3090 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3091 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3092 &quot;picture&quot;: { # The user&#x27;s profile picture.
3093 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3094 },
3095 },
3096 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
3097 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
3098 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
3099 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
3100 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
3101 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
3102 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
3103 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
3104 &quot;a_key&quot;: &quot;A String&quot;,
3105 },
3106 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
3107 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
3108 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
3109 &quot;A String&quot;,
3110 ],
3111 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
3112 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07003113 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3114 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3115 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3116 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3117 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3118 &quot;picture&quot;: { # The user&#x27;s profile picture.
3119 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3120 },
Takashi Matsuo06694102015-09-11 13:55:40 -07003121 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003122 ],
3123 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
3124 # If not specified as part of an insert request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
3125 { # A reference to a file&#x27;s parent.
3126 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
3127 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
3128 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
3129 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
3130 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
Bu Sun Kim65020912020-05-20 12:08:20 -07003131 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003132 ],
3133 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
3134 &quot;A String&quot;,
3135 ],
3136 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
3137 { # A permission for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07003138 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
3139 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003140 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003141 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
3142 &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.
3143 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
3144 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
3145 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
3146 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -07003147 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003148 # - They can only be set on user and group permissions
3149 # - The date must be in the future
3150 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003151 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07003152 &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.
3153 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
3154 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
3155 &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.
3156 {
3157 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3158 &quot;A String&quot;,
3159 ],
3160 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3161 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
3162 &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:
3163 # - file
3164 # - member
3165 &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:
3166 # - organizer
3167 # - fileOrganizer
3168 # - writer
3169 # - reader
3170 },
3171 ],
3172 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
3173 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04003174 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003175 # - organizer
3176 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04003177 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003178 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07003179 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
3180 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
3181 {
3182 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
3183 &quot;A String&quot;,
3184 ],
3185 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
3186 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
3187 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
3188 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
3189 },
3190 ],
3191 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04003192 # - user
3193 # - group
3194 # - domain
3195 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07003196 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003197 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim65020912020-05-20 12:08:20 -07003198 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04003199 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003200 ],
3201 &quot;properties&quot;: [ # The list of properties.
3202 { # A key-value pair attached to a file that is either public or private to an application.
3203 # The following limits apply to file properties:
3204 # - Maximum of 100 properties total per file
3205 # - Maximum of 30 private properties per app
3206 # - Maximum of 30 public properties
3207 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
3208 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
3209 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
3210 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
3211 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
3212 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
yoshi-code-bot69706592021-03-03 03:54:02 -08003213 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE). Private properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.
Bu Sun Kim65020912020-05-20 12:08:20 -07003214 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003215 ],
3216 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
3217 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
3218 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
3219 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
3220 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
3221 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
3222 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3223 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3224 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3225 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3226 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3227 &quot;picture&quot;: { # The user&#x27;s profile picture.
3228 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3229 },
3230 },
3231 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
3232 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
3233 &quot;targetMimeType&quot;: &quot;A String&quot;, # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target&#x27;s MIME type, captured when the shortcut is created.
3234 },
3235 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
3236 &quot;A String&quot;,
3237 ],
3238 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
3239 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
3240 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
3241 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
3242 },
3243 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content. If the file isn&#x27;t shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request.
3244 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
3245 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
3246 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
3247 &quot;trashingUser&quot;: { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
3248 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3249 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3250 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3251 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3252 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3253 &quot;picture&quot;: { # The user&#x27;s profile picture.
3254 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3255 },
3256 },
3257 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
3258 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
3259 &quot;A String&quot;,
3260 ],
3261 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
3262 &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.
3263 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
3264 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
3265 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
3266 &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:
3267 # - They cannot be set on shared drive items
3268 # - They can only be set on user and group permissions
3269 # - The date must be in the future
3270 # - The date cannot be more than a year in the future
3271 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
3272 &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.
3273 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
3274 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
3275 &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.
3276 {
3277 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3278 &quot;A String&quot;,
3279 ],
3280 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3281 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
3282 &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:
3283 # - file
3284 # - member
3285 &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:
3286 # - organizer
3287 # - fileOrganizer
3288 # - writer
3289 # - reader
3290 },
3291 ],
3292 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
3293 &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:
3294 # - owner
3295 # - organizer
3296 # - fileOrganizer
3297 # - writer
3298 # - reader
3299 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
3300 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
3301 {
3302 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
3303 &quot;A String&quot;,
3304 ],
3305 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
3306 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
3307 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
3308 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
3309 },
3310 ],
3311 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
3312 # - user
3313 # - group
3314 # - domain
3315 # - anyone
3316 &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.
3317 &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.
3318 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
3319 },
3320 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
3321 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
3322 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
3323 &quot;height&quot;: 42, # The height of the video in pixels.
3324 &quot;width&quot;: 42, # The width of the video in pixels.
3325 },
3326 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
3327 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
3328 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
3329}</pre>
John Asmuth614db982014-04-24 15:46:26 -04003330</div>
3331
3332<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003333 <code class="details" id="touch">touch(fileId, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07003334 <pre>Set the file&#x27;s updated time to the current server time.
John Asmuth614db982014-04-24 15:46:26 -04003335
3336Args:
3337 fileId: string, The ID of the file to update. (required)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003338 includePermissionsForView: string, Specifies which additional view&#x27;s permissions to include in the response. Only &#x27;published&#x27; is supported.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003339 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07003340 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
John Asmuth614db982014-04-24 15:46:26 -04003341
3342Returns:
3343 An object of the form:
3344
3345 { # The metadata for a file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003346 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
3347 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
3348 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
3349 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
3350 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
3351 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
3352 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
3353 &quot;canAddMyDriveParent&quot;: True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
3354 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
3355 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
3356 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
3357 &quot;canCopy&quot;: True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
3358 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
3359 &quot;canDeleteChildren&quot;: True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
3360 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
3361 &quot;canEdit&quot;: True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent.
3362 &quot;canListChildren&quot;: True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
3363 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
3364 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
3365 &quot;canMoveChildrenOutOfDrive&quot;: True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
3366 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
3367 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user&#x27;s access to the child and to the destination folder.
3368 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
3369 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3370 &quot;canMoveItemOutOfDrive&quot;: True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
3371 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3372 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed.
3373 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
3374 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
3375 &quot;canReadDrive&quot;: True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
3376 &quot;canReadRevisions&quot;: True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
3377 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
3378 &quot;canRemoveChildren&quot;: True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
3379 &quot;canRemoveMyDriveParent&quot;: True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
3380 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
3381 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
3382 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
3383 &quot;canTrashChildren&quot;: True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
3384 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
3385 },
3386 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
3387 { # A restriction for accessing the content of the file.
3388 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified.
3389 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
3390 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003391 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3392 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3393 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3394 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3395 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3396 &quot;picture&quot;: { # The user&#x27;s profile picture.
3397 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -04003398 },
John Asmuth614db982014-04-24 15:46:26 -04003399 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003400 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
3401 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
3402 },
3403 ],
3404 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
3405 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
3406 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
3407 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
3408 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
3409 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
3410 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
3411 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
3412 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
3413 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
3414 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
3415 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
3416 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
3417 },
3418 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
3419 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is populated for files with content stored in Google Drive and for files in Docs Editors; it is not populated for shortcut files.
3420 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
3421 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
3422 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
3423 &quot;hasThumbnail&quot;: True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
3424 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
3425 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
3426 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
3427 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
3428 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
3429 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
3430 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
3431 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
3432 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
3433 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
3434 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
3435 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
3436 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
3437 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
3438 &quot;height&quot;: 42, # The height of the image in pixels.
3439 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
3440 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
3441 &quot;location&quot;: { # Geographic location information stored in the image.
3442 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
3443 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
3444 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
3445 },
3446 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
3447 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
3448 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
3449 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
3450 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
3451 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
3452 &quot;width&quot;: 42, # The width of the image in pixels.
3453 },
3454 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
3455 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
3456 },
3457 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
3458 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
3459 &quot;labels&quot;: { # A group of labels for the file.
3460 &quot;hidden&quot;: True or False, # Deprecated.
3461 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
3462 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
3463 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
3464 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
3465 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
3466 },
3467 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
3468 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3469 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3470 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3471 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3472 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3473 &quot;picture&quot;: { # The user&#x27;s profile picture.
3474 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3475 },
3476 },
3477 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
3478 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
3479 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
3480 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
3481 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
3482 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
3483 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
3484 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
3485 &quot;a_key&quot;: &quot;A String&quot;,
3486 },
3487 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
3488 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
3489 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
3490 &quot;A String&quot;,
3491 ],
3492 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
3493 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07003494 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3495 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3496 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3497 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3498 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3499 &quot;picture&quot;: { # The user&#x27;s profile picture.
3500 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3501 },
Takashi Matsuo06694102015-09-11 13:55:40 -07003502 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003503 ],
3504 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
3505 # If not specified as part of an insert request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
3506 { # A reference to a file&#x27;s parent.
3507 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
3508 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
3509 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
3510 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
3511 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
Bu Sun Kim65020912020-05-20 12:08:20 -07003512 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003513 ],
3514 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
3515 &quot;A String&quot;,
3516 ],
3517 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
3518 { # A permission for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07003519 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
3520 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003521 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003522 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
3523 &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.
3524 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
3525 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
3526 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
3527 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -07003528 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003529 # - They can only be set on user and group permissions
3530 # - The date must be in the future
3531 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003532 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07003533 &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.
3534 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
3535 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
3536 &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.
3537 {
3538 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3539 &quot;A String&quot;,
3540 ],
3541 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3542 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
3543 &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:
3544 # - file
3545 # - member
3546 &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:
3547 # - organizer
3548 # - fileOrganizer
3549 # - writer
3550 # - reader
3551 },
3552 ],
3553 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
3554 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04003555 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003556 # - organizer
3557 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04003558 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003559 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07003560 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
3561 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
3562 {
3563 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
3564 &quot;A String&quot;,
3565 ],
3566 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
3567 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
3568 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
3569 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
3570 },
3571 ],
3572 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04003573 # - user
3574 # - group
3575 # - domain
3576 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07003577 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003578 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim65020912020-05-20 12:08:20 -07003579 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04003580 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003581 ],
3582 &quot;properties&quot;: [ # The list of properties.
3583 { # A key-value pair attached to a file that is either public or private to an application.
3584 # The following limits apply to file properties:
3585 # - Maximum of 100 properties total per file
3586 # - Maximum of 30 private properties per app
3587 # - Maximum of 30 public properties
3588 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
3589 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
3590 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
3591 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
3592 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
3593 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
yoshi-code-bot69706592021-03-03 03:54:02 -08003594 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE). Private properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.
Bu Sun Kim65020912020-05-20 12:08:20 -07003595 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003596 ],
3597 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
3598 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
3599 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
3600 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
3601 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
3602 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
3603 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3604 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3605 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3606 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3607 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3608 &quot;picture&quot;: { # The user&#x27;s profile picture.
3609 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3610 },
3611 },
3612 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
3613 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
3614 &quot;targetMimeType&quot;: &quot;A String&quot;, # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target&#x27;s MIME type, captured when the shortcut is created.
3615 },
3616 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
3617 &quot;A String&quot;,
3618 ],
3619 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
3620 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
3621 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
3622 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
3623 },
3624 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content. If the file isn&#x27;t shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request.
3625 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
3626 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
3627 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
3628 &quot;trashingUser&quot;: { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
3629 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3630 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3631 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3632 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3633 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3634 &quot;picture&quot;: { # The user&#x27;s profile picture.
3635 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3636 },
3637 },
3638 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
3639 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
3640 &quot;A String&quot;,
3641 ],
3642 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
3643 &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.
3644 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
3645 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
3646 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
3647 &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:
3648 # - They cannot be set on shared drive items
3649 # - They can only be set on user and group permissions
3650 # - The date must be in the future
3651 # - The date cannot be more than a year in the future
3652 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
3653 &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.
3654 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
3655 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
3656 &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.
3657 {
3658 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3659 &quot;A String&quot;,
3660 ],
3661 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3662 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
3663 &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:
3664 # - file
3665 # - member
3666 &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:
3667 # - organizer
3668 # - fileOrganizer
3669 # - writer
3670 # - reader
3671 },
3672 ],
3673 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
3674 &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:
3675 # - owner
3676 # - organizer
3677 # - fileOrganizer
3678 # - writer
3679 # - reader
3680 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
3681 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
3682 {
3683 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
3684 &quot;A String&quot;,
3685 ],
3686 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
3687 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
3688 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
3689 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
3690 },
3691 ],
3692 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
3693 # - user
3694 # - group
3695 # - domain
3696 # - anyone
3697 &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.
3698 &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.
3699 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
3700 },
3701 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
3702 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
3703 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
3704 &quot;height&quot;: 42, # The height of the video in pixels.
3705 &quot;width&quot;: 42, # The width of the video in pixels.
3706 },
3707 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
3708 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
3709 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
3710}</pre>
John Asmuth614db982014-04-24 15:46:26 -04003711</div>
3712
3713<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003714 <code class="details" id="trash">trash(fileId, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003715 <pre>Moves a file to the trash. The currently authenticated user must own the file or be at least a fileOrganizer on the parent for shared drive files. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
John Asmuth614db982014-04-24 15:46:26 -04003716
3717Args:
3718 fileId: string, The ID of the file to trash. (required)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003719 includePermissionsForView: string, Specifies which additional view&#x27;s permissions to include in the response. Only &#x27;published&#x27; is supported.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003720 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07003721 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
John Asmuth614db982014-04-24 15:46:26 -04003722
3723Returns:
3724 An object of the form:
3725
3726 { # The metadata for a file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003727 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
3728 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
3729 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
3730 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
3731 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
3732 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
3733 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
3734 &quot;canAddMyDriveParent&quot;: True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
3735 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
3736 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
3737 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
3738 &quot;canCopy&quot;: True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
3739 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
3740 &quot;canDeleteChildren&quot;: True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
3741 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
3742 &quot;canEdit&quot;: True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent.
3743 &quot;canListChildren&quot;: True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
3744 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
3745 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
3746 &quot;canMoveChildrenOutOfDrive&quot;: True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
3747 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
3748 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user&#x27;s access to the child and to the destination folder.
3749 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
3750 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3751 &quot;canMoveItemOutOfDrive&quot;: True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
3752 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3753 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed.
3754 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
3755 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
3756 &quot;canReadDrive&quot;: True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
3757 &quot;canReadRevisions&quot;: True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
3758 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
3759 &quot;canRemoveChildren&quot;: True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
3760 &quot;canRemoveMyDriveParent&quot;: True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
3761 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
3762 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
3763 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
3764 &quot;canTrashChildren&quot;: True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
3765 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
3766 },
3767 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
3768 { # A restriction for accessing the content of the file.
3769 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified.
3770 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
3771 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003772 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3773 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3774 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3775 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3776 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3777 &quot;picture&quot;: { # The user&#x27;s profile picture.
3778 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -04003779 },
John Asmuth614db982014-04-24 15:46:26 -04003780 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003781 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
3782 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
3783 },
3784 ],
3785 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
3786 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
3787 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
3788 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
3789 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
3790 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
3791 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
3792 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
3793 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
3794 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
3795 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
3796 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
3797 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
3798 },
3799 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
3800 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is populated for files with content stored in Google Drive and for files in Docs Editors; it is not populated for shortcut files.
3801 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
3802 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
3803 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
3804 &quot;hasThumbnail&quot;: True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
3805 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
3806 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
3807 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
3808 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
3809 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
3810 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
3811 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
3812 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
3813 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
3814 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
3815 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
3816 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
3817 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
3818 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
3819 &quot;height&quot;: 42, # The height of the image in pixels.
3820 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
3821 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
3822 &quot;location&quot;: { # Geographic location information stored in the image.
3823 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
3824 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
3825 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
3826 },
3827 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
3828 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
3829 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
3830 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
3831 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
3832 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
3833 &quot;width&quot;: 42, # The width of the image in pixels.
3834 },
3835 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
3836 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
3837 },
3838 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
3839 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
3840 &quot;labels&quot;: { # A group of labels for the file.
3841 &quot;hidden&quot;: True or False, # Deprecated.
3842 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
3843 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
3844 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
3845 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
3846 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
3847 },
3848 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
3849 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3850 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3851 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3852 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3853 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3854 &quot;picture&quot;: { # The user&#x27;s profile picture.
3855 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3856 },
3857 },
3858 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
3859 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
3860 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
3861 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
3862 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
3863 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
3864 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
3865 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
3866 &quot;a_key&quot;: &quot;A String&quot;,
3867 },
3868 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
3869 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
3870 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
3871 &quot;A String&quot;,
3872 ],
3873 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
3874 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07003875 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3876 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3877 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3878 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3879 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3880 &quot;picture&quot;: { # The user&#x27;s profile picture.
3881 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3882 },
Takashi Matsuo06694102015-09-11 13:55:40 -07003883 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003884 ],
3885 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
3886 # If not specified as part of an insert request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
3887 { # A reference to a file&#x27;s parent.
3888 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
3889 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
3890 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
3891 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
3892 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
Bu Sun Kim65020912020-05-20 12:08:20 -07003893 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003894 ],
3895 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
3896 &quot;A String&quot;,
3897 ],
3898 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
3899 { # A permission for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07003900 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
3901 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003902 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003903 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
3904 &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.
3905 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
3906 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
3907 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
3908 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -07003909 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003910 # - They can only be set on user and group permissions
3911 # - The date must be in the future
3912 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003913 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07003914 &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.
3915 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
3916 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
3917 &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.
3918 {
3919 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3920 &quot;A String&quot;,
3921 ],
3922 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3923 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
3924 &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:
3925 # - file
3926 # - member
3927 &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:
3928 # - organizer
3929 # - fileOrganizer
3930 # - writer
3931 # - reader
3932 },
3933 ],
3934 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
3935 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04003936 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003937 # - organizer
3938 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04003939 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003940 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07003941 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
3942 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
3943 {
3944 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
3945 &quot;A String&quot;,
3946 ],
3947 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
3948 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
3949 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
3950 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
3951 },
3952 ],
3953 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04003954 # - user
3955 # - group
3956 # - domain
3957 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07003958 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003959 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim65020912020-05-20 12:08:20 -07003960 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04003961 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003962 ],
3963 &quot;properties&quot;: [ # The list of properties.
3964 { # A key-value pair attached to a file that is either public or private to an application.
3965 # The following limits apply to file properties:
3966 # - Maximum of 100 properties total per file
3967 # - Maximum of 30 private properties per app
3968 # - Maximum of 30 public properties
3969 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
3970 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
3971 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
3972 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
3973 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
3974 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
yoshi-code-bot69706592021-03-03 03:54:02 -08003975 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE). Private properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.
Bu Sun Kim65020912020-05-20 12:08:20 -07003976 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003977 ],
3978 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
3979 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
3980 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
3981 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
3982 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
3983 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
3984 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3985 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3986 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3987 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3988 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3989 &quot;picture&quot;: { # The user&#x27;s profile picture.
3990 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3991 },
3992 },
3993 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
3994 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
3995 &quot;targetMimeType&quot;: &quot;A String&quot;, # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target&#x27;s MIME type, captured when the shortcut is created.
3996 },
3997 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
3998 &quot;A String&quot;,
3999 ],
4000 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
4001 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
4002 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
4003 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
4004 },
4005 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content. If the file isn&#x27;t shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request.
4006 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
4007 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
4008 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
4009 &quot;trashingUser&quot;: { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
4010 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4011 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4012 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4013 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4014 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4015 &quot;picture&quot;: { # The user&#x27;s profile picture.
4016 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4017 },
4018 },
4019 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
4020 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
4021 &quot;A String&quot;,
4022 ],
4023 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
4024 &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.
4025 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
4026 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
4027 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
4028 &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:
4029 # - They cannot be set on shared drive items
4030 # - They can only be set on user and group permissions
4031 # - The date must be in the future
4032 # - The date cannot be more than a year in the future
4033 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
4034 &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.
4035 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
4036 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
4037 &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.
4038 {
4039 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4040 &quot;A String&quot;,
4041 ],
4042 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4043 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
4044 &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:
4045 # - file
4046 # - member
4047 &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:
4048 # - organizer
4049 # - fileOrganizer
4050 # - writer
4051 # - reader
4052 },
4053 ],
4054 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
4055 &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:
4056 # - owner
4057 # - organizer
4058 # - fileOrganizer
4059 # - writer
4060 # - reader
4061 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
4062 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
4063 {
4064 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
4065 &quot;A String&quot;,
4066 ],
4067 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
4068 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
4069 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
4070 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
4071 },
4072 ],
4073 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
4074 # - user
4075 # - group
4076 # - domain
4077 # - anyone
4078 &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.
4079 &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.
4080 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
4081 },
4082 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
4083 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
4084 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
4085 &quot;height&quot;: 42, # The height of the video in pixels.
4086 &quot;width&quot;: 42, # The width of the video in pixels.
4087 },
4088 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
4089 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
4090 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
4091}</pre>
John Asmuth614db982014-04-24 15:46:26 -04004092</div>
4093
4094<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004095 <code class="details" id="untrash">untrash(fileId, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004096 <pre>Restores a file from the trash. The currently authenticated user must own the file or be at least a fileOrganizer on the parent for shared drive files. Only the owner may untrash a file.
John Asmuth614db982014-04-24 15:46:26 -04004097
4098Args:
4099 fileId: string, The ID of the file to untrash. (required)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004100 includePermissionsForView: string, Specifies which additional view&#x27;s permissions to include in the response. Only &#x27;published&#x27; is supported.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004101 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07004102 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
John Asmuth614db982014-04-24 15:46:26 -04004103
4104Returns:
4105 An object of the form:
4106
4107 { # The metadata for a file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004108 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
4109 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
4110 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
4111 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
4112 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
4113 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
4114 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
4115 &quot;canAddMyDriveParent&quot;: True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
4116 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
4117 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
4118 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
4119 &quot;canCopy&quot;: True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
4120 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
4121 &quot;canDeleteChildren&quot;: True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
4122 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
4123 &quot;canEdit&quot;: True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent.
4124 &quot;canListChildren&quot;: True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
4125 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
4126 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
4127 &quot;canMoveChildrenOutOfDrive&quot;: True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
4128 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
4129 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user&#x27;s access to the child and to the destination folder.
4130 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
4131 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
4132 &quot;canMoveItemOutOfDrive&quot;: True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
4133 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
4134 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed.
4135 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
4136 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
4137 &quot;canReadDrive&quot;: True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
4138 &quot;canReadRevisions&quot;: True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
4139 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
4140 &quot;canRemoveChildren&quot;: True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
4141 &quot;canRemoveMyDriveParent&quot;: True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
4142 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
4143 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
4144 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
4145 &quot;canTrashChildren&quot;: True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
4146 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
4147 },
4148 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
4149 { # A restriction for accessing the content of the file.
4150 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified.
4151 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
4152 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004153 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4154 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4155 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4156 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4157 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4158 &quot;picture&quot;: { # The user&#x27;s profile picture.
4159 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -04004160 },
John Asmuth614db982014-04-24 15:46:26 -04004161 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004162 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
4163 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
4164 },
4165 ],
4166 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
4167 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
4168 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
4169 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
4170 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
4171 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
4172 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
4173 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
4174 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
4175 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
4176 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
4177 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
4178 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
4179 },
4180 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
4181 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is populated for files with content stored in Google Drive and for files in Docs Editors; it is not populated for shortcut files.
4182 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
4183 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
4184 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
4185 &quot;hasThumbnail&quot;: True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
4186 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
4187 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
4188 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
4189 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
4190 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
4191 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
4192 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
4193 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
4194 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
4195 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
4196 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
4197 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
4198 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
4199 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
4200 &quot;height&quot;: 42, # The height of the image in pixels.
4201 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
4202 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
4203 &quot;location&quot;: { # Geographic location information stored in the image.
4204 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
4205 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
4206 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
4207 },
4208 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
4209 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
4210 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
4211 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
4212 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
4213 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
4214 &quot;width&quot;: 42, # The width of the image in pixels.
4215 },
4216 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
4217 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
4218 },
4219 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
4220 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
4221 &quot;labels&quot;: { # A group of labels for the file.
4222 &quot;hidden&quot;: True or False, # Deprecated.
4223 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
4224 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
4225 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
4226 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
4227 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
4228 },
4229 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
4230 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4231 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4232 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4233 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4234 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4235 &quot;picture&quot;: { # The user&#x27;s profile picture.
4236 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4237 },
4238 },
4239 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
4240 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
4241 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
4242 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
4243 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
4244 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
4245 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
4246 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
4247 &quot;a_key&quot;: &quot;A String&quot;,
4248 },
4249 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
4250 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
4251 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
4252 &quot;A String&quot;,
4253 ],
4254 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
4255 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07004256 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4257 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4258 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4259 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4260 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4261 &quot;picture&quot;: { # The user&#x27;s profile picture.
4262 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4263 },
Takashi Matsuo06694102015-09-11 13:55:40 -07004264 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004265 ],
4266 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
4267 # If not specified as part of an insert request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
4268 { # A reference to a file&#x27;s parent.
4269 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
4270 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
4271 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
4272 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
4273 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
Bu Sun Kim65020912020-05-20 12:08:20 -07004274 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004275 ],
4276 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
4277 &quot;A String&quot;,
4278 ],
4279 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
4280 { # A permission for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07004281 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
4282 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004283 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004284 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
4285 &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.
4286 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
4287 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
4288 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
4289 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -07004290 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004291 # - They can only be set on user and group permissions
4292 # - The date must be in the future
4293 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004294 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07004295 &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.
4296 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
4297 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
4298 &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.
4299 {
4300 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4301 &quot;A String&quot;,
4302 ],
4303 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4304 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
4305 &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:
4306 # - file
4307 # - member
4308 &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:
4309 # - organizer
4310 # - fileOrganizer
4311 # - writer
4312 # - reader
4313 },
4314 ],
4315 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
4316 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04004317 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004318 # - organizer
4319 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04004320 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004321 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07004322 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
4323 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
4324 {
4325 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
4326 &quot;A String&quot;,
4327 ],
4328 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
4329 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
4330 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
4331 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
4332 },
4333 ],
4334 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04004335 # - user
4336 # - group
4337 # - domain
4338 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07004339 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004340 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim65020912020-05-20 12:08:20 -07004341 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04004342 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004343 ],
4344 &quot;properties&quot;: [ # The list of properties.
4345 { # A key-value pair attached to a file that is either public or private to an application.
4346 # The following limits apply to file properties:
4347 # - Maximum of 100 properties total per file
4348 # - Maximum of 30 private properties per app
4349 # - Maximum of 30 public properties
4350 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
4351 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
4352 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
4353 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
4354 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
4355 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
yoshi-code-bot69706592021-03-03 03:54:02 -08004356 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE). Private properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.
Bu Sun Kim65020912020-05-20 12:08:20 -07004357 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004358 ],
4359 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
4360 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
4361 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
4362 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
4363 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
4364 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
4365 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4366 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4367 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4368 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4369 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4370 &quot;picture&quot;: { # The user&#x27;s profile picture.
4371 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4372 },
4373 },
4374 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
4375 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
4376 &quot;targetMimeType&quot;: &quot;A String&quot;, # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target&#x27;s MIME type, captured when the shortcut is created.
4377 },
4378 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
4379 &quot;A String&quot;,
4380 ],
4381 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
4382 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
4383 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
4384 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
4385 },
4386 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content. If the file isn&#x27;t shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request.
4387 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
4388 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
4389 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
4390 &quot;trashingUser&quot;: { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
4391 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4392 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4393 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4394 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4395 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4396 &quot;picture&quot;: { # The user&#x27;s profile picture.
4397 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4398 },
4399 },
4400 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
4401 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
4402 &quot;A String&quot;,
4403 ],
4404 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
4405 &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.
4406 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
4407 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
4408 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
4409 &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:
4410 # - They cannot be set on shared drive items
4411 # - They can only be set on user and group permissions
4412 # - The date must be in the future
4413 # - The date cannot be more than a year in the future
4414 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
4415 &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.
4416 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
4417 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
4418 &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.
4419 {
4420 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4421 &quot;A String&quot;,
4422 ],
4423 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4424 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
4425 &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:
4426 # - file
4427 # - member
4428 &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:
4429 # - organizer
4430 # - fileOrganizer
4431 # - writer
4432 # - reader
4433 },
4434 ],
4435 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
4436 &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:
4437 # - owner
4438 # - organizer
4439 # - fileOrganizer
4440 # - writer
4441 # - reader
4442 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
4443 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
4444 {
4445 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
4446 &quot;A String&quot;,
4447 ],
4448 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
4449 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
4450 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
4451 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
4452 },
4453 ],
4454 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
4455 # - user
4456 # - group
4457 # - domain
4458 # - anyone
4459 &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.
4460 &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.
4461 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
4462 },
4463 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
4464 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
4465 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
4466 &quot;height&quot;: 42, # The height of the video in pixels.
4467 &quot;width&quot;: 42, # The width of the video in pixels.
4468 },
4469 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
4470 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
4471 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
4472}</pre>
John Asmuth614db982014-04-24 15:46:26 -04004473</div>
4474
4475<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004476 <code class="details" id="update">update(fileId, addParents=None, body=None, convert=None, enforceSingleParent=None, includePermissionsForView=None, media_body=None, media_mime_type=None, modifiedDateBehavior=None, newRevision=None, ocr=None, ocrLanguage=None, pinned=None, removeParents=None, setModifiedDate=None, supportsAllDrives=None, supportsTeamDrives=None, timedTextLanguage=None, timedTextTrackName=None, updateViewedDate=None, useContentAsIndexableText=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04004477 <pre>Updates file metadata and/or content.
4478
4479Args:
4480 fileId: string, The ID of the file to update. (required)
4481 body: object, The request body.
4482 The object takes the form of:
4483
4484{ # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07004485 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
4486 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
4487 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
4488 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
4489 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
4490 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004491 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07004492 &quot;canAddMyDriveParent&quot;: True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
4493 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
4494 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
4495 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
4496 &quot;canCopy&quot;: True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
4497 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
4498 &quot;canDeleteChildren&quot;: True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
4499 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
4500 &quot;canEdit&quot;: True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent.
4501 &quot;canListChildren&quot;: True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
4502 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004503 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
Bu Sun Kim65020912020-05-20 12:08:20 -07004504 &quot;canMoveChildrenOutOfDrive&quot;: True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
4505 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004506 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user&#x27;s access to the child and to the destination folder.
Bu Sun Kim65020912020-05-20 12:08:20 -07004507 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
4508 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
4509 &quot;canMoveItemOutOfDrive&quot;: True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
4510 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004511 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed.
Bu Sun Kim65020912020-05-20 12:08:20 -07004512 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
4513 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
4514 &quot;canReadDrive&quot;: True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
4515 &quot;canReadRevisions&quot;: True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
4516 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
4517 &quot;canRemoveChildren&quot;: True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
4518 &quot;canRemoveMyDriveParent&quot;: True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
4519 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
4520 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
4521 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
4522 &quot;canTrashChildren&quot;: True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
4523 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -04004524 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004525 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
4526 { # A restriction for accessing the content of the file.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004527 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004528 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
4529 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
4530 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4531 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4532 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4533 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4534 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4535 &quot;picture&quot;: { # The user&#x27;s profile picture.
4536 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4537 },
4538 },
4539 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
4540 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
4541 },
4542 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004543 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
4544 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
4545 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
4546 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
4547 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07004548 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
Bu Sun Kim65020912020-05-20 12:08:20 -07004549 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
4550 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
4551 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
4552 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
4553 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07004554 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
Bu Sun Kim65020912020-05-20 12:08:20 -07004555 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -04004556 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07004557 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
4558 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is populated for files with content stored in Google Drive and for files in Docs Editors; it is not populated for shortcut files.
Bu Sun Kim65020912020-05-20 12:08:20 -07004559 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07004560 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
Bu Sun Kim65020912020-05-20 12:08:20 -07004561 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
4562 &quot;hasThumbnail&quot;: True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07004563 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
Bu Sun Kim65020912020-05-20 12:08:20 -07004564 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
4565 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
4566 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
4567 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
4568 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
4569 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
4570 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
4571 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
4572 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
4573 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
4574 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
4575 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
4576 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
4577 &quot;height&quot;: 42, # The height of the image in pixels.
4578 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
4579 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
4580 &quot;location&quot;: { # Geographic location information stored in the image.
4581 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
4582 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
4583 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
4584 },
4585 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
4586 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
4587 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
4588 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
4589 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
4590 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
4591 &quot;width&quot;: 42, # The width of the image in pixels.
4592 },
4593 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
4594 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
4595 },
4596 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
4597 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
4598 &quot;labels&quot;: { # A group of labels for the file.
4599 &quot;hidden&quot;: True or False, # Deprecated.
4600 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
4601 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
4602 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004603 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07004604 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
4605 },
4606 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
4607 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4608 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4609 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4610 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4611 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4612 &quot;picture&quot;: { # The user&#x27;s profile picture.
4613 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4614 },
4615 },
4616 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
4617 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
4618 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07004619 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
Bu Sun Kim65020912020-05-20 12:08:20 -07004620 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
4621 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
4622 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
4623 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
4624 &quot;a_key&quot;: &quot;A String&quot;,
4625 },
4626 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
4627 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
4628 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
4629 &quot;A String&quot;,
4630 ],
4631 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004632 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07004633 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4634 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4635 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4636 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4637 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4638 &quot;picture&quot;: { # The user&#x27;s profile picture.
4639 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -04004640 },
John Asmuth614db982014-04-24 15:46:26 -04004641 },
4642 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004643 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
4644 # If not specified as part of an insert request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
4645 { # A reference to a file&#x27;s parent.
4646 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
4647 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
4648 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
4649 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
4650 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04004651 },
4652 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004653 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
4654 &quot;A String&quot;,
4655 ],
4656 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
4657 { # A permission for a file.
4658 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
4659 &quot;A String&quot;,
4660 ],
4661 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
4662 &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.
4663 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
4664 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
4665 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
4666 &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:
4667 # - They cannot be set on shared drive items
4668 # - They can only be set on user and group permissions
4669 # - The date must be in the future
4670 # - The date cannot be more than a year in the future
4671 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
4672 &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.
4673 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
4674 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
4675 &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.
4676 {
4677 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4678 &quot;A String&quot;,
4679 ],
4680 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4681 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
4682 &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:
4683 # - file
4684 # - member
4685 &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:
4686 # - organizer
4687 # - fileOrganizer
4688 # - writer
4689 # - reader
4690 },
4691 ],
4692 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
4693 &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:
4694 # - owner
4695 # - organizer
4696 # - fileOrganizer
4697 # - writer
4698 # - reader
4699 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
4700 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
4701 {
4702 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
4703 &quot;A String&quot;,
4704 ],
4705 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
4706 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
4707 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
4708 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
4709 },
4710 ],
4711 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
4712 # - user
4713 # - group
4714 # - domain
4715 # - anyone
4716 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004717 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim65020912020-05-20 12:08:20 -07004718 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04004719 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004720 ],
4721 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004722 { # A key-value pair attached to a file that is either public or private to an application.
4723 # The following limits apply to file properties:
4724 # - Maximum of 100 properties total per file
4725 # - Maximum of 30 private properties per app
4726 # - Maximum of 30 public properties
4727 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
Bu Sun Kim65020912020-05-20 12:08:20 -07004728 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
4729 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
4730 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
4731 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
4732 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
yoshi-code-bot69706592021-03-03 03:54:02 -08004733 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE). Private properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.
John Asmuth614db982014-04-24 15:46:26 -04004734 },
4735 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004736 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
4737 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
4738 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
4739 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
4740 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
4741 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
4742 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4743 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4744 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4745 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4746 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4747 &quot;picture&quot;: { # The user&#x27;s profile picture.
4748 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4749 },
Takashi Matsuo06694102015-09-11 13:55:40 -07004750 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004751 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
4752 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
4753 &quot;targetMimeType&quot;: &quot;A String&quot;, # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target&#x27;s MIME type, captured when the shortcut is created.
4754 },
4755 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
4756 &quot;A String&quot;,
4757 ],
4758 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
4759 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
4760 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
4761 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
4762 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07004763 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content. If the file isn&#x27;t shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request.
Bu Sun Kim65020912020-05-20 12:08:20 -07004764 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
4765 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
4766 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
4767 &quot;trashingUser&quot;: { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
4768 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4769 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4770 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4771 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4772 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4773 &quot;picture&quot;: { # The user&#x27;s profile picture.
4774 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4775 },
4776 },
4777 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
4778 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
4779 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004780 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004781 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
4782 &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.
4783 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
4784 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
4785 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
4786 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -07004787 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004788 # - They can only be set on user and group permissions
4789 # - The date must be in the future
4790 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004791 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07004792 &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.
4793 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
4794 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
4795 &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.
4796 {
4797 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4798 &quot;A String&quot;,
4799 ],
4800 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4801 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
4802 &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:
4803 # - file
4804 # - member
4805 &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:
4806 # - organizer
4807 # - fileOrganizer
4808 # - writer
4809 # - reader
4810 },
4811 ],
4812 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
4813 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04004814 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004815 # - organizer
4816 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04004817 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004818 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07004819 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
4820 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
4821 {
4822 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
4823 &quot;A String&quot;,
4824 ],
4825 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
4826 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
4827 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
4828 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
4829 },
4830 ],
4831 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04004832 # - user
4833 # - group
4834 # - domain
4835 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07004836 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004837 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim65020912020-05-20 12:08:20 -07004838 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04004839 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004840 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
4841 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
4842 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
4843 &quot;height&quot;: 42, # The height of the video in pixels.
4844 &quot;width&quot;: 42, # The width of the video in pixels.
4845 },
4846 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
4847 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
4848 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04004849}
4850
Bu Sun Kim65020912020-05-20 12:08:20 -07004851 addParents: string, Comma-separated list of parent IDs to add.
4852 convert: boolean, This parameter is deprecated and has no function.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08004853 enforceSingleParent: boolean, Deprecated. Adding files to multiple folders is no longer supported. Use shortcuts instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004854 includePermissionsForView: string, Specifies which additional view&#x27;s permissions to include in the response. Only &#x27;published&#x27; is supported.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004855 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
4856 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
Takashi Matsuo06694102015-09-11 13:55:40 -07004857 modifiedDateBehavior: string, Determines the behavior in which modifiedDate is updated. This overrides setModifiedDate.
4858 Allowed values
4859 fromBody - Set modifiedDate to the value provided in the body of the request. No change if no value was provided.
4860 fromBodyIfNeeded - Set modifiedDate to the value provided in the body of the request depending on other contents of the update.
4861 fromBodyOrNow - Set modifiedDate to the value provided in the body of the request, or to the current time if no value was provided.
4862 noChange - Maintain the previous value of modifiedDate.
4863 now - Set modifiedDate to the current time.
4864 nowIfNeeded - Set modifiedDate to the current time depending on contents of the update.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004865 newRevision: boolean, Whether a blob upload should create a new revision. If false, the blob data in the current head revision is replaced. If true or not set, a new blob is created as head revision, and previous unpinned revisions are preserved for a short period of time. Pinned revisions are stored indefinitely, using additional storage quota, up to a maximum of 200 revisions. For details on how revisions are retained, see the Drive Help Center. Note that this field is ignored if there is no payload in the request.
Bu Sun Kim65020912020-05-20 12:08:20 -07004866 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004867 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004868 pinned: boolean, Whether to pin the new revision. A file can have a maximum of 200 pinned revisions. Note that this field is ignored if there is no payload in the request.
Craig Citro065b5302014-08-14 00:47:23 -07004869 removeParents: string, Comma-separated list of parent IDs to remove.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004870 setModifiedDate: boolean, Whether to set the modified date using the value supplied in the request body. Setting this field to true is equivalent to modifiedDateBehavior=fromBodyOrNow, and false is equivalent to modifiedDateBehavior=now. To prevent any changes to the modified date set modifiedDateBehavior=noChange.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004871 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07004872 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
John Asmuth614db982014-04-24 15:46:26 -04004873 timedTextLanguage: string, The language of the timed text.
Bu Sun Kim65020912020-05-20 12:08:20 -07004874 timedTextTrackName: string, The timed text track name.
4875 updateViewedDate: boolean, Whether to update the view date after successfully updating the file.
4876 useContentAsIndexableText: boolean, Whether to use the content as indexable text.
John Asmuth614db982014-04-24 15:46:26 -04004877
4878Returns:
4879 An object of the form:
4880
4881 { # The metadata for a file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004882 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
4883 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
4884 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
4885 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
4886 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
4887 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
4888 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
4889 &quot;canAddMyDriveParent&quot;: True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
4890 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
4891 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
4892 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
4893 &quot;canCopy&quot;: True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
4894 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
4895 &quot;canDeleteChildren&quot;: True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
4896 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
4897 &quot;canEdit&quot;: True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent.
4898 &quot;canListChildren&quot;: True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
4899 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
4900 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
4901 &quot;canMoveChildrenOutOfDrive&quot;: True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
4902 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
4903 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user&#x27;s access to the child and to the destination folder.
4904 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
4905 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
4906 &quot;canMoveItemOutOfDrive&quot;: True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
4907 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
4908 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed.
4909 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
4910 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
4911 &quot;canReadDrive&quot;: True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
4912 &quot;canReadRevisions&quot;: True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
4913 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
4914 &quot;canRemoveChildren&quot;: True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
4915 &quot;canRemoveMyDriveParent&quot;: True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
4916 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
4917 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
4918 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
4919 &quot;canTrashChildren&quot;: True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
4920 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
4921 },
4922 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
4923 { # A restriction for accessing the content of the file.
4924 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified.
4925 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
4926 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
Bu Sun Kim65020912020-05-20 12:08:20 -07004927 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4928 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4929 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4930 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4931 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4932 &quot;picture&quot;: { # The user&#x27;s profile picture.
4933 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -04004934 },
John Asmuth614db982014-04-24 15:46:26 -04004935 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004936 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
4937 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
4938 },
4939 ],
4940 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
4941 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
4942 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
4943 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
4944 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
4945 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
4946 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
4947 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
4948 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
4949 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
4950 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
4951 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
4952 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
4953 },
4954 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
4955 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is populated for files with content stored in Google Drive and for files in Docs Editors; it is not populated for shortcut files.
4956 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
4957 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
4958 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
4959 &quot;hasThumbnail&quot;: True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
4960 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
4961 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
4962 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
4963 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
4964 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
4965 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
4966 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
4967 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
4968 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
4969 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
4970 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
4971 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
4972 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
4973 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
4974 &quot;height&quot;: 42, # The height of the image in pixels.
4975 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
4976 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
4977 &quot;location&quot;: { # Geographic location information stored in the image.
4978 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
4979 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
4980 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
4981 },
4982 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
4983 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
4984 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
4985 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
4986 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
4987 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
4988 &quot;width&quot;: 42, # The width of the image in pixels.
4989 },
4990 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
4991 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
4992 },
4993 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
4994 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
4995 &quot;labels&quot;: { # A group of labels for the file.
4996 &quot;hidden&quot;: True or False, # Deprecated.
4997 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
4998 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
4999 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
5000 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
5001 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
5002 },
5003 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
5004 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
5005 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
5006 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
5007 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
5008 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
5009 &quot;picture&quot;: { # The user&#x27;s profile picture.
5010 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
5011 },
5012 },
5013 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
5014 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
5015 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
5016 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.
5017 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
5018 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
5019 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
5020 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
5021 &quot;a_key&quot;: &quot;A String&quot;,
5022 },
5023 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
5024 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
5025 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
5026 &quot;A String&quot;,
5027 ],
5028 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
5029 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07005030 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
5031 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
5032 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
5033 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
5034 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
5035 &quot;picture&quot;: { # The user&#x27;s profile picture.
5036 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
5037 },
Takashi Matsuo06694102015-09-11 13:55:40 -07005038 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005039 ],
5040 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
5041 # If not specified as part of an insert request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the addParents and removeParents parameters to modify the parents list.
5042 { # A reference to a file&#x27;s parent.
5043 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
5044 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
5045 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
5046 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
5047 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
Bu Sun Kim65020912020-05-20 12:08:20 -07005048 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005049 ],
5050 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
5051 &quot;A String&quot;,
5052 ],
5053 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
5054 { # A permission for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07005055 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
5056 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005057 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005058 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
5059 &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.
5060 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
5061 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
5062 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
5063 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -07005064 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005065 # - They can only be set on user and group permissions
5066 # - The date must be in the future
5067 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005068 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07005069 &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.
5070 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
5071 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
5072 &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.
5073 {
5074 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
5075 &quot;A String&quot;,
5076 ],
5077 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
5078 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
5079 &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:
5080 # - file
5081 # - member
5082 &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:
5083 # - organizer
5084 # - fileOrganizer
5085 # - writer
5086 # - reader
5087 },
5088 ],
5089 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
5090 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04005091 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005092 # - organizer
5093 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04005094 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005095 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07005096 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
5097 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
5098 {
5099 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
5100 &quot;A String&quot;,
5101 ],
5102 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
5103 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
5104 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
5105 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
5106 },
5107 ],
5108 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04005109 # - user
5110 # - group
5111 # - domain
5112 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07005113 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005114 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim65020912020-05-20 12:08:20 -07005115 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04005116 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005117 ],
5118 &quot;properties&quot;: [ # The list of properties.
5119 { # A key-value pair attached to a file that is either public or private to an application.
5120 # The following limits apply to file properties:
5121 # - Maximum of 100 properties total per file
5122 # - Maximum of 30 private properties per app
5123 # - Maximum of 30 public properties
5124 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
5125 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
5126 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
5127 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
5128 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
5129 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
yoshi-code-bot69706592021-03-03 03:54:02 -08005130 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE). Private properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.
Bu Sun Kim65020912020-05-20 12:08:20 -07005131 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005132 ],
5133 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
5134 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
5135 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
5136 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
5137 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
5138 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
5139 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
5140 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
5141 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
5142 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
5143 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
5144 &quot;picture&quot;: { # The user&#x27;s profile picture.
5145 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
5146 },
5147 },
5148 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
5149 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
5150 &quot;targetMimeType&quot;: &quot;A String&quot;, # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target&#x27;s MIME type, captured when the shortcut is created.
5151 },
5152 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
5153 &quot;A String&quot;,
5154 ],
5155 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
5156 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
5157 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
5158 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
5159 },
5160 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content. If the file isn&#x27;t shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request.
5161 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
5162 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
5163 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
5164 &quot;trashingUser&quot;: { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
5165 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
5166 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
5167 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
5168 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
5169 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
5170 &quot;picture&quot;: { # The user&#x27;s profile picture.
5171 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
5172 },
5173 },
5174 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
5175 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
5176 &quot;A String&quot;,
5177 ],
5178 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
5179 &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.
5180 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
5181 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
5182 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
5183 &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:
5184 # - They cannot be set on shared drive items
5185 # - They can only be set on user and group permissions
5186 # - The date must be in the future
5187 # - The date cannot be more than a year in the future
5188 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
5189 &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.
5190 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
5191 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
5192 &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.
5193 {
5194 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
5195 &quot;A String&quot;,
5196 ],
5197 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
5198 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
5199 &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:
5200 # - file
5201 # - member
5202 &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:
5203 # - organizer
5204 # - fileOrganizer
5205 # - writer
5206 # - reader
5207 },
5208 ],
5209 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
5210 &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:
5211 # - owner
5212 # - organizer
5213 # - fileOrganizer
5214 # - writer
5215 # - reader
5216 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
5217 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
5218 {
5219 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
5220 &quot;A String&quot;,
5221 ],
5222 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
5223 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
5224 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
5225 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
5226 },
5227 ],
5228 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
5229 # - user
5230 # - group
5231 # - domain
5232 # - anyone
5233 &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.
5234 &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.
5235 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
5236 },
5237 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
5238 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
5239 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
5240 &quot;height&quot;: 42, # The height of the video in pixels.
5241 &quot;width&quot;: 42, # The width of the video in pixels.
5242 },
5243 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
5244 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
5245 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
5246}</pre>
John Asmuth614db982014-04-24 15:46:26 -04005247</div>
5248
5249<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005250 <code class="details" id="watch">watch(fileId, acknowledgeAbuse=None, body=None, includePermissionsForView=None, projection=None, revisionId=None, supportsAllDrives=None, supportsTeamDrives=None, updateViewedDate=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04005251 <pre>Subscribe to changes on a file
5252
5253Args:
5254 fileId: string, The ID for the file in question. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005255 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04005256 The object takes the form of:
5257
5258{ # An notification channel used to watch for resource changes.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005259 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
5260 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
5261 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
5262 &quot;kind&quot;: &quot;api#channel&quot;, # Identifies this as a notification channel used to watch for changes to a resource, which is &quot;api#channel&quot;.
5263 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
5264 &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
5265 },
5266 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
5267 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
5268 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
5269 &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
5270 &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel.
5271}
John Asmuth614db982014-04-24 15:46:26 -04005272
Bu Sun Kim65020912020-05-20 12:08:20 -07005273 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005274 includePermissionsForView: string, Specifies which additional view&#x27;s permissions to include in the response. Only &#x27;published&#x27; is supported.
John Asmuth614db982014-04-24 15:46:26 -04005275 projection: string, This parameter is deprecated and has no function.
5276 Allowed values
5277 BASIC - Deprecated
5278 FULL - Deprecated
Nathaniel Manista4f877e52015-06-15 16:44:50 +00005279 revisionId: string, Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005280 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07005281 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005282 updateViewedDate: boolean, Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
John Asmuth614db982014-04-24 15:46:26 -04005283
5284Returns:
5285 An object of the form:
5286
5287 { # An notification channel used to watch for resource changes.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005288 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
5289 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
5290 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
5291 &quot;kind&quot;: &quot;api#channel&quot;, # Identifies this as a notification channel used to watch for changes to a resource, which is &quot;api#channel&quot;.
5292 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
5293 &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
5294 },
5295 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
5296 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
5297 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
5298 &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
5299 &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel.
5300}</pre>
John Asmuth614db982014-04-24 15:46:26 -04005301</div>
5302
Craig Citroe633be12015-03-02 13:40:36 -08005303<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005304 <code class="details" id="watch_media">watch_media(fileId, acknowledgeAbuse=None, body=None, includePermissionsForView=None, projection=None, revisionId=None, supportsAllDrives=None, supportsTeamDrives=None, updateViewedDate=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08005305 <pre>Subscribe to changes on a file
5306
5307Args:
5308 fileId: string, The ID for the file in question. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005309 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08005310 The object takes the form of:
5311
5312{ # An notification channel used to watch for resource changes.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005313 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
5314 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
5315 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
5316 &quot;kind&quot;: &quot;api#channel&quot;, # Identifies this as a notification channel used to watch for changes to a resource, which is &quot;api#channel&quot;.
5317 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
5318 &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
5319 },
5320 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
5321 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
5322 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
5323 &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
5324 &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel.
5325}
Craig Citroe633be12015-03-02 13:40:36 -08005326
Bu Sun Kim65020912020-05-20 12:08:20 -07005327 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005328 includePermissionsForView: string, Specifies which additional view&#x27;s permissions to include in the response. Only &#x27;published&#x27; is supported.
Craig Citroe633be12015-03-02 13:40:36 -08005329 projection: string, This parameter is deprecated and has no function.
5330 Allowed values
5331 BASIC - Deprecated
5332 FULL - Deprecated
Nathaniel Manista4f877e52015-06-15 16:44:50 +00005333 revisionId: string, Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005334 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07005335 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005336 updateViewedDate: boolean, Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
Craig Citroe633be12015-03-02 13:40:36 -08005337
5338Returns:
5339 The media object as a string.
5340
5341 </pre>
5342</div>
5343
John Asmuth614db982014-04-24 15:46:26 -04005344</body></html>