blob: 35b29bd3d20ad9f964c1d99c6dd9e766dfcc56d0 [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">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040078 <code><a href="#copy">copy(fileId, body, pinned=None, convert=None, supportsTeamDrives=None, ocrLanguage=None, visibility=None, ocr=None, timedTextTrackName=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">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040081 <code><a href="#delete">delete(fileId, supportsTeamDrives=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 Team 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>
88<p class="firstline">Exports a Google Doc to the requested MIME type and returns the exported content.</p>
89<p class="toc_element">
90 <code><a href="#export_media">export_media(fileId, mimeType)</a></code></p>
91<p class="firstline">Exports a Google Doc to the requested MIME type and returns the exported content.</p>
92<p class="toc_element">
Takashi Matsuo06694102015-09-11 13:55:40 -070093 <code><a href="#generateIds">generateIds(space=None, maxResults=None)</a></code></p>
94<p class="firstline">Generates a set of file IDs which can be provided in insert requests.</p>
95<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040096 <code><a href="#get">get(fileId, projection=None, revisionId=None, supportsTeamDrives=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">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040099 <code><a href="#get_media">get_media(fileId, projection=None, revisionId=None, supportsTeamDrives=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">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400102 <code><a href="#insert">insert(body=None, supportsTeamDrives=None, media_body=None, ocrLanguage=None, ocr=None, pinned=None, visibility=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=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">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400105 <code><a href="#list">list(orderBy=None, projection=None, supportsTeamDrives=None, spaces=None, pageToken=None, corpus=None, maxResults=None, teamDriveId=None, includeTeamDriveItems=None, corpora=None, q=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">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400111 <code><a href="#patch">patch(fileId, body, supportsTeamDrives=None, newRevision=None, modifiedDateBehavior=None, pinned=None, ocrLanguage=None, ocr=None, addParents=None, removeParents=None, updateViewedDate=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=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">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400114 <code><a href="#touch">touch(fileId, supportsTeamDrives=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">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400117 <code><a href="#trash">trash(fileId, supportsTeamDrives=None)</a></code></p>
118<p class="firstline">Moves a file to the trash. The currently authenticated user must own the file or be an organizer on the parent for Team Drive files.</p>
John Asmuth614db982014-04-24 15:46:26 -0400119<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400120 <code><a href="#untrash">untrash(fileId, supportsTeamDrives=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">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400123 <code><a href="#update">update(fileId, body=None, supportsTeamDrives=None, newRevision=None, modifiedDateBehavior=None, media_body=None, ocrLanguage=None, ocr=None, pinned=None, addParents=None, removeParents=None, updateViewedDate=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=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">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400126 <code><a href="#watch">watch(fileId, body, projection=None, revisionId=None, supportsTeamDrives=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">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400129 <code><a href="#watch_media">watch_media(fileId, body, projection=None, revisionId=None, supportsTeamDrives=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">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400133 <code class="details" id="copy">copy(fileId, body, pinned=None, convert=None, supportsTeamDrives=None, ocrLanguage=None, visibility=None, ocr=None, timedTextTrackName=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)
138 body: object, The request body. (required)
139 The object takes the form of:
140
141{ # The metadata for a file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800142 "hasThumbnail": True or False, # Whether this file has a thumbnail.
John Asmuth614db982014-04-24 15:46:26 -0400143 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400144 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for Team Drive files.
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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700149 "restricted": True or False, # Whether viewers and commenters are prevented from downloading, printing, and copying this file.
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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400163 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for Team Drive files.
164 "owners": [ # The owner(s) of this file. Not populated for Team Drive files.
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 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400176 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for Team Drive files.
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 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400188 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for Team Drive files.
189 "picture": { # The user's profile picture.
190 "url": "A String", # A URL that points to a profile picture of this user.
191 },
192 "kind": "drive#user", # This is always drive#user.
193 "displayName": "A String", # A plain text displayable name for this user.
194 "permissionId": "A String", # The user's ID as visible in the permissions collection.
195 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
196 "emailAddress": "A String", # The email address of the user.
197 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800198 "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 -0700199 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -0400200 "picture": { # The user's profile picture.
201 "url": "A String", # A URL that points to a profile picture of this user.
202 },
203 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400204 "displayName": "A String", # A plain text displayable name for this user.
205 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700206 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
207 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400208 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400209 "copyable": True or False, # Whether the file can be copied by the current user. Deprecated: use capabilities/canCopy.
210 "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 Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700211 "markedViewedByMeDate": "A String", # Deprecated.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400212 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -0400213 "A String",
214 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400215 "capabilities": { # Capabilities the current user has on the file. Each capability corresponds to a fine-grained action that a user may take.
216 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. For a Team Drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
217 "canTrash": True or False, # Whether the file can be trashed by the current user.
218 "canCopy": True or False, # Whether the file can be copied by the current user. For a Team Drive item, whether non-folder descendants of this item, or this item itself if it is not a folder, can be copied.
219 "canShare": True or False, # Whether the file's sharing settings can be modified by the current user.
220 "canDelete": True or False, # Whether the file can be deleted by the current user.
221 "canMoveTeamDriveItem": True or False, # Whether the current user can move this Team Drive item by changing its parent. Note that a request to change the parent for this item may still fail depending on the new parent that is being added. Only populated for Team Drive files.
222 "canRename": True or False, # Whether the file can be renamed by the current user.
223 "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.
224 "canMoveItemIntoTeamDrive": True or False, # Whether the current user can move this item into a Team Drive. If the item is in a Team Drive, this field is equivalent to canMoveTeamDriveItem.
225 "canDownload": True or False, # Whether the file can be downloaded by the current user.
226 "canComment": True or False, # Whether the current user can comment on the file.
227 "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.
228 "canReadTeamDrive": True or False, # Whether the current user has read access to the Team Drive to which this file belongs. Only populated for Team Drive files.
229 "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.
230 "canEdit": True or False, # Whether the file can be edited by the current user.
231 "canUntrash": True or False, # Whether the file can be restored from the trash by the current user.
232 },
John Asmuth614db982014-04-24 15:46:26 -0400233 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
234 "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.
235 "etag": "A String", # ETag of the file.
236 "parents": [ # Collection of parent folders which contain this file.
237 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
238 { # A reference to a file's parent.
239 "selfLink": "A String", # A link back to this reference.
240 "kind": "drive#parentReference", # This is always drive#parentReference.
241 "id": "A String", # The ID of the parent.
242 "isRoot": True or False, # Whether or not the parent is the root folder.
243 "parentLink": "A String", # A link to the parent.
244 },
245 ],
246 "exportLinks": { # Links for exporting Google Docs to specific formats.
247 "a_key": "A String", # A mapping from export format to URL
248 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400249 "shared": True or False, # Whether the file has been shared. Not populated for Team Drive files.
250 "permissions": [ # The list of permissions for users with access to this file. Not populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -0700251 { # A permission for a file.
252 "withLink": True or False, # Whether the link is required for this permission.
253 "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.
254 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400255 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
256 {
257 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
258 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
259 # - organizer
260 # - reader
261 # - writer
262 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
263 "A String",
264 ],
265 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
266 # - file
267 # - member
268 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
269 },
270 ],
Craig Citro065b5302014-08-14 00:47:23 -0700271 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800272 "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.
273 "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.
Craig Citro065b5302014-08-14 00:47:23 -0700274 "authKey": "A String", # The authkey parameter required for this permission.
275 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -0800276 "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 -0400277 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
278 # - They can only be set on user and group permissions
279 # - The date must be in the future
280 # - The date cannot be more than a year in the future
281 # - The date can only be set on drive.permissions.update requests
282 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
283 # - organizer
Craig Citro065b5302014-08-14 00:47:23 -0700284 # - owner
285 # - reader
286 # - writer
287 "type": "A String", # The account type. Allowed values are:
288 # - user
289 # - group
290 # - domain
291 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400292 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
Craig Citro065b5302014-08-14 00:47:23 -0700293 "A String",
294 ],
295 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700296 "photoLink": "A String", # A link to the profile photo, if available.
Craig Citro065b5302014-08-14 00:47:23 -0700297 },
298 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700299 "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 Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400300 "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.
301 "a_key": "A String",
302 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400303 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -0400304 "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.
305 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
306 "exposureTime": 3.14, # The length of the exposure, in seconds.
307 "cameraMake": "A String", # The make of the camera used to create the photo.
308 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
309 "isoSpeed": 42, # The ISO speed used to create the photo.
310 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
311 "exposureMode": "A String", # The exposure mode used to create the photo.
312 "colorSpace": "A String", # The color space of the photo.
313 "location": { # Geographic location information stored in the image.
314 "latitude": 3.14, # The latitude stored in the image.
315 "altitude": 3.14, # The altitude stored in the image.
316 "longitude": 3.14, # The longitude stored in the image.
317 },
318 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
319 "height": 42, # The height of the image in pixels.
320 "lens": "A String", # The lens used to create the photo.
321 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
322 "width": 42, # The width of the image in pixels.
323 "meteringMode": "A String", # The metering mode used to create the photo.
324 "flashUsed": True or False, # Whether a flash was used to create the photo.
325 "aperture": 3.14, # The aperture used to create the photo (f-number).
326 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
327 "sensor": "A String", # The type of sensor used to create the photo.
328 "whiteBalance": "A String", # The white balance mode used to create the photo.
329 "cameraModel": "A String", # The model of the camera used to create the photo.
330 },
331 "description": "A String", # A short description of the file.
332 "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 -0800333 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
334 "width": 42, # The width of the video in pixels.
335 "durationMillis": "A String", # The duration of the video in milliseconds.
336 "height": 42, # The height of the video in pixels.
337 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400338 "editable": True or False, # Whether the file can be edited by the current user. Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -0400339 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400340 "canComment": True or False, # Whether the current user can comment on the file. Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -0400341 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Takashi Matsuo06694102015-09-11 13:55:40 -0700342 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700343 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400344 "teamDriveId": "A String", # ID of the Team Drive the file resides in.
John Asmuth614db982014-04-24 15:46:26 -0400345 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000346 { # A key-value pair attached to a file that is either public or private to an application.
347 # The following limits apply to file properties:
348 # - Maximum of 100 properties total per file
349 # - Maximum of 30 private properties per app
350 # - Maximum of 30 public properties
351 # - 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 -0400352 "kind": "drive#property", # This is always drive#property.
353 "value": "A String", # The value of this property.
354 "etag": "A String", # ETag of the property.
355 "visibility": "A String", # The visibility of this property.
356 "key": "A String", # The key of this property.
357 "selfLink": "A String", # The link back to this property.
358 },
359 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700360 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400361 "iconLink": "A String", # A link to the file's icon.
362 "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.
363 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700364 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
John Asmuth614db982014-04-24 15:46:26 -0400365 "title": "A String", # The title of this file.
366 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800367 "thumbnail": { # A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail.
Takashi Matsuo06694102015-09-11 13:55:40 -0700368 "mimeType": "A String", # The MIME type of the thumbnail.
369 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
370 },
371 "downloadUrl": "A String",
John Asmuth614db982014-04-24 15:46:26 -0400372 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
373 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -0700374 "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.
John Asmuth614db982014-04-24 15:46:26 -0400375 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400376 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
377 {
378 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
379 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
380 # - organizer
381 # - reader
382 # - writer
383 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
384 "A String",
385 ],
386 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
387 # - file
388 # - member
389 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
390 },
391 ],
John Asmuth614db982014-04-24 15:46:26 -0400392 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800393 "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.
394 "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.
John Asmuth614db982014-04-24 15:46:26 -0400395 "authKey": "A String", # The authkey parameter required for this permission.
396 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -0800397 "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 -0400398 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
399 # - They can only be set on user and group permissions
400 # - The date must be in the future
401 # - The date cannot be more than a year in the future
402 # - The date can only be set on drive.permissions.update requests
403 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
404 # - organizer
John Asmuth614db982014-04-24 15:46:26 -0400405 # - owner
406 # - reader
407 # - writer
408 "type": "A String", # The account type. Allowed values are:
409 # - user
410 # - group
411 # - domain
412 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400413 "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 -0400414 "A String",
415 ],
416 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700417 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -0400418 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700419 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000420 "A String",
421 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400422 "shareable": True or False, # Whether the file's sharing settings can be modified by the current user. Deprecated: use capabilities/canShare.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700423 "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 Drive.
Takashi Matsuo06694102015-09-11 13:55:40 -0700424 "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 Drive; it is not populated for Google Docs or shortcut files.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400425 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for Team Drive files.
Takashi Matsuo06694102015-09-11 13:55:40 -0700426 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400427 "selfLink": "A String", # A link back to this file.
428 "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.
429}
430
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700431 pinned: boolean, Whether to pin the head revision of the new copy. A file can have a maximum of 200 pinned revisions.
John Asmuth614db982014-04-24 15:46:26 -0400432 convert: boolean, Whether to convert this file to the corresponding Google Docs format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400433 supportsTeamDrives: boolean, Whether the requesting application supports Team Drives.
434 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
John Asmuth614db982014-04-24 15:46:26 -0400435 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.
436 Allowed values
437 DEFAULT - The visibility of the new file is determined by the user's default visibility/sharing policies.
438 PRIVATE - The new file will be visible to only the owner.
John Asmuth614db982014-04-24 15:46:26 -0400439 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
John Asmuth614db982014-04-24 15:46:26 -0400440 timedTextTrackName: string, The timed text track name.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400441 timedTextLanguage: string, The language of the timed text.
John Asmuth614db982014-04-24 15:46:26 -0400442
443Returns:
444 An object of the form:
445
446 { # The metadata for a file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800447 "hasThumbnail": True or False, # Whether this file has a thumbnail.
John Asmuth614db982014-04-24 15:46:26 -0400448 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400449 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -0700450 "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.
451 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800452 "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 -0400453 "labels": { # A group of labels for the file.
Takashi Matsuo06694102015-09-11 13:55:40 -0700454 "restricted": True or False, # Whether viewers and commenters are prevented from downloading, printing, and copying this file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800455 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000456 "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 -0800457 "hidden": True or False, # Deprecated.
458 "starred": True or False, # Whether this file is starred by the user.
459 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -0400460 },
461 "indexableText": { # Indexable text attributes for the file (can only be written)
462 "text": "A String", # The text to be indexed for this file.
463 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400464 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700465 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700466 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -0400467 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400468 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for Team Drive files.
469 "owners": [ # The owner(s) of this file. Not populated for Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700470 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -0400471 "picture": { # The user's profile picture.
472 "url": "A String", # A URL that points to a profile picture of this user.
473 },
474 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400475 "displayName": "A String", # A plain text displayable name for this user.
476 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700477 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
478 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400479 },
480 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400481 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -0400482 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700483 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -0700484 "picture": { # The user's profile picture.
485 "url": "A String", # A URL that points to a profile picture of this user.
486 },
487 "kind": "drive#user", # This is always drive#user.
488 "displayName": "A String", # A plain text displayable name for this user.
489 "permissionId": "A String", # The user's ID as visible in the permissions collection.
490 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
491 "emailAddress": "A String", # The email address of the user.
492 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400493 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for Team Drive files.
494 "picture": { # The user's profile picture.
495 "url": "A String", # A URL that points to a profile picture of this user.
496 },
497 "kind": "drive#user", # This is always drive#user.
498 "displayName": "A String", # A plain text displayable name for this user.
499 "permissionId": "A String", # The user's ID as visible in the permissions collection.
500 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
501 "emailAddress": "A String", # The email address of the user.
502 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800503 "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 -0700504 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -0400505 "picture": { # The user's profile picture.
506 "url": "A String", # A URL that points to a profile picture of this user.
507 },
508 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400509 "displayName": "A String", # A plain text displayable name for this user.
510 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700511 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
512 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400513 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400514 "copyable": True or False, # Whether the file can be copied by the current user. Deprecated: use capabilities/canCopy.
515 "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 Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700516 "markedViewedByMeDate": "A String", # Deprecated.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400517 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -0400518 "A String",
519 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400520 "capabilities": { # Capabilities the current user has on the file. Each capability corresponds to a fine-grained action that a user may take.
521 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. For a Team Drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
522 "canTrash": True or False, # Whether the file can be trashed by the current user.
523 "canCopy": True or False, # Whether the file can be copied by the current user. For a Team Drive item, whether non-folder descendants of this item, or this item itself if it is not a folder, can be copied.
524 "canShare": True or False, # Whether the file's sharing settings can be modified by the current user.
525 "canDelete": True or False, # Whether the file can be deleted by the current user.
526 "canMoveTeamDriveItem": True or False, # Whether the current user can move this Team Drive item by changing its parent. Note that a request to change the parent for this item may still fail depending on the new parent that is being added. Only populated for Team Drive files.
527 "canRename": True or False, # Whether the file can be renamed by the current user.
528 "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.
529 "canMoveItemIntoTeamDrive": True or False, # Whether the current user can move this item into a Team Drive. If the item is in a Team Drive, this field is equivalent to canMoveTeamDriveItem.
530 "canDownload": True or False, # Whether the file can be downloaded by the current user.
531 "canComment": True or False, # Whether the current user can comment on the file.
532 "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.
533 "canReadTeamDrive": True or False, # Whether the current user has read access to the Team Drive to which this file belongs. Only populated for Team Drive files.
534 "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.
535 "canEdit": True or False, # Whether the file can be edited by the current user.
536 "canUntrash": True or False, # Whether the file can be restored from the trash by the current user.
537 },
John Asmuth614db982014-04-24 15:46:26 -0400538 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
539 "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.
540 "etag": "A String", # ETag of the file.
541 "parents": [ # Collection of parent folders which contain this file.
542 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
543 { # A reference to a file's parent.
544 "selfLink": "A String", # A link back to this reference.
545 "kind": "drive#parentReference", # This is always drive#parentReference.
546 "id": "A String", # The ID of the parent.
547 "isRoot": True or False, # Whether or not the parent is the root folder.
548 "parentLink": "A String", # A link to the parent.
549 },
550 ],
551 "exportLinks": { # Links for exporting Google Docs to specific formats.
552 "a_key": "A String", # A mapping from export format to URL
553 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400554 "shared": True or False, # Whether the file has been shared. Not populated for Team Drive files.
555 "permissions": [ # The list of permissions for users with access to this file. Not populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -0700556 { # A permission for a file.
557 "withLink": True or False, # Whether the link is required for this permission.
558 "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.
559 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400560 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
561 {
562 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
563 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
564 # - organizer
565 # - reader
566 # - writer
567 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
568 "A String",
569 ],
570 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
571 # - file
572 # - member
573 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
574 },
575 ],
Craig Citro065b5302014-08-14 00:47:23 -0700576 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800577 "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.
578 "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.
Craig Citro065b5302014-08-14 00:47:23 -0700579 "authKey": "A String", # The authkey parameter required for this permission.
580 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -0800581 "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 -0400582 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
583 # - They can only be set on user and group permissions
584 # - The date must be in the future
585 # - The date cannot be more than a year in the future
586 # - The date can only be set on drive.permissions.update requests
587 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
588 # - organizer
Craig Citro065b5302014-08-14 00:47:23 -0700589 # - owner
590 # - reader
591 # - writer
592 "type": "A String", # The account type. Allowed values are:
593 # - user
594 # - group
595 # - domain
596 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400597 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
Craig Citro065b5302014-08-14 00:47:23 -0700598 "A String",
599 ],
600 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700601 "photoLink": "A String", # A link to the profile photo, if available.
Craig Citro065b5302014-08-14 00:47:23 -0700602 },
603 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700604 "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 Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400605 "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.
606 "a_key": "A String",
607 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400608 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -0400609 "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.
610 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
611 "exposureTime": 3.14, # The length of the exposure, in seconds.
612 "cameraMake": "A String", # The make of the camera used to create the photo.
613 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
614 "isoSpeed": 42, # The ISO speed used to create the photo.
615 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
616 "exposureMode": "A String", # The exposure mode used to create the photo.
617 "colorSpace": "A String", # The color space of the photo.
618 "location": { # Geographic location information stored in the image.
619 "latitude": 3.14, # The latitude stored in the image.
620 "altitude": 3.14, # The altitude stored in the image.
621 "longitude": 3.14, # The longitude stored in the image.
622 },
623 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
624 "height": 42, # The height of the image in pixels.
625 "lens": "A String", # The lens used to create the photo.
626 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
627 "width": 42, # The width of the image in pixels.
628 "meteringMode": "A String", # The metering mode used to create the photo.
629 "flashUsed": True or False, # Whether a flash was used to create the photo.
630 "aperture": 3.14, # The aperture used to create the photo (f-number).
631 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
632 "sensor": "A String", # The type of sensor used to create the photo.
633 "whiteBalance": "A String", # The white balance mode used to create the photo.
634 "cameraModel": "A String", # The model of the camera used to create the photo.
635 },
636 "description": "A String", # A short description of the file.
637 "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 -0800638 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
639 "width": 42, # The width of the video in pixels.
640 "durationMillis": "A String", # The duration of the video in milliseconds.
641 "height": 42, # The height of the video in pixels.
642 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400643 "editable": True or False, # Whether the file can be edited by the current user. Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -0400644 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400645 "canComment": True or False, # Whether the current user can comment on the file. Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -0400646 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Takashi Matsuo06694102015-09-11 13:55:40 -0700647 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700648 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400649 "teamDriveId": "A String", # ID of the Team Drive the file resides in.
John Asmuth614db982014-04-24 15:46:26 -0400650 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000651 { # A key-value pair attached to a file that is either public or private to an application.
652 # The following limits apply to file properties:
653 # - Maximum of 100 properties total per file
654 # - Maximum of 30 private properties per app
655 # - Maximum of 30 public properties
656 # - 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 -0400657 "kind": "drive#property", # This is always drive#property.
658 "value": "A String", # The value of this property.
659 "etag": "A String", # ETag of the property.
660 "visibility": "A String", # The visibility of this property.
661 "key": "A String", # The key of this property.
662 "selfLink": "A String", # The link back to this property.
663 },
664 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700665 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400666 "iconLink": "A String", # A link to the file's icon.
667 "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.
668 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700669 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
John Asmuth614db982014-04-24 15:46:26 -0400670 "title": "A String", # The title of this file.
671 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800672 "thumbnail": { # A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail.
Takashi Matsuo06694102015-09-11 13:55:40 -0700673 "mimeType": "A String", # The MIME type of the thumbnail.
674 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
675 },
676 "downloadUrl": "A String",
John Asmuth614db982014-04-24 15:46:26 -0400677 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
678 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -0700679 "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.
John Asmuth614db982014-04-24 15:46:26 -0400680 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400681 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
682 {
683 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
684 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
685 # - organizer
686 # - reader
687 # - writer
688 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
689 "A String",
690 ],
691 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
692 # - file
693 # - member
694 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
695 },
696 ],
John Asmuth614db982014-04-24 15:46:26 -0400697 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800698 "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.
699 "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.
John Asmuth614db982014-04-24 15:46:26 -0400700 "authKey": "A String", # The authkey parameter required for this permission.
701 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -0800702 "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 -0400703 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
704 # - They can only be set on user and group permissions
705 # - The date must be in the future
706 # - The date cannot be more than a year in the future
707 # - The date can only be set on drive.permissions.update requests
708 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
709 # - organizer
John Asmuth614db982014-04-24 15:46:26 -0400710 # - owner
711 # - reader
712 # - writer
713 "type": "A String", # The account type. Allowed values are:
714 # - user
715 # - group
716 # - domain
717 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400718 "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 -0400719 "A String",
720 ],
721 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700722 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -0400723 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700724 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000725 "A String",
726 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400727 "shareable": True or False, # Whether the file's sharing settings can be modified by the current user. Deprecated: use capabilities/canShare.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700728 "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 Drive.
Takashi Matsuo06694102015-09-11 13:55:40 -0700729 "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 Drive; it is not populated for Google Docs or shortcut files.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400730 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for Team Drive files.
Takashi Matsuo06694102015-09-11 13:55:40 -0700731 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400732 "selfLink": "A String", # A link back to this file.
733 "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.
734 }</pre>
735</div>
736
737<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400738 <code class="details" id="delete">delete(fileId, supportsTeamDrives=None)</code>
739 <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 Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -0400740
741Args:
742 fileId: string, The ID of the file to delete. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400743 supportsTeamDrives: boolean, Whether the requesting application supports Team Drives.
John Asmuth614db982014-04-24 15:46:26 -0400744</pre>
745</div>
746
747<div class="method">
Craig Citro065b5302014-08-14 00:47:23 -0700748 <code class="details" id="emptyTrash">emptyTrash()</code>
749 <pre>Permanently deletes all of the user's trashed files.
750
751Args:
752</pre>
753</div>
754
755<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700756 <code class="details" id="export">export(fileId, mimeType)</code>
757 <pre>Exports a Google Doc to the requested MIME type and returns the exported content.
758
759Args:
760 fileId: string, The ID of the file. (required)
761 mimeType: string, The MIME type of the format requested for this export. (required)
762</pre>
763</div>
764
765<div class="method">
766 <code class="details" id="export_media">export_media(fileId, mimeType)</code>
767 <pre>Exports a Google Doc to the requested MIME type and returns the exported content.
768
769Args:
770 fileId: string, The ID of the file. (required)
771 mimeType: string, The MIME type of the format requested for this export. (required)
772</pre>
773</div>
774
775<div class="method">
Takashi Matsuo06694102015-09-11 13:55:40 -0700776 <code class="details" id="generateIds">generateIds(space=None, maxResults=None)</code>
777 <pre>Generates a set of file IDs which can be provided in insert requests.
778
779Args:
780 space: string, The space in which the IDs can be used to create new files. Supported values are 'drive' and 'appDataFolder'.
781 maxResults: integer, Maximum number of IDs to return.
782
783Returns:
784 An object of the form:
785
786 { # A list of generated IDs which can be provided in insert requests
787 "kind": "drive#generatedIds", # This is always drive#generatedIds
788 "ids": [ # The IDs generated for the requesting user in the specified space.
789 "A String",
790 ],
791 "space": "A String", # The type of file that can be created with these IDs.
792 }</pre>
793</div>
794
795<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400796 <code class="details" id="get">get(fileId, projection=None, revisionId=None, supportsTeamDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400797 <pre>Gets a file's metadata by ID.
798
799Args:
800 fileId: string, The ID for the file in question. (required)
801 projection: string, This parameter is deprecated and has no function.
802 Allowed values
803 BASIC - Deprecated
804 FULL - Deprecated
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000805 revisionId: string, Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400806 supportsTeamDrives: boolean, Whether the requesting application supports Team Drives.
Craig Citroe633be12015-03-02 13:40:36 -0800807 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700808 updateViewedDate: boolean, Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
John Asmuth614db982014-04-24 15:46:26 -0400809
810Returns:
811 An object of the form:
812
813 { # The metadata for a file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800814 "hasThumbnail": True or False, # Whether this file has a thumbnail.
John Asmuth614db982014-04-24 15:46:26 -0400815 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400816 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -0700817 "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.
818 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800819 "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 -0400820 "labels": { # A group of labels for the file.
Takashi Matsuo06694102015-09-11 13:55:40 -0700821 "restricted": True or False, # Whether viewers and commenters are prevented from downloading, printing, and copying this file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800822 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000823 "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 -0800824 "hidden": True or False, # Deprecated.
825 "starred": True or False, # Whether this file is starred by the user.
826 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -0400827 },
828 "indexableText": { # Indexable text attributes for the file (can only be written)
829 "text": "A String", # The text to be indexed for this file.
830 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400831 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700832 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700833 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -0400834 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400835 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for Team Drive files.
836 "owners": [ # The owner(s) of this file. Not populated for Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700837 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -0400838 "picture": { # The user's profile picture.
839 "url": "A String", # A URL that points to a profile picture of this user.
840 },
841 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400842 "displayName": "A String", # A plain text displayable name for this user.
843 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700844 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
845 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400846 },
847 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400848 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -0400849 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700850 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -0700851 "picture": { # The user's profile picture.
852 "url": "A String", # A URL that points to a profile picture of this user.
853 },
854 "kind": "drive#user", # This is always drive#user.
855 "displayName": "A String", # A plain text displayable name for this user.
856 "permissionId": "A String", # The user's ID as visible in the permissions collection.
857 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
858 "emailAddress": "A String", # The email address of the user.
859 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400860 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for Team Drive files.
861 "picture": { # The user's profile picture.
862 "url": "A String", # A URL that points to a profile picture of this user.
863 },
864 "kind": "drive#user", # This is always drive#user.
865 "displayName": "A String", # A plain text displayable name for this user.
866 "permissionId": "A String", # The user's ID as visible in the permissions collection.
867 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
868 "emailAddress": "A String", # The email address of the user.
869 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800870 "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 -0700871 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -0400872 "picture": { # The user's profile picture.
873 "url": "A String", # A URL that points to a profile picture of this user.
874 },
875 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400876 "displayName": "A String", # A plain text displayable name for this user.
877 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700878 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
879 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400880 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400881 "copyable": True or False, # Whether the file can be copied by the current user. Deprecated: use capabilities/canCopy.
882 "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 Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700883 "markedViewedByMeDate": "A String", # Deprecated.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400884 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -0400885 "A String",
886 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400887 "capabilities": { # Capabilities the current user has on the file. Each capability corresponds to a fine-grained action that a user may take.
888 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. For a Team Drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
889 "canTrash": True or False, # Whether the file can be trashed by the current user.
890 "canCopy": True or False, # Whether the file can be copied by the current user. For a Team Drive item, whether non-folder descendants of this item, or this item itself if it is not a folder, can be copied.
891 "canShare": True or False, # Whether the file's sharing settings can be modified by the current user.
892 "canDelete": True or False, # Whether the file can be deleted by the current user.
893 "canMoveTeamDriveItem": True or False, # Whether the current user can move this Team Drive item by changing its parent. Note that a request to change the parent for this item may still fail depending on the new parent that is being added. Only populated for Team Drive files.
894 "canRename": True or False, # Whether the file can be renamed by the current user.
895 "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.
896 "canMoveItemIntoTeamDrive": True or False, # Whether the current user can move this item into a Team Drive. If the item is in a Team Drive, this field is equivalent to canMoveTeamDriveItem.
897 "canDownload": True or False, # Whether the file can be downloaded by the current user.
898 "canComment": True or False, # Whether the current user can comment on the file.
899 "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.
900 "canReadTeamDrive": True or False, # Whether the current user has read access to the Team Drive to which this file belongs. Only populated for Team Drive files.
901 "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.
902 "canEdit": True or False, # Whether the file can be edited by the current user.
903 "canUntrash": True or False, # Whether the file can be restored from the trash by the current user.
904 },
John Asmuth614db982014-04-24 15:46:26 -0400905 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
906 "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.
907 "etag": "A String", # ETag of the file.
908 "parents": [ # Collection of parent folders which contain this file.
909 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
910 { # A reference to a file's parent.
911 "selfLink": "A String", # A link back to this reference.
912 "kind": "drive#parentReference", # This is always drive#parentReference.
913 "id": "A String", # The ID of the parent.
914 "isRoot": True or False, # Whether or not the parent is the root folder.
915 "parentLink": "A String", # A link to the parent.
916 },
917 ],
918 "exportLinks": { # Links for exporting Google Docs to specific formats.
919 "a_key": "A String", # A mapping from export format to URL
920 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400921 "shared": True or False, # Whether the file has been shared. Not populated for Team Drive files.
922 "permissions": [ # The list of permissions for users with access to this file. Not populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -0700923 { # A permission for a file.
924 "withLink": True or False, # Whether the link is required for this permission.
925 "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.
926 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400927 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
928 {
929 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
930 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
931 # - organizer
932 # - reader
933 # - writer
934 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
935 "A String",
936 ],
937 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
938 # - file
939 # - member
940 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
941 },
942 ],
Craig Citro065b5302014-08-14 00:47:23 -0700943 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800944 "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.
945 "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.
Craig Citro065b5302014-08-14 00:47:23 -0700946 "authKey": "A String", # The authkey parameter required for this permission.
947 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -0800948 "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 -0400949 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
950 # - They can only be set on user and group permissions
951 # - The date must be in the future
952 # - The date cannot be more than a year in the future
953 # - The date can only be set on drive.permissions.update requests
954 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
955 # - organizer
Craig Citro065b5302014-08-14 00:47:23 -0700956 # - owner
957 # - reader
958 # - writer
959 "type": "A String", # The account type. Allowed values are:
960 # - user
961 # - group
962 # - domain
963 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400964 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
Craig Citro065b5302014-08-14 00:47:23 -0700965 "A String",
966 ],
967 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700968 "photoLink": "A String", # A link to the profile photo, if available.
Craig Citro065b5302014-08-14 00:47:23 -0700969 },
970 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700971 "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 Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400972 "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.
973 "a_key": "A String",
974 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400975 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -0400976 "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.
977 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
978 "exposureTime": 3.14, # The length of the exposure, in seconds.
979 "cameraMake": "A String", # The make of the camera used to create the photo.
980 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
981 "isoSpeed": 42, # The ISO speed used to create the photo.
982 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
983 "exposureMode": "A String", # The exposure mode used to create the photo.
984 "colorSpace": "A String", # The color space of the photo.
985 "location": { # Geographic location information stored in the image.
986 "latitude": 3.14, # The latitude stored in the image.
987 "altitude": 3.14, # The altitude stored in the image.
988 "longitude": 3.14, # The longitude stored in the image.
989 },
990 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
991 "height": 42, # The height of the image in pixels.
992 "lens": "A String", # The lens used to create the photo.
993 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
994 "width": 42, # The width of the image in pixels.
995 "meteringMode": "A String", # The metering mode used to create the photo.
996 "flashUsed": True or False, # Whether a flash was used to create the photo.
997 "aperture": 3.14, # The aperture used to create the photo (f-number).
998 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
999 "sensor": "A String", # The type of sensor used to create the photo.
1000 "whiteBalance": "A String", # The white balance mode used to create the photo.
1001 "cameraModel": "A String", # The model of the camera used to create the photo.
1002 },
1003 "description": "A String", # A short description of the file.
1004 "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 -08001005 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
1006 "width": 42, # The width of the video in pixels.
1007 "durationMillis": "A String", # The duration of the video in milliseconds.
1008 "height": 42, # The height of the video in pixels.
1009 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001010 "editable": True or False, # Whether the file can be edited by the current user. Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04001011 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001012 "canComment": True or False, # Whether the current user can comment on the file. Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04001013 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Takashi Matsuo06694102015-09-11 13:55:40 -07001014 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001015 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001016 "teamDriveId": "A String", # ID of the Team Drive the file resides in.
John Asmuth614db982014-04-24 15:46:26 -04001017 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001018 { # A key-value pair attached to a file that is either public or private to an application.
1019 # The following limits apply to file properties:
1020 # - Maximum of 100 properties total per file
1021 # - Maximum of 30 private properties per app
1022 # - Maximum of 30 public properties
1023 # - 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 -04001024 "kind": "drive#property", # This is always drive#property.
1025 "value": "A String", # The value of this property.
1026 "etag": "A String", # ETag of the property.
1027 "visibility": "A String", # The visibility of this property.
1028 "key": "A String", # The key of this property.
1029 "selfLink": "A String", # The link back to this property.
1030 },
1031 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07001032 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001033 "iconLink": "A String", # A link to the file's icon.
1034 "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.
1035 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001036 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
John Asmuth614db982014-04-24 15:46:26 -04001037 "title": "A String", # The title of this file.
1038 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001039 "thumbnail": { # A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail.
Takashi Matsuo06694102015-09-11 13:55:40 -07001040 "mimeType": "A String", # The MIME type of the thumbnail.
1041 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
1042 },
1043 "downloadUrl": "A String",
John Asmuth614db982014-04-24 15:46:26 -04001044 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
1045 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07001046 "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.
John Asmuth614db982014-04-24 15:46:26 -04001047 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001048 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
1049 {
1050 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
1051 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
1052 # - organizer
1053 # - reader
1054 # - writer
1055 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1056 "A String",
1057 ],
1058 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
1059 # - file
1060 # - member
1061 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1062 },
1063 ],
John Asmuth614db982014-04-24 15:46:26 -04001064 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001065 "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.
1066 "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.
John Asmuth614db982014-04-24 15:46:26 -04001067 "authKey": "A String", # The authkey parameter required for this permission.
1068 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08001069 "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 -04001070 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
1071 # - They can only be set on user and group permissions
1072 # - The date must be in the future
1073 # - The date cannot be more than a year in the future
1074 # - The date can only be set on drive.permissions.update requests
1075 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
1076 # - organizer
John Asmuth614db982014-04-24 15:46:26 -04001077 # - owner
1078 # - reader
1079 # - writer
1080 "type": "A String", # The account type. Allowed values are:
1081 # - user
1082 # - group
1083 # - domain
1084 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001085 "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 -04001086 "A String",
1087 ],
1088 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001089 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04001090 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001091 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001092 "A String",
1093 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001094 "shareable": True or False, # Whether the file's sharing settings can be modified by the current user. Deprecated: use capabilities/canShare.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001095 "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 Drive.
Takashi Matsuo06694102015-09-11 13:55:40 -07001096 "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 Drive; it is not populated for Google Docs or shortcut files.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001097 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for Team Drive files.
Takashi Matsuo06694102015-09-11 13:55:40 -07001098 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001099 "selfLink": "A String", # A link back to this file.
1100 "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.
1101 }</pre>
1102</div>
1103
1104<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001105 <code class="details" id="get_media">get_media(fileId, projection=None, revisionId=None, supportsTeamDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08001106 <pre>Gets a file's metadata by ID.
1107
1108Args:
1109 fileId: string, The ID for the file in question. (required)
1110 projection: string, This parameter is deprecated and has no function.
1111 Allowed values
1112 BASIC - Deprecated
1113 FULL - Deprecated
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001114 revisionId: string, Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001115 supportsTeamDrives: boolean, Whether the requesting application supports Team Drives.
Craig Citroe633be12015-03-02 13:40:36 -08001116 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001117 updateViewedDate: boolean, Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
Craig Citroe633be12015-03-02 13:40:36 -08001118
1119Returns:
1120 The media object as a string.
1121
1122 </pre>
1123</div>
1124
1125<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001126 <code class="details" id="insert">insert(body=None, supportsTeamDrives=None, media_body=None, ocrLanguage=None, ocr=None, pinned=None, visibility=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=None, media_mime_type=None, timedTextLanguage=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04001127 <pre>Insert a new file.
1128
1129Args:
1130 body: object, The request body.
1131 The object takes the form of:
1132
1133{ # The metadata for a file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001134 "hasThumbnail": True or False, # Whether this file has a thumbnail.
John Asmuth614db982014-04-24 15:46:26 -04001135 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001136 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -07001137 "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.
1138 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001139 "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 -04001140 "labels": { # A group of labels for the file.
Takashi Matsuo06694102015-09-11 13:55:40 -07001141 "restricted": True or False, # Whether viewers and commenters are prevented from downloading, printing, and copying this file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001142 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001143 "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 -08001144 "hidden": True or False, # Deprecated.
1145 "starred": True or False, # Whether this file is starred by the user.
1146 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04001147 },
1148 "indexableText": { # Indexable text attributes for the file (can only be written)
1149 "text": "A String", # The text to be indexed for this file.
1150 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001151 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07001152 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001153 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04001154 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001155 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for Team Drive files.
1156 "owners": [ # The owner(s) of this file. Not populated for Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001157 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04001158 "picture": { # The user's profile picture.
1159 "url": "A String", # A URL that points to a profile picture of this user.
1160 },
1161 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04001162 "displayName": "A String", # A plain text displayable name for this user.
1163 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07001164 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1165 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04001166 },
1167 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001168 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -04001169 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001170 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07001171 "picture": { # The user's profile picture.
1172 "url": "A String", # A URL that points to a profile picture of this user.
1173 },
1174 "kind": "drive#user", # This is always drive#user.
1175 "displayName": "A String", # A plain text displayable name for this user.
1176 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1177 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1178 "emailAddress": "A String", # The email address of the user.
1179 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001180 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for Team Drive files.
1181 "picture": { # The user's profile picture.
1182 "url": "A String", # A URL that points to a profile picture of this user.
1183 },
1184 "kind": "drive#user", # This is always drive#user.
1185 "displayName": "A String", # A plain text displayable name for this user.
1186 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1187 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1188 "emailAddress": "A String", # The email address of the user.
1189 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001190 "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 -07001191 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04001192 "picture": { # The user's profile picture.
1193 "url": "A String", # A URL that points to a profile picture of this user.
1194 },
1195 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04001196 "displayName": "A String", # A plain text displayable name for this user.
1197 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07001198 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1199 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04001200 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001201 "copyable": True or False, # Whether the file can be copied by the current user. Deprecated: use capabilities/canCopy.
1202 "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 Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001203 "markedViewedByMeDate": "A String", # Deprecated.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001204 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -04001205 "A String",
1206 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001207 "capabilities": { # Capabilities the current user has on the file. Each capability corresponds to a fine-grained action that a user may take.
1208 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. For a Team Drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
1209 "canTrash": True or False, # Whether the file can be trashed by the current user.
1210 "canCopy": True or False, # Whether the file can be copied by the current user. For a Team Drive item, whether non-folder descendants of this item, or this item itself if it is not a folder, can be copied.
1211 "canShare": True or False, # Whether the file's sharing settings can be modified by the current user.
1212 "canDelete": True or False, # Whether the file can be deleted by the current user.
1213 "canMoveTeamDriveItem": True or False, # Whether the current user can move this Team Drive item by changing its parent. Note that a request to change the parent for this item may still fail depending on the new parent that is being added. Only populated for Team Drive files.
1214 "canRename": True or False, # Whether the file can be renamed by the current user.
1215 "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.
1216 "canMoveItemIntoTeamDrive": True or False, # Whether the current user can move this item into a Team Drive. If the item is in a Team Drive, this field is equivalent to canMoveTeamDriveItem.
1217 "canDownload": True or False, # Whether the file can be downloaded by the current user.
1218 "canComment": True or False, # Whether the current user can comment on the file.
1219 "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.
1220 "canReadTeamDrive": True or False, # Whether the current user has read access to the Team Drive to which this file belongs. Only populated for Team Drive files.
1221 "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.
1222 "canEdit": True or False, # Whether the file can be edited by the current user.
1223 "canUntrash": True or False, # Whether the file can be restored from the trash by the current user.
1224 },
John Asmuth614db982014-04-24 15:46:26 -04001225 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
1226 "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.
1227 "etag": "A String", # ETag of the file.
1228 "parents": [ # Collection of parent folders which contain this file.
1229 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
1230 { # A reference to a file's parent.
1231 "selfLink": "A String", # A link back to this reference.
1232 "kind": "drive#parentReference", # This is always drive#parentReference.
1233 "id": "A String", # The ID of the parent.
1234 "isRoot": True or False, # Whether or not the parent is the root folder.
1235 "parentLink": "A String", # A link to the parent.
1236 },
1237 ],
1238 "exportLinks": { # Links for exporting Google Docs to specific formats.
1239 "a_key": "A String", # A mapping from export format to URL
1240 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001241 "shared": True or False, # Whether the file has been shared. Not populated for Team Drive files.
1242 "permissions": [ # The list of permissions for users with access to this file. Not populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -07001243 { # A permission for a file.
1244 "withLink": True or False, # Whether the link is required for this permission.
1245 "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.
1246 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001247 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
1248 {
1249 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
1250 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
1251 # - organizer
1252 # - reader
1253 # - writer
1254 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1255 "A String",
1256 ],
1257 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
1258 # - file
1259 # - member
1260 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1261 },
1262 ],
Craig Citro065b5302014-08-14 00:47:23 -07001263 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001264 "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.
1265 "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.
Craig Citro065b5302014-08-14 00:47:23 -07001266 "authKey": "A String", # The authkey parameter required for this permission.
1267 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08001268 "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 -04001269 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
1270 # - They can only be set on user and group permissions
1271 # - The date must be in the future
1272 # - The date cannot be more than a year in the future
1273 # - The date can only be set on drive.permissions.update requests
1274 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
1275 # - organizer
Craig Citro065b5302014-08-14 00:47:23 -07001276 # - owner
1277 # - reader
1278 # - writer
1279 "type": "A String", # The account type. Allowed values are:
1280 # - user
1281 # - group
1282 # - domain
1283 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001284 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
Craig Citro065b5302014-08-14 00:47:23 -07001285 "A String",
1286 ],
1287 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001288 "photoLink": "A String", # A link to the profile photo, if available.
Craig Citro065b5302014-08-14 00:47:23 -07001289 },
1290 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07001291 "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 Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001292 "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.
1293 "a_key": "A String",
1294 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001295 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04001296 "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.
1297 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
1298 "exposureTime": 3.14, # The length of the exposure, in seconds.
1299 "cameraMake": "A String", # The make of the camera used to create the photo.
1300 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1301 "isoSpeed": 42, # The ISO speed used to create the photo.
1302 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
1303 "exposureMode": "A String", # The exposure mode used to create the photo.
1304 "colorSpace": "A String", # The color space of the photo.
1305 "location": { # Geographic location information stored in the image.
1306 "latitude": 3.14, # The latitude stored in the image.
1307 "altitude": 3.14, # The altitude stored in the image.
1308 "longitude": 3.14, # The longitude stored in the image.
1309 },
1310 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
1311 "height": 42, # The height of the image in pixels.
1312 "lens": "A String", # The lens used to create the photo.
1313 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
1314 "width": 42, # The width of the image in pixels.
1315 "meteringMode": "A String", # The metering mode used to create the photo.
1316 "flashUsed": True or False, # Whether a flash was used to create the photo.
1317 "aperture": 3.14, # The aperture used to create the photo (f-number).
1318 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
1319 "sensor": "A String", # The type of sensor used to create the photo.
1320 "whiteBalance": "A String", # The white balance mode used to create the photo.
1321 "cameraModel": "A String", # The model of the camera used to create the photo.
1322 },
1323 "description": "A String", # A short description of the file.
1324 "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 -08001325 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
1326 "width": 42, # The width of the video in pixels.
1327 "durationMillis": "A String", # The duration of the video in milliseconds.
1328 "height": 42, # The height of the video in pixels.
1329 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001330 "editable": True or False, # Whether the file can be edited by the current user. Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04001331 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001332 "canComment": True or False, # Whether the current user can comment on the file. Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04001333 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Takashi Matsuo06694102015-09-11 13:55:40 -07001334 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001335 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001336 "teamDriveId": "A String", # ID of the Team Drive the file resides in.
John Asmuth614db982014-04-24 15:46:26 -04001337 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001338 { # A key-value pair attached to a file that is either public or private to an application.
1339 # The following limits apply to file properties:
1340 # - Maximum of 100 properties total per file
1341 # - Maximum of 30 private properties per app
1342 # - Maximum of 30 public properties
1343 # - 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 -04001344 "kind": "drive#property", # This is always drive#property.
1345 "value": "A String", # The value of this property.
1346 "etag": "A String", # ETag of the property.
1347 "visibility": "A String", # The visibility of this property.
1348 "key": "A String", # The key of this property.
1349 "selfLink": "A String", # The link back to this property.
1350 },
1351 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07001352 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001353 "iconLink": "A String", # A link to the file's icon.
1354 "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.
1355 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001356 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
John Asmuth614db982014-04-24 15:46:26 -04001357 "title": "A String", # The title of this file.
1358 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001359 "thumbnail": { # A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail.
Takashi Matsuo06694102015-09-11 13:55:40 -07001360 "mimeType": "A String", # The MIME type of the thumbnail.
1361 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
1362 },
1363 "downloadUrl": "A String",
John Asmuth614db982014-04-24 15:46:26 -04001364 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
1365 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07001366 "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.
John Asmuth614db982014-04-24 15:46:26 -04001367 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001368 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
1369 {
1370 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
1371 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
1372 # - organizer
1373 # - reader
1374 # - writer
1375 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1376 "A String",
1377 ],
1378 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
1379 # - file
1380 # - member
1381 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1382 },
1383 ],
John Asmuth614db982014-04-24 15:46:26 -04001384 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001385 "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.
1386 "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.
John Asmuth614db982014-04-24 15:46:26 -04001387 "authKey": "A String", # The authkey parameter required for this permission.
1388 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08001389 "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 -04001390 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
1391 # - They can only be set on user and group permissions
1392 # - The date must be in the future
1393 # - The date cannot be more than a year in the future
1394 # - The date can only be set on drive.permissions.update requests
1395 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
1396 # - organizer
John Asmuth614db982014-04-24 15:46:26 -04001397 # - owner
1398 # - reader
1399 # - writer
1400 "type": "A String", # The account type. Allowed values are:
1401 # - user
1402 # - group
1403 # - domain
1404 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001405 "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 -04001406 "A String",
1407 ],
1408 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001409 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04001410 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001411 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001412 "A String",
1413 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001414 "shareable": True or False, # Whether the file's sharing settings can be modified by the current user. Deprecated: use capabilities/canShare.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001415 "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 Drive.
Takashi Matsuo06694102015-09-11 13:55:40 -07001416 "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 Drive; it is not populated for Google Docs or shortcut files.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001417 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for Team Drive files.
Takashi Matsuo06694102015-09-11 13:55:40 -07001418 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001419 "selfLink": "A String", # A link back to this file.
1420 "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.
1421}
1422
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001423 supportsTeamDrives: boolean, Whether the requesting application supports Team Drives.
John Asmuth614db982014-04-24 15:46:26 -04001424 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 -08001425 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
1426 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
1427 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 -04001428 visibility: string, The visibility of the new file. This parameter is only relevant when convert=false.
1429 Allowed values
1430 DEFAULT - The visibility of the new file is determined by the user's default visibility/sharing policies.
1431 PRIVATE - The new file will be visible to only the owner.
John Asmuth614db982014-04-24 15:46:26 -04001432 timedTextTrackName: string, The timed text track name.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001433 convert: boolean, Whether to convert this file to the corresponding Google Docs format.
1434 useContentAsIndexableText: boolean, Whether to use the content as indexable text.
1435 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
1436 timedTextLanguage: string, The language of the timed text.
John Asmuth614db982014-04-24 15:46:26 -04001437
1438Returns:
1439 An object of the form:
1440
1441 { # The metadata for a file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001442 "hasThumbnail": True or False, # Whether this file has a thumbnail.
John Asmuth614db982014-04-24 15:46:26 -04001443 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001444 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -07001445 "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.
1446 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001447 "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 -04001448 "labels": { # A group of labels for the file.
Takashi Matsuo06694102015-09-11 13:55:40 -07001449 "restricted": True or False, # Whether viewers and commenters are prevented from downloading, printing, and copying this file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001450 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001451 "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 -08001452 "hidden": True or False, # Deprecated.
1453 "starred": True or False, # Whether this file is starred by the user.
1454 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04001455 },
1456 "indexableText": { # Indexable text attributes for the file (can only be written)
1457 "text": "A String", # The text to be indexed for this file.
1458 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001459 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07001460 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001461 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04001462 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001463 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for Team Drive files.
1464 "owners": [ # The owner(s) of this file. Not populated for Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001465 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04001466 "picture": { # The user's profile picture.
1467 "url": "A String", # A URL that points to a profile picture of this user.
1468 },
1469 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04001470 "displayName": "A String", # A plain text displayable name for this user.
1471 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07001472 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1473 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04001474 },
1475 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001476 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -04001477 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001478 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07001479 "picture": { # The user's profile picture.
1480 "url": "A String", # A URL that points to a profile picture of this user.
1481 },
1482 "kind": "drive#user", # This is always drive#user.
1483 "displayName": "A String", # A plain text displayable name for this user.
1484 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1485 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1486 "emailAddress": "A String", # The email address of the user.
1487 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001488 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for Team Drive files.
1489 "picture": { # The user's profile picture.
1490 "url": "A String", # A URL that points to a profile picture of this user.
1491 },
1492 "kind": "drive#user", # This is always drive#user.
1493 "displayName": "A String", # A plain text displayable name for this user.
1494 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1495 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1496 "emailAddress": "A String", # The email address of the user.
1497 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001498 "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 -07001499 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04001500 "picture": { # The user's profile picture.
1501 "url": "A String", # A URL that points to a profile picture of this user.
1502 },
1503 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04001504 "displayName": "A String", # A plain text displayable name for this user.
1505 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07001506 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1507 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04001508 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001509 "copyable": True or False, # Whether the file can be copied by the current user. Deprecated: use capabilities/canCopy.
1510 "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 Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001511 "markedViewedByMeDate": "A String", # Deprecated.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001512 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -04001513 "A String",
1514 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001515 "capabilities": { # Capabilities the current user has on the file. Each capability corresponds to a fine-grained action that a user may take.
1516 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. For a Team Drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
1517 "canTrash": True or False, # Whether the file can be trashed by the current user.
1518 "canCopy": True or False, # Whether the file can be copied by the current user. For a Team Drive item, whether non-folder descendants of this item, or this item itself if it is not a folder, can be copied.
1519 "canShare": True or False, # Whether the file's sharing settings can be modified by the current user.
1520 "canDelete": True or False, # Whether the file can be deleted by the current user.
1521 "canMoveTeamDriveItem": True or False, # Whether the current user can move this Team Drive item by changing its parent. Note that a request to change the parent for this item may still fail depending on the new parent that is being added. Only populated for Team Drive files.
1522 "canRename": True or False, # Whether the file can be renamed by the current user.
1523 "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.
1524 "canMoveItemIntoTeamDrive": True or False, # Whether the current user can move this item into a Team Drive. If the item is in a Team Drive, this field is equivalent to canMoveTeamDriveItem.
1525 "canDownload": True or False, # Whether the file can be downloaded by the current user.
1526 "canComment": True or False, # Whether the current user can comment on the file.
1527 "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.
1528 "canReadTeamDrive": True or False, # Whether the current user has read access to the Team Drive to which this file belongs. Only populated for Team Drive files.
1529 "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.
1530 "canEdit": True or False, # Whether the file can be edited by the current user.
1531 "canUntrash": True or False, # Whether the file can be restored from the trash by the current user.
1532 },
John Asmuth614db982014-04-24 15:46:26 -04001533 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
1534 "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.
1535 "etag": "A String", # ETag of the file.
1536 "parents": [ # Collection of parent folders which contain this file.
1537 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
1538 { # A reference to a file's parent.
1539 "selfLink": "A String", # A link back to this reference.
1540 "kind": "drive#parentReference", # This is always drive#parentReference.
1541 "id": "A String", # The ID of the parent.
1542 "isRoot": True or False, # Whether or not the parent is the root folder.
1543 "parentLink": "A String", # A link to the parent.
1544 },
1545 ],
1546 "exportLinks": { # Links for exporting Google Docs to specific formats.
1547 "a_key": "A String", # A mapping from export format to URL
1548 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001549 "shared": True or False, # Whether the file has been shared. Not populated for Team Drive files.
1550 "permissions": [ # The list of permissions for users with access to this file. Not populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -07001551 { # A permission for a file.
1552 "withLink": True or False, # Whether the link is required for this permission.
1553 "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.
1554 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001555 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
1556 {
1557 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
1558 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
1559 # - organizer
1560 # - reader
1561 # - writer
1562 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1563 "A String",
1564 ],
1565 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
1566 # - file
1567 # - member
1568 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1569 },
1570 ],
Craig Citro065b5302014-08-14 00:47:23 -07001571 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001572 "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.
1573 "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.
Craig Citro065b5302014-08-14 00:47:23 -07001574 "authKey": "A String", # The authkey parameter required for this permission.
1575 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08001576 "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 -04001577 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
1578 # - They can only be set on user and group permissions
1579 # - The date must be in the future
1580 # - The date cannot be more than a year in the future
1581 # - The date can only be set on drive.permissions.update requests
1582 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
1583 # - organizer
Craig Citro065b5302014-08-14 00:47:23 -07001584 # - owner
1585 # - reader
1586 # - writer
1587 "type": "A String", # The account type. Allowed values are:
1588 # - user
1589 # - group
1590 # - domain
1591 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001592 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
Craig Citro065b5302014-08-14 00:47:23 -07001593 "A String",
1594 ],
1595 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001596 "photoLink": "A String", # A link to the profile photo, if available.
Craig Citro065b5302014-08-14 00:47:23 -07001597 },
1598 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07001599 "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 Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001600 "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.
1601 "a_key": "A String",
1602 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001603 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04001604 "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.
1605 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
1606 "exposureTime": 3.14, # The length of the exposure, in seconds.
1607 "cameraMake": "A String", # The make of the camera used to create the photo.
1608 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1609 "isoSpeed": 42, # The ISO speed used to create the photo.
1610 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
1611 "exposureMode": "A String", # The exposure mode used to create the photo.
1612 "colorSpace": "A String", # The color space of the photo.
1613 "location": { # Geographic location information stored in the image.
1614 "latitude": 3.14, # The latitude stored in the image.
1615 "altitude": 3.14, # The altitude stored in the image.
1616 "longitude": 3.14, # The longitude stored in the image.
1617 },
1618 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
1619 "height": 42, # The height of the image in pixels.
1620 "lens": "A String", # The lens used to create the photo.
1621 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
1622 "width": 42, # The width of the image in pixels.
1623 "meteringMode": "A String", # The metering mode used to create the photo.
1624 "flashUsed": True or False, # Whether a flash was used to create the photo.
1625 "aperture": 3.14, # The aperture used to create the photo (f-number).
1626 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
1627 "sensor": "A String", # The type of sensor used to create the photo.
1628 "whiteBalance": "A String", # The white balance mode used to create the photo.
1629 "cameraModel": "A String", # The model of the camera used to create the photo.
1630 },
1631 "description": "A String", # A short description of the file.
1632 "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 -08001633 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
1634 "width": 42, # The width of the video in pixels.
1635 "durationMillis": "A String", # The duration of the video in milliseconds.
1636 "height": 42, # The height of the video in pixels.
1637 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001638 "editable": True or False, # Whether the file can be edited by the current user. Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04001639 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001640 "canComment": True or False, # Whether the current user can comment on the file. Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04001641 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Takashi Matsuo06694102015-09-11 13:55:40 -07001642 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001643 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001644 "teamDriveId": "A String", # ID of the Team Drive the file resides in.
John Asmuth614db982014-04-24 15:46:26 -04001645 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001646 { # A key-value pair attached to a file that is either public or private to an application.
1647 # The following limits apply to file properties:
1648 # - Maximum of 100 properties total per file
1649 # - Maximum of 30 private properties per app
1650 # - Maximum of 30 public properties
1651 # - 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 -04001652 "kind": "drive#property", # This is always drive#property.
1653 "value": "A String", # The value of this property.
1654 "etag": "A String", # ETag of the property.
1655 "visibility": "A String", # The visibility of this property.
1656 "key": "A String", # The key of this property.
1657 "selfLink": "A String", # The link back to this property.
1658 },
1659 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07001660 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001661 "iconLink": "A String", # A link to the file's icon.
1662 "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.
1663 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001664 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
John Asmuth614db982014-04-24 15:46:26 -04001665 "title": "A String", # The title of this file.
1666 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001667 "thumbnail": { # A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail.
Takashi Matsuo06694102015-09-11 13:55:40 -07001668 "mimeType": "A String", # The MIME type of the thumbnail.
1669 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
1670 },
1671 "downloadUrl": "A String",
John Asmuth614db982014-04-24 15:46:26 -04001672 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
1673 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07001674 "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.
John Asmuth614db982014-04-24 15:46:26 -04001675 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001676 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
1677 {
1678 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
1679 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
1680 # - organizer
1681 # - reader
1682 # - writer
1683 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1684 "A String",
1685 ],
1686 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
1687 # - file
1688 # - member
1689 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1690 },
1691 ],
John Asmuth614db982014-04-24 15:46:26 -04001692 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001693 "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.
1694 "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.
John Asmuth614db982014-04-24 15:46:26 -04001695 "authKey": "A String", # The authkey parameter required for this permission.
1696 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08001697 "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 -04001698 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
1699 # - They can only be set on user and group permissions
1700 # - The date must be in the future
1701 # - The date cannot be more than a year in the future
1702 # - The date can only be set on drive.permissions.update requests
1703 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
1704 # - organizer
John Asmuth614db982014-04-24 15:46:26 -04001705 # - owner
1706 # - reader
1707 # - writer
1708 "type": "A String", # The account type. Allowed values are:
1709 # - user
1710 # - group
1711 # - domain
1712 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001713 "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 -04001714 "A String",
1715 ],
1716 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001717 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04001718 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001719 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001720 "A String",
1721 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001722 "shareable": True or False, # Whether the file's sharing settings can be modified by the current user. Deprecated: use capabilities/canShare.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001723 "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 Drive.
Takashi Matsuo06694102015-09-11 13:55:40 -07001724 "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 Drive; it is not populated for Google Docs or shortcut files.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001725 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for Team Drive files.
Takashi Matsuo06694102015-09-11 13:55:40 -07001726 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001727 "selfLink": "A String", # A link back to this file.
1728 "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.
1729 }</pre>
1730</div>
1731
1732<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001733 <code class="details" id="list">list(orderBy=None, projection=None, supportsTeamDrives=None, spaces=None, pageToken=None, corpus=None, maxResults=None, teamDriveId=None, includeTeamDriveItems=None, corpora=None, q=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04001734 <pre>Lists the user's files.
1735
1736Args:
Takashi Matsuo06694102015-09-11 13:55:40 -07001737 orderBy: string, A comma-separated list of sort keys. Valid keys are 'createdDate', 'folder', 'lastViewedByMeDate', 'modifiedByMeDate', 'modifiedDate', 'quotaBytesUsed', 'recency', 'sharedWithMeDate', 'starred', and 'title'. 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 -04001738 projection: string, This parameter is deprecated and has no function.
1739 Allowed values
1740 BASIC - Deprecated
1741 FULL - Deprecated
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001742 supportsTeamDrives: boolean, Whether the requesting application supports Team Drives.
Takashi Matsuo06694102015-09-11 13:55:40 -07001743 spaces: string, A comma-separated list of spaces to query. Supported values are 'drive', 'appDataFolder' and 'photos'.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001744 pageToken: string, Page token for files.
1745 corpus: string, The body of items (files/documents) to which the query applies. Deprecated: use 'corpora' instead.
Craig Citro065b5302014-08-14 00:47:23 -07001746 Allowed values
1747 DEFAULT - The items that the user has accessed.
1748 DOMAIN - Items shared to the user's domain.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001749 maxResults: integer, Maximum number of files to return.
1750 teamDriveId: string, ID of Team Drive to search.
1751 includeTeamDriveItems: boolean, Whether Team Drive items should be included in results.
1752 corpora: string, Comma-separated list of bodies of items (files/documents) to which the query applies. Supported bodies are 'default', 'domain', 'teamDrive' and 'allTeamDrives'. 'allTeamDrives' must be combined with 'default'; all other values must be used in isolation. Prefer 'default' or 'teamDrive' to 'allTeamDrives' for efficiency.
1753 q: string, Query string for searching files.
John Asmuth614db982014-04-24 15:46:26 -04001754
1755Returns:
1756 An object of the form:
1757
1758 { # A list of files.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001759 "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 Team Drives with the "default,allTeamDrives" 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 "teamDrive".
1760 "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 -04001761 "kind": "drive#fileList", # This is always drive#fileList.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001762 "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 -04001763 { # The metadata for a file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001764 "hasThumbnail": True or False, # Whether this file has a thumbnail.
John Asmuth614db982014-04-24 15:46:26 -04001765 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001766 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -07001767 "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.
1768 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001769 "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 -04001770 "labels": { # A group of labels for the file.
Takashi Matsuo06694102015-09-11 13:55:40 -07001771 "restricted": True or False, # Whether viewers and commenters are prevented from downloading, printing, and copying this file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001772 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001773 "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 -08001774 "hidden": True or False, # Deprecated.
1775 "starred": True or False, # Whether this file is starred by the user.
1776 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04001777 },
1778 "indexableText": { # Indexable text attributes for the file (can only be written)
1779 "text": "A String", # The text to be indexed for this file.
1780 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001781 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07001782 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001783 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04001784 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001785 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for Team Drive files.
1786 "owners": [ # The owner(s) of this file. Not populated for Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001787 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04001788 "picture": { # The user's profile picture.
1789 "url": "A String", # A URL that points to a profile picture of this user.
1790 },
1791 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04001792 "displayName": "A String", # A plain text displayable name for this user.
1793 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07001794 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1795 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04001796 },
1797 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001798 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -04001799 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001800 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07001801 "picture": { # The user's profile picture.
1802 "url": "A String", # A URL that points to a profile picture of this user.
1803 },
1804 "kind": "drive#user", # This is always drive#user.
1805 "displayName": "A String", # A plain text displayable name for this user.
1806 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1807 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1808 "emailAddress": "A String", # The email address of the user.
1809 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001810 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for Team Drive files.
1811 "picture": { # The user's profile picture.
1812 "url": "A String", # A URL that points to a profile picture of this user.
1813 },
1814 "kind": "drive#user", # This is always drive#user.
1815 "displayName": "A String", # A plain text displayable name for this user.
1816 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1817 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1818 "emailAddress": "A String", # The email address of the user.
1819 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001820 "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 -07001821 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04001822 "picture": { # The user's profile picture.
1823 "url": "A String", # A URL that points to a profile picture of this user.
1824 },
1825 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04001826 "displayName": "A String", # A plain text displayable name for this user.
1827 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07001828 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1829 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04001830 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001831 "copyable": True or False, # Whether the file can be copied by the current user. Deprecated: use capabilities/canCopy.
1832 "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 Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001833 "markedViewedByMeDate": "A String", # Deprecated.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001834 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -04001835 "A String",
1836 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001837 "capabilities": { # Capabilities the current user has on the file. Each capability corresponds to a fine-grained action that a user may take.
1838 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. For a Team Drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
1839 "canTrash": True or False, # Whether the file can be trashed by the current user.
1840 "canCopy": True or False, # Whether the file can be copied by the current user. For a Team Drive item, whether non-folder descendants of this item, or this item itself if it is not a folder, can be copied.
1841 "canShare": True or False, # Whether the file's sharing settings can be modified by the current user.
1842 "canDelete": True or False, # Whether the file can be deleted by the current user.
1843 "canMoveTeamDriveItem": True or False, # Whether the current user can move this Team Drive item by changing its parent. Note that a request to change the parent for this item may still fail depending on the new parent that is being added. Only populated for Team Drive files.
1844 "canRename": True or False, # Whether the file can be renamed by the current user.
1845 "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.
1846 "canMoveItemIntoTeamDrive": True or False, # Whether the current user can move this item into a Team Drive. If the item is in a Team Drive, this field is equivalent to canMoveTeamDriveItem.
1847 "canDownload": True or False, # Whether the file can be downloaded by the current user.
1848 "canComment": True or False, # Whether the current user can comment on the file.
1849 "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.
1850 "canReadTeamDrive": True or False, # Whether the current user has read access to the Team Drive to which this file belongs. Only populated for Team Drive files.
1851 "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.
1852 "canEdit": True or False, # Whether the file can be edited by the current user.
1853 "canUntrash": True or False, # Whether the file can be restored from the trash by the current user.
1854 },
John Asmuth614db982014-04-24 15:46:26 -04001855 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
1856 "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.
1857 "etag": "A String", # ETag of the file.
1858 "parents": [ # Collection of parent folders which contain this file.
1859 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
1860 { # A reference to a file's parent.
1861 "selfLink": "A String", # A link back to this reference.
1862 "kind": "drive#parentReference", # This is always drive#parentReference.
1863 "id": "A String", # The ID of the parent.
1864 "isRoot": True or False, # Whether or not the parent is the root folder.
1865 "parentLink": "A String", # A link to the parent.
1866 },
1867 ],
1868 "exportLinks": { # Links for exporting Google Docs to specific formats.
1869 "a_key": "A String", # A mapping from export format to URL
1870 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001871 "shared": True or False, # Whether the file has been shared. Not populated for Team Drive files.
1872 "permissions": [ # The list of permissions for users with access to this file. Not populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -07001873 { # A permission for a file.
1874 "withLink": True or False, # Whether the link is required for this permission.
1875 "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.
1876 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001877 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
1878 {
1879 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
1880 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
1881 # - organizer
1882 # - reader
1883 # - writer
1884 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1885 "A String",
1886 ],
1887 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
1888 # - file
1889 # - member
1890 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1891 },
1892 ],
Craig Citro065b5302014-08-14 00:47:23 -07001893 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001894 "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.
1895 "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.
Craig Citro065b5302014-08-14 00:47:23 -07001896 "authKey": "A String", # The authkey parameter required for this permission.
1897 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08001898 "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 -04001899 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
1900 # - They can only be set on user and group permissions
1901 # - The date must be in the future
1902 # - The date cannot be more than a year in the future
1903 # - The date can only be set on drive.permissions.update requests
1904 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
1905 # - organizer
Craig Citro065b5302014-08-14 00:47:23 -07001906 # - owner
1907 # - reader
1908 # - writer
1909 "type": "A String", # The account type. Allowed values are:
1910 # - user
1911 # - group
1912 # - domain
1913 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001914 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
Craig Citro065b5302014-08-14 00:47:23 -07001915 "A String",
1916 ],
1917 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001918 "photoLink": "A String", # A link to the profile photo, if available.
Craig Citro065b5302014-08-14 00:47:23 -07001919 },
1920 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07001921 "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 Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001922 "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.
1923 "a_key": "A String",
1924 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001925 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04001926 "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.
1927 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
1928 "exposureTime": 3.14, # The length of the exposure, in seconds.
1929 "cameraMake": "A String", # The make of the camera used to create the photo.
1930 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1931 "isoSpeed": 42, # The ISO speed used to create the photo.
1932 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
1933 "exposureMode": "A String", # The exposure mode used to create the photo.
1934 "colorSpace": "A String", # The color space of the photo.
1935 "location": { # Geographic location information stored in the image.
1936 "latitude": 3.14, # The latitude stored in the image.
1937 "altitude": 3.14, # The altitude stored in the image.
1938 "longitude": 3.14, # The longitude stored in the image.
1939 },
1940 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
1941 "height": 42, # The height of the image in pixels.
1942 "lens": "A String", # The lens used to create the photo.
1943 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
1944 "width": 42, # The width of the image in pixels.
1945 "meteringMode": "A String", # The metering mode used to create the photo.
1946 "flashUsed": True or False, # Whether a flash was used to create the photo.
1947 "aperture": 3.14, # The aperture used to create the photo (f-number).
1948 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
1949 "sensor": "A String", # The type of sensor used to create the photo.
1950 "whiteBalance": "A String", # The white balance mode used to create the photo.
1951 "cameraModel": "A String", # The model of the camera used to create the photo.
1952 },
1953 "description": "A String", # A short description of the file.
1954 "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 -08001955 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
1956 "width": 42, # The width of the video in pixels.
1957 "durationMillis": "A String", # The duration of the video in milliseconds.
1958 "height": 42, # The height of the video in pixels.
1959 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001960 "editable": True or False, # Whether the file can be edited by the current user. Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04001961 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001962 "canComment": True or False, # Whether the current user can comment on the file. Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04001963 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Takashi Matsuo06694102015-09-11 13:55:40 -07001964 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001965 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001966 "teamDriveId": "A String", # ID of the Team Drive the file resides in.
John Asmuth614db982014-04-24 15:46:26 -04001967 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001968 { # A key-value pair attached to a file that is either public or private to an application.
1969 # The following limits apply to file properties:
1970 # - Maximum of 100 properties total per file
1971 # - Maximum of 30 private properties per app
1972 # - Maximum of 30 public properties
1973 # - 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 -04001974 "kind": "drive#property", # This is always drive#property.
1975 "value": "A String", # The value of this property.
1976 "etag": "A String", # ETag of the property.
1977 "visibility": "A String", # The visibility of this property.
1978 "key": "A String", # The key of this property.
1979 "selfLink": "A String", # The link back to this property.
1980 },
1981 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07001982 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04001983 "iconLink": "A String", # A link to the file's icon.
1984 "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.
1985 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001986 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
John Asmuth614db982014-04-24 15:46:26 -04001987 "title": "A String", # The title of this file.
1988 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001989 "thumbnail": { # A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail.
Takashi Matsuo06694102015-09-11 13:55:40 -07001990 "mimeType": "A String", # The MIME type of the thumbnail.
1991 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
1992 },
1993 "downloadUrl": "A String",
John Asmuth614db982014-04-24 15:46:26 -04001994 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
1995 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07001996 "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.
John Asmuth614db982014-04-24 15:46:26 -04001997 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001998 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
1999 {
2000 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
2001 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
2002 # - organizer
2003 # - reader
2004 # - writer
2005 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2006 "A String",
2007 ],
2008 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
2009 # - file
2010 # - member
2011 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2012 },
2013 ],
John Asmuth614db982014-04-24 15:46:26 -04002014 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002015 "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.
2016 "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.
John Asmuth614db982014-04-24 15:46:26 -04002017 "authKey": "A String", # The authkey parameter required for this permission.
2018 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08002019 "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 -04002020 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
2021 # - They can only be set on user and group permissions
2022 # - The date must be in the future
2023 # - The date cannot be more than a year in the future
2024 # - The date can only be set on drive.permissions.update requests
2025 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
2026 # - organizer
John Asmuth614db982014-04-24 15:46:26 -04002027 # - owner
2028 # - reader
2029 # - writer
2030 "type": "A String", # The account type. Allowed values are:
2031 # - user
2032 # - group
2033 # - domain
2034 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002035 "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 -04002036 "A String",
2037 ],
2038 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002039 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04002040 },
Takashi Matsuo06694102015-09-11 13:55:40 -07002041 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002042 "A String",
2043 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002044 "shareable": True or False, # Whether the file's sharing settings can be modified by the current user. Deprecated: use capabilities/canShare.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002045 "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 Drive.
Takashi Matsuo06694102015-09-11 13:55:40 -07002046 "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 Drive; it is not populated for Google Docs or shortcut files.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002047 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for Team Drive files.
Takashi Matsuo06694102015-09-11 13:55:40 -07002048 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002049 "selfLink": "A String", # A link back to this file.
2050 "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.
2051 },
2052 ],
2053 "nextLink": "A String", # A link to the next page of files.
2054 "etag": "A String", # The ETag of the list.
2055 "selfLink": "A String", # A link back to this list.
2056 }</pre>
2057</div>
2058
2059<div class="method">
2060 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2061 <pre>Retrieves the next page of results.
2062
2063Args:
2064 previous_request: The request for the previous page. (required)
2065 previous_response: The response from the request for the previous page. (required)
2066
2067Returns:
2068 A request object that you can call 'execute()' on to request the next
2069 page. Returns None if there are no more items in the collection.
2070 </pre>
2071</div>
2072
2073<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002074 <code class="details" id="patch">patch(fileId, body, supportsTeamDrives=None, newRevision=None, modifiedDateBehavior=None, pinned=None, ocrLanguage=None, ocr=None, addParents=None, removeParents=None, updateViewedDate=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=None, setModifiedDate=None, timedTextLanguage=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04002075 <pre>Updates file metadata and/or content. This method supports patch semantics.
2076
2077Args:
2078 fileId: string, The ID of the file to update. (required)
2079 body: object, The request body. (required)
2080 The object takes the form of:
2081
2082{ # The metadata for a file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002083 "hasThumbnail": True or False, # Whether this file has a thumbnail.
John Asmuth614db982014-04-24 15:46:26 -04002084 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002085 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -07002086 "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.
2087 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002088 "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 -04002089 "labels": { # A group of labels for the file.
Takashi Matsuo06694102015-09-11 13:55:40 -07002090 "restricted": True or False, # Whether viewers and commenters are prevented from downloading, printing, and copying this file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002091 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002092 "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 -08002093 "hidden": True or False, # Deprecated.
2094 "starred": True or False, # Whether this file is starred by the user.
2095 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04002096 },
2097 "indexableText": { # Indexable text attributes for the file (can only be written)
2098 "text": "A String", # The text to be indexed for this file.
2099 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002100 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07002101 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002102 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04002103 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002104 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for Team Drive files.
2105 "owners": [ # The owner(s) of this file. Not populated for Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002106 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04002107 "picture": { # The user's profile picture.
2108 "url": "A String", # A URL that points to a profile picture of this user.
2109 },
2110 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04002111 "displayName": "A String", # A plain text displayable name for this user.
2112 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07002113 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2114 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04002115 },
2116 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002117 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -04002118 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002119 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07002120 "picture": { # The user's profile picture.
2121 "url": "A String", # A URL that points to a profile picture of this user.
2122 },
2123 "kind": "drive#user", # This is always drive#user.
2124 "displayName": "A String", # A plain text displayable name for this user.
2125 "permissionId": "A String", # The user's ID as visible in the permissions collection.
2126 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2127 "emailAddress": "A String", # The email address of the user.
2128 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002129 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for Team Drive files.
2130 "picture": { # The user's profile picture.
2131 "url": "A String", # A URL that points to a profile picture of this user.
2132 },
2133 "kind": "drive#user", # This is always drive#user.
2134 "displayName": "A String", # A plain text displayable name for this user.
2135 "permissionId": "A String", # The user's ID as visible in the permissions collection.
2136 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2137 "emailAddress": "A String", # The email address of the user.
2138 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002139 "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 -07002140 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04002141 "picture": { # The user's profile picture.
2142 "url": "A String", # A URL that points to a profile picture of this user.
2143 },
2144 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04002145 "displayName": "A String", # A plain text displayable name for this user.
2146 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07002147 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2148 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04002149 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002150 "copyable": True or False, # Whether the file can be copied by the current user. Deprecated: use capabilities/canCopy.
2151 "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 Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002152 "markedViewedByMeDate": "A String", # Deprecated.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002153 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -04002154 "A String",
2155 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002156 "capabilities": { # Capabilities the current user has on the file. Each capability corresponds to a fine-grained action that a user may take.
2157 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. For a Team Drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
2158 "canTrash": True or False, # Whether the file can be trashed by the current user.
2159 "canCopy": True or False, # Whether the file can be copied by the current user. For a Team Drive item, whether non-folder descendants of this item, or this item itself if it is not a folder, can be copied.
2160 "canShare": True or False, # Whether the file's sharing settings can be modified by the current user.
2161 "canDelete": True or False, # Whether the file can be deleted by the current user.
2162 "canMoveTeamDriveItem": True or False, # Whether the current user can move this Team Drive item by changing its parent. Note that a request to change the parent for this item may still fail depending on the new parent that is being added. Only populated for Team Drive files.
2163 "canRename": True or False, # Whether the file can be renamed by the current user.
2164 "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.
2165 "canMoveItemIntoTeamDrive": True or False, # Whether the current user can move this item into a Team Drive. If the item is in a Team Drive, this field is equivalent to canMoveTeamDriveItem.
2166 "canDownload": True or False, # Whether the file can be downloaded by the current user.
2167 "canComment": True or False, # Whether the current user can comment on the file.
2168 "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.
2169 "canReadTeamDrive": True or False, # Whether the current user has read access to the Team Drive to which this file belongs. Only populated for Team Drive files.
2170 "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.
2171 "canEdit": True or False, # Whether the file can be edited by the current user.
2172 "canUntrash": True or False, # Whether the file can be restored from the trash by the current user.
2173 },
John Asmuth614db982014-04-24 15:46:26 -04002174 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
2175 "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.
2176 "etag": "A String", # ETag of the file.
2177 "parents": [ # Collection of parent folders which contain this file.
2178 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
2179 { # A reference to a file's parent.
2180 "selfLink": "A String", # A link back to this reference.
2181 "kind": "drive#parentReference", # This is always drive#parentReference.
2182 "id": "A String", # The ID of the parent.
2183 "isRoot": True or False, # Whether or not the parent is the root folder.
2184 "parentLink": "A String", # A link to the parent.
2185 },
2186 ],
2187 "exportLinks": { # Links for exporting Google Docs to specific formats.
2188 "a_key": "A String", # A mapping from export format to URL
2189 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002190 "shared": True or False, # Whether the file has been shared. Not populated for Team Drive files.
2191 "permissions": [ # The list of permissions for users with access to this file. Not populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -07002192 { # A permission for a file.
2193 "withLink": True or False, # Whether the link is required for this permission.
2194 "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.
2195 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002196 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
2197 {
2198 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
2199 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
2200 # - organizer
2201 # - reader
2202 # - writer
2203 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2204 "A String",
2205 ],
2206 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
2207 # - file
2208 # - member
2209 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2210 },
2211 ],
Craig Citro065b5302014-08-14 00:47:23 -07002212 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002213 "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.
2214 "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.
Craig Citro065b5302014-08-14 00:47:23 -07002215 "authKey": "A String", # The authkey parameter required for this permission.
2216 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08002217 "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 -04002218 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
2219 # - They can only be set on user and group permissions
2220 # - The date must be in the future
2221 # - The date cannot be more than a year in the future
2222 # - The date can only be set on drive.permissions.update requests
2223 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
2224 # - organizer
Craig Citro065b5302014-08-14 00:47:23 -07002225 # - owner
2226 # - reader
2227 # - writer
2228 "type": "A String", # The account type. Allowed values are:
2229 # - user
2230 # - group
2231 # - domain
2232 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002233 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
Craig Citro065b5302014-08-14 00:47:23 -07002234 "A String",
2235 ],
2236 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002237 "photoLink": "A String", # A link to the profile photo, if available.
Craig Citro065b5302014-08-14 00:47:23 -07002238 },
2239 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07002240 "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 Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002241 "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.
2242 "a_key": "A String",
2243 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002244 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04002245 "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.
2246 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
2247 "exposureTime": 3.14, # The length of the exposure, in seconds.
2248 "cameraMake": "A String", # The make of the camera used to create the photo.
2249 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
2250 "isoSpeed": 42, # The ISO speed used to create the photo.
2251 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
2252 "exposureMode": "A String", # The exposure mode used to create the photo.
2253 "colorSpace": "A String", # The color space of the photo.
2254 "location": { # Geographic location information stored in the image.
2255 "latitude": 3.14, # The latitude stored in the image.
2256 "altitude": 3.14, # The altitude stored in the image.
2257 "longitude": 3.14, # The longitude stored in the image.
2258 },
2259 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
2260 "height": 42, # The height of the image in pixels.
2261 "lens": "A String", # The lens used to create the photo.
2262 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
2263 "width": 42, # The width of the image in pixels.
2264 "meteringMode": "A String", # The metering mode used to create the photo.
2265 "flashUsed": True or False, # Whether a flash was used to create the photo.
2266 "aperture": 3.14, # The aperture used to create the photo (f-number).
2267 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
2268 "sensor": "A String", # The type of sensor used to create the photo.
2269 "whiteBalance": "A String", # The white balance mode used to create the photo.
2270 "cameraModel": "A String", # The model of the camera used to create the photo.
2271 },
2272 "description": "A String", # A short description of the file.
2273 "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 -08002274 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
2275 "width": 42, # The width of the video in pixels.
2276 "durationMillis": "A String", # The duration of the video in milliseconds.
2277 "height": 42, # The height of the video in pixels.
2278 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002279 "editable": True or False, # Whether the file can be edited by the current user. Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04002280 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002281 "canComment": True or False, # Whether the current user can comment on the file. Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04002282 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Takashi Matsuo06694102015-09-11 13:55:40 -07002283 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002284 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002285 "teamDriveId": "A String", # ID of the Team Drive the file resides in.
John Asmuth614db982014-04-24 15:46:26 -04002286 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002287 { # A key-value pair attached to a file that is either public or private to an application.
2288 # The following limits apply to file properties:
2289 # - Maximum of 100 properties total per file
2290 # - Maximum of 30 private properties per app
2291 # - Maximum of 30 public properties
2292 # - 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 -04002293 "kind": "drive#property", # This is always drive#property.
2294 "value": "A String", # The value of this property.
2295 "etag": "A String", # ETag of the property.
2296 "visibility": "A String", # The visibility of this property.
2297 "key": "A String", # The key of this property.
2298 "selfLink": "A String", # The link back to this property.
2299 },
2300 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07002301 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002302 "iconLink": "A String", # A link to the file's icon.
2303 "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.
2304 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002305 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
John Asmuth614db982014-04-24 15:46:26 -04002306 "title": "A String", # The title of this file.
2307 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002308 "thumbnail": { # A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail.
Takashi Matsuo06694102015-09-11 13:55:40 -07002309 "mimeType": "A String", # The MIME type of the thumbnail.
2310 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
2311 },
2312 "downloadUrl": "A String",
John Asmuth614db982014-04-24 15:46:26 -04002313 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
2314 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07002315 "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.
John Asmuth614db982014-04-24 15:46:26 -04002316 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002317 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
2318 {
2319 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
2320 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
2321 # - organizer
2322 # - reader
2323 # - writer
2324 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2325 "A String",
2326 ],
2327 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
2328 # - file
2329 # - member
2330 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2331 },
2332 ],
John Asmuth614db982014-04-24 15:46:26 -04002333 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002334 "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.
2335 "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.
John Asmuth614db982014-04-24 15:46:26 -04002336 "authKey": "A String", # The authkey parameter required for this permission.
2337 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08002338 "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 -04002339 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
2340 # - They can only be set on user and group permissions
2341 # - The date must be in the future
2342 # - The date cannot be more than a year in the future
2343 # - The date can only be set on drive.permissions.update requests
2344 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
2345 # - organizer
John Asmuth614db982014-04-24 15:46:26 -04002346 # - owner
2347 # - reader
2348 # - writer
2349 "type": "A String", # The account type. Allowed values are:
2350 # - user
2351 # - group
2352 # - domain
2353 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002354 "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 -04002355 "A String",
2356 ],
2357 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002358 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04002359 },
Takashi Matsuo06694102015-09-11 13:55:40 -07002360 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002361 "A String",
2362 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002363 "shareable": True or False, # Whether the file's sharing settings can be modified by the current user. Deprecated: use capabilities/canShare.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002364 "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 Drive.
Takashi Matsuo06694102015-09-11 13:55:40 -07002365 "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 Drive; it is not populated for Google Docs or shortcut files.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002366 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for Team Drive files.
Takashi Matsuo06694102015-09-11 13:55:40 -07002367 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002368 "selfLink": "A String", # A link back to this file.
2369 "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.
2370}
2371
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002372 supportsTeamDrives: boolean, Whether the requesting application supports Team Drives.
Takashi Matsuo06694102015-09-11 13:55:40 -07002373 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.
2374 modifiedDateBehavior: string, Determines the behavior in which modifiedDate is updated. This overrides setModifiedDate.
2375 Allowed values
2376 fromBody - Set modifiedDate to the value provided in the body of the request. No change if no value was provided.
2377 fromBodyIfNeeded - Set modifiedDate to the value provided in the body of the request depending on other contents of the update.
2378 fromBodyOrNow - Set modifiedDate to the value provided in the body of the request, or to the current time if no value was provided.
2379 noChange - Maintain the previous value of modifiedDate.
2380 now - Set modifiedDate to the current time.
2381 nowIfNeeded - Set modifiedDate to the current time depending on contents of the update.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002382 pinned: boolean, Whether to pin the new revision. A file can have a maximum of 200 pinned revisions.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002383 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
John Asmuth614db982014-04-24 15:46:26 -04002384 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Craig Citro065b5302014-08-14 00:47:23 -07002385 addParents: string, Comma-separated list of parent IDs to add.
2386 removeParents: string, Comma-separated list of parent IDs to remove.
John Asmuth614db982014-04-24 15:46:26 -04002387 updateViewedDate: boolean, Whether to update the view date after successfully updating the file.
2388 timedTextTrackName: string, The timed text track name.
Takashi Matsuo06694102015-09-11 13:55:40 -07002389 convert: boolean, This parameter is deprecated and has no function.
John Asmuth614db982014-04-24 15:46:26 -04002390 useContentAsIndexableText: boolean, Whether to use the content as indexable text.
2391 setModifiedDate: boolean, Whether to set the modified date with the supplied modified date.
2392 timedTextLanguage: string, The language of the timed text.
2393
2394Returns:
2395 An object of the form:
2396
2397 { # The metadata for a file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002398 "hasThumbnail": True or False, # Whether this file has a thumbnail.
John Asmuth614db982014-04-24 15:46:26 -04002399 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002400 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -07002401 "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.
2402 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002403 "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 -04002404 "labels": { # A group of labels for the file.
Takashi Matsuo06694102015-09-11 13:55:40 -07002405 "restricted": True or False, # Whether viewers and commenters are prevented from downloading, printing, and copying this file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002406 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002407 "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 -08002408 "hidden": True or False, # Deprecated.
2409 "starred": True or False, # Whether this file is starred by the user.
2410 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04002411 },
2412 "indexableText": { # Indexable text attributes for the file (can only be written)
2413 "text": "A String", # The text to be indexed for this file.
2414 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002415 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07002416 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002417 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04002418 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002419 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for Team Drive files.
2420 "owners": [ # The owner(s) of this file. Not populated for Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002421 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04002422 "picture": { # The user's profile picture.
2423 "url": "A String", # A URL that points to a profile picture of this user.
2424 },
2425 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04002426 "displayName": "A String", # A plain text displayable name for this user.
2427 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07002428 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2429 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04002430 },
2431 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002432 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -04002433 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002434 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07002435 "picture": { # The user's profile picture.
2436 "url": "A String", # A URL that points to a profile picture of this user.
2437 },
2438 "kind": "drive#user", # This is always drive#user.
2439 "displayName": "A String", # A plain text displayable name for this user.
2440 "permissionId": "A String", # The user's ID as visible in the permissions collection.
2441 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2442 "emailAddress": "A String", # The email address of the user.
2443 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002444 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for Team Drive files.
2445 "picture": { # The user's profile picture.
2446 "url": "A String", # A URL that points to a profile picture of this user.
2447 },
2448 "kind": "drive#user", # This is always drive#user.
2449 "displayName": "A String", # A plain text displayable name for this user.
2450 "permissionId": "A String", # The user's ID as visible in the permissions collection.
2451 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2452 "emailAddress": "A String", # The email address of the user.
2453 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002454 "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 -07002455 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04002456 "picture": { # The user's profile picture.
2457 "url": "A String", # A URL that points to a profile picture of this user.
2458 },
2459 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04002460 "displayName": "A String", # A plain text displayable name for this user.
2461 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07002462 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2463 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04002464 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002465 "copyable": True or False, # Whether the file can be copied by the current user. Deprecated: use capabilities/canCopy.
2466 "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 Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002467 "markedViewedByMeDate": "A String", # Deprecated.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002468 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -04002469 "A String",
2470 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002471 "capabilities": { # Capabilities the current user has on the file. Each capability corresponds to a fine-grained action that a user may take.
2472 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. For a Team Drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
2473 "canTrash": True or False, # Whether the file can be trashed by the current user.
2474 "canCopy": True or False, # Whether the file can be copied by the current user. For a Team Drive item, whether non-folder descendants of this item, or this item itself if it is not a folder, can be copied.
2475 "canShare": True or False, # Whether the file's sharing settings can be modified by the current user.
2476 "canDelete": True or False, # Whether the file can be deleted by the current user.
2477 "canMoveTeamDriveItem": True or False, # Whether the current user can move this Team Drive item by changing its parent. Note that a request to change the parent for this item may still fail depending on the new parent that is being added. Only populated for Team Drive files.
2478 "canRename": True or False, # Whether the file can be renamed by the current user.
2479 "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.
2480 "canMoveItemIntoTeamDrive": True or False, # Whether the current user can move this item into a Team Drive. If the item is in a Team Drive, this field is equivalent to canMoveTeamDriveItem.
2481 "canDownload": True or False, # Whether the file can be downloaded by the current user.
2482 "canComment": True or False, # Whether the current user can comment on the file.
2483 "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.
2484 "canReadTeamDrive": True or False, # Whether the current user has read access to the Team Drive to which this file belongs. Only populated for Team Drive files.
2485 "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.
2486 "canEdit": True or False, # Whether the file can be edited by the current user.
2487 "canUntrash": True or False, # Whether the file can be restored from the trash by the current user.
2488 },
John Asmuth614db982014-04-24 15:46:26 -04002489 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
2490 "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.
2491 "etag": "A String", # ETag of the file.
2492 "parents": [ # Collection of parent folders which contain this file.
2493 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
2494 { # A reference to a file's parent.
2495 "selfLink": "A String", # A link back to this reference.
2496 "kind": "drive#parentReference", # This is always drive#parentReference.
2497 "id": "A String", # The ID of the parent.
2498 "isRoot": True or False, # Whether or not the parent is the root folder.
2499 "parentLink": "A String", # A link to the parent.
2500 },
2501 ],
2502 "exportLinks": { # Links for exporting Google Docs to specific formats.
2503 "a_key": "A String", # A mapping from export format to URL
2504 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002505 "shared": True or False, # Whether the file has been shared. Not populated for Team Drive files.
2506 "permissions": [ # The list of permissions for users with access to this file. Not populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -07002507 { # A permission for a file.
2508 "withLink": True or False, # Whether the link is required for this permission.
2509 "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.
2510 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002511 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
2512 {
2513 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
2514 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
2515 # - organizer
2516 # - reader
2517 # - writer
2518 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2519 "A String",
2520 ],
2521 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
2522 # - file
2523 # - member
2524 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2525 },
2526 ],
Craig Citro065b5302014-08-14 00:47:23 -07002527 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002528 "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.
2529 "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.
Craig Citro065b5302014-08-14 00:47:23 -07002530 "authKey": "A String", # The authkey parameter required for this permission.
2531 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08002532 "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 -04002533 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
2534 # - They can only be set on user and group permissions
2535 # - The date must be in the future
2536 # - The date cannot be more than a year in the future
2537 # - The date can only be set on drive.permissions.update requests
2538 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
2539 # - organizer
Craig Citro065b5302014-08-14 00:47:23 -07002540 # - owner
2541 # - reader
2542 # - writer
2543 "type": "A String", # The account type. Allowed values are:
2544 # - user
2545 # - group
2546 # - domain
2547 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002548 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
Craig Citro065b5302014-08-14 00:47:23 -07002549 "A String",
2550 ],
2551 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002552 "photoLink": "A String", # A link to the profile photo, if available.
Craig Citro065b5302014-08-14 00:47:23 -07002553 },
2554 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07002555 "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 Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002556 "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.
2557 "a_key": "A String",
2558 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002559 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04002560 "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.
2561 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
2562 "exposureTime": 3.14, # The length of the exposure, in seconds.
2563 "cameraMake": "A String", # The make of the camera used to create the photo.
2564 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
2565 "isoSpeed": 42, # The ISO speed used to create the photo.
2566 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
2567 "exposureMode": "A String", # The exposure mode used to create the photo.
2568 "colorSpace": "A String", # The color space of the photo.
2569 "location": { # Geographic location information stored in the image.
2570 "latitude": 3.14, # The latitude stored in the image.
2571 "altitude": 3.14, # The altitude stored in the image.
2572 "longitude": 3.14, # The longitude stored in the image.
2573 },
2574 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
2575 "height": 42, # The height of the image in pixels.
2576 "lens": "A String", # The lens used to create the photo.
2577 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
2578 "width": 42, # The width of the image in pixels.
2579 "meteringMode": "A String", # The metering mode used to create the photo.
2580 "flashUsed": True or False, # Whether a flash was used to create the photo.
2581 "aperture": 3.14, # The aperture used to create the photo (f-number).
2582 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
2583 "sensor": "A String", # The type of sensor used to create the photo.
2584 "whiteBalance": "A String", # The white balance mode used to create the photo.
2585 "cameraModel": "A String", # The model of the camera used to create the photo.
2586 },
2587 "description": "A String", # A short description of the file.
2588 "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 -08002589 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
2590 "width": 42, # The width of the video in pixels.
2591 "durationMillis": "A String", # The duration of the video in milliseconds.
2592 "height": 42, # The height of the video in pixels.
2593 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002594 "editable": True or False, # Whether the file can be edited by the current user. Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04002595 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002596 "canComment": True or False, # Whether the current user can comment on the file. Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04002597 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Takashi Matsuo06694102015-09-11 13:55:40 -07002598 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002599 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002600 "teamDriveId": "A String", # ID of the Team Drive the file resides in.
John Asmuth614db982014-04-24 15:46:26 -04002601 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002602 { # A key-value pair attached to a file that is either public or private to an application.
2603 # The following limits apply to file properties:
2604 # - Maximum of 100 properties total per file
2605 # - Maximum of 30 private properties per app
2606 # - Maximum of 30 public properties
2607 # - 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 -04002608 "kind": "drive#property", # This is always drive#property.
2609 "value": "A String", # The value of this property.
2610 "etag": "A String", # ETag of the property.
2611 "visibility": "A String", # The visibility of this property.
2612 "key": "A String", # The key of this property.
2613 "selfLink": "A String", # The link back to this property.
2614 },
2615 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07002616 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002617 "iconLink": "A String", # A link to the file's icon.
2618 "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.
2619 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002620 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
John Asmuth614db982014-04-24 15:46:26 -04002621 "title": "A String", # The title of this file.
2622 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002623 "thumbnail": { # A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail.
Takashi Matsuo06694102015-09-11 13:55:40 -07002624 "mimeType": "A String", # The MIME type of the thumbnail.
2625 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
2626 },
2627 "downloadUrl": "A String",
John Asmuth614db982014-04-24 15:46:26 -04002628 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
2629 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07002630 "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.
John Asmuth614db982014-04-24 15:46:26 -04002631 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002632 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
2633 {
2634 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
2635 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
2636 # - organizer
2637 # - reader
2638 # - writer
2639 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2640 "A String",
2641 ],
2642 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
2643 # - file
2644 # - member
2645 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2646 },
2647 ],
John Asmuth614db982014-04-24 15:46:26 -04002648 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002649 "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.
2650 "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.
John Asmuth614db982014-04-24 15:46:26 -04002651 "authKey": "A String", # The authkey parameter required for this permission.
2652 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08002653 "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 -04002654 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
2655 # - They can only be set on user and group permissions
2656 # - The date must be in the future
2657 # - The date cannot be more than a year in the future
2658 # - The date can only be set on drive.permissions.update requests
2659 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
2660 # - organizer
John Asmuth614db982014-04-24 15:46:26 -04002661 # - owner
2662 # - reader
2663 # - writer
2664 "type": "A String", # The account type. Allowed values are:
2665 # - user
2666 # - group
2667 # - domain
2668 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002669 "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 -04002670 "A String",
2671 ],
2672 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002673 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04002674 },
Takashi Matsuo06694102015-09-11 13:55:40 -07002675 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002676 "A String",
2677 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002678 "shareable": True or False, # Whether the file's sharing settings can be modified by the current user. Deprecated: use capabilities/canShare.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002679 "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 Drive.
Takashi Matsuo06694102015-09-11 13:55:40 -07002680 "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 Drive; it is not populated for Google Docs or shortcut files.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002681 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for Team Drive files.
Takashi Matsuo06694102015-09-11 13:55:40 -07002682 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002683 "selfLink": "A String", # A link back to this file.
2684 "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.
2685 }</pre>
2686</div>
2687
2688<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002689 <code class="details" id="touch">touch(fileId, supportsTeamDrives=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04002690 <pre>Set the file's updated time to the current server time.
2691
2692Args:
2693 fileId: string, The ID of the file to update. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002694 supportsTeamDrives: boolean, Whether the requesting application supports Team Drives.
John Asmuth614db982014-04-24 15:46:26 -04002695
2696Returns:
2697 An object of the form:
2698
2699 { # The metadata for a file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002700 "hasThumbnail": True or False, # Whether this file has a thumbnail.
John Asmuth614db982014-04-24 15:46:26 -04002701 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002702 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -07002703 "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.
2704 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002705 "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 -04002706 "labels": { # A group of labels for the file.
Takashi Matsuo06694102015-09-11 13:55:40 -07002707 "restricted": True or False, # Whether viewers and commenters are prevented from downloading, printing, and copying this file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002708 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002709 "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 -08002710 "hidden": True or False, # Deprecated.
2711 "starred": True or False, # Whether this file is starred by the user.
2712 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04002713 },
2714 "indexableText": { # Indexable text attributes for the file (can only be written)
2715 "text": "A String", # The text to be indexed for this file.
2716 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002717 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07002718 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002719 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04002720 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002721 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for Team Drive files.
2722 "owners": [ # The owner(s) of this file. Not populated for Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002723 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04002724 "picture": { # The user's profile picture.
2725 "url": "A String", # A URL that points to a profile picture of this user.
2726 },
2727 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04002728 "displayName": "A String", # A plain text displayable name for this user.
2729 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07002730 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2731 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04002732 },
2733 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002734 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -04002735 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002736 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07002737 "picture": { # The user's profile picture.
2738 "url": "A String", # A URL that points to a profile picture of this user.
2739 },
2740 "kind": "drive#user", # This is always drive#user.
2741 "displayName": "A String", # A plain text displayable name for this user.
2742 "permissionId": "A String", # The user's ID as visible in the permissions collection.
2743 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2744 "emailAddress": "A String", # The email address of the user.
2745 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002746 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for Team Drive files.
2747 "picture": { # The user's profile picture.
2748 "url": "A String", # A URL that points to a profile picture of this user.
2749 },
2750 "kind": "drive#user", # This is always drive#user.
2751 "displayName": "A String", # A plain text displayable name for this user.
2752 "permissionId": "A String", # The user's ID as visible in the permissions collection.
2753 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2754 "emailAddress": "A String", # The email address of the user.
2755 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002756 "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 -07002757 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04002758 "picture": { # The user's profile picture.
2759 "url": "A String", # A URL that points to a profile picture of this user.
2760 },
2761 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04002762 "displayName": "A String", # A plain text displayable name for this user.
2763 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07002764 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2765 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04002766 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002767 "copyable": True or False, # Whether the file can be copied by the current user. Deprecated: use capabilities/canCopy.
2768 "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 Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002769 "markedViewedByMeDate": "A String", # Deprecated.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002770 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -04002771 "A String",
2772 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002773 "capabilities": { # Capabilities the current user has on the file. Each capability corresponds to a fine-grained action that a user may take.
2774 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. For a Team Drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
2775 "canTrash": True or False, # Whether the file can be trashed by the current user.
2776 "canCopy": True or False, # Whether the file can be copied by the current user. For a Team Drive item, whether non-folder descendants of this item, or this item itself if it is not a folder, can be copied.
2777 "canShare": True or False, # Whether the file's sharing settings can be modified by the current user.
2778 "canDelete": True or False, # Whether the file can be deleted by the current user.
2779 "canMoveTeamDriveItem": True or False, # Whether the current user can move this Team Drive item by changing its parent. Note that a request to change the parent for this item may still fail depending on the new parent that is being added. Only populated for Team Drive files.
2780 "canRename": True or False, # Whether the file can be renamed by the current user.
2781 "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.
2782 "canMoveItemIntoTeamDrive": True or False, # Whether the current user can move this item into a Team Drive. If the item is in a Team Drive, this field is equivalent to canMoveTeamDriveItem.
2783 "canDownload": True or False, # Whether the file can be downloaded by the current user.
2784 "canComment": True or False, # Whether the current user can comment on the file.
2785 "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.
2786 "canReadTeamDrive": True or False, # Whether the current user has read access to the Team Drive to which this file belongs. Only populated for Team Drive files.
2787 "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.
2788 "canEdit": True or False, # Whether the file can be edited by the current user.
2789 "canUntrash": True or False, # Whether the file can be restored from the trash by the current user.
2790 },
John Asmuth614db982014-04-24 15:46:26 -04002791 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
2792 "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.
2793 "etag": "A String", # ETag of the file.
2794 "parents": [ # Collection of parent folders which contain this file.
2795 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
2796 { # A reference to a file's parent.
2797 "selfLink": "A String", # A link back to this reference.
2798 "kind": "drive#parentReference", # This is always drive#parentReference.
2799 "id": "A String", # The ID of the parent.
2800 "isRoot": True or False, # Whether or not the parent is the root folder.
2801 "parentLink": "A String", # A link to the parent.
2802 },
2803 ],
2804 "exportLinks": { # Links for exporting Google Docs to specific formats.
2805 "a_key": "A String", # A mapping from export format to URL
2806 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002807 "shared": True or False, # Whether the file has been shared. Not populated for Team Drive files.
2808 "permissions": [ # The list of permissions for users with access to this file. Not populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -07002809 { # A permission for a file.
2810 "withLink": True or False, # Whether the link is required for this permission.
2811 "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.
2812 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002813 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
2814 {
2815 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
2816 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
2817 # - organizer
2818 # - reader
2819 # - writer
2820 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2821 "A String",
2822 ],
2823 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
2824 # - file
2825 # - member
2826 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2827 },
2828 ],
Craig Citro065b5302014-08-14 00:47:23 -07002829 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002830 "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.
2831 "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.
Craig Citro065b5302014-08-14 00:47:23 -07002832 "authKey": "A String", # The authkey parameter required for this permission.
2833 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08002834 "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 -04002835 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
2836 # - They can only be set on user and group permissions
2837 # - The date must be in the future
2838 # - The date cannot be more than a year in the future
2839 # - The date can only be set on drive.permissions.update requests
2840 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
2841 # - organizer
Craig Citro065b5302014-08-14 00:47:23 -07002842 # - owner
2843 # - reader
2844 # - writer
2845 "type": "A String", # The account type. Allowed values are:
2846 # - user
2847 # - group
2848 # - domain
2849 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002850 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
Craig Citro065b5302014-08-14 00:47:23 -07002851 "A String",
2852 ],
2853 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002854 "photoLink": "A String", # A link to the profile photo, if available.
Craig Citro065b5302014-08-14 00:47:23 -07002855 },
2856 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07002857 "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 Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002858 "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.
2859 "a_key": "A String",
2860 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002861 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04002862 "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.
2863 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
2864 "exposureTime": 3.14, # The length of the exposure, in seconds.
2865 "cameraMake": "A String", # The make of the camera used to create the photo.
2866 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
2867 "isoSpeed": 42, # The ISO speed used to create the photo.
2868 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
2869 "exposureMode": "A String", # The exposure mode used to create the photo.
2870 "colorSpace": "A String", # The color space of the photo.
2871 "location": { # Geographic location information stored in the image.
2872 "latitude": 3.14, # The latitude stored in the image.
2873 "altitude": 3.14, # The altitude stored in the image.
2874 "longitude": 3.14, # The longitude stored in the image.
2875 },
2876 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
2877 "height": 42, # The height of the image in pixels.
2878 "lens": "A String", # The lens used to create the photo.
2879 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
2880 "width": 42, # The width of the image in pixels.
2881 "meteringMode": "A String", # The metering mode used to create the photo.
2882 "flashUsed": True or False, # Whether a flash was used to create the photo.
2883 "aperture": 3.14, # The aperture used to create the photo (f-number).
2884 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
2885 "sensor": "A String", # The type of sensor used to create the photo.
2886 "whiteBalance": "A String", # The white balance mode used to create the photo.
2887 "cameraModel": "A String", # The model of the camera used to create the photo.
2888 },
2889 "description": "A String", # A short description of the file.
2890 "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 -08002891 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
2892 "width": 42, # The width of the video in pixels.
2893 "durationMillis": "A String", # The duration of the video in milliseconds.
2894 "height": 42, # The height of the video in pixels.
2895 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002896 "editable": True or False, # Whether the file can be edited by the current user. Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04002897 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002898 "canComment": True or False, # Whether the current user can comment on the file. Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04002899 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Takashi Matsuo06694102015-09-11 13:55:40 -07002900 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002901 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002902 "teamDriveId": "A String", # ID of the Team Drive the file resides in.
John Asmuth614db982014-04-24 15:46:26 -04002903 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002904 { # A key-value pair attached to a file that is either public or private to an application.
2905 # The following limits apply to file properties:
2906 # - Maximum of 100 properties total per file
2907 # - Maximum of 30 private properties per app
2908 # - Maximum of 30 public properties
2909 # - 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 -04002910 "kind": "drive#property", # This is always drive#property.
2911 "value": "A String", # The value of this property.
2912 "etag": "A String", # ETag of the property.
2913 "visibility": "A String", # The visibility of this property.
2914 "key": "A String", # The key of this property.
2915 "selfLink": "A String", # The link back to this property.
2916 },
2917 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07002918 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002919 "iconLink": "A String", # A link to the file's icon.
2920 "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.
2921 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002922 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
John Asmuth614db982014-04-24 15:46:26 -04002923 "title": "A String", # The title of this file.
2924 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002925 "thumbnail": { # A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail.
Takashi Matsuo06694102015-09-11 13:55:40 -07002926 "mimeType": "A String", # The MIME type of the thumbnail.
2927 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
2928 },
2929 "downloadUrl": "A String",
John Asmuth614db982014-04-24 15:46:26 -04002930 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
2931 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07002932 "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.
John Asmuth614db982014-04-24 15:46:26 -04002933 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002934 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
2935 {
2936 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
2937 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
2938 # - organizer
2939 # - reader
2940 # - writer
2941 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2942 "A String",
2943 ],
2944 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
2945 # - file
2946 # - member
2947 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2948 },
2949 ],
John Asmuth614db982014-04-24 15:46:26 -04002950 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002951 "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.
2952 "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.
John Asmuth614db982014-04-24 15:46:26 -04002953 "authKey": "A String", # The authkey parameter required for this permission.
2954 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08002955 "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 -04002956 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
2957 # - They can only be set on user and group permissions
2958 # - The date must be in the future
2959 # - The date cannot be more than a year in the future
2960 # - The date can only be set on drive.permissions.update requests
2961 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
2962 # - organizer
John Asmuth614db982014-04-24 15:46:26 -04002963 # - owner
2964 # - reader
2965 # - writer
2966 "type": "A String", # The account type. Allowed values are:
2967 # - user
2968 # - group
2969 # - domain
2970 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002971 "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 -04002972 "A String",
2973 ],
2974 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002975 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04002976 },
Takashi Matsuo06694102015-09-11 13:55:40 -07002977 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002978 "A String",
2979 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002980 "shareable": True or False, # Whether the file's sharing settings can be modified by the current user. Deprecated: use capabilities/canShare.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002981 "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 Drive.
Takashi Matsuo06694102015-09-11 13:55:40 -07002982 "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 Drive; it is not populated for Google Docs or shortcut files.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002983 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for Team Drive files.
Takashi Matsuo06694102015-09-11 13:55:40 -07002984 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04002985 "selfLink": "A String", # A link back to this file.
2986 "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.
2987 }</pre>
2988</div>
2989
2990<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002991 <code class="details" id="trash">trash(fileId, supportsTeamDrives=None)</code>
2992 <pre>Moves a file to the trash. The currently authenticated user must own the file or be an organizer on the parent for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -04002993
2994Args:
2995 fileId: string, The ID of the file to trash. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002996 supportsTeamDrives: boolean, Whether the requesting application supports Team Drives.
John Asmuth614db982014-04-24 15:46:26 -04002997
2998Returns:
2999 An object of the form:
3000
3001 { # The metadata for a file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003002 "hasThumbnail": True or False, # Whether this file has a thumbnail.
John Asmuth614db982014-04-24 15:46:26 -04003003 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003004 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -07003005 "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.
3006 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003007 "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 -04003008 "labels": { # A group of labels for the file.
Takashi Matsuo06694102015-09-11 13:55:40 -07003009 "restricted": True or False, # Whether viewers and commenters are prevented from downloading, printing, and copying this file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003010 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003011 "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 -08003012 "hidden": True or False, # Deprecated.
3013 "starred": True or False, # Whether this file is starred by the user.
3014 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04003015 },
3016 "indexableText": { # Indexable text attributes for the file (can only be written)
3017 "text": "A String", # The text to be indexed for this file.
3018 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003019 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07003020 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003021 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04003022 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003023 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for Team Drive files.
3024 "owners": [ # The owner(s) of this file. Not populated for Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003025 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04003026 "picture": { # The user's profile picture.
3027 "url": "A String", # A URL that points to a profile picture of this user.
3028 },
3029 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04003030 "displayName": "A String", # A plain text displayable name for this user.
3031 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07003032 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3033 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04003034 },
3035 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003036 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -04003037 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003038 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07003039 "picture": { # The user's profile picture.
3040 "url": "A String", # A URL that points to a profile picture of this user.
3041 },
3042 "kind": "drive#user", # This is always drive#user.
3043 "displayName": "A String", # A plain text displayable name for this user.
3044 "permissionId": "A String", # The user's ID as visible in the permissions collection.
3045 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3046 "emailAddress": "A String", # The email address of the user.
3047 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003048 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for Team Drive files.
3049 "picture": { # The user's profile picture.
3050 "url": "A String", # A URL that points to a profile picture of this user.
3051 },
3052 "kind": "drive#user", # This is always drive#user.
3053 "displayName": "A String", # A plain text displayable name for this user.
3054 "permissionId": "A String", # The user's ID as visible in the permissions collection.
3055 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3056 "emailAddress": "A String", # The email address of the user.
3057 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003058 "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 -07003059 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04003060 "picture": { # The user's profile picture.
3061 "url": "A String", # A URL that points to a profile picture of this user.
3062 },
3063 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04003064 "displayName": "A String", # A plain text displayable name for this user.
3065 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07003066 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3067 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04003068 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003069 "copyable": True or False, # Whether the file can be copied by the current user. Deprecated: use capabilities/canCopy.
3070 "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 Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003071 "markedViewedByMeDate": "A String", # Deprecated.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003072 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -04003073 "A String",
3074 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003075 "capabilities": { # Capabilities the current user has on the file. Each capability corresponds to a fine-grained action that a user may take.
3076 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. For a Team Drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
3077 "canTrash": True or False, # Whether the file can be trashed by the current user.
3078 "canCopy": True or False, # Whether the file can be copied by the current user. For a Team Drive item, whether non-folder descendants of this item, or this item itself if it is not a folder, can be copied.
3079 "canShare": True or False, # Whether the file's sharing settings can be modified by the current user.
3080 "canDelete": True or False, # Whether the file can be deleted by the current user.
3081 "canMoveTeamDriveItem": True or False, # Whether the current user can move this Team Drive item by changing its parent. Note that a request to change the parent for this item may still fail depending on the new parent that is being added. Only populated for Team Drive files.
3082 "canRename": True or False, # Whether the file can be renamed by the current user.
3083 "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.
3084 "canMoveItemIntoTeamDrive": True or False, # Whether the current user can move this item into a Team Drive. If the item is in a Team Drive, this field is equivalent to canMoveTeamDriveItem.
3085 "canDownload": True or False, # Whether the file can be downloaded by the current user.
3086 "canComment": True or False, # Whether the current user can comment on the file.
3087 "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.
3088 "canReadTeamDrive": True or False, # Whether the current user has read access to the Team Drive to which this file belongs. Only populated for Team Drive files.
3089 "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.
3090 "canEdit": True or False, # Whether the file can be edited by the current user.
3091 "canUntrash": True or False, # Whether the file can be restored from the trash by the current user.
3092 },
John Asmuth614db982014-04-24 15:46:26 -04003093 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
3094 "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.
3095 "etag": "A String", # ETag of the file.
3096 "parents": [ # Collection of parent folders which contain this file.
3097 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
3098 { # A reference to a file's parent.
3099 "selfLink": "A String", # A link back to this reference.
3100 "kind": "drive#parentReference", # This is always drive#parentReference.
3101 "id": "A String", # The ID of the parent.
3102 "isRoot": True or False, # Whether or not the parent is the root folder.
3103 "parentLink": "A String", # A link to the parent.
3104 },
3105 ],
3106 "exportLinks": { # Links for exporting Google Docs to specific formats.
3107 "a_key": "A String", # A mapping from export format to URL
3108 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003109 "shared": True or False, # Whether the file has been shared. Not populated for Team Drive files.
3110 "permissions": [ # The list of permissions for users with access to this file. Not populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -07003111 { # A permission for a file.
3112 "withLink": True or False, # Whether the link is required for this permission.
3113 "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.
3114 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003115 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
3116 {
3117 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
3118 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
3119 # - organizer
3120 # - reader
3121 # - writer
3122 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3123 "A String",
3124 ],
3125 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
3126 # - file
3127 # - member
3128 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3129 },
3130 ],
Craig Citro065b5302014-08-14 00:47:23 -07003131 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003132 "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.
3133 "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.
Craig Citro065b5302014-08-14 00:47:23 -07003134 "authKey": "A String", # The authkey parameter required for this permission.
3135 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08003136 "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 -04003137 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
3138 # - They can only be set on user and group permissions
3139 # - The date must be in the future
3140 # - The date cannot be more than a year in the future
3141 # - The date can only be set on drive.permissions.update requests
3142 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
3143 # - organizer
Craig Citro065b5302014-08-14 00:47:23 -07003144 # - owner
3145 # - reader
3146 # - writer
3147 "type": "A String", # The account type. Allowed values are:
3148 # - user
3149 # - group
3150 # - domain
3151 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003152 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
Craig Citro065b5302014-08-14 00:47:23 -07003153 "A String",
3154 ],
3155 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003156 "photoLink": "A String", # A link to the profile photo, if available.
Craig Citro065b5302014-08-14 00:47:23 -07003157 },
3158 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07003159 "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 Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003160 "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.
3161 "a_key": "A String",
3162 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003163 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04003164 "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.
3165 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
3166 "exposureTime": 3.14, # The length of the exposure, in seconds.
3167 "cameraMake": "A String", # The make of the camera used to create the photo.
3168 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
3169 "isoSpeed": 42, # The ISO speed used to create the photo.
3170 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
3171 "exposureMode": "A String", # The exposure mode used to create the photo.
3172 "colorSpace": "A String", # The color space of the photo.
3173 "location": { # Geographic location information stored in the image.
3174 "latitude": 3.14, # The latitude stored in the image.
3175 "altitude": 3.14, # The altitude stored in the image.
3176 "longitude": 3.14, # The longitude stored in the image.
3177 },
3178 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
3179 "height": 42, # The height of the image in pixels.
3180 "lens": "A String", # The lens used to create the photo.
3181 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
3182 "width": 42, # The width of the image in pixels.
3183 "meteringMode": "A String", # The metering mode used to create the photo.
3184 "flashUsed": True or False, # Whether a flash was used to create the photo.
3185 "aperture": 3.14, # The aperture used to create the photo (f-number).
3186 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
3187 "sensor": "A String", # The type of sensor used to create the photo.
3188 "whiteBalance": "A String", # The white balance mode used to create the photo.
3189 "cameraModel": "A String", # The model of the camera used to create the photo.
3190 },
3191 "description": "A String", # A short description of the file.
3192 "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 -08003193 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
3194 "width": 42, # The width of the video in pixels.
3195 "durationMillis": "A String", # The duration of the video in milliseconds.
3196 "height": 42, # The height of the video in pixels.
3197 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003198 "editable": True or False, # Whether the file can be edited by the current user. Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04003199 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003200 "canComment": True or False, # Whether the current user can comment on the file. Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04003201 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Takashi Matsuo06694102015-09-11 13:55:40 -07003202 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07003203 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003204 "teamDriveId": "A String", # ID of the Team Drive the file resides in.
John Asmuth614db982014-04-24 15:46:26 -04003205 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003206 { # A key-value pair attached to a file that is either public or private to an application.
3207 # The following limits apply to file properties:
3208 # - Maximum of 100 properties total per file
3209 # - Maximum of 30 private properties per app
3210 # - Maximum of 30 public properties
3211 # - 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 -04003212 "kind": "drive#property", # This is always drive#property.
3213 "value": "A String", # The value of this property.
3214 "etag": "A String", # ETag of the property.
3215 "visibility": "A String", # The visibility of this property.
3216 "key": "A String", # The key of this property.
3217 "selfLink": "A String", # The link back to this property.
3218 },
3219 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07003220 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003221 "iconLink": "A String", # A link to the file's icon.
3222 "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.
3223 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07003224 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
John Asmuth614db982014-04-24 15:46:26 -04003225 "title": "A String", # The title of this file.
3226 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003227 "thumbnail": { # A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail.
Takashi Matsuo06694102015-09-11 13:55:40 -07003228 "mimeType": "A String", # The MIME type of the thumbnail.
3229 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
3230 },
3231 "downloadUrl": "A String",
John Asmuth614db982014-04-24 15:46:26 -04003232 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
3233 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07003234 "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.
John Asmuth614db982014-04-24 15:46:26 -04003235 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003236 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
3237 {
3238 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
3239 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
3240 # - organizer
3241 # - reader
3242 # - writer
3243 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3244 "A String",
3245 ],
3246 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
3247 # - file
3248 # - member
3249 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3250 },
3251 ],
John Asmuth614db982014-04-24 15:46:26 -04003252 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003253 "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.
3254 "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.
John Asmuth614db982014-04-24 15:46:26 -04003255 "authKey": "A String", # The authkey parameter required for this permission.
3256 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08003257 "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 -04003258 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
3259 # - They can only be set on user and group permissions
3260 # - The date must be in the future
3261 # - The date cannot be more than a year in the future
3262 # - The date can only be set on drive.permissions.update requests
3263 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
3264 # - organizer
John Asmuth614db982014-04-24 15:46:26 -04003265 # - owner
3266 # - reader
3267 # - writer
3268 "type": "A String", # The account type. Allowed values are:
3269 # - user
3270 # - group
3271 # - domain
3272 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003273 "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 -04003274 "A String",
3275 ],
3276 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003277 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04003278 },
Takashi Matsuo06694102015-09-11 13:55:40 -07003279 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003280 "A String",
3281 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003282 "shareable": True or False, # Whether the file's sharing settings can be modified by the current user. Deprecated: use capabilities/canShare.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003283 "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 Drive.
Takashi Matsuo06694102015-09-11 13:55:40 -07003284 "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 Drive; it is not populated for Google Docs or shortcut files.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003285 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for Team Drive files.
Takashi Matsuo06694102015-09-11 13:55:40 -07003286 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003287 "selfLink": "A String", # A link back to this file.
3288 "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.
3289 }</pre>
3290</div>
3291
3292<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003293 <code class="details" id="untrash">untrash(fileId, supportsTeamDrives=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04003294 <pre>Restores a file from the trash.
3295
3296Args:
3297 fileId: string, The ID of the file to untrash. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003298 supportsTeamDrives: boolean, Whether the requesting application supports Team Drives.
John Asmuth614db982014-04-24 15:46:26 -04003299
3300Returns:
3301 An object of the form:
3302
3303 { # The metadata for a file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003304 "hasThumbnail": True or False, # Whether this file has a thumbnail.
John Asmuth614db982014-04-24 15:46:26 -04003305 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003306 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -07003307 "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.
3308 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003309 "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 -04003310 "labels": { # A group of labels for the file.
Takashi Matsuo06694102015-09-11 13:55:40 -07003311 "restricted": True or False, # Whether viewers and commenters are prevented from downloading, printing, and copying this file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003312 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003313 "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 -08003314 "hidden": True or False, # Deprecated.
3315 "starred": True or False, # Whether this file is starred by the user.
3316 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04003317 },
3318 "indexableText": { # Indexable text attributes for the file (can only be written)
3319 "text": "A String", # The text to be indexed for this file.
3320 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003321 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07003322 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003323 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04003324 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003325 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for Team Drive files.
3326 "owners": [ # The owner(s) of this file. Not populated for Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003327 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04003328 "picture": { # The user's profile picture.
3329 "url": "A String", # A URL that points to a profile picture of this user.
3330 },
3331 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04003332 "displayName": "A String", # A plain text displayable name for this user.
3333 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07003334 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3335 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04003336 },
3337 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003338 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -04003339 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003340 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07003341 "picture": { # The user's profile picture.
3342 "url": "A String", # A URL that points to a profile picture of this user.
3343 },
3344 "kind": "drive#user", # This is always drive#user.
3345 "displayName": "A String", # A plain text displayable name for this user.
3346 "permissionId": "A String", # The user's ID as visible in the permissions collection.
3347 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3348 "emailAddress": "A String", # The email address of the user.
3349 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003350 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for Team Drive files.
3351 "picture": { # The user's profile picture.
3352 "url": "A String", # A URL that points to a profile picture of this user.
3353 },
3354 "kind": "drive#user", # This is always drive#user.
3355 "displayName": "A String", # A plain text displayable name for this user.
3356 "permissionId": "A String", # The user's ID as visible in the permissions collection.
3357 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3358 "emailAddress": "A String", # The email address of the user.
3359 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003360 "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 -07003361 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04003362 "picture": { # The user's profile picture.
3363 "url": "A String", # A URL that points to a profile picture of this user.
3364 },
3365 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04003366 "displayName": "A String", # A plain text displayable name for this user.
3367 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07003368 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3369 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04003370 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003371 "copyable": True or False, # Whether the file can be copied by the current user. Deprecated: use capabilities/canCopy.
3372 "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 Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003373 "markedViewedByMeDate": "A String", # Deprecated.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003374 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -04003375 "A String",
3376 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003377 "capabilities": { # Capabilities the current user has on the file. Each capability corresponds to a fine-grained action that a user may take.
3378 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. For a Team Drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
3379 "canTrash": True or False, # Whether the file can be trashed by the current user.
3380 "canCopy": True or False, # Whether the file can be copied by the current user. For a Team Drive item, whether non-folder descendants of this item, or this item itself if it is not a folder, can be copied.
3381 "canShare": True or False, # Whether the file's sharing settings can be modified by the current user.
3382 "canDelete": True or False, # Whether the file can be deleted by the current user.
3383 "canMoveTeamDriveItem": True or False, # Whether the current user can move this Team Drive item by changing its parent. Note that a request to change the parent for this item may still fail depending on the new parent that is being added. Only populated for Team Drive files.
3384 "canRename": True or False, # Whether the file can be renamed by the current user.
3385 "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.
3386 "canMoveItemIntoTeamDrive": True or False, # Whether the current user can move this item into a Team Drive. If the item is in a Team Drive, this field is equivalent to canMoveTeamDriveItem.
3387 "canDownload": True or False, # Whether the file can be downloaded by the current user.
3388 "canComment": True or False, # Whether the current user can comment on the file.
3389 "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.
3390 "canReadTeamDrive": True or False, # Whether the current user has read access to the Team Drive to which this file belongs. Only populated for Team Drive files.
3391 "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.
3392 "canEdit": True or False, # Whether the file can be edited by the current user.
3393 "canUntrash": True or False, # Whether the file can be restored from the trash by the current user.
3394 },
John Asmuth614db982014-04-24 15:46:26 -04003395 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
3396 "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.
3397 "etag": "A String", # ETag of the file.
3398 "parents": [ # Collection of parent folders which contain this file.
3399 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
3400 { # A reference to a file's parent.
3401 "selfLink": "A String", # A link back to this reference.
3402 "kind": "drive#parentReference", # This is always drive#parentReference.
3403 "id": "A String", # The ID of the parent.
3404 "isRoot": True or False, # Whether or not the parent is the root folder.
3405 "parentLink": "A String", # A link to the parent.
3406 },
3407 ],
3408 "exportLinks": { # Links for exporting Google Docs to specific formats.
3409 "a_key": "A String", # A mapping from export format to URL
3410 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003411 "shared": True or False, # Whether the file has been shared. Not populated for Team Drive files.
3412 "permissions": [ # The list of permissions for users with access to this file. Not populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -07003413 { # A permission for a file.
3414 "withLink": True or False, # Whether the link is required for this permission.
3415 "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.
3416 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003417 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
3418 {
3419 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
3420 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
3421 # - organizer
3422 # - reader
3423 # - writer
3424 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3425 "A String",
3426 ],
3427 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
3428 # - file
3429 # - member
3430 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3431 },
3432 ],
Craig Citro065b5302014-08-14 00:47:23 -07003433 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003434 "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.
3435 "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.
Craig Citro065b5302014-08-14 00:47:23 -07003436 "authKey": "A String", # The authkey parameter required for this permission.
3437 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08003438 "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 -04003439 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
3440 # - They can only be set on user and group permissions
3441 # - The date must be in the future
3442 # - The date cannot be more than a year in the future
3443 # - The date can only be set on drive.permissions.update requests
3444 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
3445 # - organizer
Craig Citro065b5302014-08-14 00:47:23 -07003446 # - owner
3447 # - reader
3448 # - writer
3449 "type": "A String", # The account type. Allowed values are:
3450 # - user
3451 # - group
3452 # - domain
3453 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003454 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
Craig Citro065b5302014-08-14 00:47:23 -07003455 "A String",
3456 ],
3457 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003458 "photoLink": "A String", # A link to the profile photo, if available.
Craig Citro065b5302014-08-14 00:47:23 -07003459 },
3460 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07003461 "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 Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003462 "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.
3463 "a_key": "A String",
3464 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003465 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04003466 "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.
3467 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
3468 "exposureTime": 3.14, # The length of the exposure, in seconds.
3469 "cameraMake": "A String", # The make of the camera used to create the photo.
3470 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
3471 "isoSpeed": 42, # The ISO speed used to create the photo.
3472 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
3473 "exposureMode": "A String", # The exposure mode used to create the photo.
3474 "colorSpace": "A String", # The color space of the photo.
3475 "location": { # Geographic location information stored in the image.
3476 "latitude": 3.14, # The latitude stored in the image.
3477 "altitude": 3.14, # The altitude stored in the image.
3478 "longitude": 3.14, # The longitude stored in the image.
3479 },
3480 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
3481 "height": 42, # The height of the image in pixels.
3482 "lens": "A String", # The lens used to create the photo.
3483 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
3484 "width": 42, # The width of the image in pixels.
3485 "meteringMode": "A String", # The metering mode used to create the photo.
3486 "flashUsed": True or False, # Whether a flash was used to create the photo.
3487 "aperture": 3.14, # The aperture used to create the photo (f-number).
3488 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
3489 "sensor": "A String", # The type of sensor used to create the photo.
3490 "whiteBalance": "A String", # The white balance mode used to create the photo.
3491 "cameraModel": "A String", # The model of the camera used to create the photo.
3492 },
3493 "description": "A String", # A short description of the file.
3494 "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 -08003495 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
3496 "width": 42, # The width of the video in pixels.
3497 "durationMillis": "A String", # The duration of the video in milliseconds.
3498 "height": 42, # The height of the video in pixels.
3499 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003500 "editable": True or False, # Whether the file can be edited by the current user. Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04003501 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003502 "canComment": True or False, # Whether the current user can comment on the file. Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04003503 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Takashi Matsuo06694102015-09-11 13:55:40 -07003504 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07003505 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003506 "teamDriveId": "A String", # ID of the Team Drive the file resides in.
John Asmuth614db982014-04-24 15:46:26 -04003507 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003508 { # A key-value pair attached to a file that is either public or private to an application.
3509 # The following limits apply to file properties:
3510 # - Maximum of 100 properties total per file
3511 # - Maximum of 30 private properties per app
3512 # - Maximum of 30 public properties
3513 # - 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 -04003514 "kind": "drive#property", # This is always drive#property.
3515 "value": "A String", # The value of this property.
3516 "etag": "A String", # ETag of the property.
3517 "visibility": "A String", # The visibility of this property.
3518 "key": "A String", # The key of this property.
3519 "selfLink": "A String", # The link back to this property.
3520 },
3521 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07003522 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003523 "iconLink": "A String", # A link to the file's icon.
3524 "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.
3525 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07003526 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
John Asmuth614db982014-04-24 15:46:26 -04003527 "title": "A String", # The title of this file.
3528 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003529 "thumbnail": { # A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail.
Takashi Matsuo06694102015-09-11 13:55:40 -07003530 "mimeType": "A String", # The MIME type of the thumbnail.
3531 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
3532 },
3533 "downloadUrl": "A String",
John Asmuth614db982014-04-24 15:46:26 -04003534 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
3535 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07003536 "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.
John Asmuth614db982014-04-24 15:46:26 -04003537 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003538 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
3539 {
3540 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
3541 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
3542 # - organizer
3543 # - reader
3544 # - writer
3545 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3546 "A String",
3547 ],
3548 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
3549 # - file
3550 # - member
3551 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3552 },
3553 ],
John Asmuth614db982014-04-24 15:46:26 -04003554 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003555 "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.
3556 "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.
John Asmuth614db982014-04-24 15:46:26 -04003557 "authKey": "A String", # The authkey parameter required for this permission.
3558 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08003559 "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 -04003560 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
3561 # - They can only be set on user and group permissions
3562 # - The date must be in the future
3563 # - The date cannot be more than a year in the future
3564 # - The date can only be set on drive.permissions.update requests
3565 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
3566 # - organizer
John Asmuth614db982014-04-24 15:46:26 -04003567 # - owner
3568 # - reader
3569 # - writer
3570 "type": "A String", # The account type. Allowed values are:
3571 # - user
3572 # - group
3573 # - domain
3574 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003575 "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 -04003576 "A String",
3577 ],
3578 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003579 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04003580 },
Takashi Matsuo06694102015-09-11 13:55:40 -07003581 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003582 "A String",
3583 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003584 "shareable": True or False, # Whether the file's sharing settings can be modified by the current user. Deprecated: use capabilities/canShare.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003585 "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 Drive.
Takashi Matsuo06694102015-09-11 13:55:40 -07003586 "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 Drive; it is not populated for Google Docs or shortcut files.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003587 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for Team Drive files.
Takashi Matsuo06694102015-09-11 13:55:40 -07003588 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003589 "selfLink": "A String", # A link back to this file.
3590 "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.
3591 }</pre>
3592</div>
3593
3594<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003595 <code class="details" id="update">update(fileId, body=None, supportsTeamDrives=None, newRevision=None, modifiedDateBehavior=None, media_body=None, ocrLanguage=None, ocr=None, pinned=None, addParents=None, removeParents=None, updateViewedDate=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=None, media_mime_type=None, setModifiedDate=None, timedTextLanguage=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04003596 <pre>Updates file metadata and/or content.
3597
3598Args:
3599 fileId: string, The ID of the file to update. (required)
3600 body: object, The request body.
3601 The object takes the form of:
3602
3603{ # The metadata for a file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003604 "hasThumbnail": True or False, # Whether this file has a thumbnail.
John Asmuth614db982014-04-24 15:46:26 -04003605 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003606 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -07003607 "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.
3608 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003609 "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 -04003610 "labels": { # A group of labels for the file.
Takashi Matsuo06694102015-09-11 13:55:40 -07003611 "restricted": True or False, # Whether viewers and commenters are prevented from downloading, printing, and copying this file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003612 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003613 "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 -08003614 "hidden": True or False, # Deprecated.
3615 "starred": True or False, # Whether this file is starred by the user.
3616 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04003617 },
3618 "indexableText": { # Indexable text attributes for the file (can only be written)
3619 "text": "A String", # The text to be indexed for this file.
3620 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003621 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07003622 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003623 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04003624 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003625 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for Team Drive files.
3626 "owners": [ # The owner(s) of this file. Not populated for Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003627 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04003628 "picture": { # The user's profile picture.
3629 "url": "A String", # A URL that points to a profile picture of this user.
3630 },
3631 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04003632 "displayName": "A String", # A plain text displayable name for this user.
3633 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07003634 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3635 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04003636 },
3637 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003638 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -04003639 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003640 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07003641 "picture": { # The user's profile picture.
3642 "url": "A String", # A URL that points to a profile picture of this user.
3643 },
3644 "kind": "drive#user", # This is always drive#user.
3645 "displayName": "A String", # A plain text displayable name for this user.
3646 "permissionId": "A String", # The user's ID as visible in the permissions collection.
3647 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3648 "emailAddress": "A String", # The email address of the user.
3649 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003650 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for Team Drive files.
3651 "picture": { # The user's profile picture.
3652 "url": "A String", # A URL that points to a profile picture of this user.
3653 },
3654 "kind": "drive#user", # This is always drive#user.
3655 "displayName": "A String", # A plain text displayable name for this user.
3656 "permissionId": "A String", # The user's ID as visible in the permissions collection.
3657 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3658 "emailAddress": "A String", # The email address of the user.
3659 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003660 "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 -07003661 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04003662 "picture": { # The user's profile picture.
3663 "url": "A String", # A URL that points to a profile picture of this user.
3664 },
3665 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04003666 "displayName": "A String", # A plain text displayable name for this user.
3667 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07003668 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3669 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04003670 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003671 "copyable": True or False, # Whether the file can be copied by the current user. Deprecated: use capabilities/canCopy.
3672 "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 Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003673 "markedViewedByMeDate": "A String", # Deprecated.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003674 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -04003675 "A String",
3676 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003677 "capabilities": { # Capabilities the current user has on the file. Each capability corresponds to a fine-grained action that a user may take.
3678 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. For a Team Drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
3679 "canTrash": True or False, # Whether the file can be trashed by the current user.
3680 "canCopy": True or False, # Whether the file can be copied by the current user. For a Team Drive item, whether non-folder descendants of this item, or this item itself if it is not a folder, can be copied.
3681 "canShare": True or False, # Whether the file's sharing settings can be modified by the current user.
3682 "canDelete": True or False, # Whether the file can be deleted by the current user.
3683 "canMoveTeamDriveItem": True or False, # Whether the current user can move this Team Drive item by changing its parent. Note that a request to change the parent for this item may still fail depending on the new parent that is being added. Only populated for Team Drive files.
3684 "canRename": True or False, # Whether the file can be renamed by the current user.
3685 "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.
3686 "canMoveItemIntoTeamDrive": True or False, # Whether the current user can move this item into a Team Drive. If the item is in a Team Drive, this field is equivalent to canMoveTeamDriveItem.
3687 "canDownload": True or False, # Whether the file can be downloaded by the current user.
3688 "canComment": True or False, # Whether the current user can comment on the file.
3689 "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.
3690 "canReadTeamDrive": True or False, # Whether the current user has read access to the Team Drive to which this file belongs. Only populated for Team Drive files.
3691 "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.
3692 "canEdit": True or False, # Whether the file can be edited by the current user.
3693 "canUntrash": True or False, # Whether the file can be restored from the trash by the current user.
3694 },
John Asmuth614db982014-04-24 15:46:26 -04003695 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
3696 "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.
3697 "etag": "A String", # ETag of the file.
3698 "parents": [ # Collection of parent folders which contain this file.
3699 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
3700 { # A reference to a file's parent.
3701 "selfLink": "A String", # A link back to this reference.
3702 "kind": "drive#parentReference", # This is always drive#parentReference.
3703 "id": "A String", # The ID of the parent.
3704 "isRoot": True or False, # Whether or not the parent is the root folder.
3705 "parentLink": "A String", # A link to the parent.
3706 },
3707 ],
3708 "exportLinks": { # Links for exporting Google Docs to specific formats.
3709 "a_key": "A String", # A mapping from export format to URL
3710 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003711 "shared": True or False, # Whether the file has been shared. Not populated for Team Drive files.
3712 "permissions": [ # The list of permissions for users with access to this file. Not populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -07003713 { # A permission for a file.
3714 "withLink": True or False, # Whether the link is required for this permission.
3715 "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.
3716 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003717 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
3718 {
3719 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
3720 "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
3722 # - reader
3723 # - writer
3724 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3725 "A String",
3726 ],
3727 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
3728 # - file
3729 # - member
3730 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3731 },
3732 ],
Craig Citro065b5302014-08-14 00:47:23 -07003733 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003734 "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.
3735 "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.
Craig Citro065b5302014-08-14 00:47:23 -07003736 "authKey": "A String", # The authkey parameter required for this permission.
3737 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08003738 "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 -04003739 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
3740 # - They can only be set on user and group permissions
3741 # - The date must be in the future
3742 # - The date cannot be more than a year in the future
3743 # - The date can only be set on drive.permissions.update requests
3744 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
3745 # - organizer
Craig Citro065b5302014-08-14 00:47:23 -07003746 # - owner
3747 # - reader
3748 # - writer
3749 "type": "A String", # The account type. Allowed values are:
3750 # - user
3751 # - group
3752 # - domain
3753 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003754 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
Craig Citro065b5302014-08-14 00:47:23 -07003755 "A String",
3756 ],
3757 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003758 "photoLink": "A String", # A link to the profile photo, if available.
Craig Citro065b5302014-08-14 00:47:23 -07003759 },
3760 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07003761 "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 Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003762 "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.
3763 "a_key": "A String",
3764 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003765 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04003766 "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.
3767 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
3768 "exposureTime": 3.14, # The length of the exposure, in seconds.
3769 "cameraMake": "A String", # The make of the camera used to create the photo.
3770 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
3771 "isoSpeed": 42, # The ISO speed used to create the photo.
3772 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
3773 "exposureMode": "A String", # The exposure mode used to create the photo.
3774 "colorSpace": "A String", # The color space of the photo.
3775 "location": { # Geographic location information stored in the image.
3776 "latitude": 3.14, # The latitude stored in the image.
3777 "altitude": 3.14, # The altitude stored in the image.
3778 "longitude": 3.14, # The longitude stored in the image.
3779 },
3780 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
3781 "height": 42, # The height of the image in pixels.
3782 "lens": "A String", # The lens used to create the photo.
3783 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
3784 "width": 42, # The width of the image in pixels.
3785 "meteringMode": "A String", # The metering mode used to create the photo.
3786 "flashUsed": True or False, # Whether a flash was used to create the photo.
3787 "aperture": 3.14, # The aperture used to create the photo (f-number).
3788 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
3789 "sensor": "A String", # The type of sensor used to create the photo.
3790 "whiteBalance": "A String", # The white balance mode used to create the photo.
3791 "cameraModel": "A String", # The model of the camera used to create the photo.
3792 },
3793 "description": "A String", # A short description of the file.
3794 "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 -08003795 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
3796 "width": 42, # The width of the video in pixels.
3797 "durationMillis": "A String", # The duration of the video in milliseconds.
3798 "height": 42, # The height of the video in pixels.
3799 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003800 "editable": True or False, # Whether the file can be edited by the current user. Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04003801 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003802 "canComment": True or False, # Whether the current user can comment on the file. Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04003803 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Takashi Matsuo06694102015-09-11 13:55:40 -07003804 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07003805 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003806 "teamDriveId": "A String", # ID of the Team Drive the file resides in.
John Asmuth614db982014-04-24 15:46:26 -04003807 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003808 { # A key-value pair attached to a file that is either public or private to an application.
3809 # The following limits apply to file properties:
3810 # - Maximum of 100 properties total per file
3811 # - Maximum of 30 private properties per app
3812 # - Maximum of 30 public properties
3813 # - 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 -04003814 "kind": "drive#property", # This is always drive#property.
3815 "value": "A String", # The value of this property.
3816 "etag": "A String", # ETag of the property.
3817 "visibility": "A String", # The visibility of this property.
3818 "key": "A String", # The key of this property.
3819 "selfLink": "A String", # The link back to this property.
3820 },
3821 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07003822 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003823 "iconLink": "A String", # A link to the file's icon.
3824 "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.
3825 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07003826 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
John Asmuth614db982014-04-24 15:46:26 -04003827 "title": "A String", # The title of this file.
3828 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003829 "thumbnail": { # A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail.
Takashi Matsuo06694102015-09-11 13:55:40 -07003830 "mimeType": "A String", # The MIME type of the thumbnail.
3831 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
3832 },
3833 "downloadUrl": "A String",
John Asmuth614db982014-04-24 15:46:26 -04003834 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
3835 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07003836 "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.
John Asmuth614db982014-04-24 15:46:26 -04003837 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003838 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
3839 {
3840 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
3841 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
3842 # - organizer
3843 # - reader
3844 # - writer
3845 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3846 "A String",
3847 ],
3848 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
3849 # - file
3850 # - member
3851 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3852 },
3853 ],
John Asmuth614db982014-04-24 15:46:26 -04003854 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003855 "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.
3856 "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.
John Asmuth614db982014-04-24 15:46:26 -04003857 "authKey": "A String", # The authkey parameter required for this permission.
3858 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08003859 "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 -04003860 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
3861 # - They can only be set on user and group permissions
3862 # - The date must be in the future
3863 # - The date cannot be more than a year in the future
3864 # - The date can only be set on drive.permissions.update requests
3865 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
3866 # - organizer
John Asmuth614db982014-04-24 15:46:26 -04003867 # - owner
3868 # - reader
3869 # - writer
3870 "type": "A String", # The account type. Allowed values are:
3871 # - user
3872 # - group
3873 # - domain
3874 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003875 "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 -04003876 "A String",
3877 ],
3878 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003879 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04003880 },
Takashi Matsuo06694102015-09-11 13:55:40 -07003881 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003882 "A String",
3883 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003884 "shareable": True or False, # Whether the file's sharing settings can be modified by the current user. Deprecated: use capabilities/canShare.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003885 "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 Drive.
Takashi Matsuo06694102015-09-11 13:55:40 -07003886 "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 Drive; it is not populated for Google Docs or shortcut files.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003887 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for Team Drive files.
Takashi Matsuo06694102015-09-11 13:55:40 -07003888 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04003889 "selfLink": "A String", # A link back to this file.
3890 "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.
3891}
3892
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003893 supportsTeamDrives: boolean, Whether the requesting application supports Team Drives.
Takashi Matsuo06694102015-09-11 13:55:40 -07003894 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.
3895 modifiedDateBehavior: string, Determines the behavior in which modifiedDate is updated. This overrides setModifiedDate.
3896 Allowed values
3897 fromBody - Set modifiedDate to the value provided in the body of the request. No change if no value was provided.
3898 fromBodyIfNeeded - Set modifiedDate to the value provided in the body of the request depending on other contents of the update.
3899 fromBodyOrNow - Set modifiedDate to the value provided in the body of the request, or to the current time if no value was provided.
3900 noChange - Maintain the previous value of modifiedDate.
3901 now - Set modifiedDate to the current time.
3902 nowIfNeeded - Set modifiedDate to the current time depending on contents of the update.
John Asmuth614db982014-04-24 15:46:26 -04003903 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003904 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
John Asmuth614db982014-04-24 15:46:26 -04003905 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07003906 pinned: boolean, Whether to pin the new revision. A file can have a maximum of 200 pinned revisions.
Craig Citro065b5302014-08-14 00:47:23 -07003907 addParents: string, Comma-separated list of parent IDs to add.
3908 removeParents: string, Comma-separated list of parent IDs to remove.
John Asmuth614db982014-04-24 15:46:26 -04003909 updateViewedDate: boolean, Whether to update the view date after successfully updating the file.
3910 timedTextTrackName: string, The timed text track name.
Takashi Matsuo06694102015-09-11 13:55:40 -07003911 convert: boolean, This parameter is deprecated and has no function.
John Asmuth614db982014-04-24 15:46:26 -04003912 useContentAsIndexableText: boolean, Whether to use the content as indexable text.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003913 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
John Asmuth614db982014-04-24 15:46:26 -04003914 setModifiedDate: boolean, Whether to set the modified date with the supplied modified date.
3915 timedTextLanguage: string, The language of the timed text.
3916
3917Returns:
3918 An object of the form:
3919
3920 { # The metadata for a file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003921 "hasThumbnail": True or False, # Whether this file has a thumbnail.
John Asmuth614db982014-04-24 15:46:26 -04003922 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003923 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -07003924 "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.
3925 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003926 "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 -04003927 "labels": { # A group of labels for the file.
Takashi Matsuo06694102015-09-11 13:55:40 -07003928 "restricted": True or False, # Whether viewers and commenters are prevented from downloading, printing, and copying this file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003929 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003930 "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 -08003931 "hidden": True or False, # Deprecated.
3932 "starred": True or False, # Whether this file is starred by the user.
3933 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -04003934 },
3935 "indexableText": { # Indexable text attributes for the file (can only be written)
3936 "text": "A String", # The text to be indexed for this file.
3937 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003938 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -07003939 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003940 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -04003941 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003942 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for Team Drive files.
3943 "owners": [ # The owner(s) of this file. Not populated for Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003944 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -04003945 "picture": { # The user's profile picture.
3946 "url": "A String", # A URL that points to a profile picture of this user.
3947 },
3948 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04003949 "displayName": "A String", # A plain text displayable name for this user.
3950 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07003951 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3952 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04003953 },
3954 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003955 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -04003956 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003957 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -07003958 "picture": { # The user's profile picture.
3959 "url": "A String", # A URL that points to a profile picture of this user.
3960 },
3961 "kind": "drive#user", # This is always drive#user.
3962 "displayName": "A String", # A plain text displayable name for this user.
3963 "permissionId": "A String", # The user's ID as visible in the permissions collection.
3964 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3965 "emailAddress": "A String", # The email address of the user.
3966 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003967 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for Team Drive files.
3968 "picture": { # The user's profile picture.
3969 "url": "A String", # A URL that points to a profile picture of this user.
3970 },
3971 "kind": "drive#user", # This is always drive#user.
3972 "displayName": "A String", # A plain text displayable name for this user.
3973 "permissionId": "A String", # The user's ID as visible in the permissions collection.
3974 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3975 "emailAddress": "A String", # The email address of the user.
3976 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003977 "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 -07003978 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -04003979 "picture": { # The user's profile picture.
3980 "url": "A String", # A URL that points to a profile picture of this user.
3981 },
3982 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -04003983 "displayName": "A String", # A plain text displayable name for this user.
3984 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -07003985 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3986 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -04003987 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003988 "copyable": True or False, # Whether the file can be copied by the current user. Deprecated: use capabilities/canCopy.
3989 "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 Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003990 "markedViewedByMeDate": "A String", # Deprecated.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003991 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -04003992 "A String",
3993 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003994 "capabilities": { # Capabilities the current user has on the file. Each capability corresponds to a fine-grained action that a user may take.
3995 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. For a Team Drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
3996 "canTrash": True or False, # Whether the file can be trashed by the current user.
3997 "canCopy": True or False, # Whether the file can be copied by the current user. For a Team Drive item, whether non-folder descendants of this item, or this item itself if it is not a folder, can be copied.
3998 "canShare": True or False, # Whether the file's sharing settings can be modified by the current user.
3999 "canDelete": True or False, # Whether the file can be deleted by the current user.
4000 "canMoveTeamDriveItem": True or False, # Whether the current user can move this Team Drive item by changing its parent. Note that a request to change the parent for this item may still fail depending on the new parent that is being added. Only populated for Team Drive files.
4001 "canRename": True or False, # Whether the file can be renamed by the current user.
4002 "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.
4003 "canMoveItemIntoTeamDrive": True or False, # Whether the current user can move this item into a Team Drive. If the item is in a Team Drive, this field is equivalent to canMoveTeamDriveItem.
4004 "canDownload": True or False, # Whether the file can be downloaded by the current user.
4005 "canComment": True or False, # Whether the current user can comment on the file.
4006 "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.
4007 "canReadTeamDrive": True or False, # Whether the current user has read access to the Team Drive to which this file belongs. Only populated for Team Drive files.
4008 "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.
4009 "canEdit": True or False, # Whether the file can be edited by the current user.
4010 "canUntrash": True or False, # Whether the file can be restored from the trash by the current user.
4011 },
John Asmuth614db982014-04-24 15:46:26 -04004012 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
4013 "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.
4014 "etag": "A String", # ETag of the file.
4015 "parents": [ # Collection of parent folders which contain this file.
4016 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
4017 { # A reference to a file's parent.
4018 "selfLink": "A String", # A link back to this reference.
4019 "kind": "drive#parentReference", # This is always drive#parentReference.
4020 "id": "A String", # The ID of the parent.
4021 "isRoot": True or False, # Whether or not the parent is the root folder.
4022 "parentLink": "A String", # A link to the parent.
4023 },
4024 ],
4025 "exportLinks": { # Links for exporting Google Docs to specific formats.
4026 "a_key": "A String", # A mapping from export format to URL
4027 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004028 "shared": True or False, # Whether the file has been shared. Not populated for Team Drive files.
4029 "permissions": [ # The list of permissions for users with access to this file. Not populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -07004030 { # A permission for a file.
4031 "withLink": True or False, # Whether the link is required for this permission.
4032 "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.
4033 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004034 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
4035 {
4036 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
4037 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
4038 # - organizer
4039 # - reader
4040 # - writer
4041 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4042 "A String",
4043 ],
4044 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
4045 # - file
4046 # - member
4047 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4048 },
4049 ],
Craig Citro065b5302014-08-14 00:47:23 -07004050 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004051 "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.
4052 "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.
Craig Citro065b5302014-08-14 00:47:23 -07004053 "authKey": "A String", # The authkey parameter required for this permission.
4054 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08004055 "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 -04004056 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
4057 # - They can only be set on user and group permissions
4058 # - The date must be in the future
4059 # - The date cannot be more than a year in the future
4060 # - The date can only be set on drive.permissions.update requests
4061 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
4062 # - organizer
Craig Citro065b5302014-08-14 00:47:23 -07004063 # - owner
4064 # - reader
4065 # - writer
4066 "type": "A String", # The account type. Allowed values are:
4067 # - user
4068 # - group
4069 # - domain
4070 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004071 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
Craig Citro065b5302014-08-14 00:47:23 -07004072 "A String",
4073 ],
4074 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004075 "photoLink": "A String", # A link to the profile photo, if available.
Craig Citro065b5302014-08-14 00:47:23 -07004076 },
4077 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07004078 "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 Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04004079 "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.
4080 "a_key": "A String",
4081 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004082 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -04004083 "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.
4084 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
4085 "exposureTime": 3.14, # The length of the exposure, in seconds.
4086 "cameraMake": "A String", # The make of the camera used to create the photo.
4087 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
4088 "isoSpeed": 42, # The ISO speed used to create the photo.
4089 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
4090 "exposureMode": "A String", # The exposure mode used to create the photo.
4091 "colorSpace": "A String", # The color space of the photo.
4092 "location": { # Geographic location information stored in the image.
4093 "latitude": 3.14, # The latitude stored in the image.
4094 "altitude": 3.14, # The altitude stored in the image.
4095 "longitude": 3.14, # The longitude stored in the image.
4096 },
4097 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
4098 "height": 42, # The height of the image in pixels.
4099 "lens": "A String", # The lens used to create the photo.
4100 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
4101 "width": 42, # The width of the image in pixels.
4102 "meteringMode": "A String", # The metering mode used to create the photo.
4103 "flashUsed": True or False, # Whether a flash was used to create the photo.
4104 "aperture": 3.14, # The aperture used to create the photo (f-number).
4105 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
4106 "sensor": "A String", # The type of sensor used to create the photo.
4107 "whiteBalance": "A String", # The white balance mode used to create the photo.
4108 "cameraModel": "A String", # The model of the camera used to create the photo.
4109 },
4110 "description": "A String", # A short description of the file.
4111 "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 -08004112 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
4113 "width": 42, # The width of the video in pixels.
4114 "durationMillis": "A String", # The duration of the video in milliseconds.
4115 "height": 42, # The height of the video in pixels.
4116 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004117 "editable": True or False, # Whether the file can be edited by the current user. Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -04004118 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004119 "canComment": True or False, # Whether the current user can comment on the file. Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -04004120 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Takashi Matsuo06694102015-09-11 13:55:40 -07004121 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07004122 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004123 "teamDriveId": "A String", # ID of the Team Drive the file resides in.
John Asmuth614db982014-04-24 15:46:26 -04004124 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004125 { # A key-value pair attached to a file that is either public or private to an application.
4126 # The following limits apply to file properties:
4127 # - Maximum of 100 properties total per file
4128 # - Maximum of 30 private properties per app
4129 # - Maximum of 30 public properties
4130 # - 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 -04004131 "kind": "drive#property", # This is always drive#property.
4132 "value": "A String", # The value of this property.
4133 "etag": "A String", # ETag of the property.
4134 "visibility": "A String", # The visibility of this property.
4135 "key": "A String", # The key of this property.
4136 "selfLink": "A String", # The link back to this property.
4137 },
4138 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07004139 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04004140 "iconLink": "A String", # A link to the file's icon.
4141 "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.
4142 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07004143 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
John Asmuth614db982014-04-24 15:46:26 -04004144 "title": "A String", # The title of this file.
4145 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004146 "thumbnail": { # A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail.
Takashi Matsuo06694102015-09-11 13:55:40 -07004147 "mimeType": "A String", # The MIME type of the thumbnail.
4148 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
4149 },
4150 "downloadUrl": "A String",
John Asmuth614db982014-04-24 15:46:26 -04004151 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
4152 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -07004153 "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.
John Asmuth614db982014-04-24 15:46:26 -04004154 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004155 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
4156 {
4157 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
4158 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
4159 # - organizer
4160 # - reader
4161 # - writer
4162 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4163 "A String",
4164 ],
4165 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
4166 # - file
4167 # - member
4168 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4169 },
4170 ],
John Asmuth614db982014-04-24 15:46:26 -04004171 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004172 "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.
4173 "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.
John Asmuth614db982014-04-24 15:46:26 -04004174 "authKey": "A String", # The authkey parameter required for this permission.
4175 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -08004176 "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 -04004177 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
4178 # - They can only be set on user and group permissions
4179 # - The date must be in the future
4180 # - The date cannot be more than a year in the future
4181 # - The date can only be set on drive.permissions.update requests
4182 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
4183 # - organizer
John Asmuth614db982014-04-24 15:46:26 -04004184 # - owner
4185 # - reader
4186 # - writer
4187 "type": "A String", # The account type. Allowed values are:
4188 # - user
4189 # - group
4190 # - domain
4191 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004192 "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 -04004193 "A String",
4194 ],
4195 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004196 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -04004197 },
Takashi Matsuo06694102015-09-11 13:55:40 -07004198 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004199 "A String",
4200 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004201 "shareable": True or False, # Whether the file's sharing settings can be modified by the current user. Deprecated: use capabilities/canShare.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004202 "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 Drive.
Takashi Matsuo06694102015-09-11 13:55:40 -07004203 "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 Drive; it is not populated for Google Docs or shortcut files.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004204 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for Team Drive files.
Takashi Matsuo06694102015-09-11 13:55:40 -07004205 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -04004206 "selfLink": "A String", # A link back to this file.
4207 "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.
4208 }</pre>
4209</div>
4210
4211<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004212 <code class="details" id="watch">watch(fileId, body, projection=None, revisionId=None, supportsTeamDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04004213 <pre>Subscribe to changes on a file
4214
4215Args:
4216 fileId: string, The ID for the file in question. (required)
4217 body: object, The request body. (required)
4218 The object takes the form of:
4219
4220{ # An notification channel used to watch for resource changes.
4221 "resourceUri": "A String", # A version-specific identifier for the watched resource.
4222 "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel".
4223 "resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
4224 "payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional.
4225 "token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
4226 "params": { # Additional parameters controlling delivery channel behavior. Optional.
4227 "a_key": "A String", # Declares a new parameter by name.
4228 },
4229 "expiration": "A String", # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
4230 "address": "A String", # The address where notifications are delivered for this channel.
4231 "type": "A String", # The type of delivery mechanism used for this channel.
4232 "id": "A String", # A UUID or similar unique string that identifies this channel.
4233 }
4234
4235 projection: string, This parameter is deprecated and has no function.
4236 Allowed values
4237 BASIC - Deprecated
4238 FULL - Deprecated
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004239 revisionId: string, Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004240 supportsTeamDrives: boolean, Whether the requesting application supports Team Drives.
Craig Citroe633be12015-03-02 13:40:36 -08004241 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004242 updateViewedDate: boolean, Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
John Asmuth614db982014-04-24 15:46:26 -04004243
4244Returns:
4245 An object of the form:
4246
4247 { # An notification channel used to watch for resource changes.
4248 "resourceUri": "A String", # A version-specific identifier for the watched resource.
4249 "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel".
4250 "resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
4251 "payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional.
4252 "token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
4253 "params": { # Additional parameters controlling delivery channel behavior. Optional.
4254 "a_key": "A String", # Declares a new parameter by name.
4255 },
4256 "expiration": "A String", # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
4257 "address": "A String", # The address where notifications are delivered for this channel.
4258 "type": "A String", # The type of delivery mechanism used for this channel.
4259 "id": "A String", # A UUID or similar unique string that identifies this channel.
4260 }</pre>
4261</div>
4262
Craig Citroe633be12015-03-02 13:40:36 -08004263<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004264 <code class="details" id="watch_media">watch_media(fileId, body, projection=None, revisionId=None, supportsTeamDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08004265 <pre>Subscribe to changes on a file
4266
4267Args:
4268 fileId: string, The ID for the file in question. (required)
4269 body: object, The request body. (required)
4270 The object takes the form of:
4271
4272{ # An notification channel used to watch for resource changes.
4273 "resourceUri": "A String", # A version-specific identifier for the watched resource.
4274 "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel".
4275 "resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
4276 "payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional.
4277 "token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
4278 "params": { # Additional parameters controlling delivery channel behavior. Optional.
4279 "a_key": "A String", # Declares a new parameter by name.
4280 },
4281 "expiration": "A String", # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
4282 "address": "A String", # The address where notifications are delivered for this channel.
4283 "type": "A String", # The type of delivery mechanism used for this channel.
4284 "id": "A String", # A UUID or similar unique string that identifies this channel.
4285 }
4286
4287 projection: string, This parameter is deprecated and has no function.
4288 Allowed values
4289 BASIC - Deprecated
4290 FULL - Deprecated
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004291 revisionId: string, Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004292 supportsTeamDrives: boolean, Whether the requesting application supports Team Drives.
Craig Citroe633be12015-03-02 13:40:36 -08004293 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004294 updateViewedDate: boolean, Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
Craig Citroe633be12015-03-02 13:40:36 -08004295
4296Returns:
4297 The media object as a string.
4298
4299 </pre>
4300</div>
4301
John Asmuth614db982014-04-24 15:46:26 -04004302</body></html>