blob: 75670340f0e82b4c624c54fc7cf6b1e09f77729a [file] [log] [blame]
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="drive_v3.html">Drive API</a> . <a href="drive_v3.files.html">files</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
81 <code><a href="#copy">copy(fileId, body=None, enforceSingleParent=None, ignoreDefaultVisibility=None, includePermissionsForView=None, keepRevisionForever=None, ocrLanguage=None, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070082<p class="firstline">Creates a copy of a file and applies any requested updates with patch semantics. Folders cannot be copied.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080083<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070084 <code><a href="#create">create(body=None, enforceSingleParent=None, ignoreDefaultVisibility=None, includePermissionsForView=None, keepRevisionForever=None, ocrLanguage=None, supportsAllDrives=None, supportsTeamDrives=None, useContentAsIndexableText=None, media_body=None, media_mime_type=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080085<p class="firstline">Creates a new file.</p>
86<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070087 <code><a href="#delete">delete(fileId, enforceSingleParent=None, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080089<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070090 <code><a href="#emptyTrash">emptyTrash(enforceSingleParent=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080091<p class="firstline">Permanently deletes all of the user's trashed files.</p>
92<p class="toc_element">
93 <code><a href="#export">export(fileId, mimeType)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080095<p class="toc_element">
96 <code><a href="#export_media">export_media(fileId, mimeType)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080098<p class="toc_element">
99 <code><a href="#generateIds">generateIds(count=None, space=None)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -0700100<p class="firstline">Generates a set of file IDs which can be provided in create or copy requests.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800101<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700102 <code><a href="#get">get(fileId, acknowledgeAbuse=None, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800103<p class="firstline">Gets a file's metadata or content by ID.</p>
104<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700105 <code><a href="#get_media">get_media(fileId, acknowledgeAbuse=None, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800106<p class="firstline">Gets a file's metadata or content by ID.</p>
107<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700108 <code><a href="#list">list(corpora=None, corpus=None, driveId=None, includeItemsFromAllDrives=None, includePermissionsForView=None, includeTeamDriveItems=None, orderBy=None, pageSize=None, pageToken=None, q=None, spaces=None, supportsAllDrives=None, supportsTeamDrives=None, teamDriveId=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800109<p class="firstline">Lists or searches files.</p>
110<p class="toc_element">
111 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
112<p class="firstline">Retrieves the next page of results.</p>
113<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700114 <code><a href="#update">update(fileId, body=None, addParents=None, enforceSingleParent=None, includePermissionsForView=None, keepRevisionForever=None, ocrLanguage=None, removeParents=None, supportsAllDrives=None, supportsTeamDrives=None, useContentAsIndexableText=None, media_body=None, media_mime_type=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700115<p class="firstline">Updates a file's metadata and/or content. This method supports patch semantics.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800116<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700117 <code><a href="#watch">watch(fileId, body=None, acknowledgeAbuse=None, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800118<p class="firstline">Subscribes to changes to a file</p>
119<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700120 <code><a href="#watch_media">watch_media(fileId, body=None, acknowledgeAbuse=None, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800121<p class="firstline">Subscribes to changes to a file</p>
122<h3>Method Details</h3>
123<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700124 <code class="details" id="close">close()</code>
125 <pre>Close httplib2 connections.</pre>
126</div>
127
128<div class="method">
129 <code class="details" id="copy">copy(fileId, body=None, enforceSingleParent=None, ignoreDefaultVisibility=None, includePermissionsForView=None, keepRevisionForever=None, ocrLanguage=None, supportsAllDrives=None, supportsTeamDrives=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700130 <pre>Creates a copy of a file and applies any requested updates with patch semantics. Folders cannot be copied.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800131
132Args:
133 fileId: string, The ID of the file. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700134 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800135 The object takes the form of:
136
137{ # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700138 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
139 # Entries with null values are cleared in update and copy requests.
140 &quot;a_key&quot;: &quot;A String&quot;,
141 },
142 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
143 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700144 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700145 &quot;canAddMyDriveParent&quot;: True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
146 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
147 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
148 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
149 &quot;canCopy&quot;: True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
150 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
151 &quot;canDeleteChildren&quot;: True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
152 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
153 &quot;canEdit&quot;: True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent.
154 &quot;canListChildren&quot;: True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
155 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700156 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700157 &quot;canMoveChildrenOutOfDrive&quot;: True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
158 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700159 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user&#x27;s access to the child and to the destination folder.
Bu Sun Kim65020912020-05-20 12:08:20 -0700160 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
161 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
162 &quot;canMoveItemOutOfDrive&quot;: True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
163 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700164 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed.
Bu Sun Kim65020912020-05-20 12:08:20 -0700165 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
166 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
167 &quot;canReadDrive&quot;: True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
168 &quot;canReadRevisions&quot;: True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
169 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
170 &quot;canRemoveChildren&quot;: True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
171 &quot;canRemoveMyDriveParent&quot;: True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
172 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
173 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
174 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
175 &quot;canTrashChildren&quot;: True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
176 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
177 },
178 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
179 &quot;indexableText&quot;: &quot;A String&quot;, # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements.
180 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
181 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
182 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
183 },
184 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700185 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
186 { # A restriction for accessing the content of the file.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700187 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700188 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
189 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
190 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
191 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
192 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
193 &quot;me&quot;: True or False, # Whether this user is the requesting user.
194 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
195 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
196 },
197 &quot;restrictionTime&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
198 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
199 },
200 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700201 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
202 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
203 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
204 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
205 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700206 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
Bu Sun Kim65020912020-05-20 12:08:20 -0700207 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
208 },
209 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
210 &quot;folderColorRgb&quot;: &quot;A String&quot;, # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
211 # If an unsupported color is specified, the closest color in the palette will be used instead.
212 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. This is only available for files with binary content in Google Drive.
213 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
214 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
215 &quot;hasThumbnail&quot;: True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
216 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This is currently only available for files with binary content in Google Drive.
217 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
218 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
219 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
220 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
221 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
222 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
223 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
224 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
225 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
226 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
227 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
228 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
229 &quot;height&quot;: 42, # The height of the image in pixels.
230 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
231 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
232 &quot;location&quot;: { # Geographic location information stored in the image.
233 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
234 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
235 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
236 },
237 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
238 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
239 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
240 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
241 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
242 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
243 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
244 &quot;width&quot;: 42, # The width of the image in pixels.
245 },
246 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
247 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
248 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
249 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
250 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
251 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
252 &quot;me&quot;: True or False, # Whether this user is the requesting user.
253 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
254 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
255 },
256 &quot;md5Checksum&quot;: &quot;A String&quot;, # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.
257 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700258 # Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800259 # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700260 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
261 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
262 &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the file was modified by anyone (RFC 3339 date-time).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800263 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700264 &quot;name&quot;: &quot;A String&quot;, # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant.
265 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive.
266 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
267 &quot;owners&quot;: [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800268 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700269 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
270 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
271 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
272 &quot;me&quot;: True or False, # Whether this user is the requesting user.
273 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
274 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800275 },
276 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700277 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
278 # If not specified as part of a create request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list.
279 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800280 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700281 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
282 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700283 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700284 &quot;permissions&quot;: [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700285 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700286 &quot;allowFileDiscovery&quot;: True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
287 &quot;deleted&quot;: True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
288 &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
289 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
290 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
291 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700292 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -0700293 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
294 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
295 &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
296 # - They can only be set on user and group permissions
297 # - The time must be in the future
298 # - The time cannot be more than a year in the future
299 &quot;id&quot;: &quot;A String&quot;, # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.
300 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
301 &quot;permissionDetails&quot;: [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700302 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700303 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
304 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
305 &quot;permissionType&quot;: &quot;A String&quot;, # The permission type for this user. While new values may be added in future, the following are currently possible:
306 # - file
307 # - member
308 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700309 # - organizer
310 # - fileOrganizer
311 # - writer
312 # - commenter
313 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700314 },
315 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700316 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
317 &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700318 # - owner
319 # - organizer
320 # - fileOrganizer
321 # - writer
322 # - commenter
323 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700324 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
325 {
326 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
327 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
328 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
329 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
330 },
331 ],
332 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700333 # - user
334 # - group
335 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -0700336 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn&#x27;t extra information required for a anyone type.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700337 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700338 },
339 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700340 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
341 # Entries with null values are cleared in update and copy requests.
342 &quot;a_key&quot;: &quot;A String&quot;,
343 },
344 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.
345 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
346 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
347 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
348 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
349 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
350 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
351 &quot;me&quot;: True or False, # Whether this user is the requesting user.
352 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
353 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
354 },
355 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
356 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
357 &quot;targetMimeType&quot;: &quot;A String&quot;, # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target&#x27;s MIME type, captured when the shortcut is created.
358 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700359 &quot;size&quot;: &quot;A String&quot;, # The size of the file&#x27;s content in bytes. This is applicable to binary files in Google Drive and Google Docs files.
Bu Sun Kim65020912020-05-20 12:08:20 -0700360 &quot;spaces&quot;: [ # The list of spaces which contain the file. The currently supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
361 &quot;A String&quot;,
362 ],
363 &quot;starred&quot;: True or False, # Whether the user has starred the file.
364 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700365 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content. If the file isn&#x27;t shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700366 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700367 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700368 &quot;trashedTime&quot;: &quot;A String&quot;, # The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives.
369 &quot;trashingUser&quot;: { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
370 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
371 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
372 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
373 &quot;me&quot;: True or False, # Whether this user is the requesting user.
374 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
375 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
376 },
377 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.
378 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
379 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
380 &quot;height&quot;: 42, # The height of the video in pixels.
381 &quot;width&quot;: 42, # The width of the video in pixels.
382 },
383 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
384 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
385 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
386 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.
387 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
388 &quot;writersCanShare&quot;: True or False, # Whether users with only writer permission can modify the file&#x27;s permissions. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800389}
390
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800391 enforceSingleParent: boolean, Deprecated. Copying files into multiple folders is no longer supported. Use shortcuts instead.
Bu Sun Kim65020912020-05-20 12:08:20 -0700392 ignoreDefaultVisibility: boolean, Whether to ignore the domain&#x27;s default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700393 includePermissionsForView: string, Specifies which additional view&#x27;s permissions to include in the response. Only &#x27;published&#x27; is supported.
Bu Sun Kim65020912020-05-20 12:08:20 -0700394 keepRevisionForever: boolean, Whether to set the &#x27;keepForever&#x27; field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions.
Dan O'Mearadd494642020-05-01 07:42:23 -0700395 ocrLanguage: string, A language hint for OCR processing during image import (ISO 639-1 code).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700396 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700397 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800398
399Returns:
400 An object of the form:
401
402 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700403 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
404 # Entries with null values are cleared in update and copy requests.
405 &quot;a_key&quot;: &quot;A String&quot;,
406 },
407 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
408 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700409 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700410 &quot;canAddMyDriveParent&quot;: True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
411 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
412 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
413 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
414 &quot;canCopy&quot;: True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
415 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
416 &quot;canDeleteChildren&quot;: True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
417 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
418 &quot;canEdit&quot;: True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent.
419 &quot;canListChildren&quot;: True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
420 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700421 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700422 &quot;canMoveChildrenOutOfDrive&quot;: True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
423 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700424 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user&#x27;s access to the child and to the destination folder.
Bu Sun Kim65020912020-05-20 12:08:20 -0700425 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
426 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
427 &quot;canMoveItemOutOfDrive&quot;: True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
428 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700429 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed.
Bu Sun Kim65020912020-05-20 12:08:20 -0700430 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
431 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
432 &quot;canReadDrive&quot;: True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
433 &quot;canReadRevisions&quot;: True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
434 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
435 &quot;canRemoveChildren&quot;: True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
436 &quot;canRemoveMyDriveParent&quot;: True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
437 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
438 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
439 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
440 &quot;canTrashChildren&quot;: True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
441 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
442 },
443 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
444 &quot;indexableText&quot;: &quot;A String&quot;, # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements.
445 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
446 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
447 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
448 },
449 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700450 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
451 { # A restriction for accessing the content of the file.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700452 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700453 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
454 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
455 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
456 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
457 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
458 &quot;me&quot;: True or False, # Whether this user is the requesting user.
459 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
460 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
461 },
462 &quot;restrictionTime&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
463 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
464 },
465 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700466 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
467 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
468 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
469 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
470 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700471 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
Bu Sun Kim65020912020-05-20 12:08:20 -0700472 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
473 },
474 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
475 &quot;folderColorRgb&quot;: &quot;A String&quot;, # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
476 # If an unsupported color is specified, the closest color in the palette will be used instead.
477 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. This is only available for files with binary content in Google Drive.
478 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
479 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
480 &quot;hasThumbnail&quot;: True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
481 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This is currently only available for files with binary content in Google Drive.
482 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
483 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
484 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
485 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
486 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
487 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
488 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
489 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
490 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
491 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
492 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
493 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
494 &quot;height&quot;: 42, # The height of the image in pixels.
495 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
496 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
497 &quot;location&quot;: { # Geographic location information stored in the image.
498 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
499 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
500 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
501 },
502 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
503 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
504 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
505 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
506 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
507 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
508 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
509 &quot;width&quot;: 42, # The width of the image in pixels.
510 },
511 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
512 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
513 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
514 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
515 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
516 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
517 &quot;me&quot;: True or False, # Whether this user is the requesting user.
518 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
519 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
520 },
521 &quot;md5Checksum&quot;: &quot;A String&quot;, # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.
522 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700523 # Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800524 # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700525 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
526 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
527 &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the file was modified by anyone (RFC 3339 date-time).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800528 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700529 &quot;name&quot;: &quot;A String&quot;, # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant.
530 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive.
531 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
532 &quot;owners&quot;: [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800533 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700534 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
535 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
536 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
537 &quot;me&quot;: True or False, # Whether this user is the requesting user.
538 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
539 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800540 },
541 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700542 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
543 # If not specified as part of a create request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list.
544 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800545 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700546 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
547 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700548 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700549 &quot;permissions&quot;: [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700550 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700551 &quot;allowFileDiscovery&quot;: True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
552 &quot;deleted&quot;: True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
553 &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
554 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
555 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
556 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700557 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -0700558 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
559 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
560 &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
561 # - They can only be set on user and group permissions
562 # - The time must be in the future
563 # - The time cannot be more than a year in the future
564 &quot;id&quot;: &quot;A String&quot;, # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.
565 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
566 &quot;permissionDetails&quot;: [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700567 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700568 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
569 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
570 &quot;permissionType&quot;: &quot;A String&quot;, # The permission type for this user. While new values may be added in future, the following are currently possible:
571 # - file
572 # - member
573 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700574 # - organizer
575 # - fileOrganizer
576 # - writer
577 # - commenter
578 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700579 },
580 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700581 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
582 &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700583 # - owner
584 # - organizer
585 # - fileOrganizer
586 # - writer
587 # - commenter
588 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700589 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
590 {
591 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
592 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
593 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
594 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
595 },
596 ],
597 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700598 # - user
599 # - group
600 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -0700601 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn&#x27;t extra information required for a anyone type.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700602 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700603 },
604 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700605 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
606 # Entries with null values are cleared in update and copy requests.
607 &quot;a_key&quot;: &quot;A String&quot;,
608 },
609 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.
610 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
611 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
612 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
613 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
614 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
615 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
616 &quot;me&quot;: True or False, # Whether this user is the requesting user.
617 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
618 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
619 },
620 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
621 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
622 &quot;targetMimeType&quot;: &quot;A String&quot;, # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target&#x27;s MIME type, captured when the shortcut is created.
623 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700624 &quot;size&quot;: &quot;A String&quot;, # The size of the file&#x27;s content in bytes. This is applicable to binary files in Google Drive and Google Docs files.
Bu Sun Kim65020912020-05-20 12:08:20 -0700625 &quot;spaces&quot;: [ # The list of spaces which contain the file. The currently supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
626 &quot;A String&quot;,
627 ],
628 &quot;starred&quot;: True or False, # Whether the user has starred the file.
629 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700630 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content. If the file isn&#x27;t shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700631 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700632 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700633 &quot;trashedTime&quot;: &quot;A String&quot;, # The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives.
634 &quot;trashingUser&quot;: { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
635 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
636 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
637 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
638 &quot;me&quot;: True or False, # Whether this user is the requesting user.
639 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
640 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
641 },
642 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.
643 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
644 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
645 &quot;height&quot;: 42, # The height of the video in pixels.
646 &quot;width&quot;: 42, # The width of the video in pixels.
647 },
648 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
649 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
650 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
651 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.
652 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
653 &quot;writersCanShare&quot;: True or False, # Whether users with only writer permission can modify the file&#x27;s permissions. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800654 }</pre>
655</div>
656
657<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700658 <code class="details" id="create">create(body=None, enforceSingleParent=None, ignoreDefaultVisibility=None, includePermissionsForView=None, keepRevisionForever=None, ocrLanguage=None, supportsAllDrives=None, supportsTeamDrives=None, useContentAsIndexableText=None, media_body=None, media_mime_type=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800659 <pre>Creates a new file.
660
661Args:
662 body: object, The request body.
663 The object takes the form of:
664
665{ # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700666 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
667 # Entries with null values are cleared in update and copy requests.
668 &quot;a_key&quot;: &quot;A String&quot;,
669 },
670 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
671 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700672 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700673 &quot;canAddMyDriveParent&quot;: True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
674 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
675 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
676 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
677 &quot;canCopy&quot;: True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
678 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
679 &quot;canDeleteChildren&quot;: True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
680 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
681 &quot;canEdit&quot;: True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent.
682 &quot;canListChildren&quot;: True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
683 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700684 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700685 &quot;canMoveChildrenOutOfDrive&quot;: True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
686 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700687 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user&#x27;s access to the child and to the destination folder.
Bu Sun Kim65020912020-05-20 12:08:20 -0700688 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
689 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
690 &quot;canMoveItemOutOfDrive&quot;: True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
691 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700692 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed.
Bu Sun Kim65020912020-05-20 12:08:20 -0700693 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
694 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
695 &quot;canReadDrive&quot;: True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
696 &quot;canReadRevisions&quot;: True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
697 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
698 &quot;canRemoveChildren&quot;: True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
699 &quot;canRemoveMyDriveParent&quot;: True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
700 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
701 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
702 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
703 &quot;canTrashChildren&quot;: True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
704 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
705 },
706 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
707 &quot;indexableText&quot;: &quot;A String&quot;, # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements.
708 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
709 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
710 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
711 },
712 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700713 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
714 { # A restriction for accessing the content of the file.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700715 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700716 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
717 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
718 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
719 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
720 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
721 &quot;me&quot;: True or False, # Whether this user is the requesting user.
722 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
723 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
724 },
725 &quot;restrictionTime&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
726 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
727 },
728 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700729 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
730 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
731 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
732 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
733 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700734 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
Bu Sun Kim65020912020-05-20 12:08:20 -0700735 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
736 },
737 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
738 &quot;folderColorRgb&quot;: &quot;A String&quot;, # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
739 # If an unsupported color is specified, the closest color in the palette will be used instead.
740 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. This is only available for files with binary content in Google Drive.
741 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
742 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
743 &quot;hasThumbnail&quot;: True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
744 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This is currently only available for files with binary content in Google Drive.
745 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
746 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
747 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
748 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
749 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
750 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
751 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
752 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
753 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
754 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
755 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
756 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
757 &quot;height&quot;: 42, # The height of the image in pixels.
758 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
759 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
760 &quot;location&quot;: { # Geographic location information stored in the image.
761 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
762 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
763 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
764 },
765 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
766 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
767 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
768 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
769 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
770 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
771 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
772 &quot;width&quot;: 42, # The width of the image in pixels.
773 },
774 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
775 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
776 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
777 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
778 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
779 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
780 &quot;me&quot;: True or False, # Whether this user is the requesting user.
781 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
782 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
783 },
784 &quot;md5Checksum&quot;: &quot;A String&quot;, # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.
785 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700786 # Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800787 # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700788 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
789 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
790 &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the file was modified by anyone (RFC 3339 date-time).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800791 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700792 &quot;name&quot;: &quot;A String&quot;, # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant.
793 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive.
794 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
795 &quot;owners&quot;: [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800796 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700797 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
798 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
799 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
800 &quot;me&quot;: True or False, # Whether this user is the requesting user.
801 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
802 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800803 },
804 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700805 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
806 # If not specified as part of a create request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list.
807 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800808 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700809 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
810 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700811 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700812 &quot;permissions&quot;: [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700813 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700814 &quot;allowFileDiscovery&quot;: True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
815 &quot;deleted&quot;: True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
816 &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
817 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
818 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
819 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700820 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -0700821 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
822 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
823 &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
824 # - They can only be set on user and group permissions
825 # - The time must be in the future
826 # - The time cannot be more than a year in the future
827 &quot;id&quot;: &quot;A String&quot;, # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.
828 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
829 &quot;permissionDetails&quot;: [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700830 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700831 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
832 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
833 &quot;permissionType&quot;: &quot;A String&quot;, # The permission type for this user. While new values may be added in future, the following are currently possible:
834 # - file
835 # - member
836 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700837 # - organizer
838 # - fileOrganizer
839 # - writer
840 # - commenter
841 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700842 },
843 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700844 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
845 &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700846 # - owner
847 # - organizer
848 # - fileOrganizer
849 # - writer
850 # - commenter
851 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700852 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
853 {
854 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
855 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
856 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
857 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
858 },
859 ],
860 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700861 # - user
862 # - group
863 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -0700864 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn&#x27;t extra information required for a anyone type.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700865 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700866 },
867 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700868 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
869 # Entries with null values are cleared in update and copy requests.
870 &quot;a_key&quot;: &quot;A String&quot;,
871 },
872 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.
873 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
874 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
875 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
876 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
877 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
878 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
879 &quot;me&quot;: True or False, # Whether this user is the requesting user.
880 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
881 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
882 },
883 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
884 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
885 &quot;targetMimeType&quot;: &quot;A String&quot;, # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target&#x27;s MIME type, captured when the shortcut is created.
886 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700887 &quot;size&quot;: &quot;A String&quot;, # The size of the file&#x27;s content in bytes. This is applicable to binary files in Google Drive and Google Docs files.
Bu Sun Kim65020912020-05-20 12:08:20 -0700888 &quot;spaces&quot;: [ # The list of spaces which contain the file. The currently supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
889 &quot;A String&quot;,
890 ],
891 &quot;starred&quot;: True or False, # Whether the user has starred the file.
892 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700893 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content. If the file isn&#x27;t shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700894 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700895 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700896 &quot;trashedTime&quot;: &quot;A String&quot;, # The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives.
897 &quot;trashingUser&quot;: { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
898 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
899 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
900 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
901 &quot;me&quot;: True or False, # Whether this user is the requesting user.
902 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
903 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
904 },
905 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.
906 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
907 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
908 &quot;height&quot;: 42, # The height of the video in pixels.
909 &quot;width&quot;: 42, # The width of the video in pixels.
910 },
911 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
912 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
913 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
914 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.
915 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
916 &quot;writersCanShare&quot;: True or False, # Whether users with only writer permission can modify the file&#x27;s permissions. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800917}
918
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800919 enforceSingleParent: boolean, Deprecated. Creating files in multiple folders is no longer supported.
Bu Sun Kim65020912020-05-20 12:08:20 -0700920 ignoreDefaultVisibility: boolean, Whether to ignore the domain&#x27;s default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700921 includePermissionsForView: string, Specifies which additional view&#x27;s permissions to include in the response. Only &#x27;published&#x27; is supported.
Bu Sun Kim65020912020-05-20 12:08:20 -0700922 keepRevisionForever: boolean, Whether to set the &#x27;keepForever&#x27; field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400923 ocrLanguage: string, A language hint for OCR processing during image import (ISO 639-1 code).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700924 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700925 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
926 useContentAsIndexableText: boolean, Whether to use the uploaded content as indexable text.
927 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700928 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800929
930Returns:
931 An object of the form:
932
933 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700934 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
935 # Entries with null values are cleared in update and copy requests.
936 &quot;a_key&quot;: &quot;A String&quot;,
937 },
938 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
939 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700940 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700941 &quot;canAddMyDriveParent&quot;: True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
942 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
943 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
944 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
945 &quot;canCopy&quot;: True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
946 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
947 &quot;canDeleteChildren&quot;: True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
948 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
949 &quot;canEdit&quot;: True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent.
950 &quot;canListChildren&quot;: True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
951 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700952 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700953 &quot;canMoveChildrenOutOfDrive&quot;: True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
954 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700955 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user&#x27;s access to the child and to the destination folder.
Bu Sun Kim65020912020-05-20 12:08:20 -0700956 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
957 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
958 &quot;canMoveItemOutOfDrive&quot;: True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
959 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700960 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed.
Bu Sun Kim65020912020-05-20 12:08:20 -0700961 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
962 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
963 &quot;canReadDrive&quot;: True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
964 &quot;canReadRevisions&quot;: True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
965 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
966 &quot;canRemoveChildren&quot;: True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
967 &quot;canRemoveMyDriveParent&quot;: True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
968 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
969 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
970 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
971 &quot;canTrashChildren&quot;: True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
972 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
973 },
974 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
975 &quot;indexableText&quot;: &quot;A String&quot;, # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements.
976 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
977 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
978 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
979 },
980 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700981 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
982 { # A restriction for accessing the content of the file.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700983 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700984 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
985 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
986 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
987 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
988 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
989 &quot;me&quot;: True or False, # Whether this user is the requesting user.
990 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
991 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
992 },
993 &quot;restrictionTime&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
994 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
995 },
996 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700997 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
998 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
999 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
1000 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1001 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001002 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
Bu Sun Kim65020912020-05-20 12:08:20 -07001003 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
1004 },
1005 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
1006 &quot;folderColorRgb&quot;: &quot;A String&quot;, # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
1007 # If an unsupported color is specified, the closest color in the palette will be used instead.
1008 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. This is only available for files with binary content in Google Drive.
1009 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
1010 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1011 &quot;hasThumbnail&quot;: True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
1012 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This is currently only available for files with binary content in Google Drive.
1013 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
1014 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1015 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
1016 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1017 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1018 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1019 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1020 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1021 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1022 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1023 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1024 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1025 &quot;height&quot;: 42, # The height of the image in pixels.
1026 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1027 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1028 &quot;location&quot;: { # Geographic location information stored in the image.
1029 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1030 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1031 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1032 },
1033 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1034 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1035 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1036 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1037 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1038 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
1039 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1040 &quot;width&quot;: 42, # The width of the image in pixels.
1041 },
1042 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1043 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
1044 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
1045 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1046 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1047 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1048 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1049 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1050 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1051 },
1052 &quot;md5Checksum&quot;: &quot;A String&quot;, # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.
1053 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001054 # Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001055 # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001056 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
1057 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
1058 &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the file was modified by anyone (RFC 3339 date-time).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001059 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001060 &quot;name&quot;: &quot;A String&quot;, # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant.
1061 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive.
1062 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
1063 &quot;owners&quot;: [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001064 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001065 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1066 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1067 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1068 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1069 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1070 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001071 },
1072 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001073 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
1074 # If not specified as part of a create request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list.
1075 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001076 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001077 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1078 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001079 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001080 &quot;permissions&quot;: [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001081 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001082 &quot;allowFileDiscovery&quot;: True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
1083 &quot;deleted&quot;: True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
1084 &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
1085 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
1086 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
1087 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001088 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -07001089 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
1090 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
1091 &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
1092 # - They can only be set on user and group permissions
1093 # - The time must be in the future
1094 # - The time cannot be more than a year in the future
1095 &quot;id&quot;: &quot;A String&quot;, # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.
1096 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
1097 &quot;permissionDetails&quot;: [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001098 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001099 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1100 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1101 &quot;permissionType&quot;: &quot;A String&quot;, # The permission type for this user. While new values may be added in future, the following are currently possible:
1102 # - file
1103 # - member
1104 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001105 # - organizer
1106 # - fileOrganizer
1107 # - writer
1108 # - commenter
1109 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001110 },
1111 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001112 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1113 &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001114 # - owner
1115 # - organizer
1116 # - fileOrganizer
1117 # - writer
1118 # - commenter
1119 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07001120 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1121 {
1122 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1123 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1124 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1125 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1126 },
1127 ],
1128 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001129 # - user
1130 # - group
1131 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -07001132 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn&#x27;t extra information required for a anyone type.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001133 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001134 },
1135 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001136 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
1137 # Entries with null values are cleared in update and copy requests.
1138 &quot;a_key&quot;: &quot;A String&quot;,
1139 },
1140 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.
1141 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
1142 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
1143 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
1144 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1145 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1146 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1147 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1148 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1149 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1150 },
1151 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
1152 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
1153 &quot;targetMimeType&quot;: &quot;A String&quot;, # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target&#x27;s MIME type, captured when the shortcut is created.
1154 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001155 &quot;size&quot;: &quot;A String&quot;, # The size of the file&#x27;s content in bytes. This is applicable to binary files in Google Drive and Google Docs files.
Bu Sun Kim65020912020-05-20 12:08:20 -07001156 &quot;spaces&quot;: [ # The list of spaces which contain the file. The currently supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
1157 &quot;A String&quot;,
1158 ],
1159 &quot;starred&quot;: True or False, # Whether the user has starred the file.
1160 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001161 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content. If the file isn&#x27;t shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request.
Bu Sun Kim65020912020-05-20 12:08:20 -07001162 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001163 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001164 &quot;trashedTime&quot;: &quot;A String&quot;, # The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives.
1165 &quot;trashingUser&quot;: { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
1166 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1167 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1168 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1169 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1170 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1171 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1172 },
1173 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.
1174 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
1175 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
1176 &quot;height&quot;: 42, # The height of the video in pixels.
1177 &quot;width&quot;: 42, # The width of the video in pixels.
1178 },
1179 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
1180 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
1181 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
1182 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.
1183 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
1184 &quot;writersCanShare&quot;: True or False, # Whether users with only writer permission can modify the file&#x27;s permissions. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001185 }</pre>
1186</div>
1187
1188<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001189 <code class="details" id="delete">delete(fileId, enforceSingleParent=None, supportsAllDrives=None, supportsTeamDrives=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001190 <pre>Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001191
1192Args:
1193 fileId: string, The ID of the file. (required)
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001194 enforceSingleParent: boolean, Deprecated. If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner&#x27;s root.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001195 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001196 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001197</pre>
1198</div>
1199
1200<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001201 <code class="details" id="emptyTrash">emptyTrash(enforceSingleParent=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07001202 <pre>Permanently deletes all of the user&#x27;s trashed files.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001203
1204Args:
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001205 enforceSingleParent: boolean, Deprecated. If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner&#x27;s root.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001206</pre>
1207</div>
1208
1209<div class="method">
1210 <code class="details" id="export">export(fileId, mimeType)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001211 <pre>Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001212
1213Args:
1214 fileId: string, The ID of the file. (required)
1215 mimeType: string, The MIME type of the format requested for this export. (required)
1216</pre>
1217</div>
1218
1219<div class="method">
1220 <code class="details" id="export_media">export_media(fileId, mimeType)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001221 <pre>Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001222
1223Args:
1224 fileId: string, The ID of the file. (required)
1225 mimeType: string, The MIME type of the format requested for this export. (required)
1226</pre>
1227</div>
1228
1229<div class="method">
1230 <code class="details" id="generateIds">generateIds(count=None, space=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -07001231 <pre>Generates a set of file IDs which can be provided in create or copy requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001232
1233Args:
1234 count: integer, The number of IDs to return.
Bu Sun Kim65020912020-05-20 12:08:20 -07001235 space: string, The space in which the IDs can be used to create new files. Supported values are &#x27;drive&#x27; and &#x27;appDataFolder&#x27;.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001236
1237Returns:
1238 An object of the form:
1239
1240 { # A list of generated file IDs which can be provided in create requests.
Bu Sun Kim65020912020-05-20 12:08:20 -07001241 &quot;ids&quot;: [ # The IDs generated for the requesting user in the specified space.
1242 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001243 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001244 &quot;kind&quot;: &quot;drive#generatedIds&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#generatedIds&quot;.
1245 &quot;space&quot;: &quot;A String&quot;, # The type of file that can be created with these IDs.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001246 }</pre>
1247</div>
1248
1249<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001250 <code class="details" id="get">get(fileId, acknowledgeAbuse=None, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07001251 <pre>Gets a file&#x27;s metadata or content by ID.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001252
1253Args:
1254 fileId: string, The ID of the file. (required)
1255 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001256 includePermissionsForView: string, Specifies which additional view&#x27;s permissions to include in the response. Only &#x27;published&#x27; is supported.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001257 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001258 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001259
1260Returns:
1261 An object of the form:
1262
1263 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001264 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
1265 # Entries with null values are cleared in update and copy requests.
1266 &quot;a_key&quot;: &quot;A String&quot;,
1267 },
1268 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
1269 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001270 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001271 &quot;canAddMyDriveParent&quot;: True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
1272 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1273 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
1274 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
1275 &quot;canCopy&quot;: True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
1276 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
1277 &quot;canDeleteChildren&quot;: True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
1278 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
1279 &quot;canEdit&quot;: True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent.
1280 &quot;canListChildren&quot;: True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
1281 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001282 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001283 &quot;canMoveChildrenOutOfDrive&quot;: True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
1284 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001285 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user&#x27;s access to the child and to the destination folder.
Bu Sun Kim65020912020-05-20 12:08:20 -07001286 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1287 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1288 &quot;canMoveItemOutOfDrive&quot;: True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
1289 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001290 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed.
Bu Sun Kim65020912020-05-20 12:08:20 -07001291 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
1292 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1293 &quot;canReadDrive&quot;: True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
1294 &quot;canReadRevisions&quot;: True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
1295 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
1296 &quot;canRemoveChildren&quot;: True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
1297 &quot;canRemoveMyDriveParent&quot;: True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
1298 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
1299 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
1300 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
1301 &quot;canTrashChildren&quot;: True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
1302 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
1303 },
1304 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
1305 &quot;indexableText&quot;: &quot;A String&quot;, # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements.
1306 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
1307 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
1308 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
1309 },
1310 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001311 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
1312 { # A restriction for accessing the content of the file.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001313 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001314 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
1315 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
1316 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1317 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1318 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1319 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1320 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1321 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1322 },
1323 &quot;restrictionTime&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
1324 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
1325 },
1326 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001327 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1328 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
1329 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
1330 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1331 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001332 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
Bu Sun Kim65020912020-05-20 12:08:20 -07001333 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
1334 },
1335 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
1336 &quot;folderColorRgb&quot;: &quot;A String&quot;, # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
1337 # If an unsupported color is specified, the closest color in the palette will be used instead.
1338 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. This is only available for files with binary content in Google Drive.
1339 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
1340 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1341 &quot;hasThumbnail&quot;: True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
1342 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This is currently only available for files with binary content in Google Drive.
1343 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
1344 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1345 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
1346 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1347 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1348 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1349 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1350 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1351 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1352 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1353 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1354 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1355 &quot;height&quot;: 42, # The height of the image in pixels.
1356 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1357 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1358 &quot;location&quot;: { # Geographic location information stored in the image.
1359 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1360 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1361 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1362 },
1363 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1364 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1365 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1366 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1367 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1368 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
1369 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1370 &quot;width&quot;: 42, # The width of the image in pixels.
1371 },
1372 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1373 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
1374 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
1375 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1376 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1377 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1378 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1379 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1380 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1381 },
1382 &quot;md5Checksum&quot;: &quot;A String&quot;, # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.
1383 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001384 # Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001385 # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001386 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
1387 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
1388 &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the file was modified by anyone (RFC 3339 date-time).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001389 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001390 &quot;name&quot;: &quot;A String&quot;, # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant.
1391 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive.
1392 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
1393 &quot;owners&quot;: [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001394 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001395 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1396 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1397 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1398 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1399 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1400 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001401 },
1402 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001403 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
1404 # If not specified as part of a create request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list.
1405 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001406 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001407 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1408 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001409 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001410 &quot;permissions&quot;: [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001411 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001412 &quot;allowFileDiscovery&quot;: True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
1413 &quot;deleted&quot;: True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
1414 &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
1415 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
1416 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
1417 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001418 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -07001419 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
1420 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
1421 &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
1422 # - They can only be set on user and group permissions
1423 # - The time must be in the future
1424 # - The time cannot be more than a year in the future
1425 &quot;id&quot;: &quot;A String&quot;, # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.
1426 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
1427 &quot;permissionDetails&quot;: [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001428 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001429 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1430 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1431 &quot;permissionType&quot;: &quot;A String&quot;, # The permission type for this user. While new values may be added in future, the following are currently possible:
1432 # - file
1433 # - member
1434 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001435 # - organizer
1436 # - fileOrganizer
1437 # - writer
1438 # - commenter
1439 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001440 },
1441 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001442 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1443 &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001444 # - owner
1445 # - organizer
1446 # - fileOrganizer
1447 # - writer
1448 # - commenter
1449 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07001450 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1451 {
1452 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1453 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1454 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1455 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1456 },
1457 ],
1458 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001459 # - user
1460 # - group
1461 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -07001462 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn&#x27;t extra information required for a anyone type.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001463 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001464 },
1465 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001466 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
1467 # Entries with null values are cleared in update and copy requests.
1468 &quot;a_key&quot;: &quot;A String&quot;,
1469 },
1470 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.
1471 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
1472 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
1473 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
1474 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1475 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1476 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1477 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1478 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1479 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1480 },
1481 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
1482 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
1483 &quot;targetMimeType&quot;: &quot;A String&quot;, # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target&#x27;s MIME type, captured when the shortcut is created.
1484 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001485 &quot;size&quot;: &quot;A String&quot;, # The size of the file&#x27;s content in bytes. This is applicable to binary files in Google Drive and Google Docs files.
Bu Sun Kim65020912020-05-20 12:08:20 -07001486 &quot;spaces&quot;: [ # The list of spaces which contain the file. The currently supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
1487 &quot;A String&quot;,
1488 ],
1489 &quot;starred&quot;: True or False, # Whether the user has starred the file.
1490 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001491 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content. If the file isn&#x27;t shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request.
Bu Sun Kim65020912020-05-20 12:08:20 -07001492 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001493 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001494 &quot;trashedTime&quot;: &quot;A String&quot;, # The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives.
1495 &quot;trashingUser&quot;: { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
1496 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1497 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1498 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1499 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1500 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1501 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1502 },
1503 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.
1504 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
1505 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
1506 &quot;height&quot;: 42, # The height of the video in pixels.
1507 &quot;width&quot;: 42, # The width of the video in pixels.
1508 },
1509 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
1510 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
1511 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
1512 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.
1513 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
1514 &quot;writersCanShare&quot;: True or False, # Whether users with only writer permission can modify the file&#x27;s permissions. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001515 }</pre>
1516</div>
1517
1518<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001519 <code class="details" id="get_media">get_media(fileId, acknowledgeAbuse=None, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07001520 <pre>Gets a file&#x27;s metadata or content by ID.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001521
1522Args:
1523 fileId: string, The ID of the file. (required)
1524 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001525 includePermissionsForView: string, Specifies which additional view&#x27;s permissions to include in the response. Only &#x27;published&#x27; is supported.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001526 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001527 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001528
1529Returns:
1530 The media object as a string.
1531
1532 </pre>
1533</div>
1534
1535<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001536 <code class="details" id="list">list(corpora=None, corpus=None, driveId=None, includeItemsFromAllDrives=None, includePermissionsForView=None, includeTeamDriveItems=None, orderBy=None, pageSize=None, pageToken=None, q=None, spaces=None, supportsAllDrives=None, supportsTeamDrives=None, teamDriveId=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001537 <pre>Lists or searches files.
1538
1539Args:
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001540 corpora: string, Groupings of files to which the query applies. Supported groupings are: &#x27;user&#x27; (files created by, opened by, or shared directly with the user), &#x27;drive&#x27; (files in the specified shared drive as indicated by the &#x27;driveId&#x27;), &#x27;domain&#x27; (files shared to the user&#x27;s domain), and &#x27;allDrives&#x27; (A combination of &#x27;user&#x27; and &#x27;drive&#x27; for all drives where the user is a member). When able, use &#x27;user&#x27; or &#x27;drive&#x27;, instead of &#x27;allDrives&#x27;, for efficiency.
Bu Sun Kim65020912020-05-20 12:08:20 -07001541 corpus: string, The source of files to list. Deprecated: use &#x27;corpora&#x27; instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001542 Allowed values
Bu Sun Kim65020912020-05-20 12:08:20 -07001543 domain - Files shared to the user&#x27;s domain.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001544 user - Files owned by or shared to the user. If a user has permissions on a Shared Drive, the files inside it won&#x27;t be retrieved unless the user has created, opened, or shared the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001545 driveId: string, ID of the shared drive to search.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001546 includeItemsFromAllDrives: boolean, Whether both My Drive and shared drive items should be included in results.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001547 includePermissionsForView: string, Specifies which additional view&#x27;s permissions to include in the response. Only &#x27;published&#x27; is supported.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001548 includeTeamDriveItems: boolean, Deprecated use includeItemsFromAllDrives instead.
Bu Sun Kim65020912020-05-20 12:08:20 -07001549 orderBy: string, A comma-separated list of sort keys. Valid keys are &#x27;createdTime&#x27;, &#x27;folder&#x27;, &#x27;modifiedByMeTime&#x27;, &#x27;modifiedTime&#x27;, &#x27;name&#x27;, &#x27;name_natural&#x27;, &#x27;quotaBytesUsed&#x27;, &#x27;recency&#x27;, &#x27;sharedWithMeTime&#x27;, &#x27;starred&#x27;, and &#x27;viewedByMeTime&#x27;. Each key sorts ascending by default, but may be reversed with the &#x27;desc&#x27; modifier. Example usage: ?orderBy=folder,modifiedTime desc,name. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.
1550 pageSize: integer, The maximum number of files to return per page. Partial or empty result pages are possible even before the end of the files list has been reached.
1551 pageToken: string, The token for continuing a previous list request on the next page. This should be set to the value of &#x27;nextPageToken&#x27; from the previous response.
1552 q: string, A query for filtering the file results. See the &quot;Search for Files&quot; guide for supported syntax.
1553 spaces: string, A comma-separated list of spaces to query within the corpus. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001554 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001555 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
1556 teamDriveId: string, Deprecated use driveId instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001557
1558Returns:
1559 An object of the form:
1560
1561 { # A list of files.
Bu Sun Kim65020912020-05-20 12:08:20 -07001562 &quot;files&quot;: [ # The list of files. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001563 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001564 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
1565 # Entries with null values are cleared in update and copy requests.
1566 &quot;a_key&quot;: &quot;A String&quot;,
1567 },
1568 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
1569 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001570 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001571 &quot;canAddMyDriveParent&quot;: True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
1572 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1573 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
1574 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
1575 &quot;canCopy&quot;: True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
1576 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
1577 &quot;canDeleteChildren&quot;: True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
1578 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
1579 &quot;canEdit&quot;: True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent.
1580 &quot;canListChildren&quot;: True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
1581 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001582 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001583 &quot;canMoveChildrenOutOfDrive&quot;: True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
1584 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001585 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user&#x27;s access to the child and to the destination folder.
Bu Sun Kim65020912020-05-20 12:08:20 -07001586 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1587 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1588 &quot;canMoveItemOutOfDrive&quot;: True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
1589 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001590 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed.
Bu Sun Kim65020912020-05-20 12:08:20 -07001591 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
1592 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1593 &quot;canReadDrive&quot;: True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
1594 &quot;canReadRevisions&quot;: True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
1595 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
1596 &quot;canRemoveChildren&quot;: True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
1597 &quot;canRemoveMyDriveParent&quot;: True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
1598 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
1599 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
1600 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
1601 &quot;canTrashChildren&quot;: True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
1602 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
1603 },
1604 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
1605 &quot;indexableText&quot;: &quot;A String&quot;, # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements.
1606 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
1607 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
1608 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
1609 },
1610 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001611 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
1612 { # A restriction for accessing the content of the file.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001613 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001614 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
1615 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
1616 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1617 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1618 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1619 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1620 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1621 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1622 },
1623 &quot;restrictionTime&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
1624 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
1625 },
1626 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001627 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1628 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
1629 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
1630 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1631 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001632 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
Bu Sun Kim65020912020-05-20 12:08:20 -07001633 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
1634 },
1635 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
1636 &quot;folderColorRgb&quot;: &quot;A String&quot;, # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
1637 # If an unsupported color is specified, the closest color in the palette will be used instead.
1638 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. This is only available for files with binary content in Google Drive.
1639 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
1640 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1641 &quot;hasThumbnail&quot;: True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
1642 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This is currently only available for files with binary content in Google Drive.
1643 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
1644 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1645 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
1646 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1647 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1648 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1649 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1650 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1651 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1652 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1653 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1654 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1655 &quot;height&quot;: 42, # The height of the image in pixels.
1656 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1657 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1658 &quot;location&quot;: { # Geographic location information stored in the image.
1659 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1660 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1661 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1662 },
1663 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1664 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1665 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1666 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1667 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1668 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
1669 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1670 &quot;width&quot;: 42, # The width of the image in pixels.
1671 },
1672 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1673 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
1674 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
1675 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1676 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1677 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1678 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1679 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1680 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1681 },
1682 &quot;md5Checksum&quot;: &quot;A String&quot;, # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.
1683 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001684 # Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001685 # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001686 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
1687 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
1688 &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the file was modified by anyone (RFC 3339 date-time).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001689 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001690 &quot;name&quot;: &quot;A String&quot;, # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant.
1691 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive.
1692 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
1693 &quot;owners&quot;: [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001694 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001695 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1696 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1697 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1698 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1699 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1700 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001701 },
1702 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001703 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
1704 # If not specified as part of a create request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list.
1705 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001706 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001707 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1708 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001709 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001710 &quot;permissions&quot;: [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001711 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001712 &quot;allowFileDiscovery&quot;: True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
1713 &quot;deleted&quot;: True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
1714 &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
1715 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
1716 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
1717 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001718 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -07001719 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
1720 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
1721 &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
1722 # - They can only be set on user and group permissions
1723 # - The time must be in the future
1724 # - The time cannot be more than a year in the future
1725 &quot;id&quot;: &quot;A String&quot;, # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.
1726 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
1727 &quot;permissionDetails&quot;: [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001728 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001729 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1730 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1731 &quot;permissionType&quot;: &quot;A String&quot;, # The permission type for this user. While new values may be added in future, the following are currently possible:
1732 # - file
1733 # - member
1734 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001735 # - organizer
1736 # - fileOrganizer
1737 # - writer
1738 # - commenter
1739 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001740 },
1741 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001742 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1743 &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001744 # - owner
1745 # - organizer
1746 # - fileOrganizer
1747 # - writer
1748 # - commenter
1749 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07001750 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1751 {
1752 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1753 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1754 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1755 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1756 },
1757 ],
1758 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001759 # - user
1760 # - group
1761 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -07001762 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn&#x27;t extra information required for a anyone type.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001763 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001764 },
1765 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001766 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
1767 # Entries with null values are cleared in update and copy requests.
1768 &quot;a_key&quot;: &quot;A String&quot;,
1769 },
1770 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.
1771 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
1772 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
1773 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
1774 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1775 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1776 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1777 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1778 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1779 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1780 },
1781 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
1782 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
1783 &quot;targetMimeType&quot;: &quot;A String&quot;, # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target&#x27;s MIME type, captured when the shortcut is created.
1784 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001785 &quot;size&quot;: &quot;A String&quot;, # The size of the file&#x27;s content in bytes. This is applicable to binary files in Google Drive and Google Docs files.
Bu Sun Kim65020912020-05-20 12:08:20 -07001786 &quot;spaces&quot;: [ # The list of spaces which contain the file. The currently supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
1787 &quot;A String&quot;,
1788 ],
1789 &quot;starred&quot;: True or False, # Whether the user has starred the file.
1790 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001791 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content. If the file isn&#x27;t shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request.
Bu Sun Kim65020912020-05-20 12:08:20 -07001792 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001793 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001794 &quot;trashedTime&quot;: &quot;A String&quot;, # The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives.
1795 &quot;trashingUser&quot;: { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
1796 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1797 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1798 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1799 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1800 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1801 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1802 },
1803 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.
1804 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
1805 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
1806 &quot;height&quot;: 42, # The height of the video in pixels.
1807 &quot;width&quot;: 42, # The width of the video in pixels.
1808 },
1809 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
1810 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
1811 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
1812 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.
1813 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
1814 &quot;writersCanShare&quot;: True or False, # Whether users with only writer permission can modify the file&#x27;s permissions. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001815 },
1816 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001817 &quot;incompleteSearch&quot;: True or False, # Whether the search process was incomplete. If true, then some search results may be missing, since all documents were not searched. This may occur when searching multiple drives with the &quot;allDrives&quot; corpora, but all corpora could not be searched. When this happens, it is suggested that clients narrow their query by choosing a different corpus such as &quot;user&quot; or &quot;drive&quot;.
1818 &quot;kind&quot;: &quot;drive#fileList&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#fileList&quot;.
1819 &quot;nextPageToken&quot;: &quot;A String&quot;, # The page token for the next page of files. This will be absent if the end of the files list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001820 }</pre>
1821</div>
1822
1823<div class="method">
1824 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1825 <pre>Retrieves the next page of results.
1826
1827Args:
1828 previous_request: The request for the previous page. (required)
1829 previous_response: The response from the request for the previous page. (required)
1830
1831Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001832 A request object that you can call &#x27;execute()&#x27; on to request the next
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001833 page. Returns None if there are no more items in the collection.
1834 </pre>
1835</div>
1836
1837<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001838 <code class="details" id="update">update(fileId, body=None, addParents=None, enforceSingleParent=None, includePermissionsForView=None, keepRevisionForever=None, ocrLanguage=None, removeParents=None, supportsAllDrives=None, supportsTeamDrives=None, useContentAsIndexableText=None, media_body=None, media_mime_type=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001839 <pre>Updates a file&#x27;s metadata and/or content. This method supports patch semantics.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001840
1841Args:
1842 fileId: string, The ID of the file. (required)
1843 body: object, The request body.
1844 The object takes the form of:
1845
1846{ # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001847 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
1848 # Entries with null values are cleared in update and copy requests.
1849 &quot;a_key&quot;: &quot;A String&quot;,
1850 },
1851 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
1852 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001853 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001854 &quot;canAddMyDriveParent&quot;: True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
1855 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1856 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
1857 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
1858 &quot;canCopy&quot;: True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
1859 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
1860 &quot;canDeleteChildren&quot;: True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
1861 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
1862 &quot;canEdit&quot;: True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent.
1863 &quot;canListChildren&quot;: True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
1864 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001865 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001866 &quot;canMoveChildrenOutOfDrive&quot;: True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
1867 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001868 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user&#x27;s access to the child and to the destination folder.
Bu Sun Kim65020912020-05-20 12:08:20 -07001869 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1870 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1871 &quot;canMoveItemOutOfDrive&quot;: True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
1872 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001873 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed.
Bu Sun Kim65020912020-05-20 12:08:20 -07001874 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
1875 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1876 &quot;canReadDrive&quot;: True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
1877 &quot;canReadRevisions&quot;: True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
1878 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
1879 &quot;canRemoveChildren&quot;: True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
1880 &quot;canRemoveMyDriveParent&quot;: True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
1881 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
1882 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
1883 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
1884 &quot;canTrashChildren&quot;: True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
1885 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
1886 },
1887 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
1888 &quot;indexableText&quot;: &quot;A String&quot;, # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements.
1889 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
1890 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
1891 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
1892 },
1893 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001894 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
1895 { # A restriction for accessing the content of the file.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001896 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001897 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
1898 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
1899 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1900 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1901 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1902 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1903 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1904 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1905 },
1906 &quot;restrictionTime&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
1907 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
1908 },
1909 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001910 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1911 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
1912 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
1913 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1914 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001915 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
Bu Sun Kim65020912020-05-20 12:08:20 -07001916 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
1917 },
1918 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
1919 &quot;folderColorRgb&quot;: &quot;A String&quot;, # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
1920 # If an unsupported color is specified, the closest color in the palette will be used instead.
1921 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. This is only available for files with binary content in Google Drive.
1922 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
1923 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1924 &quot;hasThumbnail&quot;: True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
1925 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This is currently only available for files with binary content in Google Drive.
1926 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
1927 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1928 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
1929 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1930 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1931 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1932 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1933 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1934 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1935 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1936 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1937 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1938 &quot;height&quot;: 42, # The height of the image in pixels.
1939 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1940 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1941 &quot;location&quot;: { # Geographic location information stored in the image.
1942 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1943 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1944 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1945 },
1946 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1947 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1948 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1949 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1950 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1951 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
1952 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1953 &quot;width&quot;: 42, # The width of the image in pixels.
1954 },
1955 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1956 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
1957 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
1958 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1959 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1960 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1961 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1962 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1963 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1964 },
1965 &quot;md5Checksum&quot;: &quot;A String&quot;, # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.
1966 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001967 # Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001968 # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001969 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
1970 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
1971 &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the file was modified by anyone (RFC 3339 date-time).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001972 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001973 &quot;name&quot;: &quot;A String&quot;, # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant.
1974 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive.
1975 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
1976 &quot;owners&quot;: [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001977 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001978 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1979 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1980 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1981 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1982 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1983 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001984 },
1985 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001986 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
1987 # If not specified as part of a create request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list.
1988 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001989 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001990 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1991 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001992 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001993 &quot;permissions&quot;: [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001994 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001995 &quot;allowFileDiscovery&quot;: True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
1996 &quot;deleted&quot;: True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
1997 &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
1998 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
1999 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
2000 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07002001 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -07002002 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
2003 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
2004 &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
2005 # - They can only be set on user and group permissions
2006 # - The time must be in the future
2007 # - The time cannot be more than a year in the future
2008 &quot;id&quot;: &quot;A String&quot;, # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.
2009 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
2010 &quot;permissionDetails&quot;: [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002011 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002012 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2013 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
2014 &quot;permissionType&quot;: &quot;A String&quot;, # The permission type for this user. While new values may be added in future, the following are currently possible:
2015 # - file
2016 # - member
2017 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002018 # - organizer
2019 # - fileOrganizer
2020 # - writer
2021 # - commenter
2022 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002023 },
2024 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002025 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2026 &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002027 # - owner
2028 # - organizer
2029 # - fileOrganizer
2030 # - writer
2031 # - commenter
2032 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07002033 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
2034 {
2035 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
2036 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
2037 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
2038 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
2039 },
2040 ],
2041 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002042 # - user
2043 # - group
2044 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -07002045 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn&#x27;t extra information required for a anyone type.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002046 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002047 },
2048 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002049 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
2050 # Entries with null values are cleared in update and copy requests.
2051 &quot;a_key&quot;: &quot;A String&quot;,
2052 },
2053 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.
2054 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
2055 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
2056 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
2057 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2058 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
2059 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2060 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2061 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2062 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2063 },
2064 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
2065 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
2066 &quot;targetMimeType&quot;: &quot;A String&quot;, # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target&#x27;s MIME type, captured when the shortcut is created.
2067 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002068 &quot;size&quot;: &quot;A String&quot;, # The size of the file&#x27;s content in bytes. This is applicable to binary files in Google Drive and Google Docs files.
Bu Sun Kim65020912020-05-20 12:08:20 -07002069 &quot;spaces&quot;: [ # The list of spaces which contain the file. The currently supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
2070 &quot;A String&quot;,
2071 ],
2072 &quot;starred&quot;: True or False, # Whether the user has starred the file.
2073 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002074 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content. If the file isn&#x27;t shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request.
Bu Sun Kim65020912020-05-20 12:08:20 -07002075 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002076 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07002077 &quot;trashedTime&quot;: &quot;A String&quot;, # The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives.
2078 &quot;trashingUser&quot;: { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
2079 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2080 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
2081 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2082 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2083 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2084 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2085 },
2086 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.
2087 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
2088 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
2089 &quot;height&quot;: 42, # The height of the video in pixels.
2090 &quot;width&quot;: 42, # The width of the video in pixels.
2091 },
2092 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
2093 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
2094 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
2095 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.
2096 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
2097 &quot;writersCanShare&quot;: True or False, # Whether users with only writer permission can modify the file&#x27;s permissions. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002098}
2099
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002100 addParents: string, A comma-separated list of parent IDs to add.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002101 enforceSingleParent: boolean, Deprecated. Adding files to multiple folders is no longer supported. Use shortcuts instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002102 includePermissionsForView: string, Specifies which additional view&#x27;s permissions to include in the response. Only &#x27;published&#x27; is supported.
Bu Sun Kim65020912020-05-20 12:08:20 -07002103 keepRevisionForever: boolean, Whether to set the &#x27;keepForever&#x27; field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions.
2104 ocrLanguage: string, A language hint for OCR processing during image import (ISO 639-1 code).
2105 removeParents: string, A comma-separated list of parent IDs to remove.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002106 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07002107 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
2108 useContentAsIndexableText: boolean, Whether to use the uploaded content as indexable text.
2109 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002110 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002111
2112Returns:
2113 An object of the form:
2114
2115 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07002116 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
2117 # Entries with null values are cleared in update and copy requests.
2118 &quot;a_key&quot;: &quot;A String&quot;,
2119 },
2120 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
2121 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002122 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07002123 &quot;canAddMyDriveParent&quot;: True or False, # Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
2124 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
2125 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
2126 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
2127 &quot;canCopy&quot;: True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
2128 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
2129 &quot;canDeleteChildren&quot;: True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
2130 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
2131 &quot;canEdit&quot;: True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent.
2132 &quot;canListChildren&quot;: True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
2133 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002134 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
Bu Sun Kim65020912020-05-20 12:08:20 -07002135 &quot;canMoveChildrenOutOfDrive&quot;: True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
2136 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002137 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within this drive. This is false when the item is not a folder. Note that a request to move the child may still fail depending on the current user&#x27;s access to the child and to the destination folder.
Bu Sun Kim65020912020-05-20 12:08:20 -07002138 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
2139 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2140 &quot;canMoveItemOutOfDrive&quot;: True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
2141 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002142 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed.
Bu Sun Kim65020912020-05-20 12:08:20 -07002143 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
2144 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
2145 &quot;canReadDrive&quot;: True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
2146 &quot;canReadRevisions&quot;: True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
2147 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
2148 &quot;canRemoveChildren&quot;: True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
2149 &quot;canRemoveMyDriveParent&quot;: True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
2150 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
2151 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
2152 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
2153 &quot;canTrashChildren&quot;: True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
2154 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
2155 },
2156 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
2157 &quot;indexableText&quot;: &quot;A String&quot;, # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements.
2158 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
2159 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
2160 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
2161 },
2162 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002163 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
2164 { # A restriction for accessing the content of the file.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002165 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002166 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
2167 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
2168 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2169 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
2170 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2171 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2172 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2173 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2174 },
2175 &quot;restrictionTime&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
2176 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
2177 },
2178 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002179 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
2180 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
2181 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
2182 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
2183 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002184 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
Bu Sun Kim65020912020-05-20 12:08:20 -07002185 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
2186 },
2187 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
2188 &quot;folderColorRgb&quot;: &quot;A String&quot;, # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
2189 # If an unsupported color is specified, the closest color in the palette will be used instead.
2190 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. This is only available for files with binary content in Google Drive.
2191 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
2192 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
2193 &quot;hasThumbnail&quot;: True or False, # Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
2194 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This is currently only available for files with binary content in Google Drive.
2195 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
2196 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
2197 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
2198 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
2199 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
2200 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
2201 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
2202 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
2203 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
2204 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
2205 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
2206 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
2207 &quot;height&quot;: 42, # The height of the image in pixels.
2208 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
2209 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
2210 &quot;location&quot;: { # Geographic location information stored in the image.
2211 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
2212 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
2213 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
2214 },
2215 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
2216 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
2217 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
2218 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
2219 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
2220 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
2221 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
2222 &quot;width&quot;: 42, # The width of the image in pixels.
2223 },
2224 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
2225 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
2226 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
2227 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2228 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
2229 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2230 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2231 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2232 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2233 },
2234 &quot;md5Checksum&quot;: &quot;A String&quot;, # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.
2235 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002236 # Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002237 # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002238 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
2239 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
2240 &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the file was modified by anyone (RFC 3339 date-time).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002241 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -07002242 &quot;name&quot;: &quot;A String&quot;, # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant.
2243 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive.
2244 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
2245 &quot;owners&quot;: [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002246 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07002247 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2248 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
2249 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2250 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2251 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2252 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002253 },
2254 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002255 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
2256 # If not specified as part of a create request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list.
2257 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002258 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002259 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
2260 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002261 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002262 &quot;permissions&quot;: [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002263 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002264 &quot;allowFileDiscovery&quot;: True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
2265 &quot;deleted&quot;: True or False, # Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
2266 &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
2267 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
2268 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
2269 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07002270 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -07002271 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
2272 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
2273 &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
2274 # - They can only be set on user and group permissions
2275 # - The time must be in the future
2276 # - The time cannot be more than a year in the future
2277 &quot;id&quot;: &quot;A String&quot;, # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.
2278 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
2279 &quot;permissionDetails&quot;: [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002280 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002281 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2282 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
2283 &quot;permissionType&quot;: &quot;A String&quot;, # The permission type for this user. While new values may be added in future, the following are currently possible:
2284 # - file
2285 # - member
2286 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002287 # - organizer
2288 # - fileOrganizer
2289 # - writer
2290 # - commenter
2291 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002292 },
2293 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002294 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2295 &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002296 # - owner
2297 # - organizer
2298 # - fileOrganizer
2299 # - writer
2300 # - commenter
2301 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07002302 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
2303 {
2304 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
2305 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
2306 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
2307 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
2308 },
2309 ],
2310 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002311 # - user
2312 # - group
2313 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -07002314 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn&#x27;t extra information required for a anyone type.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002315 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002316 },
2317 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002318 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
2319 # Entries with null values are cleared in update and copy requests.
2320 &quot;a_key&quot;: &quot;A String&quot;,
2321 },
2322 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.
2323 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
2324 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
2325 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
2326 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2327 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
2328 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2329 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2330 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2331 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2332 },
2333 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
2334 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
2335 &quot;targetMimeType&quot;: &quot;A String&quot;, # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target&#x27;s MIME type, captured when the shortcut is created.
2336 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002337 &quot;size&quot;: &quot;A String&quot;, # The size of the file&#x27;s content in bytes. This is applicable to binary files in Google Drive and Google Docs files.
Bu Sun Kim65020912020-05-20 12:08:20 -07002338 &quot;spaces&quot;: [ # The list of spaces which contain the file. The currently supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
2339 &quot;A String&quot;,
2340 ],
2341 &quot;starred&quot;: True or False, # Whether the user has starred the file.
2342 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002343 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content. If the file isn&#x27;t shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request.
Bu Sun Kim65020912020-05-20 12:08:20 -07002344 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002345 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07002346 &quot;trashedTime&quot;: &quot;A String&quot;, # The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives.
2347 &quot;trashingUser&quot;: { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
2348 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2349 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
2350 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2351 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2352 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2353 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2354 },
2355 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.
2356 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
2357 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
2358 &quot;height&quot;: 42, # The height of the video in pixels.
2359 &quot;width&quot;: 42, # The width of the video in pixels.
2360 },
2361 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
2362 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
2363 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
2364 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.
2365 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
2366 &quot;writersCanShare&quot;: True or False, # Whether users with only writer permission can modify the file&#x27;s permissions. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002367 }</pre>
2368</div>
2369
2370<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002371 <code class="details" id="watch">watch(fileId, body=None, acknowledgeAbuse=None, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002372 <pre>Subscribes to changes to a file
2373
2374Args:
2375 fileId: string, The ID of the file. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002376 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002377 The object takes the form of:
2378
2379{ # An notification channel used to watch for resource changes.
Bu Sun Kim65020912020-05-20 12:08:20 -07002380 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
2381 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
2382 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
2383 &quot;kind&quot;: &quot;api#channel&quot;, # Identifies this as a notification channel used to watch for changes to a resource, which is &quot;api#channel&quot;.
2384 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
2385 &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002386 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002387 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
2388 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
2389 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
2390 &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
2391 &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002392 }
2393
2394 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002395 includePermissionsForView: string, Specifies which additional view&#x27;s permissions to include in the response. Only &#x27;published&#x27; is supported.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002396 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07002397 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002398
2399Returns:
2400 An object of the form:
2401
2402 { # An notification channel used to watch for resource changes.
Bu Sun Kim65020912020-05-20 12:08:20 -07002403 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
2404 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
2405 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
2406 &quot;kind&quot;: &quot;api#channel&quot;, # Identifies this as a notification channel used to watch for changes to a resource, which is &quot;api#channel&quot;.
2407 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
2408 &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002409 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002410 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
2411 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
2412 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
2413 &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
2414 &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002415 }</pre>
2416</div>
2417
2418<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002419 <code class="details" id="watch_media">watch_media(fileId, body=None, acknowledgeAbuse=None, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002420 <pre>Subscribes to changes to a file
2421
2422Args:
2423 fileId: string, The ID of the file. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002424 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002425 The object takes the form of:
2426
2427{ # An notification channel used to watch for resource changes.
Bu Sun Kim65020912020-05-20 12:08:20 -07002428 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
2429 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
2430 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
2431 &quot;kind&quot;: &quot;api#channel&quot;, # Identifies this as a notification channel used to watch for changes to a resource, which is &quot;api#channel&quot;.
2432 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
2433 &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002434 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002435 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
2436 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
2437 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
2438 &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
2439 &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002440 }
2441
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002442 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002443 includePermissionsForView: string, Specifies which additional view&#x27;s permissions to include in the response. Only &#x27;published&#x27; is supported.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002444 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07002445 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002446
2447Returns:
2448 The media object as a string.
2449
2450 </pre>
2451</div>
2452
2453</body></html>