blob: f720b58a868a525f6af92a2554bf02ae1263937a [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">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#copy">copy(fileId, body=None, supportsTeamDrives=None, pinned=None, ocrLanguage=None, ocr=None, visibility=None, timedTextTrackName=None, enforceSingleParent=None, convert=None, supportsAllDrives=None, timedTextLanguage=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040079<p class="firstline">Creates a copy of the specified file.</p>
80<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070081 <code><a href="#delete">delete(fileId, supportsTeamDrives=None, supportsAllDrives=None)</a></code></p>
82<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 -040083<p class="toc_element">
Craig Citro065b5302014-08-14 00:47:23 -070084 <code><a href="#emptyTrash">emptyTrash()</a></code></p>
85<p class="firstline">Permanently deletes all of the user's trashed files.</p>
86<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070087 <code><a href="#export">export(fileId, mimeType)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<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 -070089<p class="toc_element">
90 <code><a href="#export_media">export_media(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">
Takashi Matsuo06694102015-09-11 13:55:40 -070093 <code><a href="#generateIds">generateIds(space=None, maxResults=None)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -070094<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 -070095<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070096 <code><a href="#get">get(fileId, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080097<p class="firstline">Gets a file's metadata by ID.</p>
98<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070099 <code><a href="#get_media">get_media(fileId, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400100<p class="firstline">Gets a file's metadata by ID.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#insert">insert(body=None, supportsTeamDrives=None, media_body=None, ocrLanguage=None, ocr=None, pinned=None, visibility=None, timedTextTrackName=None, enforceSingleParent=None, convert=None, useContentAsIndexableText=None, supportsAllDrives=None, media_mime_type=None, timedTextLanguage=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400103<p class="firstline">Insert a new file.</p>
104<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700105 <code><a href="#list">list(orderBy=None, projection=None, supportsTeamDrives=None, spaces=None, q=None, pageToken=None, corpus=None, maxResults=None, teamDriveId=None, includeItemsFromAllDrives=None, includeTeamDriveItems=None, corpora=None, supportsAllDrives=None, driveId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400106<p class="firstline">Lists the user's files.</p>
107<p class="toc_element">
108 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
109<p class="firstline">Retrieves the next page of results.</p>
110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#patch">patch(fileId, body=None, supportsTeamDrives=None, newRevision=None, modifiedDateBehavior=None, ocrLanguage=None, pinned=None, ocr=None, addParents=None, removeParents=None, updateViewedDate=None, timedTextTrackName=None, enforceSingleParent=None, convert=None, useContentAsIndexableText=None, supportsAllDrives=None, setModifiedDate=None, timedTextLanguage=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400112<p class="firstline">Updates file metadata and/or content. This method supports patch semantics.</p>
113<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700114 <code><a href="#touch">touch(fileId, supportsTeamDrives=None, supportsAllDrives=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400115<p class="firstline">Set the file's updated time to the current server time.</p>
116<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700117 <code><a href="#trash">trash(fileId, supportsTeamDrives=None, supportsAllDrives=None)</a></code></p>
118<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.</p>
John Asmuth614db982014-04-24 15:46:26 -0400119<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700120 <code><a href="#untrash">untrash(fileId, supportsTeamDrives=None, supportsAllDrives=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400121<p class="firstline">Restores a file from the trash.</p>
122<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700123 <code><a href="#update">update(fileId, body=None, supportsTeamDrives=None, newRevision=None, modifiedDateBehavior=None, media_body=None, ocrLanguage=None, pinned=None, ocr=None, addParents=None, removeParents=None, updateViewedDate=None, timedTextTrackName=None, enforceSingleParent=None, convert=None, useContentAsIndexableText=None, supportsAllDrives=None, media_mime_type=None, setModifiedDate=None, timedTextLanguage=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400124<p class="firstline">Updates file metadata and/or content.</p>
125<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700126 <code><a href="#watch">watch(fileId, body=None, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800127<p class="firstline">Subscribe to changes on a file</p>
128<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700129 <code><a href="#watch_media">watch_media(fileId, body=None, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400130<p class="firstline">Subscribe to changes on a file</p>
131<h3>Method Details</h3>
132<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700133 <code class="details" id="copy">copy(fileId, body=None, supportsTeamDrives=None, pinned=None, ocrLanguage=None, ocr=None, visibility=None, timedTextTrackName=None, enforceSingleParent=None, convert=None, supportsAllDrives=None, timedTextLanguage=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400134 <pre>Creates a copy of the specified file.
135
136Args:
137 fileId: string, The ID of the file to copy. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700138 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400139 The object takes the form of:
140
141{ # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400142 "hasThumbnail": 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.
John Asmuth614db982014-04-24 15:46:26 -0400143 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700144 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -0700145 "version": "A String", # 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.
146 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800147 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -0400148 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700149 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800150 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000151 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800152 "hidden": True or False, # Deprecated.
153 "starred": True or False, # Whether this file is starred by the user.
154 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -0400155 },
156 "indexableText": { # Indexable text attributes for the file (can only be written)
157 "text": "A String", # The text to be indexed for this file.
158 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400159 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700160 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700161 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -0400162 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700163 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
164 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700165 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -0400166 "picture": { # The user's profile picture.
167 "url": "A String", # A URL that points to a profile picture of this user.
168 },
169 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400170 "displayName": "A String", # A plain text displayable name for this user.
171 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700172 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
173 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400174 },
175 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700176 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -0400177 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700178 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -0700179 "picture": { # The user's profile picture.
180 "url": "A String", # A URL that points to a profile picture of this user.
181 },
182 "kind": "drive#user", # This is always drive#user.
183 "displayName": "A String", # A plain text displayable name for this user.
184 "permissionId": "A String", # The user's ID as visible in the permissions collection.
185 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
186 "emailAddress": "A String", # The email address of the user.
187 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700188 "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
189 "targetId": "A String", # The ID of the file that this shortcut points to.
190 "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400191 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700192 "downloadUrl": "A String", # 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 Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800193 "mimeType": "A String", # 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's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700194 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -0400195 "picture": { # The user's profile picture.
196 "url": "A String", # A URL that points to a profile picture of this user.
197 },
198 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400199 "displayName": "A String", # A plain text displayable name for this user.
200 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700201 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
202 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400203 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400204 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700205 "folderColorRgb": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700206 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700207 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -0400208 "A String",
209 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400210 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700211 "canMoveItemOutOfDrive": 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400212 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700213 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
214 "canDeleteChildren": 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.
215 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
216 "canListChildren": 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.
217 "canRename": True or False, # Whether the current user can rename this file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700218 "canModifyContent": True or False, # Whether the current user can modify the content of this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700219 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
220 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
221 "canChangeRestrictedDownload": True or False, # Deprecated
222 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
223 "canTrashChildren": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700224 "canAddMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700225 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
226 "canReadRevisions": 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.
227 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
228 "canCopy": 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.
229 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
230 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
231 "canComment": True or False, # Whether the current user can comment on this file.
232 "canMoveChildrenOutOfDrive": 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.
233 "canTrash": True or False, # Whether the current user can move this file to trash.
Dan O'Mearadd494642020-05-01 07:42:23 -0700234 "canRemoveMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700235 "canDelete": True or False, # Whether the current user can delete this file.
236 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
237 "canDownload": True or False, # Whether the current user can download this file.
238 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
239 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
240 "canRemoveChildren": 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.
241 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
Dan O'Mearadd494642020-05-01 07:42:23 -0700242 "canEdit": 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400243 },
John Asmuth614db982014-04-24 15:46:26 -0400244 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
245 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
246 "etag": "A String", # ETag of the file.
247 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700248 # If not specified as part of an insert request, the file will be placed directly in the user'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.
John Asmuth614db982014-04-24 15:46:26 -0400249 { # A reference to a file's parent.
250 "selfLink": "A String", # A link back to this reference.
251 "kind": "drive#parentReference", # This is always drive#parentReference.
252 "id": "A String", # The ID of the parent.
253 "isRoot": True or False, # Whether or not the parent is the root folder.
254 "parentLink": "A String", # A link to the parent.
255 },
256 ],
257 "exportLinks": { # Links for exporting Google Docs to specific formats.
258 "a_key": "A String", # A mapping from export format to URL
259 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700260 "shareable": True or False, # Deprecated: use capabilities/canShare.
261 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
262 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400263 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
264 "a_key": "A String",
265 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400266 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -0400267 "imageMediaMetadata": { # 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.
268 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
269 "exposureTime": 3.14, # The length of the exposure, in seconds.
270 "cameraMake": "A String", # The make of the camera used to create the photo.
271 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
272 "isoSpeed": 42, # The ISO speed used to create the photo.
273 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
274 "exposureMode": "A String", # The exposure mode used to create the photo.
275 "colorSpace": "A String", # The color space of the photo.
276 "location": { # Geographic location information stored in the image.
277 "latitude": 3.14, # The latitude stored in the image.
278 "altitude": 3.14, # The altitude stored in the image.
279 "longitude": 3.14, # The longitude stored in the image.
280 },
281 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
282 "height": 42, # The height of the image in pixels.
283 "lens": "A String", # The lens used to create the photo.
284 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
285 "width": 42, # The width of the image in pixels.
286 "meteringMode": "A String", # The metering mode used to create the photo.
287 "flashUsed": True or False, # Whether a flash was used to create the photo.
288 "aperture": 3.14, # The aperture used to create the photo (f-number).
Dan O'Mearadd494642020-05-01 07:42:23 -0700289 "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
John Asmuth614db982014-04-24 15:46:26 -0400290 "sensor": "A String", # The type of sensor used to create the photo.
291 "whiteBalance": "A String", # The white balance mode used to create the photo.
292 "cameraModel": "A String", # The model of the camera used to create the photo.
293 },
294 "description": "A String", # A short description of the file.
295 "webContentLink": "A String", # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800296 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
297 "width": 42, # The width of the video in pixels.
298 "durationMillis": "A String", # The duration of the video in milliseconds.
299 "height": 42, # The height of the video in pixels.
300 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400301 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -0400302 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400303 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -0400304 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700305 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
306 "picture": { # The user's profile picture.
307 "url": "A String", # A URL that points to a profile picture of this user.
308 },
309 "kind": "drive#user", # This is always drive#user.
310 "displayName": "A String", # A plain text displayable name for this user.
311 "permissionId": "A String", # The user's ID as visible in the permissions collection.
312 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
313 "emailAddress": "A String", # The email address of the user.
314 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700315 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700316 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700317 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -0400318 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000319 { # A key-value pair attached to a file that is either public or private to an application.
320 # The following limits apply to file properties:
321 # - Maximum of 100 properties total per file
322 # - Maximum of 30 private properties per app
323 # - Maximum of 30 public properties
324 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -0400325 "kind": "drive#property", # This is always drive#property.
326 "value": "A String", # The value of this property.
327 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700328 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -0400329 "key": "A String", # The key of this property.
330 "selfLink": "A String", # The link back to this property.
331 },
332 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700333 "md5Checksum": "A String", # 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400334 "iconLink": "A String", # A link to the file's icon.
335 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
336 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700337 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700338 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
339 "title": "A String", # 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.
John Asmuth614db982014-04-24 15:46:26 -0400340 "modifiedByMeDate": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700341 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -0700342 "mimeType": "A String", # The MIME type of the thumbnail.
343 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
344 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700345 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -0400346 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
347 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -0700348 "domain": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700349 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400350 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400351 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
352 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700353 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400354 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700355 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -0700356 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700357 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
358 # - file
359 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400360 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
361 "A String",
362 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400363 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
364 },
365 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700366 "name": "A String", # The name for this permission.
367 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
368 {
369 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
370 "role": "A String", # Deprecated - use permissionDetails/role instead.
371 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
372 "A String",
373 ],
374 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
375 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
376 },
377 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400378 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -0400379 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800380 "value": "A String", # 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.
381 "id": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700382 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -0400383 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -0800384 "emailAddress": "A String", # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400385 "expirationDate": "A String", # 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 -0700386 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400387 # - They can only be set on user and group permissions
388 # - The date must be in the future
389 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700390 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400391 "role": "A String", # 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 -0400392 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700393 # - organizer
394 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -0400395 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700396 # - reader
John Asmuth614db982014-04-24 15:46:26 -0400397 "type": "A String", # The account type. Allowed values are:
398 # - user
399 # - group
400 # - domain
401 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400402 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -0400403 "A String",
404 ],
405 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700406 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -0400407 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700408 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000409 "A String",
410 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700411 "permissionIds": [ # List of permission IDs for users with access to this file.
412 "A String",
413 ],
414 "originalFilename": "A String", # 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.
415 "fileExtension": "A String", # 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 Google Docs or shortcut files.
Dan O'Mearadd494642020-05-01 07:42:23 -0700416 "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700417 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
418 { # A permission for a file.
419 "withLink": True or False, # Whether the link is required for this permission.
420 "domain": "A String", # 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.
421 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
422 {
423 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
424 # - organizer
425 # - fileOrganizer
426 # - writer
427 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -0700428 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700429 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
430 # - file
431 # - member
432 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
433 "A String",
434 ],
435 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
436 },
437 ],
438 "name": "A String", # The name for this permission.
439 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
440 {
441 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
442 "role": "A String", # Deprecated - use permissionDetails/role instead.
443 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
444 "A String",
445 ],
446 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
447 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
448 },
449 ],
450 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
451 "kind": "drive#permission", # This is always drive#permission.
452 "value": "A String", # 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.
453 "id": "A String", # 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.
454 "authKey": "A String", # Deprecated.
455 "etag": "A String", # The ETag of the permission.
456 "emailAddress": "A String", # 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.
457 "expirationDate": "A String", # 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 -0700458 # - They cannot be set on shared drive items
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700459 # - They can only be set on user and group permissions
460 # - The date must be in the future
461 # - The date cannot be more than a year in the future
462 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
463 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
464 # - owner
465 # - organizer
466 # - fileOrganizer
467 # - writer
468 # - reader
469 "type": "A String", # The account type. Allowed values are:
470 # - user
471 # - group
472 # - domain
473 # - anyone
474 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
475 "A String",
476 ],
477 "selfLink": "A String", # A link back to this permission.
478 "photoLink": "A String", # A link to the profile photo, if available.
479 },
480 ],
481 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400482 "selfLink": "A String", # A link back to this file.
483 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
484}
485
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700486 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700487 pinned: boolean, Whether to pin the head revision of the new copy. A file can have a maximum of 200 pinned revisions.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400488 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700489 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
John Asmuth614db982014-04-24 15:46:26 -0400490 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.
491 Allowed values
492 DEFAULT - The visibility of the new file is determined by the user's default visibility/sharing policies.
493 PRIVATE - The new file will be visible to only the owner.
John Asmuth614db982014-04-24 15:46:26 -0400494 timedTextTrackName: string, The timed text track name.
Dan O'Mearadd494642020-05-01 07:42:23 -0700495 enforceSingleParent: boolean, Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter only takes effect if the item is not in a shared drive. Requests that specify more than one parent fail.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700496 convert: boolean, Whether to convert this file to the corresponding Google Docs format.
497 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400498 timedTextLanguage: string, The language of the timed text.
John Asmuth614db982014-04-24 15:46:26 -0400499
500Returns:
501 An object of the form:
502
503 { # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400504 "hasThumbnail": 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.
John Asmuth614db982014-04-24 15:46:26 -0400505 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700506 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -0700507 "version": "A String", # 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.
508 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800509 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -0400510 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700511 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800512 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000513 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800514 "hidden": True or False, # Deprecated.
515 "starred": True or False, # Whether this file is starred by the user.
516 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -0400517 },
518 "indexableText": { # Indexable text attributes for the file (can only be written)
519 "text": "A String", # The text to be indexed for this file.
520 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400521 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700522 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700523 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -0400524 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700525 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
526 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700527 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -0400528 "picture": { # The user's profile picture.
529 "url": "A String", # A URL that points to a profile picture of this user.
530 },
531 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400532 "displayName": "A String", # A plain text displayable name for this user.
533 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700534 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
535 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400536 },
537 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700538 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -0400539 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700540 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -0700541 "picture": { # The user's profile picture.
542 "url": "A String", # A URL that points to a profile picture of this user.
543 },
544 "kind": "drive#user", # This is always drive#user.
545 "displayName": "A String", # A plain text displayable name for this user.
546 "permissionId": "A String", # The user's ID as visible in the permissions collection.
547 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
548 "emailAddress": "A String", # The email address of the user.
549 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700550 "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
551 "targetId": "A String", # The ID of the file that this shortcut points to.
552 "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400553 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700554 "downloadUrl": "A String", # 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 Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800555 "mimeType": "A String", # 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's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700556 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -0400557 "picture": { # The user's profile picture.
558 "url": "A String", # A URL that points to a profile picture of this user.
559 },
560 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400561 "displayName": "A String", # A plain text displayable name for this user.
562 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700563 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
564 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400565 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400566 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700567 "folderColorRgb": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700568 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700569 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -0400570 "A String",
571 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400572 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700573 "canMoveItemOutOfDrive": 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400574 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700575 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
576 "canDeleteChildren": 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.
577 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
578 "canListChildren": 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.
579 "canRename": True or False, # Whether the current user can rename this file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700580 "canModifyContent": True or False, # Whether the current user can modify the content of this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700581 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
582 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
583 "canChangeRestrictedDownload": True or False, # Deprecated
584 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
585 "canTrashChildren": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700586 "canAddMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700587 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
588 "canReadRevisions": 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.
589 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
590 "canCopy": 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.
591 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
592 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
593 "canComment": True or False, # Whether the current user can comment on this file.
594 "canMoveChildrenOutOfDrive": 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.
595 "canTrash": True or False, # Whether the current user can move this file to trash.
Dan O'Mearadd494642020-05-01 07:42:23 -0700596 "canRemoveMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700597 "canDelete": True or False, # Whether the current user can delete this file.
598 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
599 "canDownload": True or False, # Whether the current user can download this file.
600 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
601 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
602 "canRemoveChildren": 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.
603 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
Dan O'Mearadd494642020-05-01 07:42:23 -0700604 "canEdit": 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400605 },
John Asmuth614db982014-04-24 15:46:26 -0400606 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
607 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
608 "etag": "A String", # ETag of the file.
609 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700610 # If not specified as part of an insert request, the file will be placed directly in the user'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.
John Asmuth614db982014-04-24 15:46:26 -0400611 { # A reference to a file's parent.
612 "selfLink": "A String", # A link back to this reference.
613 "kind": "drive#parentReference", # This is always drive#parentReference.
614 "id": "A String", # The ID of the parent.
615 "isRoot": True or False, # Whether or not the parent is the root folder.
616 "parentLink": "A String", # A link to the parent.
617 },
618 ],
619 "exportLinks": { # Links for exporting Google Docs to specific formats.
620 "a_key": "A String", # A mapping from export format to URL
621 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700622 "shareable": True or False, # Deprecated: use capabilities/canShare.
623 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
624 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400625 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
626 "a_key": "A String",
627 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400628 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -0400629 "imageMediaMetadata": { # 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.
630 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
631 "exposureTime": 3.14, # The length of the exposure, in seconds.
632 "cameraMake": "A String", # The make of the camera used to create the photo.
633 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
634 "isoSpeed": 42, # The ISO speed used to create the photo.
635 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
636 "exposureMode": "A String", # The exposure mode used to create the photo.
637 "colorSpace": "A String", # The color space of the photo.
638 "location": { # Geographic location information stored in the image.
639 "latitude": 3.14, # The latitude stored in the image.
640 "altitude": 3.14, # The altitude stored in the image.
641 "longitude": 3.14, # The longitude stored in the image.
642 },
643 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
644 "height": 42, # The height of the image in pixels.
645 "lens": "A String", # The lens used to create the photo.
646 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
647 "width": 42, # The width of the image in pixels.
648 "meteringMode": "A String", # The metering mode used to create the photo.
649 "flashUsed": True or False, # Whether a flash was used to create the photo.
650 "aperture": 3.14, # The aperture used to create the photo (f-number).
Dan O'Mearadd494642020-05-01 07:42:23 -0700651 "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
John Asmuth614db982014-04-24 15:46:26 -0400652 "sensor": "A String", # The type of sensor used to create the photo.
653 "whiteBalance": "A String", # The white balance mode used to create the photo.
654 "cameraModel": "A String", # The model of the camera used to create the photo.
655 },
656 "description": "A String", # A short description of the file.
657 "webContentLink": "A String", # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800658 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
659 "width": 42, # The width of the video in pixels.
660 "durationMillis": "A String", # The duration of the video in milliseconds.
661 "height": 42, # The height of the video in pixels.
662 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400663 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -0400664 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400665 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -0400666 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700667 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
668 "picture": { # The user's profile picture.
669 "url": "A String", # A URL that points to a profile picture of this user.
670 },
671 "kind": "drive#user", # This is always drive#user.
672 "displayName": "A String", # A plain text displayable name for this user.
673 "permissionId": "A String", # The user's ID as visible in the permissions collection.
674 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
675 "emailAddress": "A String", # The email address of the user.
676 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700677 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700678 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700679 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -0400680 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000681 { # A key-value pair attached to a file that is either public or private to an application.
682 # The following limits apply to file properties:
683 # - Maximum of 100 properties total per file
684 # - Maximum of 30 private properties per app
685 # - Maximum of 30 public properties
686 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -0400687 "kind": "drive#property", # This is always drive#property.
688 "value": "A String", # The value of this property.
689 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700690 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -0400691 "key": "A String", # The key of this property.
692 "selfLink": "A String", # The link back to this property.
693 },
694 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700695 "md5Checksum": "A String", # 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400696 "iconLink": "A String", # A link to the file's icon.
697 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
698 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700699 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700700 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
701 "title": "A String", # 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.
John Asmuth614db982014-04-24 15:46:26 -0400702 "modifiedByMeDate": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700703 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -0700704 "mimeType": "A String", # The MIME type of the thumbnail.
705 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
706 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700707 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -0400708 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
709 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -0700710 "domain": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700711 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400712 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400713 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
714 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700715 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400716 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700717 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -0700718 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700719 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
720 # - file
721 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400722 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
723 "A String",
724 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400725 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
726 },
727 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700728 "name": "A String", # The name for this permission.
729 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
730 {
731 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
732 "role": "A String", # Deprecated - use permissionDetails/role instead.
733 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
734 "A String",
735 ],
736 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
737 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
738 },
739 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400740 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -0400741 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800742 "value": "A String", # 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.
743 "id": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700744 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -0400745 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -0800746 "emailAddress": "A String", # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400747 "expirationDate": "A String", # 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 -0700748 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400749 # - They can only be set on user and group permissions
750 # - The date must be in the future
751 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700752 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400753 "role": "A String", # 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 -0400754 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700755 # - organizer
756 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -0400757 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700758 # - reader
John Asmuth614db982014-04-24 15:46:26 -0400759 "type": "A String", # The account type. Allowed values are:
760 # - user
761 # - group
762 # - domain
763 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400764 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -0400765 "A String",
766 ],
767 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700768 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -0400769 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700770 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000771 "A String",
772 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700773 "permissionIds": [ # List of permission IDs for users with access to this file.
774 "A String",
775 ],
776 "originalFilename": "A String", # 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.
777 "fileExtension": "A String", # 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 Google Docs or shortcut files.
Dan O'Mearadd494642020-05-01 07:42:23 -0700778 "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700779 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
780 { # A permission for a file.
781 "withLink": True or False, # Whether the link is required for this permission.
782 "domain": "A String", # 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.
783 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
784 {
785 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
786 # - organizer
787 # - fileOrganizer
788 # - writer
789 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -0700790 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700791 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
792 # - file
793 # - member
794 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
795 "A String",
796 ],
797 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
798 },
799 ],
800 "name": "A String", # The name for this permission.
801 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
802 {
803 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
804 "role": "A String", # Deprecated - use permissionDetails/role instead.
805 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
806 "A String",
807 ],
808 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
809 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
810 },
811 ],
812 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
813 "kind": "drive#permission", # This is always drive#permission.
814 "value": "A String", # 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.
815 "id": "A String", # 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.
816 "authKey": "A String", # Deprecated.
817 "etag": "A String", # The ETag of the permission.
818 "emailAddress": "A String", # 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.
819 "expirationDate": "A String", # 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 -0700820 # - They cannot be set on shared drive items
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700821 # - They can only be set on user and group permissions
822 # - The date must be in the future
823 # - The date cannot be more than a year in the future
824 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
825 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
826 # - owner
827 # - organizer
828 # - fileOrganizer
829 # - writer
830 # - reader
831 "type": "A String", # The account type. Allowed values are:
832 # - user
833 # - group
834 # - domain
835 # - anyone
836 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
837 "A String",
838 ],
839 "selfLink": "A String", # A link back to this permission.
840 "photoLink": "A String", # A link to the profile photo, if available.
841 },
842 ],
843 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400844 "selfLink": "A String", # A link back to this file.
845 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
846 }</pre>
847</div>
848
849<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700850 <code class="details" id="delete">delete(fileId, supportsTeamDrives=None, supportsAllDrives=None)</code>
851 <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 -0400852
853Args:
854 fileId: string, The ID of the file to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700855 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
856 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
John Asmuth614db982014-04-24 15:46:26 -0400857</pre>
858</div>
859
860<div class="method">
Craig Citro065b5302014-08-14 00:47:23 -0700861 <code class="details" id="emptyTrash">emptyTrash()</code>
862 <pre>Permanently deletes all of the user's trashed files.
863
864Args:
865</pre>
866</div>
867
868<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700869 <code class="details" id="export">export(fileId, mimeType)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700870 <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 -0700871
872Args:
873 fileId: string, The ID of the file. (required)
874 mimeType: string, The MIME type of the format requested for this export. (required)
875</pre>
876</div>
877
878<div class="method">
879 <code class="details" id="export_media">export_media(fileId, mimeType)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700880 <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 -0700881
882Args:
883 fileId: string, The ID of the file. (required)
884 mimeType: string, The MIME type of the format requested for this export. (required)
885</pre>
886</div>
887
888<div class="method">
Takashi Matsuo06694102015-09-11 13:55:40 -0700889 <code class="details" id="generateIds">generateIds(space=None, maxResults=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -0700890 <pre>Generates a set of file IDs which can be provided in insert or copy requests.
Takashi Matsuo06694102015-09-11 13:55:40 -0700891
892Args:
893 space: string, The space in which the IDs can be used to create new files. Supported values are 'drive' and 'appDataFolder'.
894 maxResults: integer, Maximum number of IDs to return.
895
896Returns:
897 An object of the form:
898
899 { # A list of generated IDs which can be provided in insert requests
900 "kind": "drive#generatedIds", # This is always drive#generatedIds
901 "ids": [ # The IDs generated for the requesting user in the specified space.
902 "A String",
903 ],
904 "space": "A String", # The type of file that can be created with these IDs.
905 }</pre>
906</div>
907
908<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700909 <code class="details" id="get">get(fileId, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400910 <pre>Gets a file's metadata by ID.
911
912Args:
913 fileId: string, The ID for the file in question. (required)
914 projection: string, This parameter is deprecated and has no function.
915 Allowed values
916 BASIC - Deprecated
917 FULL - Deprecated
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000918 revisionId: string, Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700919 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
920 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Craig Citroe633be12015-03-02 13:40:36 -0800921 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700922 updateViewedDate: boolean, Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
John Asmuth614db982014-04-24 15:46:26 -0400923
924Returns:
925 An object of the form:
926
927 { # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400928 "hasThumbnail": 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.
John Asmuth614db982014-04-24 15:46:26 -0400929 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700930 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -0700931 "version": "A String", # 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.
932 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800933 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -0400934 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700935 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800936 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000937 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800938 "hidden": True or False, # Deprecated.
939 "starred": True or False, # Whether this file is starred by the user.
940 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -0400941 },
942 "indexableText": { # Indexable text attributes for the file (can only be written)
943 "text": "A String", # The text to be indexed for this file.
944 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400945 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700946 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700947 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -0400948 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700949 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
950 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700951 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -0400952 "picture": { # The user's profile picture.
953 "url": "A String", # A URL that points to a profile picture of this user.
954 },
955 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400956 "displayName": "A String", # A plain text displayable name for this user.
957 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700958 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
959 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400960 },
961 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700962 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -0400963 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700964 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -0700965 "picture": { # The user's profile picture.
966 "url": "A String", # A URL that points to a profile picture of this user.
967 },
968 "kind": "drive#user", # This is always drive#user.
969 "displayName": "A String", # A plain text displayable name for this user.
970 "permissionId": "A String", # The user's ID as visible in the permissions collection.
971 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
972 "emailAddress": "A String", # The email address of the user.
973 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700974 "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
975 "targetId": "A String", # The ID of the file that this shortcut points to.
976 "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400977 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700978 "downloadUrl": "A String", # 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 Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800979 "mimeType": "A String", # 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's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700980 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -0400981 "picture": { # The user's profile picture.
982 "url": "A String", # A URL that points to a profile picture of this user.
983 },
984 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400985 "displayName": "A String", # A plain text displayable name for this user.
986 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700987 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
988 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400989 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400990 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700991 "folderColorRgb": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700992 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700993 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -0400994 "A String",
995 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400996 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700997 "canMoveItemOutOfDrive": 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400998 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700999 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
1000 "canDeleteChildren": 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.
1001 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1002 "canListChildren": 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.
1003 "canRename": True or False, # Whether the current user can rename this file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001004 "canModifyContent": True or False, # Whether the current user can modify the content of this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001005 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
1006 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
1007 "canChangeRestrictedDownload": True or False, # Deprecated
1008 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
1009 "canTrashChildren": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001010 "canAddMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001011 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
1012 "canReadRevisions": 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.
1013 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
1014 "canCopy": 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.
1015 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1016 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1017 "canComment": True or False, # Whether the current user can comment on this file.
1018 "canMoveChildrenOutOfDrive": 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.
1019 "canTrash": True or False, # Whether the current user can move this file to trash.
Dan O'Mearadd494642020-05-01 07:42:23 -07001020 "canRemoveMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001021 "canDelete": True or False, # Whether the current user can delete this file.
1022 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1023 "canDownload": True or False, # Whether the current user can download this file.
1024 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1025 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
1026 "canRemoveChildren": 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.
1027 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
Dan O'Mearadd494642020-05-01 07:42:23 -07001028 "canEdit": 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001029 },
John Asmuth614db982014-04-24 15:46:26 -04001030 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
1031 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
1032 "etag": "A String", # ETag of the file.
1033 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001034 # If not specified as part of an insert request, the file will be placed directly in the user'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.
John Asmuth614db982014-04-24 15:46:26 -04001035 { # A reference to a file's parent.
1036 "selfLink": "A String", # A link back to this reference.
1037 "kind": "drive#parentReference", # This is always drive#parentReference.
1038 "id": "A String", # The ID of the parent.
1039 "isRoot": True or False, # Whether or not the parent is the root folder.
1040 "parentLink": "A String", # A link to the parent.
1041 },
1042 ],
1043 "exportLinks": { # Links for exporting Google Docs to specific formats.
1044 "a_key": "A String", # A mapping from export format to URL
1045 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001046 "shareable": True or False, # Deprecated: use capabilities/canShare.
1047 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1048 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001049 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
1050 "a_key": "A String",
1051 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001052 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04001053 "imageMediaMetadata": { # 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.
1054 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
1055 "exposureTime": 3.14, # The length of the exposure, in seconds.
1056 "cameraMake": "A String", # The make of the camera used to create the photo.
1057 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1058 "isoSpeed": 42, # The ISO speed used to create the photo.
1059 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
1060 "exposureMode": "A String", # The exposure mode used to create the photo.
1061 "colorSpace": "A String", # The color space of the photo.
1062 "location": { # Geographic location information stored in the image.
1063 "latitude": 3.14, # The latitude stored in the image.
1064 "altitude": 3.14, # The altitude stored in the image.
1065 "longitude": 3.14, # The longitude stored in the image.
1066 },
1067 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
1068 "height": 42, # The height of the image in pixels.
1069 "lens": "A String", # The lens used to create the photo.
1070 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
1071 "width": 42, # The width of the image in pixels.
1072 "meteringMode": "A String", # The metering mode used to create the photo.
1073 "flashUsed": True or False, # Whether a flash was used to create the photo.
1074 "aperture": 3.14, # The aperture used to create the photo (f-number).
Dan O'Mearadd494642020-05-01 07:42:23 -07001075 "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
John Asmuth614db982014-04-24 15:46:26 -04001076 "sensor": "A String", # The type of sensor used to create the photo.
1077 "whiteBalance": "A String", # The white balance mode used to create the photo.
1078 "cameraModel": "A String", # The model of the camera used to create the photo.
1079 },
1080 "description": "A String", # A short description of the file.
1081 "webContentLink": "A String", # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001082 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
1083 "width": 42, # The width of the video in pixels.
1084 "durationMillis": "A String", # The duration of the video in milliseconds.
1085 "height": 42, # The height of the video in pixels.
1086 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001087 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04001088 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001089 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04001090 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001091 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
1092 "picture": { # The user's profile picture.
1093 "url": "A String", # A URL that points to a profile picture of this user.
1094 },
1095 "kind": "drive#user", # This is always drive#user.
1096 "displayName": "A String", # A plain text displayable name for this user.
1097 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1098 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1099 "emailAddress": "A String", # The email address of the user.
1100 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001101 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001102 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001103 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04001104 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001105 { # A key-value pair attached to a file that is either public or private to an application.
1106 # The following limits apply to file properties:
1107 # - Maximum of 100 properties total per file
1108 # - Maximum of 30 private properties per app
1109 # - Maximum of 30 public properties
1110 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -04001111 "kind": "drive#property", # This is always drive#property.
1112 "value": "A String", # The value of this property.
1113 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001114 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04001115 "key": "A String", # The key of this property.
1116 "selfLink": "A String", # The link back to this property.
1117 },
1118 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001119 "md5Checksum": "A String", # 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001120 "iconLink": "A String", # A link to the file's icon.
1121 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
1122 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001123 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001124 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
1125 "title": "A String", # 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.
John Asmuth614db982014-04-24 15:46:26 -04001126 "modifiedByMeDate": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001127 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -07001128 "mimeType": "A String", # The MIME type of the thumbnail.
1129 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
1130 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001131 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04001132 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
1133 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07001134 "domain": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001135 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001136 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001137 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
1138 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001139 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001140 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001141 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -07001142 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001143 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
1144 # - file
1145 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001146 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1147 "A String",
1148 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001149 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1150 },
1151 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001152 "name": "A String", # The name for this permission.
1153 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
1154 {
1155 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
1156 "role": "A String", # Deprecated - use permissionDetails/role instead.
1157 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
1158 "A String",
1159 ],
1160 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
1161 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
1162 },
1163 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001164 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -04001165 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001166 "value": "A String", # 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.
1167 "id": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001168 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -04001169 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08001170 "emailAddress": "A String", # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001171 "expirationDate": "A String", # 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 -07001172 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001173 # - They can only be set on user and group permissions
1174 # - The date must be in the future
1175 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001176 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001177 "role": "A String", # 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 -04001178 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001179 # - organizer
1180 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04001181 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001182 # - reader
John Asmuth614db982014-04-24 15:46:26 -04001183 "type": "A String", # The account type. Allowed values are:
1184 # - user
1185 # - group
1186 # - domain
1187 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001188 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -04001189 "A String",
1190 ],
1191 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001192 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04001193 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001194 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001195 "A String",
1196 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001197 "permissionIds": [ # List of permission IDs for users with access to this file.
1198 "A String",
1199 ],
1200 "originalFilename": "A String", # 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.
1201 "fileExtension": "A String", # 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 Google Docs or shortcut files.
Dan O'Mearadd494642020-05-01 07:42:23 -07001202 "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001203 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
1204 { # A permission for a file.
1205 "withLink": True or False, # Whether the link is required for this permission.
1206 "domain": "A String", # 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.
1207 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
1208 {
1209 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
1210 # - organizer
1211 # - fileOrganizer
1212 # - writer
1213 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -07001214 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001215 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
1216 # - file
1217 # - member
1218 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1219 "A String",
1220 ],
1221 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1222 },
1223 ],
1224 "name": "A String", # The name for this permission.
1225 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
1226 {
1227 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
1228 "role": "A String", # Deprecated - use permissionDetails/role instead.
1229 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
1230 "A String",
1231 ],
1232 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
1233 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
1234 },
1235 ],
1236 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
1237 "kind": "drive#permission", # This is always drive#permission.
1238 "value": "A String", # 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.
1239 "id": "A String", # 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.
1240 "authKey": "A String", # Deprecated.
1241 "etag": "A String", # The ETag of the permission.
1242 "emailAddress": "A String", # 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.
1243 "expirationDate": "A String", # 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 -07001244 # - They cannot be set on shared drive items
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001245 # - They can only be set on user and group permissions
1246 # - The date must be in the future
1247 # - The date cannot be more than a year in the future
1248 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
1249 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
1250 # - owner
1251 # - organizer
1252 # - fileOrganizer
1253 # - writer
1254 # - reader
1255 "type": "A String", # The account type. Allowed values are:
1256 # - user
1257 # - group
1258 # - domain
1259 # - anyone
1260 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
1261 "A String",
1262 ],
1263 "selfLink": "A String", # A link back to this permission.
1264 "photoLink": "A String", # A link to the profile photo, if available.
1265 },
1266 ],
1267 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001268 "selfLink": "A String", # A link back to this file.
1269 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
1270 }</pre>
1271</div>
1272
1273<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001274 <code class="details" id="get_media">get_media(fileId, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08001275 <pre>Gets a file's metadata by ID.
1276
1277Args:
1278 fileId: string, The ID for the file in question. (required)
1279 projection: string, This parameter is deprecated and has no function.
1280 Allowed values
1281 BASIC - Deprecated
1282 FULL - Deprecated
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001283 revisionId: string, Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001284 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
1285 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Craig Citroe633be12015-03-02 13:40:36 -08001286 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001287 updateViewedDate: boolean, Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
Craig Citroe633be12015-03-02 13:40:36 -08001288
1289Returns:
1290 The media object as a string.
1291
1292 </pre>
1293</div>
1294
1295<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001296 <code class="details" id="insert">insert(body=None, supportsTeamDrives=None, media_body=None, ocrLanguage=None, ocr=None, pinned=None, visibility=None, timedTextTrackName=None, enforceSingleParent=None, convert=None, useContentAsIndexableText=None, supportsAllDrives=None, media_mime_type=None, timedTextLanguage=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04001297 <pre>Insert a new file.
1298
1299Args:
1300 body: object, The request body.
1301 The object takes the form of:
1302
1303{ # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001304 "hasThumbnail": 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.
John Asmuth614db982014-04-24 15:46:26 -04001305 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001306 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -07001307 "version": "A String", # 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.
1308 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001309 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -04001310 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001311 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001312 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001313 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001314 "hidden": True or False, # Deprecated.
1315 "starred": True or False, # Whether this file is starred by the user.
1316 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04001317 },
1318 "indexableText": { # Indexable text attributes for the file (can only be written)
1319 "text": "A String", # The text to be indexed for this file.
1320 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001321 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07001322 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001323 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04001324 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001325 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
1326 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001327 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04001328 "picture": { # The user's profile picture.
1329 "url": "A String", # A URL that points to a profile picture of this user.
1330 },
1331 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04001332 "displayName": "A String", # A plain text displayable name for this user.
1333 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07001334 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1335 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04001336 },
1337 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001338 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04001339 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001340 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07001341 "picture": { # The user's profile picture.
1342 "url": "A String", # A URL that points to a profile picture of this user.
1343 },
1344 "kind": "drive#user", # This is always drive#user.
1345 "displayName": "A String", # A plain text displayable name for this user.
1346 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1347 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1348 "emailAddress": "A String", # The email address of the user.
1349 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001350 "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
1351 "targetId": "A String", # The ID of the file that this shortcut points to.
1352 "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001353 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001354 "downloadUrl": "A String", # 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 Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001355 "mimeType": "A String", # 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's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001356 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04001357 "picture": { # The user's profile picture.
1358 "url": "A String", # A URL that points to a profile picture of this user.
1359 },
1360 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04001361 "displayName": "A String", # A plain text displayable name for this user.
1362 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07001363 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1364 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04001365 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001366 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001367 "folderColorRgb": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001368 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001369 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04001370 "A String",
1371 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001372 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001373 "canMoveItemOutOfDrive": 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001374 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001375 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
1376 "canDeleteChildren": 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.
1377 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1378 "canListChildren": 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.
1379 "canRename": True or False, # Whether the current user can rename this file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001380 "canModifyContent": True or False, # Whether the current user can modify the content of this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001381 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
1382 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
1383 "canChangeRestrictedDownload": True or False, # Deprecated
1384 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
1385 "canTrashChildren": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001386 "canAddMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001387 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
1388 "canReadRevisions": 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.
1389 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
1390 "canCopy": 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.
1391 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1392 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1393 "canComment": True or False, # Whether the current user can comment on this file.
1394 "canMoveChildrenOutOfDrive": 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.
1395 "canTrash": True or False, # Whether the current user can move this file to trash.
Dan O'Mearadd494642020-05-01 07:42:23 -07001396 "canRemoveMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001397 "canDelete": True or False, # Whether the current user can delete this file.
1398 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1399 "canDownload": True or False, # Whether the current user can download this file.
1400 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1401 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
1402 "canRemoveChildren": 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.
1403 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
Dan O'Mearadd494642020-05-01 07:42:23 -07001404 "canEdit": 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001405 },
John Asmuth614db982014-04-24 15:46:26 -04001406 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
1407 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
1408 "etag": "A String", # ETag of the file.
1409 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001410 # If not specified as part of an insert request, the file will be placed directly in the user'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.
John Asmuth614db982014-04-24 15:46:26 -04001411 { # A reference to a file's parent.
1412 "selfLink": "A String", # A link back to this reference.
1413 "kind": "drive#parentReference", # This is always drive#parentReference.
1414 "id": "A String", # The ID of the parent.
1415 "isRoot": True or False, # Whether or not the parent is the root folder.
1416 "parentLink": "A String", # A link to the parent.
1417 },
1418 ],
1419 "exportLinks": { # Links for exporting Google Docs to specific formats.
1420 "a_key": "A String", # A mapping from export format to URL
1421 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001422 "shareable": True or False, # Deprecated: use capabilities/canShare.
1423 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1424 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001425 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
1426 "a_key": "A String",
1427 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001428 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04001429 "imageMediaMetadata": { # 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.
1430 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
1431 "exposureTime": 3.14, # The length of the exposure, in seconds.
1432 "cameraMake": "A String", # The make of the camera used to create the photo.
1433 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1434 "isoSpeed": 42, # The ISO speed used to create the photo.
1435 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
1436 "exposureMode": "A String", # The exposure mode used to create the photo.
1437 "colorSpace": "A String", # The color space of the photo.
1438 "location": { # Geographic location information stored in the image.
1439 "latitude": 3.14, # The latitude stored in the image.
1440 "altitude": 3.14, # The altitude stored in the image.
1441 "longitude": 3.14, # The longitude stored in the image.
1442 },
1443 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
1444 "height": 42, # The height of the image in pixels.
1445 "lens": "A String", # The lens used to create the photo.
1446 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
1447 "width": 42, # The width of the image in pixels.
1448 "meteringMode": "A String", # The metering mode used to create the photo.
1449 "flashUsed": True or False, # Whether a flash was used to create the photo.
1450 "aperture": 3.14, # The aperture used to create the photo (f-number).
Dan O'Mearadd494642020-05-01 07:42:23 -07001451 "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
John Asmuth614db982014-04-24 15:46:26 -04001452 "sensor": "A String", # The type of sensor used to create the photo.
1453 "whiteBalance": "A String", # The white balance mode used to create the photo.
1454 "cameraModel": "A String", # The model of the camera used to create the photo.
1455 },
1456 "description": "A String", # A short description of the file.
1457 "webContentLink": "A String", # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001458 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
1459 "width": 42, # The width of the video in pixels.
1460 "durationMillis": "A String", # The duration of the video in milliseconds.
1461 "height": 42, # The height of the video in pixels.
1462 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001463 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04001464 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001465 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04001466 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001467 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
1468 "picture": { # The user's profile picture.
1469 "url": "A String", # A URL that points to a profile picture of this user.
1470 },
1471 "kind": "drive#user", # This is always drive#user.
1472 "displayName": "A String", # A plain text displayable name for this user.
1473 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1474 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1475 "emailAddress": "A String", # The email address of the user.
1476 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001477 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001478 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001479 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04001480 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001481 { # A key-value pair attached to a file that is either public or private to an application.
1482 # The following limits apply to file properties:
1483 # - Maximum of 100 properties total per file
1484 # - Maximum of 30 private properties per app
1485 # - Maximum of 30 public properties
1486 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -04001487 "kind": "drive#property", # This is always drive#property.
1488 "value": "A String", # The value of this property.
1489 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001490 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04001491 "key": "A String", # The key of this property.
1492 "selfLink": "A String", # The link back to this property.
1493 },
1494 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001495 "md5Checksum": "A String", # 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001496 "iconLink": "A String", # A link to the file's icon.
1497 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
1498 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001499 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001500 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
1501 "title": "A String", # 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.
John Asmuth614db982014-04-24 15:46:26 -04001502 "modifiedByMeDate": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001503 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -07001504 "mimeType": "A String", # The MIME type of the thumbnail.
1505 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
1506 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001507 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04001508 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
1509 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07001510 "domain": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001511 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001512 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001513 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
1514 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001515 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001516 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001517 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -07001518 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001519 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
1520 # - file
1521 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001522 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1523 "A String",
1524 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001525 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1526 },
1527 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001528 "name": "A String", # The name for this permission.
1529 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
1530 {
1531 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
1532 "role": "A String", # Deprecated - use permissionDetails/role instead.
1533 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
1534 "A String",
1535 ],
1536 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
1537 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
1538 },
1539 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001540 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -04001541 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001542 "value": "A String", # 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.
1543 "id": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001544 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -04001545 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08001546 "emailAddress": "A String", # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001547 "expirationDate": "A String", # 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 -07001548 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001549 # - They can only be set on user and group permissions
1550 # - The date must be in the future
1551 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001552 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001553 "role": "A String", # 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 -04001554 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001555 # - organizer
1556 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04001557 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001558 # - reader
John Asmuth614db982014-04-24 15:46:26 -04001559 "type": "A String", # The account type. Allowed values are:
1560 # - user
1561 # - group
1562 # - domain
1563 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001564 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -04001565 "A String",
1566 ],
1567 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001568 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04001569 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001570 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001571 "A String",
1572 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001573 "permissionIds": [ # List of permission IDs for users with access to this file.
1574 "A String",
1575 ],
1576 "originalFilename": "A String", # 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.
1577 "fileExtension": "A String", # 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 Google Docs or shortcut files.
Dan O'Mearadd494642020-05-01 07:42:23 -07001578 "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001579 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
1580 { # A permission for a file.
1581 "withLink": True or False, # Whether the link is required for this permission.
1582 "domain": "A String", # 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.
1583 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
1584 {
1585 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
1586 # - organizer
1587 # - fileOrganizer
1588 # - writer
1589 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -07001590 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001591 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
1592 # - file
1593 # - member
1594 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1595 "A String",
1596 ],
1597 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1598 },
1599 ],
1600 "name": "A String", # The name for this permission.
1601 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
1602 {
1603 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
1604 "role": "A String", # Deprecated - use permissionDetails/role instead.
1605 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
1606 "A String",
1607 ],
1608 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
1609 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
1610 },
1611 ],
1612 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
1613 "kind": "drive#permission", # This is always drive#permission.
1614 "value": "A String", # 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.
1615 "id": "A String", # 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.
1616 "authKey": "A String", # Deprecated.
1617 "etag": "A String", # The ETag of the permission.
1618 "emailAddress": "A String", # 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.
1619 "expirationDate": "A String", # 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 -07001620 # - They cannot be set on shared drive items
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001621 # - They can only be set on user and group permissions
1622 # - The date must be in the future
1623 # - The date cannot be more than a year in the future
1624 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
1625 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
1626 # - owner
1627 # - organizer
1628 # - fileOrganizer
1629 # - writer
1630 # - reader
1631 "type": "A String", # The account type. Allowed values are:
1632 # - user
1633 # - group
1634 # - domain
1635 # - anyone
1636 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
1637 "A String",
1638 ],
1639 "selfLink": "A String", # A link back to this permission.
1640 "photoLink": "A String", # A link to the profile photo, if available.
1641 },
1642 ],
1643 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001644 "selfLink": "A String", # A link back to this file.
1645 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
1646}
1647
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001648 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
John Asmuth614db982014-04-24 15:46:26 -04001649 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001650 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
1651 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
1652 pinned: boolean, Whether to pin the head revision of the uploaded file. A file can have a maximum of 200 pinned revisions.
John Asmuth614db982014-04-24 15:46:26 -04001653 visibility: string, The visibility of the new file. This parameter is only relevant when convert=false.
1654 Allowed values
1655 DEFAULT - The visibility of the new file is determined by the user's default visibility/sharing policies.
1656 PRIVATE - The new file will be visible to only the owner.
John Asmuth614db982014-04-24 15:46:26 -04001657 timedTextTrackName: string, The timed text track name.
Dan O'Mearadd494642020-05-01 07:42:23 -07001658 enforceSingleParent: boolean, Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter only takes effect if the item is not in a shared drive. Requests that specify more than one parent fail.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001659 convert: boolean, Whether to convert this file to the corresponding Google Docs format.
1660 useContentAsIndexableText: boolean, Whether to use the content as indexable text.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001661 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001662 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
1663 timedTextLanguage: string, The language of the timed text.
John Asmuth614db982014-04-24 15:46:26 -04001664
1665Returns:
1666 An object of the form:
1667
1668 { # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001669 "hasThumbnail": 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.
John Asmuth614db982014-04-24 15:46:26 -04001670 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001671 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -07001672 "version": "A String", # 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.
1673 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001674 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -04001675 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001676 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001677 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001678 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001679 "hidden": True or False, # Deprecated.
1680 "starred": True or False, # Whether this file is starred by the user.
1681 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04001682 },
1683 "indexableText": { # Indexable text attributes for the file (can only be written)
1684 "text": "A String", # The text to be indexed for this file.
1685 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001686 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07001687 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001688 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04001689 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001690 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
1691 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001692 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04001693 "picture": { # The user's profile picture.
1694 "url": "A String", # A URL that points to a profile picture of this user.
1695 },
1696 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04001697 "displayName": "A String", # A plain text displayable name for this user.
1698 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07001699 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1700 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04001701 },
1702 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001703 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04001704 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001705 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07001706 "picture": { # The user's profile picture.
1707 "url": "A String", # A URL that points to a profile picture of this user.
1708 },
1709 "kind": "drive#user", # This is always drive#user.
1710 "displayName": "A String", # A plain text displayable name for this user.
1711 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1712 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1713 "emailAddress": "A String", # The email address of the user.
1714 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001715 "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
1716 "targetId": "A String", # The ID of the file that this shortcut points to.
1717 "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001718 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001719 "downloadUrl": "A String", # 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 Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001720 "mimeType": "A String", # 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's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001721 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04001722 "picture": { # The user's profile picture.
1723 "url": "A String", # A URL that points to a profile picture of this user.
1724 },
1725 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04001726 "displayName": "A String", # A plain text displayable name for this user.
1727 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07001728 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1729 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04001730 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001731 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001732 "folderColorRgb": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001733 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001734 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04001735 "A String",
1736 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001737 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001738 "canMoveItemOutOfDrive": 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001739 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001740 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
1741 "canDeleteChildren": 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.
1742 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1743 "canListChildren": 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.
1744 "canRename": True or False, # Whether the current user can rename this file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001745 "canModifyContent": True or False, # Whether the current user can modify the content of this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001746 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
1747 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
1748 "canChangeRestrictedDownload": True or False, # Deprecated
1749 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
1750 "canTrashChildren": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001751 "canAddMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001752 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
1753 "canReadRevisions": 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.
1754 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
1755 "canCopy": 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.
1756 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1757 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1758 "canComment": True or False, # Whether the current user can comment on this file.
1759 "canMoveChildrenOutOfDrive": 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.
1760 "canTrash": True or False, # Whether the current user can move this file to trash.
Dan O'Mearadd494642020-05-01 07:42:23 -07001761 "canRemoveMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001762 "canDelete": True or False, # Whether the current user can delete this file.
1763 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1764 "canDownload": True or False, # Whether the current user can download this file.
1765 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1766 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
1767 "canRemoveChildren": 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.
1768 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
Dan O'Mearadd494642020-05-01 07:42:23 -07001769 "canEdit": 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001770 },
John Asmuth614db982014-04-24 15:46:26 -04001771 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
1772 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
1773 "etag": "A String", # ETag of the file.
1774 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001775 # If not specified as part of an insert request, the file will be placed directly in the user'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.
John Asmuth614db982014-04-24 15:46:26 -04001776 { # A reference to a file's parent.
1777 "selfLink": "A String", # A link back to this reference.
1778 "kind": "drive#parentReference", # This is always drive#parentReference.
1779 "id": "A String", # The ID of the parent.
1780 "isRoot": True or False, # Whether or not the parent is the root folder.
1781 "parentLink": "A String", # A link to the parent.
1782 },
1783 ],
1784 "exportLinks": { # Links for exporting Google Docs to specific formats.
1785 "a_key": "A String", # A mapping from export format to URL
1786 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001787 "shareable": True or False, # Deprecated: use capabilities/canShare.
1788 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1789 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001790 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
1791 "a_key": "A String",
1792 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001793 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04001794 "imageMediaMetadata": { # 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.
1795 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
1796 "exposureTime": 3.14, # The length of the exposure, in seconds.
1797 "cameraMake": "A String", # The make of the camera used to create the photo.
1798 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1799 "isoSpeed": 42, # The ISO speed used to create the photo.
1800 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
1801 "exposureMode": "A String", # The exposure mode used to create the photo.
1802 "colorSpace": "A String", # The color space of the photo.
1803 "location": { # Geographic location information stored in the image.
1804 "latitude": 3.14, # The latitude stored in the image.
1805 "altitude": 3.14, # The altitude stored in the image.
1806 "longitude": 3.14, # The longitude stored in the image.
1807 },
1808 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
1809 "height": 42, # The height of the image in pixels.
1810 "lens": "A String", # The lens used to create the photo.
1811 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
1812 "width": 42, # The width of the image in pixels.
1813 "meteringMode": "A String", # The metering mode used to create the photo.
1814 "flashUsed": True or False, # Whether a flash was used to create the photo.
1815 "aperture": 3.14, # The aperture used to create the photo (f-number).
Dan O'Mearadd494642020-05-01 07:42:23 -07001816 "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
John Asmuth614db982014-04-24 15:46:26 -04001817 "sensor": "A String", # The type of sensor used to create the photo.
1818 "whiteBalance": "A String", # The white balance mode used to create the photo.
1819 "cameraModel": "A String", # The model of the camera used to create the photo.
1820 },
1821 "description": "A String", # A short description of the file.
1822 "webContentLink": "A String", # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001823 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
1824 "width": 42, # The width of the video in pixels.
1825 "durationMillis": "A String", # The duration of the video in milliseconds.
1826 "height": 42, # The height of the video in pixels.
1827 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001828 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04001829 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001830 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04001831 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001832 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
1833 "picture": { # The user's profile picture.
1834 "url": "A String", # A URL that points to a profile picture of this user.
1835 },
1836 "kind": "drive#user", # This is always drive#user.
1837 "displayName": "A String", # A plain text displayable name for this user.
1838 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1839 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1840 "emailAddress": "A String", # The email address of the user.
1841 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001842 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001843 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001844 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04001845 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001846 { # A key-value pair attached to a file that is either public or private to an application.
1847 # The following limits apply to file properties:
1848 # - Maximum of 100 properties total per file
1849 # - Maximum of 30 private properties per app
1850 # - Maximum of 30 public properties
1851 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -04001852 "kind": "drive#property", # This is always drive#property.
1853 "value": "A String", # The value of this property.
1854 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001855 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04001856 "key": "A String", # The key of this property.
1857 "selfLink": "A String", # The link back to this property.
1858 },
1859 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001860 "md5Checksum": "A String", # 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001861 "iconLink": "A String", # A link to the file's icon.
1862 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
1863 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001864 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001865 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
1866 "title": "A String", # 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.
John Asmuth614db982014-04-24 15:46:26 -04001867 "modifiedByMeDate": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001868 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -07001869 "mimeType": "A String", # The MIME type of the thumbnail.
1870 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
1871 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001872 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04001873 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
1874 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07001875 "domain": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001876 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001877 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001878 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
1879 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001880 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001881 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001882 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -07001883 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001884 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
1885 # - file
1886 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001887 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1888 "A String",
1889 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001890 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1891 },
1892 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001893 "name": "A String", # The name for this permission.
1894 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
1895 {
1896 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
1897 "role": "A String", # Deprecated - use permissionDetails/role instead.
1898 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
1899 "A String",
1900 ],
1901 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
1902 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
1903 },
1904 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001905 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -04001906 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001907 "value": "A String", # 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.
1908 "id": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001909 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -04001910 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08001911 "emailAddress": "A String", # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001912 "expirationDate": "A String", # 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 -07001913 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001914 # - They can only be set on user and group permissions
1915 # - The date must be in the future
1916 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001917 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001918 "role": "A String", # 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 -04001919 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001920 # - organizer
1921 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04001922 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001923 # - reader
John Asmuth614db982014-04-24 15:46:26 -04001924 "type": "A String", # The account type. Allowed values are:
1925 # - user
1926 # - group
1927 # - domain
1928 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001929 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -04001930 "A String",
1931 ],
1932 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001933 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04001934 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001935 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001936 "A String",
1937 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001938 "permissionIds": [ # List of permission IDs for users with access to this file.
1939 "A String",
1940 ],
1941 "originalFilename": "A String", # 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.
1942 "fileExtension": "A String", # 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 Google Docs or shortcut files.
Dan O'Mearadd494642020-05-01 07:42:23 -07001943 "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001944 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
1945 { # A permission for a file.
1946 "withLink": True or False, # Whether the link is required for this permission.
1947 "domain": "A String", # 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.
1948 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
1949 {
1950 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
1951 # - organizer
1952 # - fileOrganizer
1953 # - writer
1954 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -07001955 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001956 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
1957 # - file
1958 # - member
1959 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1960 "A String",
1961 ],
1962 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1963 },
1964 ],
1965 "name": "A String", # The name for this permission.
1966 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
1967 {
1968 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
1969 "role": "A String", # Deprecated - use permissionDetails/role instead.
1970 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
1971 "A String",
1972 ],
1973 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
1974 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
1975 },
1976 ],
1977 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
1978 "kind": "drive#permission", # This is always drive#permission.
1979 "value": "A String", # 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.
1980 "id": "A String", # 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.
1981 "authKey": "A String", # Deprecated.
1982 "etag": "A String", # The ETag of the permission.
1983 "emailAddress": "A String", # 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.
1984 "expirationDate": "A String", # 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 -07001985 # - They cannot be set on shared drive items
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001986 # - They can only be set on user and group permissions
1987 # - The date must be in the future
1988 # - The date cannot be more than a year in the future
1989 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
1990 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
1991 # - owner
1992 # - organizer
1993 # - fileOrganizer
1994 # - writer
1995 # - reader
1996 "type": "A String", # The account type. Allowed values are:
1997 # - user
1998 # - group
1999 # - domain
2000 # - anyone
2001 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
2002 "A String",
2003 ],
2004 "selfLink": "A String", # A link back to this permission.
2005 "photoLink": "A String", # A link to the profile photo, if available.
2006 },
2007 ],
2008 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002009 "selfLink": "A String", # A link back to this file.
2010 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
2011 }</pre>
2012</div>
2013
2014<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002015 <code class="details" id="list">list(orderBy=None, projection=None, supportsTeamDrives=None, spaces=None, q=None, pageToken=None, corpus=None, maxResults=None, teamDriveId=None, includeItemsFromAllDrives=None, includeTeamDriveItems=None, corpora=None, supportsAllDrives=None, driveId=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04002016 <pre>Lists the user's files.
2017
2018Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002019 orderBy: string, A comma-separated list of sort keys. Valid keys are 'createdDate', 'folder', 'lastViewedByMeDate', 'modifiedByMeDate', 'modifiedDate', 'quotaBytesUsed', 'recency', 'sharedWithMeDate', 'starred', 'title', and 'title_natural'. Each key sorts ascending by default, but may be reversed with the 'desc' 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.
John Asmuth614db982014-04-24 15:46:26 -04002020 projection: string, This parameter is deprecated and has no function.
2021 Allowed values
2022 BASIC - Deprecated
2023 FULL - Deprecated
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002024 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Takashi Matsuo06694102015-09-11 13:55:40 -07002025 spaces: string, A comma-separated list of spaces to query. Supported values are 'drive', 'appDataFolder' and 'photos'.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002026 q: string, Query string for searching files.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002027 pageToken: string, Page token for files.
2028 corpus: string, The body of items (files/documents) to which the query applies. Deprecated: use 'corpora' instead.
Craig Citro065b5302014-08-14 00:47:23 -07002029 Allowed values
2030 DEFAULT - The items that the user has accessed.
2031 DOMAIN - Items shared to the user's domain.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002032 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002033 teamDriveId: string, Deprecated use driveId instead.
2034 includeItemsFromAllDrives: boolean, Deprecated - Whether both My Drive and shared drive items should be included in results. This parameter will only be effective until June 1, 2020. Afterwards shared drive items will be included in the results.
2035 includeTeamDriveItems: boolean, Deprecated use includeItemsFromAllDrives instead.
2036 corpora: string, Bodies of items (files/documents) to which the query applies. Supported bodies are 'default', 'domain', 'drive' and 'allDrives'. Prefer 'default' or 'drive' to 'allDrives' for efficiency.
2037 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
2038 driveId: string, ID of the shared drive to search.
John Asmuth614db982014-04-24 15:46:26 -04002039
2040Returns:
2041 An object of the form:
2042
2043 { # A list of files.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002044 "incompleteSearch": 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 "allDrives" 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 "default" or "drive".
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002045 "nextPageToken": "A String", # 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.
John Asmuth614db982014-04-24 15:46:26 -04002046 "kind": "drive#fileList", # This is always drive#fileList.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002047 "items": [ # The list of files. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.
John Asmuth614db982014-04-24 15:46:26 -04002048 { # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002049 "hasThumbnail": 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.
John Asmuth614db982014-04-24 15:46:26 -04002050 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002051 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -07002052 "version": "A String", # 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.
2053 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002054 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -04002055 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002056 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002057 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002058 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002059 "hidden": True or False, # Deprecated.
2060 "starred": True or False, # Whether this file is starred by the user.
2061 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04002062 },
2063 "indexableText": { # Indexable text attributes for the file (can only be written)
2064 "text": "A String", # The text to be indexed for this file.
2065 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002066 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07002067 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002068 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04002069 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002070 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
2071 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002072 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04002073 "picture": { # The user's profile picture.
2074 "url": "A String", # A URL that points to a profile picture of this user.
2075 },
2076 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04002077 "displayName": "A String", # A plain text displayable name for this user.
2078 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07002079 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2080 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04002081 },
2082 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002083 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04002084 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002085 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07002086 "picture": { # The user's profile picture.
2087 "url": "A String", # A URL that points to a profile picture of this user.
2088 },
2089 "kind": "drive#user", # This is always drive#user.
2090 "displayName": "A String", # A plain text displayable name for this user.
2091 "permissionId": "A String", # The user's ID as visible in the permissions collection.
2092 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2093 "emailAddress": "A String", # The email address of the user.
2094 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002095 "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
2096 "targetId": "A String", # The ID of the file that this shortcut points to.
2097 "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002098 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002099 "downloadUrl": "A String", # 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 Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002100 "mimeType": "A String", # 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's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002101 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04002102 "picture": { # The user's profile picture.
2103 "url": "A String", # A URL that points to a profile picture of this user.
2104 },
2105 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04002106 "displayName": "A String", # A plain text displayable name for this user.
2107 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07002108 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2109 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04002110 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002111 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002112 "folderColorRgb": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002113 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002114 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04002115 "A String",
2116 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002117 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002118 "canMoveItemOutOfDrive": 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002119 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002120 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
2121 "canDeleteChildren": 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.
2122 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
2123 "canListChildren": 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.
2124 "canRename": True or False, # Whether the current user can rename this file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002125 "canModifyContent": True or False, # Whether the current user can modify the content of this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002126 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
2127 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
2128 "canChangeRestrictedDownload": True or False, # Deprecated
2129 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
2130 "canTrashChildren": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002131 "canAddMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002132 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
2133 "canReadRevisions": 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.
2134 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
2135 "canCopy": 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.
2136 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2137 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2138 "canComment": True or False, # Whether the current user can comment on this file.
2139 "canMoveChildrenOutOfDrive": 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.
2140 "canTrash": True or False, # Whether the current user can move this file to trash.
Dan O'Mearadd494642020-05-01 07:42:23 -07002141 "canRemoveMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002142 "canDelete": True or False, # Whether the current user can delete this file.
2143 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
2144 "canDownload": True or False, # Whether the current user can download this file.
2145 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
2146 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
2147 "canRemoveChildren": 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.
2148 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
Dan O'Mearadd494642020-05-01 07:42:23 -07002149 "canEdit": 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002150 },
John Asmuth614db982014-04-24 15:46:26 -04002151 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
2152 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
2153 "etag": "A String", # ETag of the file.
2154 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002155 # If not specified as part of an insert request, the file will be placed directly in the user'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.
John Asmuth614db982014-04-24 15:46:26 -04002156 { # A reference to a file's parent.
2157 "selfLink": "A String", # A link back to this reference.
2158 "kind": "drive#parentReference", # This is always drive#parentReference.
2159 "id": "A String", # The ID of the parent.
2160 "isRoot": True or False, # Whether or not the parent is the root folder.
2161 "parentLink": "A String", # A link to the parent.
2162 },
2163 ],
2164 "exportLinks": { # Links for exporting Google Docs to specific formats.
2165 "a_key": "A String", # A mapping from export format to URL
2166 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002167 "shareable": True or False, # Deprecated: use capabilities/canShare.
2168 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
2169 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002170 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
2171 "a_key": "A String",
2172 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002173 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04002174 "imageMediaMetadata": { # 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.
2175 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
2176 "exposureTime": 3.14, # The length of the exposure, in seconds.
2177 "cameraMake": "A String", # The make of the camera used to create the photo.
2178 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
2179 "isoSpeed": 42, # The ISO speed used to create the photo.
2180 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
2181 "exposureMode": "A String", # The exposure mode used to create the photo.
2182 "colorSpace": "A String", # The color space of the photo.
2183 "location": { # Geographic location information stored in the image.
2184 "latitude": 3.14, # The latitude stored in the image.
2185 "altitude": 3.14, # The altitude stored in the image.
2186 "longitude": 3.14, # The longitude stored in the image.
2187 },
2188 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
2189 "height": 42, # The height of the image in pixels.
2190 "lens": "A String", # The lens used to create the photo.
2191 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
2192 "width": 42, # The width of the image in pixels.
2193 "meteringMode": "A String", # The metering mode used to create the photo.
2194 "flashUsed": True or False, # Whether a flash was used to create the photo.
2195 "aperture": 3.14, # The aperture used to create the photo (f-number).
Dan O'Mearadd494642020-05-01 07:42:23 -07002196 "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
John Asmuth614db982014-04-24 15:46:26 -04002197 "sensor": "A String", # The type of sensor used to create the photo.
2198 "whiteBalance": "A String", # The white balance mode used to create the photo.
2199 "cameraModel": "A String", # The model of the camera used to create the photo.
2200 },
2201 "description": "A String", # A short description of the file.
2202 "webContentLink": "A String", # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002203 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
2204 "width": 42, # The width of the video in pixels.
2205 "durationMillis": "A String", # The duration of the video in milliseconds.
2206 "height": 42, # The height of the video in pixels.
2207 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002208 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04002209 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002210 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04002211 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002212 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
2213 "picture": { # The user's profile picture.
2214 "url": "A String", # A URL that points to a profile picture of this user.
2215 },
2216 "kind": "drive#user", # This is always drive#user.
2217 "displayName": "A String", # A plain text displayable name for this user.
2218 "permissionId": "A String", # The user's ID as visible in the permissions collection.
2219 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2220 "emailAddress": "A String", # The email address of the user.
2221 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002222 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002223 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002224 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04002225 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002226 { # A key-value pair attached to a file that is either public or private to an application.
2227 # The following limits apply to file properties:
2228 # - Maximum of 100 properties total per file
2229 # - Maximum of 30 private properties per app
2230 # - Maximum of 30 public properties
2231 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -04002232 "kind": "drive#property", # This is always drive#property.
2233 "value": "A String", # The value of this property.
2234 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002235 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04002236 "key": "A String", # The key of this property.
2237 "selfLink": "A String", # The link back to this property.
2238 },
2239 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002240 "md5Checksum": "A String", # 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002241 "iconLink": "A String", # A link to the file's icon.
2242 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
2243 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002244 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002245 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
2246 "title": "A String", # 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.
John Asmuth614db982014-04-24 15:46:26 -04002247 "modifiedByMeDate": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002248 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -07002249 "mimeType": "A String", # The MIME type of the thumbnail.
2250 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
2251 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002252 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04002253 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
2254 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07002255 "domain": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002256 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002257 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002258 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
2259 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002260 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002261 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002262 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -07002263 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002264 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
2265 # - file
2266 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002267 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2268 "A String",
2269 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002270 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2271 },
2272 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002273 "name": "A String", # The name for this permission.
2274 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
2275 {
2276 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
2277 "role": "A String", # Deprecated - use permissionDetails/role instead.
2278 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
2279 "A String",
2280 ],
2281 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
2282 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
2283 },
2284 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002285 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -04002286 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002287 "value": "A String", # 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.
2288 "id": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002289 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -04002290 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08002291 "emailAddress": "A String", # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002292 "expirationDate": "A String", # 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 -07002293 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002294 # - They can only be set on user and group permissions
2295 # - The date must be in the future
2296 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002297 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002298 "role": "A String", # 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 -04002299 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002300 # - organizer
2301 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04002302 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002303 # - reader
John Asmuth614db982014-04-24 15:46:26 -04002304 "type": "A String", # The account type. Allowed values are:
2305 # - user
2306 # - group
2307 # - domain
2308 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002309 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -04002310 "A String",
2311 ],
2312 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002313 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04002314 },
Takashi Matsuo06694102015-09-11 13:55:40 -07002315 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002316 "A String",
2317 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002318 "permissionIds": [ # List of permission IDs for users with access to this file.
2319 "A String",
2320 ],
2321 "originalFilename": "A String", # 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.
2322 "fileExtension": "A String", # 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 Google Docs or shortcut files.
Dan O'Mearadd494642020-05-01 07:42:23 -07002323 "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002324 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
2325 { # A permission for a file.
2326 "withLink": True or False, # Whether the link is required for this permission.
2327 "domain": "A String", # 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.
2328 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
2329 {
2330 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
2331 # - organizer
2332 # - fileOrganizer
2333 # - writer
2334 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -07002335 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002336 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
2337 # - file
2338 # - member
2339 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2340 "A String",
2341 ],
2342 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2343 },
2344 ],
2345 "name": "A String", # The name for this permission.
2346 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
2347 {
2348 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
2349 "role": "A String", # Deprecated - use permissionDetails/role instead.
2350 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
2351 "A String",
2352 ],
2353 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
2354 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
2355 },
2356 ],
2357 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
2358 "kind": "drive#permission", # This is always drive#permission.
2359 "value": "A String", # 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.
2360 "id": "A String", # 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 "authKey": "A String", # Deprecated.
2362 "etag": "A String", # The ETag of the permission.
2363 "emailAddress": "A String", # 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.
2364 "expirationDate": "A String", # 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 -07002365 # - They cannot be set on shared drive items
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002366 # - They can only be set on user and group permissions
2367 # - The date must be in the future
2368 # - The date cannot be more than a year in the future
2369 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
2370 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
2371 # - owner
2372 # - organizer
2373 # - fileOrganizer
2374 # - writer
2375 # - reader
2376 "type": "A String", # The account type. Allowed values are:
2377 # - user
2378 # - group
2379 # - domain
2380 # - anyone
2381 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
2382 "A String",
2383 ],
2384 "selfLink": "A String", # A link back to this permission.
2385 "photoLink": "A String", # A link to the profile photo, if available.
2386 },
2387 ],
2388 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002389 "selfLink": "A String", # A link back to this file.
2390 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
2391 },
2392 ],
2393 "nextLink": "A String", # A link to the next page of files.
2394 "etag": "A String", # The ETag of the list.
2395 "selfLink": "A String", # A link back to this list.
2396 }</pre>
2397</div>
2398
2399<div class="method">
2400 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2401 <pre>Retrieves the next page of results.
2402
2403Args:
2404 previous_request: The request for the previous page. (required)
2405 previous_response: The response from the request for the previous page. (required)
2406
2407Returns:
2408 A request object that you can call 'execute()' on to request the next
2409 page. Returns None if there are no more items in the collection.
2410 </pre>
2411</div>
2412
2413<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002414 <code class="details" id="patch">patch(fileId, body=None, supportsTeamDrives=None, newRevision=None, modifiedDateBehavior=None, ocrLanguage=None, pinned=None, ocr=None, addParents=None, removeParents=None, updateViewedDate=None, timedTextTrackName=None, enforceSingleParent=None, convert=None, useContentAsIndexableText=None, supportsAllDrives=None, setModifiedDate=None, timedTextLanguage=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04002415 <pre>Updates file metadata and/or content. This method supports patch semantics.
2416
2417Args:
2418 fileId: string, The ID of the file to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002419 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04002420 The object takes the form of:
2421
2422{ # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002423 "hasThumbnail": 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.
John Asmuth614db982014-04-24 15:46:26 -04002424 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002425 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -07002426 "version": "A String", # 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.
2427 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002428 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -04002429 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002430 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002431 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002432 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002433 "hidden": True or False, # Deprecated.
2434 "starred": True or False, # Whether this file is starred by the user.
2435 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04002436 },
2437 "indexableText": { # Indexable text attributes for the file (can only be written)
2438 "text": "A String", # The text to be indexed for this file.
2439 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002440 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07002441 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002442 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04002443 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002444 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
2445 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002446 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04002447 "picture": { # The user's profile picture.
2448 "url": "A String", # A URL that points to a profile picture of this user.
2449 },
2450 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04002451 "displayName": "A String", # A plain text displayable name for this user.
2452 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07002453 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2454 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04002455 },
2456 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002457 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04002458 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002459 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07002460 "picture": { # The user's profile picture.
2461 "url": "A String", # A URL that points to a profile picture of this user.
2462 },
2463 "kind": "drive#user", # This is always drive#user.
2464 "displayName": "A String", # A plain text displayable name for this user.
2465 "permissionId": "A String", # The user's ID as visible in the permissions collection.
2466 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2467 "emailAddress": "A String", # The email address of the user.
2468 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002469 "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
2470 "targetId": "A String", # The ID of the file that this shortcut points to.
2471 "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002472 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002473 "downloadUrl": "A String", # 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 Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002474 "mimeType": "A String", # 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's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002475 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04002476 "picture": { # The user's profile picture.
2477 "url": "A String", # A URL that points to a profile picture of this user.
2478 },
2479 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04002480 "displayName": "A String", # A plain text displayable name for this user.
2481 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07002482 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2483 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04002484 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002485 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002486 "folderColorRgb": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002487 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002488 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04002489 "A String",
2490 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002491 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002492 "canMoveItemOutOfDrive": 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002493 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002494 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
2495 "canDeleteChildren": 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.
2496 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
2497 "canListChildren": 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.
2498 "canRename": True or False, # Whether the current user can rename this file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002499 "canModifyContent": True or False, # Whether the current user can modify the content of this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002500 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
2501 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
2502 "canChangeRestrictedDownload": True or False, # Deprecated
2503 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
2504 "canTrashChildren": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002505 "canAddMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002506 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
2507 "canReadRevisions": 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.
2508 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
2509 "canCopy": 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.
2510 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2511 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2512 "canComment": True or False, # Whether the current user can comment on this file.
2513 "canMoveChildrenOutOfDrive": 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.
2514 "canTrash": True or False, # Whether the current user can move this file to trash.
Dan O'Mearadd494642020-05-01 07:42:23 -07002515 "canRemoveMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002516 "canDelete": True or False, # Whether the current user can delete this file.
2517 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
2518 "canDownload": True or False, # Whether the current user can download this file.
2519 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
2520 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
2521 "canRemoveChildren": 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.
2522 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
Dan O'Mearadd494642020-05-01 07:42:23 -07002523 "canEdit": 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002524 },
John Asmuth614db982014-04-24 15:46:26 -04002525 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
2526 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
2527 "etag": "A String", # ETag of the file.
2528 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002529 # If not specified as part of an insert request, the file will be placed directly in the user'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.
John Asmuth614db982014-04-24 15:46:26 -04002530 { # A reference to a file's parent.
2531 "selfLink": "A String", # A link back to this reference.
2532 "kind": "drive#parentReference", # This is always drive#parentReference.
2533 "id": "A String", # The ID of the parent.
2534 "isRoot": True or False, # Whether or not the parent is the root folder.
2535 "parentLink": "A String", # A link to the parent.
2536 },
2537 ],
2538 "exportLinks": { # Links for exporting Google Docs to specific formats.
2539 "a_key": "A String", # A mapping from export format to URL
2540 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002541 "shareable": True or False, # Deprecated: use capabilities/canShare.
2542 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
2543 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002544 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
2545 "a_key": "A String",
2546 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002547 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04002548 "imageMediaMetadata": { # 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.
2549 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
2550 "exposureTime": 3.14, # The length of the exposure, in seconds.
2551 "cameraMake": "A String", # The make of the camera used to create the photo.
2552 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
2553 "isoSpeed": 42, # The ISO speed used to create the photo.
2554 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
2555 "exposureMode": "A String", # The exposure mode used to create the photo.
2556 "colorSpace": "A String", # The color space of the photo.
2557 "location": { # Geographic location information stored in the image.
2558 "latitude": 3.14, # The latitude stored in the image.
2559 "altitude": 3.14, # The altitude stored in the image.
2560 "longitude": 3.14, # The longitude stored in the image.
2561 },
2562 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
2563 "height": 42, # The height of the image in pixels.
2564 "lens": "A String", # The lens used to create the photo.
2565 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
2566 "width": 42, # The width of the image in pixels.
2567 "meteringMode": "A String", # The metering mode used to create the photo.
2568 "flashUsed": True or False, # Whether a flash was used to create the photo.
2569 "aperture": 3.14, # The aperture used to create the photo (f-number).
Dan O'Mearadd494642020-05-01 07:42:23 -07002570 "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
John Asmuth614db982014-04-24 15:46:26 -04002571 "sensor": "A String", # The type of sensor used to create the photo.
2572 "whiteBalance": "A String", # The white balance mode used to create the photo.
2573 "cameraModel": "A String", # The model of the camera used to create the photo.
2574 },
2575 "description": "A String", # A short description of the file.
2576 "webContentLink": "A String", # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002577 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
2578 "width": 42, # The width of the video in pixels.
2579 "durationMillis": "A String", # The duration of the video in milliseconds.
2580 "height": 42, # The height of the video in pixels.
2581 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002582 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04002583 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002584 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04002585 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002586 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
2587 "picture": { # The user's profile picture.
2588 "url": "A String", # A URL that points to a profile picture of this user.
2589 },
2590 "kind": "drive#user", # This is always drive#user.
2591 "displayName": "A String", # A plain text displayable name for this user.
2592 "permissionId": "A String", # The user's ID as visible in the permissions collection.
2593 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2594 "emailAddress": "A String", # The email address of the user.
2595 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002596 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002597 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002598 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04002599 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002600 { # A key-value pair attached to a file that is either public or private to an application.
2601 # The following limits apply to file properties:
2602 # - Maximum of 100 properties total per file
2603 # - Maximum of 30 private properties per app
2604 # - Maximum of 30 public properties
2605 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -04002606 "kind": "drive#property", # This is always drive#property.
2607 "value": "A String", # The value of this property.
2608 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002609 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04002610 "key": "A String", # The key of this property.
2611 "selfLink": "A String", # The link back to this property.
2612 },
2613 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002614 "md5Checksum": "A String", # 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002615 "iconLink": "A String", # A link to the file's icon.
2616 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
2617 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002618 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002619 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
2620 "title": "A String", # 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.
John Asmuth614db982014-04-24 15:46:26 -04002621 "modifiedByMeDate": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002622 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -07002623 "mimeType": "A String", # The MIME type of the thumbnail.
2624 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
2625 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002626 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04002627 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
2628 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07002629 "domain": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002630 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002631 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002632 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
2633 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002634 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002635 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002636 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -07002637 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002638 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
2639 # - file
2640 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002641 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2642 "A String",
2643 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002644 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2645 },
2646 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002647 "name": "A String", # The name for this permission.
2648 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
2649 {
2650 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
2651 "role": "A String", # Deprecated - use permissionDetails/role instead.
2652 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
2653 "A String",
2654 ],
2655 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
2656 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
2657 },
2658 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002659 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -04002660 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002661 "value": "A String", # 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.
2662 "id": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002663 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -04002664 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08002665 "emailAddress": "A String", # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002666 "expirationDate": "A String", # 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 -07002667 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002668 # - They can only be set on user and group permissions
2669 # - The date must be in the future
2670 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002671 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002672 "role": "A String", # 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 -04002673 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002674 # - organizer
2675 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04002676 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002677 # - reader
John Asmuth614db982014-04-24 15:46:26 -04002678 "type": "A String", # The account type. Allowed values are:
2679 # - user
2680 # - group
2681 # - domain
2682 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002683 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -04002684 "A String",
2685 ],
2686 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002687 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04002688 },
Takashi Matsuo06694102015-09-11 13:55:40 -07002689 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002690 "A String",
2691 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002692 "permissionIds": [ # List of permission IDs for users with access to this file.
2693 "A String",
2694 ],
2695 "originalFilename": "A String", # 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.
2696 "fileExtension": "A String", # 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 Google Docs or shortcut files.
Dan O'Mearadd494642020-05-01 07:42:23 -07002697 "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002698 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
2699 { # A permission for a file.
2700 "withLink": True or False, # Whether the link is required for this permission.
2701 "domain": "A String", # 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.
2702 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
2703 {
2704 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
2705 # - organizer
2706 # - fileOrganizer
2707 # - writer
2708 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -07002709 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002710 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
2711 # - file
2712 # - member
2713 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2714 "A String",
2715 ],
2716 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2717 },
2718 ],
2719 "name": "A String", # The name for this permission.
2720 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
2721 {
2722 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
2723 "role": "A String", # Deprecated - use permissionDetails/role instead.
2724 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
2725 "A String",
2726 ],
2727 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
2728 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
2729 },
2730 ],
2731 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
2732 "kind": "drive#permission", # This is always drive#permission.
2733 "value": "A String", # 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.
2734 "id": "A String", # 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.
2735 "authKey": "A String", # Deprecated.
2736 "etag": "A String", # The ETag of the permission.
2737 "emailAddress": "A String", # 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.
2738 "expirationDate": "A String", # 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 -07002739 # - They cannot be set on shared drive items
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002740 # - They can only be set on user and group permissions
2741 # - The date must be in the future
2742 # - The date cannot be more than a year in the future
2743 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
2744 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
2745 # - owner
2746 # - organizer
2747 # - fileOrganizer
2748 # - writer
2749 # - reader
2750 "type": "A String", # The account type. Allowed values are:
2751 # - user
2752 # - group
2753 # - domain
2754 # - anyone
2755 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
2756 "A String",
2757 ],
2758 "selfLink": "A String", # A link back to this permission.
2759 "photoLink": "A String", # A link to the profile photo, if available.
2760 },
2761 ],
2762 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002763 "selfLink": "A String", # A link back to this file.
2764 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
2765}
2766
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002767 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Takashi Matsuo06694102015-09-11 13:55:40 -07002768 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.
2769 modifiedDateBehavior: string, Determines the behavior in which modifiedDate is updated. This overrides setModifiedDate.
2770 Allowed values
2771 fromBody - Set modifiedDate to the value provided in the body of the request. No change if no value was provided.
2772 fromBodyIfNeeded - Set modifiedDate to the value provided in the body of the request depending on other contents of the update.
2773 fromBodyOrNow - Set modifiedDate to the value provided in the body of the request, or to the current time if no value was provided.
2774 noChange - Maintain the previous value of modifiedDate.
2775 now - Set modifiedDate to the current time.
2776 nowIfNeeded - Set modifiedDate to the current time depending on contents of the update.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002777 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
Dan O'Mearadd494642020-05-01 07:42:23 -07002778 pinned: boolean, Whether to pin the new revision. A file can have a maximum of 200 pinned revisions.
John Asmuth614db982014-04-24 15:46:26 -04002779 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Craig Citro065b5302014-08-14 00:47:23 -07002780 addParents: string, Comma-separated list of parent IDs to add.
2781 removeParents: string, Comma-separated list of parent IDs to remove.
John Asmuth614db982014-04-24 15:46:26 -04002782 updateViewedDate: boolean, Whether to update the view date after successfully updating the file.
2783 timedTextTrackName: string, The timed text track name.
Dan O'Mearadd494642020-05-01 07:42:23 -07002784 enforceSingleParent: boolean, Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter only takes effect if the item is not in a shared drive. If the item's owner makes a request to add a single parent, the item is removed from all current folders and placed in the requested folder. Other requests that increase the number of parents fail, except when the canAddMyDriveParent file capability is true and a single parent is being added.
Takashi Matsuo06694102015-09-11 13:55:40 -07002785 convert: boolean, This parameter is deprecated and has no function.
John Asmuth614db982014-04-24 15:46:26 -04002786 useContentAsIndexableText: boolean, Whether to use the content as indexable text.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002787 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
2788 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.
John Asmuth614db982014-04-24 15:46:26 -04002789 timedTextLanguage: string, The language of the timed text.
2790
2791Returns:
2792 An object of the form:
2793
2794 { # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002795 "hasThumbnail": 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.
John Asmuth614db982014-04-24 15:46:26 -04002796 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002797 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -07002798 "version": "A String", # 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.
2799 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002800 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -04002801 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002802 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002803 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002804 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002805 "hidden": True or False, # Deprecated.
2806 "starred": True or False, # Whether this file is starred by the user.
2807 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04002808 },
2809 "indexableText": { # Indexable text attributes for the file (can only be written)
2810 "text": "A String", # The text to be indexed for this file.
2811 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002812 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07002813 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002814 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04002815 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002816 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
2817 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002818 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04002819 "picture": { # The user's profile picture.
2820 "url": "A String", # A URL that points to a profile picture of this user.
2821 },
2822 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04002823 "displayName": "A String", # A plain text displayable name for this user.
2824 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07002825 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2826 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04002827 },
2828 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002829 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04002830 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002831 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07002832 "picture": { # The user's profile picture.
2833 "url": "A String", # A URL that points to a profile picture of this user.
2834 },
2835 "kind": "drive#user", # This is always drive#user.
2836 "displayName": "A String", # A plain text displayable name for this user.
2837 "permissionId": "A String", # The user's ID as visible in the permissions collection.
2838 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2839 "emailAddress": "A String", # The email address of the user.
2840 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002841 "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
2842 "targetId": "A String", # The ID of the file that this shortcut points to.
2843 "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002844 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002845 "downloadUrl": "A String", # 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 Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002846 "mimeType": "A String", # 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's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002847 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04002848 "picture": { # The user's profile picture.
2849 "url": "A String", # A URL that points to a profile picture of this user.
2850 },
2851 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04002852 "displayName": "A String", # A plain text displayable name for this user.
2853 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07002854 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2855 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04002856 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002857 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002858 "folderColorRgb": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002859 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002860 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04002861 "A String",
2862 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002863 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002864 "canMoveItemOutOfDrive": 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002865 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002866 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
2867 "canDeleteChildren": 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.
2868 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
2869 "canListChildren": 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.
2870 "canRename": True or False, # Whether the current user can rename this file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002871 "canModifyContent": True or False, # Whether the current user can modify the content of this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002872 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
2873 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
2874 "canChangeRestrictedDownload": True or False, # Deprecated
2875 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
2876 "canTrashChildren": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002877 "canAddMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002878 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
2879 "canReadRevisions": 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.
2880 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
2881 "canCopy": 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.
2882 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2883 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2884 "canComment": True or False, # Whether the current user can comment on this file.
2885 "canMoveChildrenOutOfDrive": 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.
2886 "canTrash": True or False, # Whether the current user can move this file to trash.
Dan O'Mearadd494642020-05-01 07:42:23 -07002887 "canRemoveMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002888 "canDelete": True or False, # Whether the current user can delete this file.
2889 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
2890 "canDownload": True or False, # Whether the current user can download this file.
2891 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
2892 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
2893 "canRemoveChildren": 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.
2894 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
Dan O'Mearadd494642020-05-01 07:42:23 -07002895 "canEdit": 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002896 },
John Asmuth614db982014-04-24 15:46:26 -04002897 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
2898 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
2899 "etag": "A String", # ETag of the file.
2900 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002901 # If not specified as part of an insert request, the file will be placed directly in the user'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.
John Asmuth614db982014-04-24 15:46:26 -04002902 { # A reference to a file's parent.
2903 "selfLink": "A String", # A link back to this reference.
2904 "kind": "drive#parentReference", # This is always drive#parentReference.
2905 "id": "A String", # The ID of the parent.
2906 "isRoot": True or False, # Whether or not the parent is the root folder.
2907 "parentLink": "A String", # A link to the parent.
2908 },
2909 ],
2910 "exportLinks": { # Links for exporting Google Docs to specific formats.
2911 "a_key": "A String", # A mapping from export format to URL
2912 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002913 "shareable": True or False, # Deprecated: use capabilities/canShare.
2914 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
2915 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002916 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
2917 "a_key": "A String",
2918 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002919 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04002920 "imageMediaMetadata": { # 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.
2921 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
2922 "exposureTime": 3.14, # The length of the exposure, in seconds.
2923 "cameraMake": "A String", # The make of the camera used to create the photo.
2924 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
2925 "isoSpeed": 42, # The ISO speed used to create the photo.
2926 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
2927 "exposureMode": "A String", # The exposure mode used to create the photo.
2928 "colorSpace": "A String", # The color space of the photo.
2929 "location": { # Geographic location information stored in the image.
2930 "latitude": 3.14, # The latitude stored in the image.
2931 "altitude": 3.14, # The altitude stored in the image.
2932 "longitude": 3.14, # The longitude stored in the image.
2933 },
2934 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
2935 "height": 42, # The height of the image in pixels.
2936 "lens": "A String", # The lens used to create the photo.
2937 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
2938 "width": 42, # The width of the image in pixels.
2939 "meteringMode": "A String", # The metering mode used to create the photo.
2940 "flashUsed": True or False, # Whether a flash was used to create the photo.
2941 "aperture": 3.14, # The aperture used to create the photo (f-number).
Dan O'Mearadd494642020-05-01 07:42:23 -07002942 "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
John Asmuth614db982014-04-24 15:46:26 -04002943 "sensor": "A String", # The type of sensor used to create the photo.
2944 "whiteBalance": "A String", # The white balance mode used to create the photo.
2945 "cameraModel": "A String", # The model of the camera used to create the photo.
2946 },
2947 "description": "A String", # A short description of the file.
2948 "webContentLink": "A String", # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002949 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
2950 "width": 42, # The width of the video in pixels.
2951 "durationMillis": "A String", # The duration of the video in milliseconds.
2952 "height": 42, # The height of the video in pixels.
2953 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002954 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04002955 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002956 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04002957 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002958 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
2959 "picture": { # The user's profile picture.
2960 "url": "A String", # A URL that points to a profile picture of this user.
2961 },
2962 "kind": "drive#user", # This is always drive#user.
2963 "displayName": "A String", # A plain text displayable name for this user.
2964 "permissionId": "A String", # The user's ID as visible in the permissions collection.
2965 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2966 "emailAddress": "A String", # The email address of the user.
2967 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002968 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002969 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002970 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04002971 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002972 { # A key-value pair attached to a file that is either public or private to an application.
2973 # The following limits apply to file properties:
2974 # - Maximum of 100 properties total per file
2975 # - Maximum of 30 private properties per app
2976 # - Maximum of 30 public properties
2977 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -04002978 "kind": "drive#property", # This is always drive#property.
2979 "value": "A String", # The value of this property.
2980 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002981 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04002982 "key": "A String", # The key of this property.
2983 "selfLink": "A String", # The link back to this property.
2984 },
2985 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002986 "md5Checksum": "A String", # 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002987 "iconLink": "A String", # A link to the file's icon.
2988 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
2989 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002990 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002991 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
2992 "title": "A String", # 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.
John Asmuth614db982014-04-24 15:46:26 -04002993 "modifiedByMeDate": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002994 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -07002995 "mimeType": "A String", # The MIME type of the thumbnail.
2996 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
2997 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002998 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04002999 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
3000 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07003001 "domain": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003002 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003003 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003004 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
3005 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003006 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003007 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003008 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -07003009 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003010 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
3011 # - file
3012 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003013 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3014 "A String",
3015 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003016 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3017 },
3018 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003019 "name": "A String", # The name for this permission.
3020 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
3021 {
3022 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
3023 "role": "A String", # Deprecated - use permissionDetails/role instead.
3024 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
3025 "A String",
3026 ],
3027 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
3028 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
3029 },
3030 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003031 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -04003032 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003033 "value": "A String", # 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.
3034 "id": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003035 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -04003036 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08003037 "emailAddress": "A String", # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003038 "expirationDate": "A String", # 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 -07003039 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003040 # - They can only be set on user and group permissions
3041 # - The date must be in the future
3042 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003043 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003044 "role": "A String", # 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 -04003045 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003046 # - organizer
3047 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04003048 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003049 # - reader
John Asmuth614db982014-04-24 15:46:26 -04003050 "type": "A String", # The account type. Allowed values are:
3051 # - user
3052 # - group
3053 # - domain
3054 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003055 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -04003056 "A String",
3057 ],
3058 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003059 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04003060 },
Takashi Matsuo06694102015-09-11 13:55:40 -07003061 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003062 "A String",
3063 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003064 "permissionIds": [ # List of permission IDs for users with access to this file.
3065 "A String",
3066 ],
3067 "originalFilename": "A String", # 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.
3068 "fileExtension": "A String", # 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 Google Docs or shortcut files.
Dan O'Mearadd494642020-05-01 07:42:23 -07003069 "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003070 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
3071 { # A permission for a file.
3072 "withLink": True or False, # Whether the link is required for this permission.
3073 "domain": "A String", # 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.
3074 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
3075 {
3076 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
3077 # - organizer
3078 # - fileOrganizer
3079 # - writer
3080 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -07003081 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003082 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
3083 # - file
3084 # - member
3085 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3086 "A String",
3087 ],
3088 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3089 },
3090 ],
3091 "name": "A String", # The name for this permission.
3092 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
3093 {
3094 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
3095 "role": "A String", # Deprecated - use permissionDetails/role instead.
3096 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
3097 "A String",
3098 ],
3099 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
3100 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
3101 },
3102 ],
3103 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
3104 "kind": "drive#permission", # This is always drive#permission.
3105 "value": "A String", # 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.
3106 "id": "A String", # 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.
3107 "authKey": "A String", # Deprecated.
3108 "etag": "A String", # The ETag of the permission.
3109 "emailAddress": "A String", # 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.
3110 "expirationDate": "A String", # 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 -07003111 # - They cannot be set on shared drive items
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003112 # - They can only be set on user and group permissions
3113 # - The date must be in the future
3114 # - The date cannot be more than a year in the future
3115 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
3116 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
3117 # - owner
3118 # - organizer
3119 # - fileOrganizer
3120 # - writer
3121 # - reader
3122 "type": "A String", # The account type. Allowed values are:
3123 # - user
3124 # - group
3125 # - domain
3126 # - anyone
3127 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
3128 "A String",
3129 ],
3130 "selfLink": "A String", # A link back to this permission.
3131 "photoLink": "A String", # A link to the profile photo, if available.
3132 },
3133 ],
3134 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003135 "selfLink": "A String", # A link back to this file.
3136 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
3137 }</pre>
3138</div>
3139
3140<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003141 <code class="details" id="touch">touch(fileId, supportsTeamDrives=None, supportsAllDrives=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04003142 <pre>Set the file's updated time to the current server time.
3143
3144Args:
3145 fileId: string, The ID of the file to update. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003146 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
3147 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003148
3149Returns:
3150 An object of the form:
3151
3152 { # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003153 "hasThumbnail": 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.
John Asmuth614db982014-04-24 15:46:26 -04003154 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003155 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -07003156 "version": "A String", # 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.
3157 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003158 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -04003159 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003160 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003161 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003162 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003163 "hidden": True or False, # Deprecated.
3164 "starred": True or False, # Whether this file is starred by the user.
3165 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04003166 },
3167 "indexableText": { # Indexable text attributes for the file (can only be written)
3168 "text": "A String", # The text to be indexed for this file.
3169 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003170 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07003171 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003172 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04003173 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003174 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
3175 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003176 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04003177 "picture": { # The user's profile picture.
3178 "url": "A String", # A URL that points to a profile picture of this user.
3179 },
3180 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04003181 "displayName": "A String", # A plain text displayable name for this user.
3182 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07003183 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3184 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04003185 },
3186 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003187 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003188 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003189 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07003190 "picture": { # The user's profile picture.
3191 "url": "A String", # A URL that points to a profile picture of this user.
3192 },
3193 "kind": "drive#user", # This is always drive#user.
3194 "displayName": "A String", # A plain text displayable name for this user.
3195 "permissionId": "A String", # The user's ID as visible in the permissions collection.
3196 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3197 "emailAddress": "A String", # The email address of the user.
3198 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003199 "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
3200 "targetId": "A String", # The ID of the file that this shortcut points to.
3201 "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003202 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003203 "downloadUrl": "A String", # 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 Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003204 "mimeType": "A String", # 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's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003205 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04003206 "picture": { # The user's profile picture.
3207 "url": "A String", # A URL that points to a profile picture of this user.
3208 },
3209 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04003210 "displayName": "A String", # A plain text displayable name for this user.
3211 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07003212 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3213 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04003214 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003215 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003216 "folderColorRgb": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003217 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003218 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003219 "A String",
3220 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003221 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003222 "canMoveItemOutOfDrive": 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003223 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003224 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
3225 "canDeleteChildren": 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.
3226 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
3227 "canListChildren": 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.
3228 "canRename": True or False, # Whether the current user can rename this file.
Dan O'Mearadd494642020-05-01 07:42:23 -07003229 "canModifyContent": True or False, # Whether the current user can modify the content of this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003230 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
3231 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
3232 "canChangeRestrictedDownload": True or False, # Deprecated
3233 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
3234 "canTrashChildren": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07003235 "canAddMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003236 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
3237 "canReadRevisions": 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.
3238 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
3239 "canCopy": 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.
3240 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3241 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3242 "canComment": True or False, # Whether the current user can comment on this file.
3243 "canMoveChildrenOutOfDrive": 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.
3244 "canTrash": True or False, # Whether the current user can move this file to trash.
Dan O'Mearadd494642020-05-01 07:42:23 -07003245 "canRemoveMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003246 "canDelete": True or False, # Whether the current user can delete this file.
3247 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
3248 "canDownload": True or False, # Whether the current user can download this file.
3249 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
3250 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
3251 "canRemoveChildren": 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.
3252 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
Dan O'Mearadd494642020-05-01 07:42:23 -07003253 "canEdit": 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003254 },
John Asmuth614db982014-04-24 15:46:26 -04003255 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
3256 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
3257 "etag": "A String", # ETag of the file.
3258 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003259 # If not specified as part of an insert request, the file will be placed directly in the user'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.
John Asmuth614db982014-04-24 15:46:26 -04003260 { # A reference to a file's parent.
3261 "selfLink": "A String", # A link back to this reference.
3262 "kind": "drive#parentReference", # This is always drive#parentReference.
3263 "id": "A String", # The ID of the parent.
3264 "isRoot": True or False, # Whether or not the parent is the root folder.
3265 "parentLink": "A String", # A link to the parent.
3266 },
3267 ],
3268 "exportLinks": { # Links for exporting Google Docs to specific formats.
3269 "a_key": "A String", # A mapping from export format to URL
3270 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003271 "shareable": True or False, # Deprecated: use capabilities/canShare.
3272 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
3273 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003274 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
3275 "a_key": "A String",
3276 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003277 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04003278 "imageMediaMetadata": { # 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.
3279 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
3280 "exposureTime": 3.14, # The length of the exposure, in seconds.
3281 "cameraMake": "A String", # The make of the camera used to create the photo.
3282 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
3283 "isoSpeed": 42, # The ISO speed used to create the photo.
3284 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
3285 "exposureMode": "A String", # The exposure mode used to create the photo.
3286 "colorSpace": "A String", # The color space of the photo.
3287 "location": { # Geographic location information stored in the image.
3288 "latitude": 3.14, # The latitude stored in the image.
3289 "altitude": 3.14, # The altitude stored in the image.
3290 "longitude": 3.14, # The longitude stored in the image.
3291 },
3292 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
3293 "height": 42, # The height of the image in pixels.
3294 "lens": "A String", # The lens used to create the photo.
3295 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
3296 "width": 42, # The width of the image in pixels.
3297 "meteringMode": "A String", # The metering mode used to create the photo.
3298 "flashUsed": True or False, # Whether a flash was used to create the photo.
3299 "aperture": 3.14, # The aperture used to create the photo (f-number).
Dan O'Mearadd494642020-05-01 07:42:23 -07003300 "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
John Asmuth614db982014-04-24 15:46:26 -04003301 "sensor": "A String", # The type of sensor used to create the photo.
3302 "whiteBalance": "A String", # The white balance mode used to create the photo.
3303 "cameraModel": "A String", # The model of the camera used to create the photo.
3304 },
3305 "description": "A String", # A short description of the file.
3306 "webContentLink": "A String", # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003307 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
3308 "width": 42, # The width of the video in pixels.
3309 "durationMillis": "A String", # The duration of the video in milliseconds.
3310 "height": 42, # The height of the video in pixels.
3311 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003312 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04003313 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003314 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04003315 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Dan O'Mearadd494642020-05-01 07:42:23 -07003316 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
3317 "picture": { # The user's profile picture.
3318 "url": "A String", # A URL that points to a profile picture of this user.
3319 },
3320 "kind": "drive#user", # This is always drive#user.
3321 "displayName": "A String", # A plain text displayable name for this user.
3322 "permissionId": "A String", # The user's ID as visible in the permissions collection.
3323 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3324 "emailAddress": "A String", # The email address of the user.
3325 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003326 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07003327 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003328 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04003329 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003330 { # A key-value pair attached to a file that is either public or private to an application.
3331 # The following limits apply to file properties:
3332 # - Maximum of 100 properties total per file
3333 # - Maximum of 30 private properties per app
3334 # - Maximum of 30 public properties
3335 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -04003336 "kind": "drive#property", # This is always drive#property.
3337 "value": "A String", # The value of this property.
3338 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003339 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04003340 "key": "A String", # The key of this property.
3341 "selfLink": "A String", # The link back to this property.
3342 },
3343 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003344 "md5Checksum": "A String", # 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003345 "iconLink": "A String", # A link to the file's icon.
3346 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
3347 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07003348 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003349 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
3350 "title": "A String", # 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.
John Asmuth614db982014-04-24 15:46:26 -04003351 "modifiedByMeDate": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003352 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -07003353 "mimeType": "A String", # The MIME type of the thumbnail.
3354 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
3355 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003356 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003357 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
3358 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07003359 "domain": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003360 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003361 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003362 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
3363 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003364 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003365 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003366 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -07003367 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003368 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
3369 # - file
3370 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003371 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3372 "A String",
3373 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003374 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3375 },
3376 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003377 "name": "A String", # The name for this permission.
3378 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
3379 {
3380 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
3381 "role": "A String", # Deprecated - use permissionDetails/role instead.
3382 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
3383 "A String",
3384 ],
3385 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
3386 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
3387 },
3388 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003389 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -04003390 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003391 "value": "A String", # 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.
3392 "id": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003393 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -04003394 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08003395 "emailAddress": "A String", # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003396 "expirationDate": "A String", # 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 -07003397 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003398 # - They can only be set on user and group permissions
3399 # - The date must be in the future
3400 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003401 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003402 "role": "A String", # 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 -04003403 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003404 # - organizer
3405 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04003406 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003407 # - reader
John Asmuth614db982014-04-24 15:46:26 -04003408 "type": "A String", # The account type. Allowed values are:
3409 # - user
3410 # - group
3411 # - domain
3412 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003413 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -04003414 "A String",
3415 ],
3416 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003417 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04003418 },
Takashi Matsuo06694102015-09-11 13:55:40 -07003419 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003420 "A String",
3421 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003422 "permissionIds": [ # List of permission IDs for users with access to this file.
3423 "A String",
3424 ],
3425 "originalFilename": "A String", # 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.
3426 "fileExtension": "A String", # 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 Google Docs or shortcut files.
Dan O'Mearadd494642020-05-01 07:42:23 -07003427 "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003428 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
3429 { # A permission for a file.
3430 "withLink": True or False, # Whether the link is required for this permission.
3431 "domain": "A String", # 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.
3432 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
3433 {
3434 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
3435 # - organizer
3436 # - fileOrganizer
3437 # - writer
3438 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -07003439 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003440 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
3441 # - file
3442 # - member
3443 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3444 "A String",
3445 ],
3446 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3447 },
3448 ],
3449 "name": "A String", # The name for this permission.
3450 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
3451 {
3452 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
3453 "role": "A String", # Deprecated - use permissionDetails/role instead.
3454 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
3455 "A String",
3456 ],
3457 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
3458 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
3459 },
3460 ],
3461 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
3462 "kind": "drive#permission", # This is always drive#permission.
3463 "value": "A String", # 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.
3464 "id": "A String", # 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.
3465 "authKey": "A String", # Deprecated.
3466 "etag": "A String", # The ETag of the permission.
3467 "emailAddress": "A String", # 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.
3468 "expirationDate": "A String", # 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 -07003469 # - They cannot be set on shared drive items
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003470 # - They can only be set on user and group permissions
3471 # - The date must be in the future
3472 # - The date cannot be more than a year in the future
3473 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
3474 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
3475 # - owner
3476 # - organizer
3477 # - fileOrganizer
3478 # - writer
3479 # - reader
3480 "type": "A String", # The account type. Allowed values are:
3481 # - user
3482 # - group
3483 # - domain
3484 # - anyone
3485 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
3486 "A String",
3487 ],
3488 "selfLink": "A String", # A link back to this permission.
3489 "photoLink": "A String", # A link to the profile photo, if available.
3490 },
3491 ],
3492 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003493 "selfLink": "A String", # A link back to this file.
3494 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
3495 }</pre>
3496</div>
3497
3498<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003499 <code class="details" id="trash">trash(fileId, supportsTeamDrives=None, supportsAllDrives=None)</code>
3500 <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.
John Asmuth614db982014-04-24 15:46:26 -04003501
3502Args:
3503 fileId: string, The ID of the file to trash. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003504 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
3505 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003506
3507Returns:
3508 An object of the form:
3509
3510 { # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003511 "hasThumbnail": 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.
John Asmuth614db982014-04-24 15:46:26 -04003512 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003513 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -07003514 "version": "A String", # 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.
3515 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003516 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -04003517 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003518 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003519 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003520 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003521 "hidden": True or False, # Deprecated.
3522 "starred": True or False, # Whether this file is starred by the user.
3523 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04003524 },
3525 "indexableText": { # Indexable text attributes for the file (can only be written)
3526 "text": "A String", # The text to be indexed for this file.
3527 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003528 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07003529 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003530 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04003531 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003532 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
3533 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003534 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04003535 "picture": { # The user's profile picture.
3536 "url": "A String", # A URL that points to a profile picture of this user.
3537 },
3538 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04003539 "displayName": "A String", # A plain text displayable name for this user.
3540 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07003541 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3542 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04003543 },
3544 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003545 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003546 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003547 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07003548 "picture": { # The user's profile picture.
3549 "url": "A String", # A URL that points to a profile picture of this user.
3550 },
3551 "kind": "drive#user", # This is always drive#user.
3552 "displayName": "A String", # A plain text displayable name for this user.
3553 "permissionId": "A String", # The user's ID as visible in the permissions collection.
3554 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3555 "emailAddress": "A String", # The email address of the user.
3556 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003557 "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
3558 "targetId": "A String", # The ID of the file that this shortcut points to.
3559 "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003560 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003561 "downloadUrl": "A String", # 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 Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003562 "mimeType": "A String", # 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's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003563 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04003564 "picture": { # The user's profile picture.
3565 "url": "A String", # A URL that points to a profile picture of this user.
3566 },
3567 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04003568 "displayName": "A String", # A plain text displayable name for this user.
3569 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07003570 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3571 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04003572 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003573 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003574 "folderColorRgb": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003575 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003576 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003577 "A String",
3578 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003579 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003580 "canMoveItemOutOfDrive": 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003581 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003582 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
3583 "canDeleteChildren": 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.
3584 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
3585 "canListChildren": 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.
3586 "canRename": True or False, # Whether the current user can rename this file.
Dan O'Mearadd494642020-05-01 07:42:23 -07003587 "canModifyContent": True or False, # Whether the current user can modify the content of this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003588 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
3589 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
3590 "canChangeRestrictedDownload": True or False, # Deprecated
3591 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
3592 "canTrashChildren": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07003593 "canAddMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003594 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
3595 "canReadRevisions": 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.
3596 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
3597 "canCopy": 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.
3598 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3599 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3600 "canComment": True or False, # Whether the current user can comment on this file.
3601 "canMoveChildrenOutOfDrive": 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.
3602 "canTrash": True or False, # Whether the current user can move this file to trash.
Dan O'Mearadd494642020-05-01 07:42:23 -07003603 "canRemoveMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003604 "canDelete": True or False, # Whether the current user can delete this file.
3605 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
3606 "canDownload": True or False, # Whether the current user can download this file.
3607 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
3608 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
3609 "canRemoveChildren": 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.
3610 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
Dan O'Mearadd494642020-05-01 07:42:23 -07003611 "canEdit": 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003612 },
John Asmuth614db982014-04-24 15:46:26 -04003613 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
3614 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
3615 "etag": "A String", # ETag of the file.
3616 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003617 # If not specified as part of an insert request, the file will be placed directly in the user'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.
John Asmuth614db982014-04-24 15:46:26 -04003618 { # A reference to a file's parent.
3619 "selfLink": "A String", # A link back to this reference.
3620 "kind": "drive#parentReference", # This is always drive#parentReference.
3621 "id": "A String", # The ID of the parent.
3622 "isRoot": True or False, # Whether or not the parent is the root folder.
3623 "parentLink": "A String", # A link to the parent.
3624 },
3625 ],
3626 "exportLinks": { # Links for exporting Google Docs to specific formats.
3627 "a_key": "A String", # A mapping from export format to URL
3628 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003629 "shareable": True or False, # Deprecated: use capabilities/canShare.
3630 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
3631 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003632 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
3633 "a_key": "A String",
3634 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003635 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04003636 "imageMediaMetadata": { # 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.
3637 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
3638 "exposureTime": 3.14, # The length of the exposure, in seconds.
3639 "cameraMake": "A String", # The make of the camera used to create the photo.
3640 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
3641 "isoSpeed": 42, # The ISO speed used to create the photo.
3642 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
3643 "exposureMode": "A String", # The exposure mode used to create the photo.
3644 "colorSpace": "A String", # The color space of the photo.
3645 "location": { # Geographic location information stored in the image.
3646 "latitude": 3.14, # The latitude stored in the image.
3647 "altitude": 3.14, # The altitude stored in the image.
3648 "longitude": 3.14, # The longitude stored in the image.
3649 },
3650 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
3651 "height": 42, # The height of the image in pixels.
3652 "lens": "A String", # The lens used to create the photo.
3653 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
3654 "width": 42, # The width of the image in pixels.
3655 "meteringMode": "A String", # The metering mode used to create the photo.
3656 "flashUsed": True or False, # Whether a flash was used to create the photo.
3657 "aperture": 3.14, # The aperture used to create the photo (f-number).
Dan O'Mearadd494642020-05-01 07:42:23 -07003658 "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
John Asmuth614db982014-04-24 15:46:26 -04003659 "sensor": "A String", # The type of sensor used to create the photo.
3660 "whiteBalance": "A String", # The white balance mode used to create the photo.
3661 "cameraModel": "A String", # The model of the camera used to create the photo.
3662 },
3663 "description": "A String", # A short description of the file.
3664 "webContentLink": "A String", # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003665 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
3666 "width": 42, # The width of the video in pixels.
3667 "durationMillis": "A String", # The duration of the video in milliseconds.
3668 "height": 42, # The height of the video in pixels.
3669 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003670 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04003671 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003672 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04003673 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Dan O'Mearadd494642020-05-01 07:42:23 -07003674 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
3675 "picture": { # The user's profile picture.
3676 "url": "A String", # A URL that points to a profile picture of this user.
3677 },
3678 "kind": "drive#user", # This is always drive#user.
3679 "displayName": "A String", # A plain text displayable name for this user.
3680 "permissionId": "A String", # The user's ID as visible in the permissions collection.
3681 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3682 "emailAddress": "A String", # The email address of the user.
3683 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003684 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07003685 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003686 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04003687 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003688 { # A key-value pair attached to a file that is either public or private to an application.
3689 # The following limits apply to file properties:
3690 # - Maximum of 100 properties total per file
3691 # - Maximum of 30 private properties per app
3692 # - Maximum of 30 public properties
3693 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -04003694 "kind": "drive#property", # This is always drive#property.
3695 "value": "A String", # The value of this property.
3696 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003697 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04003698 "key": "A String", # The key of this property.
3699 "selfLink": "A String", # The link back to this property.
3700 },
3701 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003702 "md5Checksum": "A String", # 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003703 "iconLink": "A String", # A link to the file's icon.
3704 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
3705 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07003706 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003707 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
3708 "title": "A String", # 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.
John Asmuth614db982014-04-24 15:46:26 -04003709 "modifiedByMeDate": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003710 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -07003711 "mimeType": "A String", # The MIME type of the thumbnail.
3712 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
3713 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003714 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003715 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
3716 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07003717 "domain": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003718 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003719 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003720 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
3721 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003722 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003723 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003724 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -07003725 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003726 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
3727 # - file
3728 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003729 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3730 "A String",
3731 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003732 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3733 },
3734 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003735 "name": "A String", # The name for this permission.
3736 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
3737 {
3738 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
3739 "role": "A String", # Deprecated - use permissionDetails/role instead.
3740 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
3741 "A String",
3742 ],
3743 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
3744 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
3745 },
3746 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003747 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -04003748 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003749 "value": "A String", # 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.
3750 "id": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003751 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -04003752 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08003753 "emailAddress": "A String", # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003754 "expirationDate": "A String", # 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 -07003755 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003756 # - They can only be set on user and group permissions
3757 # - The date must be in the future
3758 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003759 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003760 "role": "A String", # 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 -04003761 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003762 # - organizer
3763 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04003764 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003765 # - reader
John Asmuth614db982014-04-24 15:46:26 -04003766 "type": "A String", # The account type. Allowed values are:
3767 # - user
3768 # - group
3769 # - domain
3770 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003771 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -04003772 "A String",
3773 ],
3774 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003775 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04003776 },
Takashi Matsuo06694102015-09-11 13:55:40 -07003777 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003778 "A String",
3779 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003780 "permissionIds": [ # List of permission IDs for users with access to this file.
3781 "A String",
3782 ],
3783 "originalFilename": "A String", # 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.
3784 "fileExtension": "A String", # 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 Google Docs or shortcut files.
Dan O'Mearadd494642020-05-01 07:42:23 -07003785 "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003786 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
3787 { # A permission for a file.
3788 "withLink": True or False, # Whether the link is required for this permission.
3789 "domain": "A String", # 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.
3790 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
3791 {
3792 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
3793 # - organizer
3794 # - fileOrganizer
3795 # - writer
3796 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -07003797 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003798 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
3799 # - file
3800 # - member
3801 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3802 "A String",
3803 ],
3804 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3805 },
3806 ],
3807 "name": "A String", # The name for this permission.
3808 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
3809 {
3810 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
3811 "role": "A String", # Deprecated - use permissionDetails/role instead.
3812 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
3813 "A String",
3814 ],
3815 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
3816 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
3817 },
3818 ],
3819 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
3820 "kind": "drive#permission", # This is always drive#permission.
3821 "value": "A String", # 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.
3822 "id": "A String", # 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.
3823 "authKey": "A String", # Deprecated.
3824 "etag": "A String", # The ETag of the permission.
3825 "emailAddress": "A String", # 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.
3826 "expirationDate": "A String", # 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 -07003827 # - They cannot be set on shared drive items
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003828 # - They can only be set on user and group permissions
3829 # - The date must be in the future
3830 # - The date cannot be more than a year in the future
3831 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
3832 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
3833 # - owner
3834 # - organizer
3835 # - fileOrganizer
3836 # - writer
3837 # - reader
3838 "type": "A String", # The account type. Allowed values are:
3839 # - user
3840 # - group
3841 # - domain
3842 # - anyone
3843 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
3844 "A String",
3845 ],
3846 "selfLink": "A String", # A link back to this permission.
3847 "photoLink": "A String", # A link to the profile photo, if available.
3848 },
3849 ],
3850 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003851 "selfLink": "A String", # A link back to this file.
3852 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
3853 }</pre>
3854</div>
3855
3856<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003857 <code class="details" id="untrash">untrash(fileId, supportsTeamDrives=None, supportsAllDrives=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04003858 <pre>Restores a file from the trash.
3859
3860Args:
3861 fileId: string, The ID of the file to untrash. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003862 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
3863 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003864
3865Returns:
3866 An object of the form:
3867
3868 { # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003869 "hasThumbnail": 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.
John Asmuth614db982014-04-24 15:46:26 -04003870 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003871 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -07003872 "version": "A String", # 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.
3873 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003874 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -04003875 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003876 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003877 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003878 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003879 "hidden": True or False, # Deprecated.
3880 "starred": True or False, # Whether this file is starred by the user.
3881 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04003882 },
3883 "indexableText": { # Indexable text attributes for the file (can only be written)
3884 "text": "A String", # The text to be indexed for this file.
3885 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003886 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07003887 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003888 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04003889 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003890 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
3891 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003892 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04003893 "picture": { # The user's profile picture.
3894 "url": "A String", # A URL that points to a profile picture of this user.
3895 },
3896 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04003897 "displayName": "A String", # A plain text displayable name for this user.
3898 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07003899 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3900 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04003901 },
3902 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003903 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003904 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003905 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07003906 "picture": { # The user's profile picture.
3907 "url": "A String", # A URL that points to a profile picture of this user.
3908 },
3909 "kind": "drive#user", # This is always drive#user.
3910 "displayName": "A String", # A plain text displayable name for this user.
3911 "permissionId": "A String", # The user's ID as visible in the permissions collection.
3912 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3913 "emailAddress": "A String", # The email address of the user.
3914 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003915 "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
3916 "targetId": "A String", # The ID of the file that this shortcut points to.
3917 "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003918 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003919 "downloadUrl": "A String", # 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 Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003920 "mimeType": "A String", # 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's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003921 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04003922 "picture": { # The user's profile picture.
3923 "url": "A String", # A URL that points to a profile picture of this user.
3924 },
3925 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04003926 "displayName": "A String", # A plain text displayable name for this user.
3927 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07003928 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3929 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04003930 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003931 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003932 "folderColorRgb": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003933 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003934 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003935 "A String",
3936 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003937 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003938 "canMoveItemOutOfDrive": 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003939 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003940 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
3941 "canDeleteChildren": 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.
3942 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
3943 "canListChildren": 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.
3944 "canRename": True or False, # Whether the current user can rename this file.
Dan O'Mearadd494642020-05-01 07:42:23 -07003945 "canModifyContent": True or False, # Whether the current user can modify the content of this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003946 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
3947 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
3948 "canChangeRestrictedDownload": True or False, # Deprecated
3949 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
3950 "canTrashChildren": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07003951 "canAddMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003952 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
3953 "canReadRevisions": 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.
3954 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
3955 "canCopy": 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.
3956 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3957 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3958 "canComment": True or False, # Whether the current user can comment on this file.
3959 "canMoveChildrenOutOfDrive": 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.
3960 "canTrash": True or False, # Whether the current user can move this file to trash.
Dan O'Mearadd494642020-05-01 07:42:23 -07003961 "canRemoveMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003962 "canDelete": True or False, # Whether the current user can delete this file.
3963 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
3964 "canDownload": True or False, # Whether the current user can download this file.
3965 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
3966 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
3967 "canRemoveChildren": 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.
3968 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
Dan O'Mearadd494642020-05-01 07:42:23 -07003969 "canEdit": 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003970 },
John Asmuth614db982014-04-24 15:46:26 -04003971 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
3972 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
3973 "etag": "A String", # ETag of the file.
3974 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003975 # If not specified as part of an insert request, the file will be placed directly in the user'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.
John Asmuth614db982014-04-24 15:46:26 -04003976 { # A reference to a file's parent.
3977 "selfLink": "A String", # A link back to this reference.
3978 "kind": "drive#parentReference", # This is always drive#parentReference.
3979 "id": "A String", # The ID of the parent.
3980 "isRoot": True or False, # Whether or not the parent is the root folder.
3981 "parentLink": "A String", # A link to the parent.
3982 },
3983 ],
3984 "exportLinks": { # Links for exporting Google Docs to specific formats.
3985 "a_key": "A String", # A mapping from export format to URL
3986 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003987 "shareable": True or False, # Deprecated: use capabilities/canShare.
3988 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
3989 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003990 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
3991 "a_key": "A String",
3992 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003993 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04003994 "imageMediaMetadata": { # 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.
3995 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
3996 "exposureTime": 3.14, # The length of the exposure, in seconds.
3997 "cameraMake": "A String", # The make of the camera used to create the photo.
3998 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
3999 "isoSpeed": 42, # The ISO speed used to create the photo.
4000 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
4001 "exposureMode": "A String", # The exposure mode used to create the photo.
4002 "colorSpace": "A String", # The color space of the photo.
4003 "location": { # Geographic location information stored in the image.
4004 "latitude": 3.14, # The latitude stored in the image.
4005 "altitude": 3.14, # The altitude stored in the image.
4006 "longitude": 3.14, # The longitude stored in the image.
4007 },
4008 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
4009 "height": 42, # The height of the image in pixels.
4010 "lens": "A String", # The lens used to create the photo.
4011 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
4012 "width": 42, # The width of the image in pixels.
4013 "meteringMode": "A String", # The metering mode used to create the photo.
4014 "flashUsed": True or False, # Whether a flash was used to create the photo.
4015 "aperture": 3.14, # The aperture used to create the photo (f-number).
Dan O'Mearadd494642020-05-01 07:42:23 -07004016 "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
John Asmuth614db982014-04-24 15:46:26 -04004017 "sensor": "A String", # The type of sensor used to create the photo.
4018 "whiteBalance": "A String", # The white balance mode used to create the photo.
4019 "cameraModel": "A String", # The model of the camera used to create the photo.
4020 },
4021 "description": "A String", # A short description of the file.
4022 "webContentLink": "A String", # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004023 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
4024 "width": 42, # The width of the video in pixels.
4025 "durationMillis": "A String", # The duration of the video in milliseconds.
4026 "height": 42, # The height of the video in pixels.
4027 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004028 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04004029 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004030 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04004031 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Dan O'Mearadd494642020-05-01 07:42:23 -07004032 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
4033 "picture": { # The user's profile picture.
4034 "url": "A String", # A URL that points to a profile picture of this user.
4035 },
4036 "kind": "drive#user", # This is always drive#user.
4037 "displayName": "A String", # A plain text displayable name for this user.
4038 "permissionId": "A String", # The user's ID as visible in the permissions collection.
4039 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4040 "emailAddress": "A String", # The email address of the user.
4041 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004042 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07004043 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004044 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04004045 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004046 { # A key-value pair attached to a file that is either public or private to an application.
4047 # The following limits apply to file properties:
4048 # - Maximum of 100 properties total per file
4049 # - Maximum of 30 private properties per app
4050 # - Maximum of 30 public properties
4051 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -04004052 "kind": "drive#property", # This is always drive#property.
4053 "value": "A String", # The value of this property.
4054 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004055 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04004056 "key": "A String", # The key of this property.
4057 "selfLink": "A String", # The link back to this property.
4058 },
4059 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004060 "md5Checksum": "A String", # 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04004061 "iconLink": "A String", # A link to the file's icon.
4062 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
4063 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07004064 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004065 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
4066 "title": "A String", # 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.
John Asmuth614db982014-04-24 15:46:26 -04004067 "modifiedByMeDate": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004068 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -07004069 "mimeType": "A String", # The MIME type of the thumbnail.
4070 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
4071 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004072 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04004073 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
4074 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07004075 "domain": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004076 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004077 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004078 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
4079 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004080 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004081 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004082 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -07004083 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004084 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
4085 # - file
4086 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004087 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4088 "A String",
4089 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004090 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4091 },
4092 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004093 "name": "A String", # The name for this permission.
4094 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
4095 {
4096 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
4097 "role": "A String", # Deprecated - use permissionDetails/role instead.
4098 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
4099 "A String",
4100 ],
4101 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
4102 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
4103 },
4104 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004105 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -04004106 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004107 "value": "A String", # 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.
4108 "id": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004109 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -04004110 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08004111 "emailAddress": "A String", # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004112 "expirationDate": "A String", # 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 -07004113 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004114 # - They can only be set on user and group permissions
4115 # - The date must be in the future
4116 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004117 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004118 "role": "A String", # 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 -04004119 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004120 # - organizer
4121 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04004122 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004123 # - reader
John Asmuth614db982014-04-24 15:46:26 -04004124 "type": "A String", # The account type. Allowed values are:
4125 # - user
4126 # - group
4127 # - domain
4128 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004129 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -04004130 "A String",
4131 ],
4132 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004133 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04004134 },
Takashi Matsuo06694102015-09-11 13:55:40 -07004135 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004136 "A String",
4137 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004138 "permissionIds": [ # List of permission IDs for users with access to this file.
4139 "A String",
4140 ],
4141 "originalFilename": "A String", # 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.
4142 "fileExtension": "A String", # 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 Google Docs or shortcut files.
Dan O'Mearadd494642020-05-01 07:42:23 -07004143 "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004144 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
4145 { # A permission for a file.
4146 "withLink": True or False, # Whether the link is required for this permission.
4147 "domain": "A String", # 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.
4148 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
4149 {
4150 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
4151 # - organizer
4152 # - fileOrganizer
4153 # - writer
4154 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -07004155 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004156 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
4157 # - file
4158 # - member
4159 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4160 "A String",
4161 ],
4162 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4163 },
4164 ],
4165 "name": "A String", # The name for this permission.
4166 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
4167 {
4168 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
4169 "role": "A String", # Deprecated - use permissionDetails/role instead.
4170 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
4171 "A String",
4172 ],
4173 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
4174 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
4175 },
4176 ],
4177 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
4178 "kind": "drive#permission", # This is always drive#permission.
4179 "value": "A String", # 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.
4180 "id": "A String", # 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.
4181 "authKey": "A String", # Deprecated.
4182 "etag": "A String", # The ETag of the permission.
4183 "emailAddress": "A String", # 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.
4184 "expirationDate": "A String", # 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 -07004185 # - They cannot be set on shared drive items
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004186 # - They can only be set on user and group permissions
4187 # - The date must be in the future
4188 # - The date cannot be more than a year in the future
4189 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
4190 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
4191 # - owner
4192 # - organizer
4193 # - fileOrganizer
4194 # - writer
4195 # - reader
4196 "type": "A String", # The account type. Allowed values are:
4197 # - user
4198 # - group
4199 # - domain
4200 # - anyone
4201 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
4202 "A String",
4203 ],
4204 "selfLink": "A String", # A link back to this permission.
4205 "photoLink": "A String", # A link to the profile photo, if available.
4206 },
4207 ],
4208 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04004209 "selfLink": "A String", # A link back to this file.
4210 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
4211 }</pre>
4212</div>
4213
4214<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004215 <code class="details" id="update">update(fileId, body=None, supportsTeamDrives=None, newRevision=None, modifiedDateBehavior=None, media_body=None, ocrLanguage=None, pinned=None, ocr=None, addParents=None, removeParents=None, updateViewedDate=None, timedTextTrackName=None, enforceSingleParent=None, convert=None, useContentAsIndexableText=None, supportsAllDrives=None, media_mime_type=None, setModifiedDate=None, timedTextLanguage=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04004216 <pre>Updates file metadata and/or content.
4217
4218Args:
4219 fileId: string, The ID of the file to update. (required)
4220 body: object, The request body.
4221 The object takes the form of:
4222
4223{ # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004224 "hasThumbnail": 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.
John Asmuth614db982014-04-24 15:46:26 -04004225 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004226 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -07004227 "version": "A String", # 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.
4228 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004229 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -04004230 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004231 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004232 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004233 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004234 "hidden": True or False, # Deprecated.
4235 "starred": True or False, # Whether this file is starred by the user.
4236 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04004237 },
4238 "indexableText": { # Indexable text attributes for the file (can only be written)
4239 "text": "A String", # The text to be indexed for this file.
4240 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004241 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07004242 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004243 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04004244 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004245 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
4246 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004247 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04004248 "picture": { # The user's profile picture.
4249 "url": "A String", # A URL that points to a profile picture of this user.
4250 },
4251 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04004252 "displayName": "A String", # A plain text displayable name for this user.
4253 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07004254 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4255 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04004256 },
4257 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004258 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04004259 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004260 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07004261 "picture": { # The user's profile picture.
4262 "url": "A String", # A URL that points to a profile picture of this user.
4263 },
4264 "kind": "drive#user", # This is always drive#user.
4265 "displayName": "A String", # A plain text displayable name for this user.
4266 "permissionId": "A String", # The user's ID as visible in the permissions collection.
4267 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4268 "emailAddress": "A String", # The email address of the user.
4269 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004270 "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
4271 "targetId": "A String", # The ID of the file that this shortcut points to.
4272 "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004273 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004274 "downloadUrl": "A String", # 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 Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004275 "mimeType": "A String", # 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's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004276 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04004277 "picture": { # The user's profile picture.
4278 "url": "A String", # A URL that points to a profile picture of this user.
4279 },
4280 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04004281 "displayName": "A String", # A plain text displayable name for this user.
4282 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07004283 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4284 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04004285 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004286 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004287 "folderColorRgb": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004288 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004289 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04004290 "A String",
4291 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004292 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004293 "canMoveItemOutOfDrive": 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004294 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004295 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
4296 "canDeleteChildren": 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.
4297 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
4298 "canListChildren": 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.
4299 "canRename": True or False, # Whether the current user can rename this file.
Dan O'Mearadd494642020-05-01 07:42:23 -07004300 "canModifyContent": True or False, # Whether the current user can modify the content of this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004301 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
4302 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
4303 "canChangeRestrictedDownload": True or False, # Deprecated
4304 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
4305 "canTrashChildren": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07004306 "canAddMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004307 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
4308 "canReadRevisions": 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.
4309 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
4310 "canCopy": 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.
4311 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
4312 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
4313 "canComment": True or False, # Whether the current user can comment on this file.
4314 "canMoveChildrenOutOfDrive": 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.
4315 "canTrash": True or False, # Whether the current user can move this file to trash.
Dan O'Mearadd494642020-05-01 07:42:23 -07004316 "canRemoveMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004317 "canDelete": True or False, # Whether the current user can delete this file.
4318 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
4319 "canDownload": True or False, # Whether the current user can download this file.
4320 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
4321 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
4322 "canRemoveChildren": 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.
4323 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
Dan O'Mearadd494642020-05-01 07:42:23 -07004324 "canEdit": 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004325 },
John Asmuth614db982014-04-24 15:46:26 -04004326 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
4327 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
4328 "etag": "A String", # ETag of the file.
4329 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004330 # If not specified as part of an insert request, the file will be placed directly in the user'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.
John Asmuth614db982014-04-24 15:46:26 -04004331 { # A reference to a file's parent.
4332 "selfLink": "A String", # A link back to this reference.
4333 "kind": "drive#parentReference", # This is always drive#parentReference.
4334 "id": "A String", # The ID of the parent.
4335 "isRoot": True or False, # Whether or not the parent is the root folder.
4336 "parentLink": "A String", # A link to the parent.
4337 },
4338 ],
4339 "exportLinks": { # Links for exporting Google Docs to specific formats.
4340 "a_key": "A String", # A mapping from export format to URL
4341 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004342 "shareable": True or False, # Deprecated: use capabilities/canShare.
4343 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
4344 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04004345 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
4346 "a_key": "A String",
4347 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004348 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04004349 "imageMediaMetadata": { # 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.
4350 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
4351 "exposureTime": 3.14, # The length of the exposure, in seconds.
4352 "cameraMake": "A String", # The make of the camera used to create the photo.
4353 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
4354 "isoSpeed": 42, # The ISO speed used to create the photo.
4355 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
4356 "exposureMode": "A String", # The exposure mode used to create the photo.
4357 "colorSpace": "A String", # The color space of the photo.
4358 "location": { # Geographic location information stored in the image.
4359 "latitude": 3.14, # The latitude stored in the image.
4360 "altitude": 3.14, # The altitude stored in the image.
4361 "longitude": 3.14, # The longitude stored in the image.
4362 },
4363 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
4364 "height": 42, # The height of the image in pixels.
4365 "lens": "A String", # The lens used to create the photo.
4366 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
4367 "width": 42, # The width of the image in pixels.
4368 "meteringMode": "A String", # The metering mode used to create the photo.
4369 "flashUsed": True or False, # Whether a flash was used to create the photo.
4370 "aperture": 3.14, # The aperture used to create the photo (f-number).
Dan O'Mearadd494642020-05-01 07:42:23 -07004371 "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
John Asmuth614db982014-04-24 15:46:26 -04004372 "sensor": "A String", # The type of sensor used to create the photo.
4373 "whiteBalance": "A String", # The white balance mode used to create the photo.
4374 "cameraModel": "A String", # The model of the camera used to create the photo.
4375 },
4376 "description": "A String", # A short description of the file.
4377 "webContentLink": "A String", # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004378 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
4379 "width": 42, # The width of the video in pixels.
4380 "durationMillis": "A String", # The duration of the video in milliseconds.
4381 "height": 42, # The height of the video in pixels.
4382 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004383 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04004384 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004385 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04004386 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Dan O'Mearadd494642020-05-01 07:42:23 -07004387 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
4388 "picture": { # The user's profile picture.
4389 "url": "A String", # A URL that points to a profile picture of this user.
4390 },
4391 "kind": "drive#user", # This is always drive#user.
4392 "displayName": "A String", # A plain text displayable name for this user.
4393 "permissionId": "A String", # The user's ID as visible in the permissions collection.
4394 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4395 "emailAddress": "A String", # The email address of the user.
4396 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004397 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07004398 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004399 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04004400 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004401 { # A key-value pair attached to a file that is either public or private to an application.
4402 # The following limits apply to file properties:
4403 # - Maximum of 100 properties total per file
4404 # - Maximum of 30 private properties per app
4405 # - Maximum of 30 public properties
4406 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -04004407 "kind": "drive#property", # This is always drive#property.
4408 "value": "A String", # The value of this property.
4409 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004410 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04004411 "key": "A String", # The key of this property.
4412 "selfLink": "A String", # The link back to this property.
4413 },
4414 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004415 "md5Checksum": "A String", # 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04004416 "iconLink": "A String", # A link to the file's icon.
4417 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
4418 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07004419 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004420 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
4421 "title": "A String", # 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.
John Asmuth614db982014-04-24 15:46:26 -04004422 "modifiedByMeDate": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004423 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -07004424 "mimeType": "A String", # The MIME type of the thumbnail.
4425 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
4426 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004427 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04004428 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
4429 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07004430 "domain": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004431 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004432 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004433 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
4434 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004435 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004436 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004437 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -07004438 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004439 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
4440 # - file
4441 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004442 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4443 "A String",
4444 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004445 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4446 },
4447 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004448 "name": "A String", # The name for this permission.
4449 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
4450 {
4451 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
4452 "role": "A String", # Deprecated - use permissionDetails/role instead.
4453 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
4454 "A String",
4455 ],
4456 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
4457 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
4458 },
4459 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004460 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -04004461 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004462 "value": "A String", # 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.
4463 "id": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004464 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -04004465 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08004466 "emailAddress": "A String", # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004467 "expirationDate": "A String", # 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 -07004468 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004469 # - They can only be set on user and group permissions
4470 # - The date must be in the future
4471 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004472 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004473 "role": "A String", # 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 -04004474 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004475 # - organizer
4476 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04004477 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004478 # - reader
John Asmuth614db982014-04-24 15:46:26 -04004479 "type": "A String", # The account type. Allowed values are:
4480 # - user
4481 # - group
4482 # - domain
4483 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004484 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -04004485 "A String",
4486 ],
4487 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004488 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04004489 },
Takashi Matsuo06694102015-09-11 13:55:40 -07004490 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004491 "A String",
4492 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004493 "permissionIds": [ # List of permission IDs for users with access to this file.
4494 "A String",
4495 ],
4496 "originalFilename": "A String", # 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.
4497 "fileExtension": "A String", # 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 Google Docs or shortcut files.
Dan O'Mearadd494642020-05-01 07:42:23 -07004498 "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004499 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
4500 { # A permission for a file.
4501 "withLink": True or False, # Whether the link is required for this permission.
4502 "domain": "A String", # 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.
4503 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
4504 {
4505 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
4506 # - organizer
4507 # - fileOrganizer
4508 # - writer
4509 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -07004510 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004511 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
4512 # - file
4513 # - member
4514 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4515 "A String",
4516 ],
4517 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4518 },
4519 ],
4520 "name": "A String", # The name for this permission.
4521 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
4522 {
4523 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
4524 "role": "A String", # Deprecated - use permissionDetails/role instead.
4525 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
4526 "A String",
4527 ],
4528 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
4529 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
4530 },
4531 ],
4532 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
4533 "kind": "drive#permission", # This is always drive#permission.
4534 "value": "A String", # 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.
4535 "id": "A String", # 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.
4536 "authKey": "A String", # Deprecated.
4537 "etag": "A String", # The ETag of the permission.
4538 "emailAddress": "A String", # 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.
4539 "expirationDate": "A String", # 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 -07004540 # - They cannot be set on shared drive items
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004541 # - They can only be set on user and group permissions
4542 # - The date must be in the future
4543 # - The date cannot be more than a year in the future
4544 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
4545 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
4546 # - owner
4547 # - organizer
4548 # - fileOrganizer
4549 # - writer
4550 # - reader
4551 "type": "A String", # The account type. Allowed values are:
4552 # - user
4553 # - group
4554 # - domain
4555 # - anyone
4556 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
4557 "A String",
4558 ],
4559 "selfLink": "A String", # A link back to this permission.
4560 "photoLink": "A String", # A link to the profile photo, if available.
4561 },
4562 ],
4563 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04004564 "selfLink": "A String", # A link back to this file.
4565 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
4566}
4567
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004568 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Takashi Matsuo06694102015-09-11 13:55:40 -07004569 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.
4570 modifiedDateBehavior: string, Determines the behavior in which modifiedDate is updated. This overrides setModifiedDate.
4571 Allowed values
4572 fromBody - Set modifiedDate to the value provided in the body of the request. No change if no value was provided.
4573 fromBodyIfNeeded - Set modifiedDate to the value provided in the body of the request depending on other contents of the update.
4574 fromBodyOrNow - Set modifiedDate to the value provided in the body of the request, or to the current time if no value was provided.
4575 noChange - Maintain the previous value of modifiedDate.
4576 now - Set modifiedDate to the current time.
4577 nowIfNeeded - Set modifiedDate to the current time depending on contents of the update.
John Asmuth614db982014-04-24 15:46:26 -04004578 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004579 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07004580 pinned: boolean, Whether to pin the new revision. A file can have a maximum of 200 pinned revisions.
Dan O'Mearadd494642020-05-01 07:42:23 -07004581 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Craig Citro065b5302014-08-14 00:47:23 -07004582 addParents: string, Comma-separated list of parent IDs to add.
4583 removeParents: string, Comma-separated list of parent IDs to remove.
John Asmuth614db982014-04-24 15:46:26 -04004584 updateViewedDate: boolean, Whether to update the view date after successfully updating the file.
4585 timedTextTrackName: string, The timed text track name.
Dan O'Mearadd494642020-05-01 07:42:23 -07004586 enforceSingleParent: boolean, Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter only takes effect if the item is not in a shared drive. If the item's owner makes a request to add a single parent, the item is removed from all current folders and placed in the requested folder. Other requests that increase the number of parents fail, except when the canAddMyDriveParent file capability is true and a single parent is being added.
Takashi Matsuo06694102015-09-11 13:55:40 -07004587 convert: boolean, This parameter is deprecated and has no function.
John Asmuth614db982014-04-24 15:46:26 -04004588 useContentAsIndexableText: boolean, Whether to use the content as indexable text.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004589 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004590 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004591 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.
John Asmuth614db982014-04-24 15:46:26 -04004592 timedTextLanguage: string, The language of the timed text.
4593
4594Returns:
4595 An object of the form:
4596
4597 { # The metadata for a file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004598 "hasThumbnail": 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.
John Asmuth614db982014-04-24 15:46:26 -04004599 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004600 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
Craig Citro065b5302014-08-14 00:47:23 -07004601 "version": "A String", # 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.
4602 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004603 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -04004604 "labels": { # A group of labels for the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004605 "restricted": True or False, # Deprecated - use copyRequiresWriterPermission instead.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004606 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004607 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004608 "hidden": True or False, # Deprecated.
4609 "starred": True or False, # Whether this file is starred by the user.
4610 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04004611 },
4612 "indexableText": { # Indexable text attributes for the file (can only be written)
4613 "text": "A String", # The text to be indexed for this file.
4614 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004615 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07004616 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004617 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04004618 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004619 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
4620 "owners": [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004621 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04004622 "picture": { # The user's profile picture.
4623 "url": "A String", # A URL that points to a profile picture of this user.
4624 },
4625 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04004626 "displayName": "A String", # A plain text displayable name for this user.
4627 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07004628 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4629 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04004630 },
4631 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004632 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04004633 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004634 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07004635 "picture": { # The user's profile picture.
4636 "url": "A String", # A URL that points to a profile picture of this user.
4637 },
4638 "kind": "drive#user", # This is always drive#user.
4639 "displayName": "A String", # A plain text displayable name for this user.
4640 "permissionId": "A String", # The user's ID as visible in the permissions collection.
4641 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4642 "emailAddress": "A String", # The email address of the user.
4643 },
Dan O'Mearadd494642020-05-01 07:42:23 -07004644 "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
4645 "targetId": "A String", # The ID of the file that this shortcut points to.
4646 "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004647 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004648 "downloadUrl": "A String", # 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 Google Docs or shortcut files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004649 "mimeType": "A String", # 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's MIME type.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004650 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04004651 "picture": { # The user's profile picture.
4652 "url": "A String", # A URL that points to a profile picture of this user.
4653 },
4654 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04004655 "displayName": "A String", # A plain text displayable name for this user.
4656 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07004657 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4658 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04004659 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004660 "copyable": True or False, # Deprecated: use capabilities/canCopy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004661 "folderColorRgb": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004662 "markedViewedByMeDate": "A String", # Deprecated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004663 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04004664 "A String",
4665 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004666 "capabilities": { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004667 "canMoveItemOutOfDrive": 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004668 "canUntrash": True or False, # Whether the current user can restore this file from trash.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004669 "canMoveItemWithinTeamDrive": True or False, # Deprecated - use canMoveItemWithinDrive instead.
4670 "canDeleteChildren": 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.
4671 "canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
4672 "canListChildren": 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.
4673 "canRename": True or False, # Whether the current user can rename this file.
Dan O'Mearadd494642020-05-01 07:42:23 -07004674 "canModifyContent": True or False, # Whether the current user can modify the content of this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004675 "canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
4676 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
4677 "canChangeRestrictedDownload": True or False, # Deprecated
4678 "canShare": True or False, # Whether the current user can modify the sharing settings for this file.
4679 "canTrashChildren": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07004680 "canAddMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004681 "canMoveChildrenWithinDrive": True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
4682 "canReadRevisions": 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.
4683 "canMoveItemWithinDrive": True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
4684 "canCopy": 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.
4685 "canMoveItemIntoTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
4686 "canMoveItemOutOfTeamDrive": True or False, # Deprecated - use canMoveItemOutOfDrive instead.
4687 "canComment": True or False, # Whether the current user can comment on this file.
4688 "canMoveChildrenOutOfDrive": 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.
4689 "canTrash": True or False, # Whether the current user can move this file to trash.
Dan O'Mearadd494642020-05-01 07:42:23 -07004690 "canRemoveMyDriveParent": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004691 "canDelete": True or False, # Whether the current user can delete this file.
4692 "canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
4693 "canDownload": True or False, # Whether the current user can download this file.
4694 "canChangeCopyRequiresWriterPermission": True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
4695 "canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
4696 "canRemoveChildren": 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.
4697 "canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
Dan O'Mearadd494642020-05-01 07:42:23 -07004698 "canEdit": 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004699 },
John Asmuth614db982014-04-24 15:46:26 -04004700 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
4701 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
4702 "etag": "A String", # ETag of the file.
4703 "parents": [ # Collection of parent folders which contain this file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004704 # If not specified as part of an insert request, the file will be placed directly in the user'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.
John Asmuth614db982014-04-24 15:46:26 -04004705 { # A reference to a file's parent.
4706 "selfLink": "A String", # A link back to this reference.
4707 "kind": "drive#parentReference", # This is always drive#parentReference.
4708 "id": "A String", # The ID of the parent.
4709 "isRoot": True or False, # Whether or not the parent is the root folder.
4710 "parentLink": "A String", # A link to the parent.
4711 },
4712 ],
4713 "exportLinks": { # Links for exporting Google Docs to specific formats.
4714 "a_key": "A String", # A mapping from export format to URL
4715 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004716 "shareable": True or False, # Deprecated: use capabilities/canShare.
4717 "copyRequiresWriterPermission": True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
4718 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04004719 "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
4720 "a_key": "A String",
4721 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004722 "canReadRevisions": True or False, # Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04004723 "imageMediaMetadata": { # 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.
4724 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
4725 "exposureTime": 3.14, # The length of the exposure, in seconds.
4726 "cameraMake": "A String", # The make of the camera used to create the photo.
4727 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
4728 "isoSpeed": 42, # The ISO speed used to create the photo.
4729 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
4730 "exposureMode": "A String", # The exposure mode used to create the photo.
4731 "colorSpace": "A String", # The color space of the photo.
4732 "location": { # Geographic location information stored in the image.
4733 "latitude": 3.14, # The latitude stored in the image.
4734 "altitude": 3.14, # The altitude stored in the image.
4735 "longitude": 3.14, # The longitude stored in the image.
4736 },
4737 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
4738 "height": 42, # The height of the image in pixels.
4739 "lens": "A String", # The lens used to create the photo.
4740 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
4741 "width": 42, # The width of the image in pixels.
4742 "meteringMode": "A String", # The metering mode used to create the photo.
4743 "flashUsed": True or False, # Whether a flash was used to create the photo.
4744 "aperture": 3.14, # The aperture used to create the photo (f-number).
Dan O'Mearadd494642020-05-01 07:42:23 -07004745 "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
John Asmuth614db982014-04-24 15:46:26 -04004746 "sensor": "A String", # The type of sensor used to create the photo.
4747 "whiteBalance": "A String", # The white balance mode used to create the photo.
4748 "cameraModel": "A String", # The model of the camera used to create the photo.
4749 },
4750 "description": "A String", # A short description of the file.
4751 "webContentLink": "A String", # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004752 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
4753 "width": 42, # The width of the video in pixels.
4754 "durationMillis": "A String", # The duration of the video in milliseconds.
4755 "height": 42, # The height of the video in pixels.
4756 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004757 "editable": True or False, # Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04004758 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004759 "canComment": True or False, # Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04004760 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Dan O'Mearadd494642020-05-01 07:42:23 -07004761 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
4762 "picture": { # The user's profile picture.
4763 "url": "A String", # A URL that points to a profile picture of this user.
4764 },
4765 "kind": "drive#user", # This is always drive#user.
4766 "displayName": "A String", # A plain text displayable name for this user.
4767 "permissionId": "A String", # The user's ID as visible in the permissions collection.
4768 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4769 "emailAddress": "A String", # The email address of the user.
4770 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004771 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07004772 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004773 "teamDriveId": "A String", # Deprecated - use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04004774 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004775 { # A key-value pair attached to a file that is either public or private to an application.
4776 # The following limits apply to file properties:
4777 # - Maximum of 100 properties total per file
4778 # - Maximum of 30 private properties per app
4779 # - Maximum of 30 public properties
4780 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -04004781 "kind": "drive#property", # This is always drive#property.
4782 "value": "A String", # The value of this property.
4783 "etag": "A String", # ETag of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004784 "visibility": "A String", # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04004785 "key": "A String", # The key of this property.
4786 "selfLink": "A String", # The link back to this property.
4787 },
4788 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004789 "md5Checksum": "A String", # 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 Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04004790 "iconLink": "A String", # A link to the file's icon.
4791 "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used.
4792 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07004793 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004794 "shared": True or False, # Whether the file has been shared. Not populated for items in shared drives.
4795 "title": "A String", # 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.
John Asmuth614db982014-04-24 15:46:26 -04004796 "modifiedByMeDate": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004797 "thumbnail": { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
Takashi Matsuo06694102015-09-11 13:55:40 -07004798 "mimeType": "A String", # The MIME type of the thumbnail.
4799 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
4800 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004801 "driveId": "A String", # ID of the shared drive the file resides in. Only populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04004802 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
4803 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07004804 "domain": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004805 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004806 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004807 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
4808 # - organizer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004809 # - fileOrganizer
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004810 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004811 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -07004812 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004813 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
4814 # - file
4815 # - member
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004816 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4817 "A String",
4818 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004819 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4820 },
4821 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004822 "name": "A String", # The name for this permission.
4823 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
4824 {
4825 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
4826 "role": "A String", # Deprecated - use permissionDetails/role instead.
4827 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
4828 "A String",
4829 ],
4830 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
4831 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
4832 },
4833 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004834 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
John Asmuth614db982014-04-24 15:46:26 -04004835 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004836 "value": "A String", # 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.
4837 "id": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004838 "authKey": "A String", # Deprecated.
John Asmuth614db982014-04-24 15:46:26 -04004839 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08004840 "emailAddress": "A String", # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004841 "expirationDate": "A String", # 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 -07004842 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004843 # - They can only be set on user and group permissions
4844 # - The date must be in the future
4845 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004846 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004847 "role": "A String", # 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 -04004848 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004849 # - organizer
4850 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04004851 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004852 # - reader
John Asmuth614db982014-04-24 15:46:26 -04004853 "type": "A String", # The account type. Allowed values are:
4854 # - user
4855 # - group
4856 # - domain
4857 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004858 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -04004859 "A String",
4860 ],
4861 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004862 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04004863 },
Takashi Matsuo06694102015-09-11 13:55:40 -07004864 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004865 "A String",
4866 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004867 "permissionIds": [ # List of permission IDs for users with access to this file.
4868 "A String",
4869 ],
4870 "originalFilename": "A String", # 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.
4871 "fileExtension": "A String", # 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 Google Docs or shortcut files.
Dan O'Mearadd494642020-05-01 07:42:23 -07004872 "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004873 "permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
4874 { # A permission for a file.
4875 "withLink": True or False, # Whether the link is required for this permission.
4876 "domain": "A String", # 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.
4877 "permissionDetails": [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
4878 {
4879 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
4880 # - organizer
4881 # - fileOrganizer
4882 # - writer
4883 # - reader
Dan O'Mearadd494642020-05-01 07:42:23 -07004884 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004885 "permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
4886 # - file
4887 # - member
4888 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4889 "A String",
4890 ],
4891 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4892 },
4893 ],
4894 "name": "A String", # The name for this permission.
4895 "teamDrivePermissionDetails": [ # Deprecated - use permissionDetails instead.
4896 {
4897 "inheritedFrom": "A String", # Deprecated - use permissionDetails/inheritedFrom instead.
4898 "role": "A String", # Deprecated - use permissionDetails/role instead.
4899 "additionalRoles": [ # Deprecated - use permissionDetails/additionalRoles instead.
4900 "A String",
4901 ],
4902 "teamDrivePermissionType": "A String", # Deprecated - use permissionDetails/permissionType instead.
4903 "inherited": True or False, # Deprecated - use permissionDetails/inherited instead.
4904 },
4905 ],
4906 "deleted": True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
4907 "kind": "drive#permission", # This is always drive#permission.
4908 "value": "A String", # 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.
4909 "id": "A String", # 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.
4910 "authKey": "A String", # Deprecated.
4911 "etag": "A String", # The ETag of the permission.
4912 "emailAddress": "A String", # 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.
4913 "expirationDate": "A String", # 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 -07004914 # - They cannot be set on shared drive items
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004915 # - They can only be set on user and group permissions
4916 # - The date must be in the future
4917 # - The date cannot be more than a year in the future
4918 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
4919 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
4920 # - owner
4921 # - organizer
4922 # - fileOrganizer
4923 # - writer
4924 # - reader
4925 "type": "A String", # The account type. Allowed values are:
4926 # - user
4927 # - group
4928 # - domain
4929 # - anyone
4930 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
4931 "A String",
4932 ],
4933 "selfLink": "A String", # A link back to this permission.
4934 "photoLink": "A String", # A link to the profile photo, if available.
4935 },
4936 ],
4937 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04004938 "selfLink": "A String", # A link back to this file.
4939 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
4940 }</pre>
4941</div>
4942
4943<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004944 <code class="details" id="watch">watch(fileId, body=None, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04004945 <pre>Subscribe to changes on a file
4946
4947Args:
4948 fileId: string, The ID for the file in question. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004949 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04004950 The object takes the form of:
4951
4952{ # An notification channel used to watch for resource changes.
4953 "resourceUri": "A String", # A version-specific identifier for the watched resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07004954 "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource, which is "api#channel".
John Asmuth614db982014-04-24 15:46:26 -04004955 "resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
4956 "payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional.
4957 "token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
4958 "params": { # Additional parameters controlling delivery channel behavior. Optional.
4959 "a_key": "A String", # Declares a new parameter by name.
4960 },
4961 "expiration": "A String", # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
4962 "address": "A String", # The address where notifications are delivered for this channel.
4963 "type": "A String", # The type of delivery mechanism used for this channel.
4964 "id": "A String", # A UUID or similar unique string that identifies this channel.
4965 }
4966
4967 projection: string, This parameter is deprecated and has no function.
4968 Allowed values
4969 BASIC - Deprecated
4970 FULL - Deprecated
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004971 revisionId: string, Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004972 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
4973 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Craig Citroe633be12015-03-02 13:40:36 -08004974 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004975 updateViewedDate: boolean, Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
John Asmuth614db982014-04-24 15:46:26 -04004976
4977Returns:
4978 An object of the form:
4979
4980 { # An notification channel used to watch for resource changes.
4981 "resourceUri": "A String", # A version-specific identifier for the watched resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07004982 "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource, which is "api#channel".
John Asmuth614db982014-04-24 15:46:26 -04004983 "resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
4984 "payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional.
4985 "token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
4986 "params": { # Additional parameters controlling delivery channel behavior. Optional.
4987 "a_key": "A String", # Declares a new parameter by name.
4988 },
4989 "expiration": "A String", # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
4990 "address": "A String", # The address where notifications are delivered for this channel.
4991 "type": "A String", # The type of delivery mechanism used for this channel.
4992 "id": "A String", # A UUID or similar unique string that identifies this channel.
4993 }</pre>
4994</div>
4995
Craig Citroe633be12015-03-02 13:40:36 -08004996<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004997 <code class="details" id="watch_media">watch_media(fileId, body=None, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08004998 <pre>Subscribe to changes on a file
4999
5000Args:
5001 fileId: string, The ID for the file in question. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005002 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08005003 The object takes the form of:
5004
5005{ # An notification channel used to watch for resource changes.
5006 "resourceUri": "A String", # A version-specific identifier for the watched resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07005007 "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource, which is "api#channel".
Craig Citroe633be12015-03-02 13:40:36 -08005008 "resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
5009 "payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional.
5010 "token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
5011 "params": { # Additional parameters controlling delivery channel behavior. Optional.
5012 "a_key": "A String", # Declares a new parameter by name.
5013 },
5014 "expiration": "A String", # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
5015 "address": "A String", # The address where notifications are delivered for this channel.
5016 "type": "A String", # The type of delivery mechanism used for this channel.
5017 "id": "A String", # A UUID or similar unique string that identifies this channel.
5018 }
5019
5020 projection: string, This parameter is deprecated and has no function.
5021 Allowed values
5022 BASIC - Deprecated
5023 FULL - Deprecated
Nathaniel Manista4f877e52015-06-15 16:44:50 +00005024 revisionId: string, Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005025 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
5026 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Craig Citroe633be12015-03-02 13:40:36 -08005027 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005028 updateViewedDate: boolean, Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
Craig Citroe633be12015-03-02 13:40:36 -08005029
5030Returns:
5031 The media object as a string.
5032
5033 </pre>
5034</div>
5035
John Asmuth614db982014-04-24 15:46:26 -04005036</body></html>