blob: 1f5844477d2229ebe76b1594b9ca9aae705ce99e [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">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -080084 <code><a href="#create">create(body=None, enforceSingleParent=None, ignoreDefaultVisibility=None, includePermissionsForView=None, keepRevisionForever=None, media_body=None, media_mime_type=None, ocrLanguage=None, supportsAllDrives=None, supportsTeamDrives=None, useContentAsIndexableText=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">
yoshi-code-botc2cd3262021-05-16 02:16:04 -070099 <code><a href="#generateIds">generateIds(count=None, space=None, type=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">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800114 <code><a href="#update">update(fileId, addParents=None, body=None, enforceSingleParent=None, includePermissionsForView=None, keepRevisionForever=None, media_body=None, media_mime_type=None, ocrLanguage=None, removeParents=None, supportsAllDrives=None, supportsTeamDrives=None, useContentAsIndexableText=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">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800117 <code><a href="#watch">watch(fileId, acknowledgeAbuse=None, body=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">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800120 <code><a href="#watch_media">watch_media(fileId, acknowledgeAbuse=None, body=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.
yoshi-code-bot69706592021-03-03 03:54:02 -0800139 # Entries with null values are cleared in update and copy requests. These properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.
Bu Sun Kim65020912020-05-20 12:08:20 -0700140 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800403 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
yoshi-code-bot69706592021-03-03 03:54:02 -0800404 # Entries with null values are cleared in update and copy requests. These properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800405 &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.
409 &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.
410 &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.
421 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
422 &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.
424 &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.
425 &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.
429 &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.
430 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700448 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800449 },
450 &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.
452 &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.
453 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700455 &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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800461 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800462 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700464 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800465 ],
466 &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.
471 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
472 &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.
523 # 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.
524 # 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.
525 &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).
528 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
529 &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.
533 { # 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.
540 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800541 ],
542 &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;,
545 ],
546 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
547 &quot;A String&quot;,
548 ],
549 &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.
550 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
551 &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;
557 # - anyone - No displayName is present.
558 &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.
567 {
568 &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:
574 # - organizer
575 # - fileOrganizer
576 # - writer
577 # - commenter
578 # - reader
579 },
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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800582 &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:
583 # - owner
584 # - organizer
585 # - fileOrganizer
586 # - writer
587 # - commenter
588 # - reader
589 &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:
598 # - user
599 # - group
600 # - domain
601 # - 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.
602 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim65020912020-05-20 12:08:20 -0700603 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800604 ],
605 &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 },
624 &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.
625 &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.
630 &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.
631 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
632 &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.
633 &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.
654}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800655</div>
656
657<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800658 <code class="details" id="create">create(body=None, enforceSingleParent=None, ignoreDefaultVisibility=None, includePermissionsForView=None, keepRevisionForever=None, media_body=None, media_mime_type=None, ocrLanguage=None, supportsAllDrives=None, supportsTeamDrives=None, useContentAsIndexableText=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.
yoshi-code-bot69706592021-03-03 03:54:02 -0800667 # Entries with null values are cleared in update and copy requests. These properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.
Bu Sun Kim65020912020-05-20 12:08:20 -0700668 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800923 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
924 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400925 ocrLanguage: string, A language hint for OCR processing during image import (ISO 639-1 code).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700926 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700927 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
928 useContentAsIndexableText: boolean, Whether to use the uploaded content as indexable text.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800929
930Returns:
931 An object of the form:
932
933 { # The metadata for a file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800934 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
yoshi-code-bot69706592021-03-03 03:54:02 -0800935 # Entries with null values are cleared in update and copy requests. These properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800936 &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.
940 &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.
941 &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.
952 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
953 &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.
955 &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.
956 &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.
960 &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.
961 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700979 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800980 },
981 &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.
983 &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.
984 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700986 &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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800992 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800993 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700995 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800996 ],
997 &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.
1002 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
1003 &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.
1054 # 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.
1055 # 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.
1056 &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).
1059 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
1060 &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.
1064 { # 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.
1071 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001072 ],
1073 &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;,
1076 ],
1077 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1078 &quot;A String&quot;,
1079 ],
1080 &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.
1081 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
1082 &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;
1088 # - anyone - No displayName is present.
1089 &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.
1098 {
1099 &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:
1105 # - organizer
1106 # - fileOrganizer
1107 # - writer
1108 # - commenter
1109 # - reader
1110 },
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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001113 &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:
1114 # - owner
1115 # - organizer
1116 # - fileOrganizer
1117 # - writer
1118 # - commenter
1119 # - reader
1120 &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:
1129 # - user
1130 # - group
1131 # - domain
1132 # - 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.
1133 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim65020912020-05-20 12:08:20 -07001134 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001135 ],
1136 &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 },
1155 &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.
1156 &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.
1161 &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.
1162 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
1163 &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.
1164 &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.
1185}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001186</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">
yoshi-code-botc2cd3262021-05-16 02:16:04 -07001230 <code class="details" id="generateIds">generateIds(count=None, space=None, type=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.
yoshi-code-botc2cd3262021-05-16 02:16:04 -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;. (Default: &#x27;drive&#x27;)
1236 type: string, The type of items which the IDs can be used for. Supported values are &#x27;files&#x27; and &#x27;shortcuts&#x27;. Note that &#x27;shortcuts&#x27; are only supported in the drive &#x27;space&#x27;. (Default: &#x27;files&#x27;)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001237
1238Returns:
1239 An object of the form:
1240
1241 { # A list of generated file IDs which can be provided in create requests.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001242 &quot;ids&quot;: [ # The IDs generated for the requesting user in the specified space.
1243 &quot;A String&quot;,
1244 ],
1245 &quot;kind&quot;: &quot;drive#generatedIds&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#generatedIds&quot;.
1246 &quot;space&quot;: &quot;A String&quot;, # The type of file that can be created with these IDs.
1247}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001248</div>
1249
1250<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001251 <code class="details" id="get">get(fileId, acknowledgeAbuse=None, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07001252 <pre>Gets a file&#x27;s metadata or content by ID.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001253
1254Args:
1255 fileId: string, The ID of the file. (required)
1256 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 -07001257 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 -07001258 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001259 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001260
1261Returns:
1262 An object of the form:
1263
1264 { # The metadata for a file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001265 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
yoshi-code-bot69706592021-03-03 03:54:02 -08001266 # Entries with null values are cleared in update and copy requests. These properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001267 &quot;a_key&quot;: &quot;A String&quot;,
1268 },
1269 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
1270 &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.
1271 &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.
1272 &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.
1273 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1274 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
1275 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
1276 &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.
1277 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
1278 &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.
1279 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
1280 &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.
1281 &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.
1282 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
1283 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
1284 &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.
1285 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
1286 &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.
1287 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1288 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1289 &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.
1290 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1291 &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.
1292 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
1293 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1294 &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.
1295 &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.
1296 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
1297 &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.
1298 &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.
1299 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
1300 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
1301 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
1302 &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.
1303 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
1304 },
1305 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
1306 &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.
1307 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
1308 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
1309 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
Bu Sun Kim65020912020-05-20 12:08:20 -07001310 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001311 },
1312 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
1313 { # A restriction for accessing the content of the file.
1314 &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.
1315 &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.
1316 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001317 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1318 &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.
1319 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1320 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1321 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1322 &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 -08001323 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001324 &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.
1325 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
Bu Sun Kim65020912020-05-20 12:08:20 -07001326 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001327 ],
1328 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1329 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
1330 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
1331 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1332 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
1333 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
1334 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
1335 },
1336 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
1337 &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.
1338 # If an unsupported color is specified, the closest color in the palette will be used instead.
1339 &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.
1340 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
1341 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1342 &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.
1343 &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.
1344 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
1345 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1346 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
1347 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1348 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1349 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1350 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1351 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1352 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1353 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1354 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1355 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1356 &quot;height&quot;: 42, # The height of the image in pixels.
1357 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1358 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1359 &quot;location&quot;: { # Geographic location information stored in the image.
1360 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1361 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1362 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1363 },
1364 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1365 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1366 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1367 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1368 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1369 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
1370 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1371 &quot;width&quot;: 42, # The width of the image in pixels.
1372 },
1373 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1374 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
1375 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
1376 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1377 &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.
1378 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1379 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1380 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1381 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1382 },
1383 &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.
1384 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
1385 # 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.
1386 # 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.
1387 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
1388 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
1389 &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the file was modified by anyone (RFC 3339 date-time).
1390 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
1391 &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.
1392 &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.
1393 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
1394 &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.
1395 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001396 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1397 &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.
1398 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1399 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1400 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1401 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1402 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001403 ],
1404 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
1405 # 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.
1406 &quot;A String&quot;,
1407 ],
1408 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1409 &quot;A String&quot;,
1410 ],
1411 &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.
1412 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
1413 &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.
1414 &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.
1415 &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:
1416 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
1417 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
1418 # - domain - String domain name, such as &quot;thecompany.com.&quot;
1419 # - anyone - No displayName is present.
1420 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
1421 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
1422 &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:
1423 # - They can only be set on user and group permissions
1424 # - The time must be in the future
1425 # - The time cannot be more than a year in the future
1426 &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.
1427 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
1428 &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.
1429 {
1430 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1431 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1432 &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:
1433 # - file
1434 # - member
1435 &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:
1436 # - organizer
1437 # - fileOrganizer
1438 # - writer
1439 # - commenter
1440 # - reader
1441 },
1442 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001443 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001444 &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:
1445 # - owner
1446 # - organizer
1447 # - fileOrganizer
1448 # - writer
1449 # - commenter
1450 # - reader
1451 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1452 {
1453 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1454 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1455 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1456 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1457 },
1458 ],
1459 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
1460 # - user
1461 # - group
1462 # - domain
1463 # - 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.
1464 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim65020912020-05-20 12:08:20 -07001465 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001466 ],
1467 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
1468 # Entries with null values are cleared in update and copy requests.
1469 &quot;a_key&quot;: &quot;A String&quot;,
1470 },
1471 &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.
1472 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
1473 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
1474 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
1475 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1476 &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.
1477 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1478 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1479 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1480 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1481 },
1482 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
1483 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
1484 &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.
1485 },
1486 &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.
1487 &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;.
1488 &quot;A String&quot;,
1489 ],
1490 &quot;starred&quot;: True or False, # Whether the user has starred the file.
1491 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
1492 &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.
1493 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
1494 &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.
1495 &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.
1496 &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.
1497 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1498 &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.
1499 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1500 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1501 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1502 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1503 },
1504 &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.
1505 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
1506 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
1507 &quot;height&quot;: 42, # The height of the video in pixels.
1508 &quot;width&quot;: 42, # The width of the video in pixels.
1509 },
1510 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
1511 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
1512 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
1513 &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.
1514 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
1515 &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.
1516}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001517</div>
1518
1519<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001520 <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 -07001521 <pre>Gets a file&#x27;s metadata or content by ID.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001522
1523Args:
1524 fileId: string, The ID of the file. (required)
1525 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 -07001526 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 -07001527 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001528 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001529
1530Returns:
1531 The media object as a string.
1532
1533 </pre>
1534</div>
1535
1536<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001537 <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 -08001538 <pre>Lists or searches files.
1539
1540Args:
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001541 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 -07001542 corpus: string, The source of files to list. Deprecated: use &#x27;corpora&#x27; instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001543 Allowed values
Bu Sun Kim65020912020-05-20 12:08:20 -07001544 domain - Files shared to the user&#x27;s domain.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001545 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 -07001546 driveId: string, ID of the shared drive to search.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001547 includeItemsFromAllDrives: boolean, Whether both My Drive and shared drive items should be included in results.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001548 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 -07001549 includeTeamDriveItems: boolean, Deprecated use includeItemsFromAllDrives instead.
Bu Sun Kim65020912020-05-20 12:08:20 -07001550 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.
1551 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.
1552 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.
1553 q: string, A query for filtering the file results. See the &quot;Search for Files&quot; guide for supported syntax.
1554 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 -07001555 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001556 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
1557 teamDriveId: string, Deprecated use driveId instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001558
1559Returns:
1560 An object of the form:
1561
1562 { # A list of files.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001563 &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.
1564 { # The metadata for a file.
1565 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
yoshi-code-bot69706592021-03-03 03:54:02 -08001566 # Entries with null values are cleared in update and copy requests. These properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001567 &quot;a_key&quot;: &quot;A String&quot;,
1568 },
1569 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
1570 &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.
1571 &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.
1572 &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.
1573 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1574 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
1575 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
1576 &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.
1577 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
1578 &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.
1579 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
1580 &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.
1581 &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.
1582 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
1583 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
1584 &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.
1585 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
1586 &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.
1587 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1588 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1589 &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.
1590 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1591 &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.
1592 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
1593 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1594 &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.
1595 &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.
1596 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
1597 &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.
1598 &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.
1599 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
1600 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
1601 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
1602 &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.
1603 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
1604 },
1605 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
1606 &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.
1607 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
1608 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
1609 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
Bu Sun Kim65020912020-05-20 12:08:20 -07001610 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001611 },
1612 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
1613 { # A restriction for accessing the content of the file.
1614 &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.
1615 &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.
1616 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001617 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1618 &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.
1619 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1620 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1621 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1622 &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 -08001623 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001624 &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.
1625 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
Bu Sun Kim65020912020-05-20 12:08:20 -07001626 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001627 ],
1628 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1629 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
1630 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
1631 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1632 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
1633 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
1634 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001635 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001636 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
1637 &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.
1638 # If an unsupported color is specified, the closest color in the palette will be used instead.
1639 &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.
1640 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
1641 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1642 &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.
1643 &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.
1644 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
1645 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1646 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
1647 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1648 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1649 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1650 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1651 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1652 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1653 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1654 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1655 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1656 &quot;height&quot;: 42, # The height of the image in pixels.
1657 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1658 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1659 &quot;location&quot;: { # Geographic location information stored in the image.
1660 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1661 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1662 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1663 },
1664 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1665 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1666 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1667 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1668 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1669 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
1670 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1671 &quot;width&quot;: 42, # The width of the image in pixels.
1672 },
1673 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1674 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
1675 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
1676 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1677 &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.
1678 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1679 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1680 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1681 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1682 },
1683 &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.
1684 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
1685 # 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.
1686 # 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.
1687 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
1688 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
1689 &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the file was modified by anyone (RFC 3339 date-time).
1690 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
1691 &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.
1692 &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.
1693 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
1694 &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.
1695 { # Information about a Drive user.
1696 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1697 &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.
1698 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1699 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1700 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1701 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1702 },
1703 ],
1704 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
1705 # 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.
1706 &quot;A String&quot;,
1707 ],
1708 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1709 &quot;A String&quot;,
1710 ],
1711 &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.
1712 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
1713 &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.
1714 &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.
1715 &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:
1716 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
1717 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
1718 # - domain - String domain name, such as &quot;thecompany.com.&quot;
1719 # - anyone - No displayName is present.
1720 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
1721 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
1722 &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:
1723 # - They can only be set on user and group permissions
1724 # - The time must be in the future
1725 # - The time cannot be more than a year in the future
1726 &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.
1727 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
1728 &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.
1729 {
1730 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1731 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1732 &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:
1733 # - file
1734 # - member
1735 &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:
1736 # - organizer
1737 # - fileOrganizer
1738 # - writer
1739 # - commenter
1740 # - reader
1741 },
1742 ],
1743 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1744 &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:
1745 # - owner
1746 # - organizer
1747 # - fileOrganizer
1748 # - writer
1749 # - commenter
1750 # - reader
1751 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1752 {
1753 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1754 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1755 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1756 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1757 },
1758 ],
1759 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
1760 # - user
1761 # - group
1762 # - domain
1763 # - 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.
1764 &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.
1765 },
1766 ],
1767 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
1768 # Entries with null values are cleared in update and copy requests.
1769 &quot;a_key&quot;: &quot;A String&quot;,
1770 },
1771 &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.
1772 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
1773 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
1774 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
1775 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1776 &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.
1777 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1778 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1779 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1780 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1781 },
1782 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
1783 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
1784 &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.
1785 },
1786 &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.
1787 &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;.
1788 &quot;A String&quot;,
1789 ],
1790 &quot;starred&quot;: True or False, # Whether the user has starred the file.
1791 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
1792 &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.
1793 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
1794 &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.
1795 &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.
1796 &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.
1797 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1798 &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.
1799 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1800 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1801 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1802 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1803 },
1804 &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.
1805 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
1806 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
1807 &quot;height&quot;: 42, # The height of the video in pixels.
1808 &quot;width&quot;: 42, # The width of the video in pixels.
1809 },
1810 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
1811 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
1812 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
1813 &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.
1814 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
1815 &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.
1816 },
1817 ],
1818 &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;.
1819 &quot;kind&quot;: &quot;drive#fileList&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#fileList&quot;.
1820 &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.
1821}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001822</div>
1823
1824<div class="method">
1825 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1826 <pre>Retrieves the next page of results.
1827
1828Args:
1829 previous_request: The request for the previous page. (required)
1830 previous_response: The response from the request for the previous page. (required)
1831
1832Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001833 A request object that you can call &#x27;execute()&#x27; on to request the next
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001834 page. Returns None if there are no more items in the collection.
1835 </pre>
1836</div>
1837
1838<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001839 <code class="details" id="update">update(fileId, addParents=None, body=None, enforceSingleParent=None, includePermissionsForView=None, keepRevisionForever=None, media_body=None, media_mime_type=None, ocrLanguage=None, removeParents=None, supportsAllDrives=None, supportsTeamDrives=None, useContentAsIndexableText=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001840 <pre>Updates a file&#x27;s metadata and/or content. This method supports patch semantics.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001841
1842Args:
1843 fileId: string, The ID of the file. (required)
1844 body: object, The request body.
1845 The object takes the form of:
1846
1847{ # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001848 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
yoshi-code-bot69706592021-03-03 03:54:02 -08001849 # Entries with null values are cleared in update and copy requests. These properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.
Bu Sun Kim65020912020-05-20 12:08:20 -07001850 &quot;a_key&quot;: &quot;A String&quot;,
1851 },
1852 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
1853 &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 -07001854 &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 -07001855 &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.
1856 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1857 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
1858 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
1859 &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.
1860 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
1861 &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.
1862 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
1863 &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.
1864 &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.
1865 &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 -07001866 &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 -07001867 &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.
1868 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001869 &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 -07001870 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1871 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1872 &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.
1873 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001874 &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 -07001875 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
1876 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1877 &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.
1878 &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.
1879 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
1880 &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.
1881 &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.
1882 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
1883 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
1884 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
1885 &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.
1886 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
1887 },
1888 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
1889 &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.
1890 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
1891 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
1892 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
1893 },
1894 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001895 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
1896 { # A restriction for accessing the content of the file.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001897 &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 -07001898 &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.
1899 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
1900 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1901 &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.
1902 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1903 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1904 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1905 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1906 },
1907 &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.
1908 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
1909 },
1910 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001911 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1912 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
1913 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
1914 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1915 &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 -07001916 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
Bu Sun Kim65020912020-05-20 12:08:20 -07001917 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
1918 },
1919 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
1920 &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.
1921 # If an unsupported color is specified, the closest color in the palette will be used instead.
1922 &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.
1923 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
1924 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1925 &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.
1926 &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.
1927 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
1928 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1929 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
1930 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1931 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1932 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1933 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1934 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1935 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1936 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1937 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1938 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1939 &quot;height&quot;: 42, # The height of the image in pixels.
1940 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1941 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1942 &quot;location&quot;: { # Geographic location information stored in the image.
1943 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1944 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1945 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1946 },
1947 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1948 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1949 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1950 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1951 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1952 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
1953 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1954 &quot;width&quot;: 42, # The width of the image in pixels.
1955 },
1956 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1957 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
1958 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
1959 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1960 &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.
1961 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1962 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1963 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1964 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1965 },
1966 &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.
1967 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001968 # 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 -08001969 # 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 -07001970 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
1971 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
1972 &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 -08001973 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001974 &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.
1975 &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.
1976 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
1977 &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 -08001978 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001979 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1980 &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.
1981 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1982 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1983 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1984 &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 -08001985 },
1986 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001987 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
1988 # 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.
1989 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001990 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001991 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1992 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001993 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001994 &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 -07001995 { # 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 -07001996 &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.
1997 &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.
1998 &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:
1999 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
2000 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
2001 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07002002 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -07002003 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
2004 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
2005 &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:
2006 # - They can only be set on user and group permissions
2007 # - The time must be in the future
2008 # - The time cannot be more than a year in the future
2009 &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.
2010 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
2011 &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 -07002012 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002013 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2014 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
2015 &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:
2016 # - file
2017 # - member
2018 &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 -07002019 # - organizer
2020 # - fileOrganizer
2021 # - writer
2022 # - commenter
2023 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002024 },
2025 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002026 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2027 &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 -07002028 # - owner
2029 # - organizer
2030 # - fileOrganizer
2031 # - writer
2032 # - commenter
2033 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07002034 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
2035 {
2036 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
2037 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
2038 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
2039 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
2040 },
2041 ],
2042 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002043 # - user
2044 # - group
2045 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -07002046 # - 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 -07002047 &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 -07002048 },
2049 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002050 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
2051 # Entries with null values are cleared in update and copy requests.
2052 &quot;a_key&quot;: &quot;A String&quot;,
2053 },
2054 &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.
2055 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
2056 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
2057 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
2058 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2059 &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.
2060 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2061 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2062 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2063 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2064 },
2065 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
2066 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
2067 &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.
2068 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002069 &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 -07002070 &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;.
2071 &quot;A String&quot;,
2072 ],
2073 &quot;starred&quot;: True or False, # Whether the user has starred the file.
2074 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002075 &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 -07002076 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002077 &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 -07002078 &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.
2079 &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.
2080 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2081 &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.
2082 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2083 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2084 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2085 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2086 },
2087 &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.
2088 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
2089 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
2090 &quot;height&quot;: 42, # The height of the video in pixels.
2091 &quot;width&quot;: 42, # The width of the video in pixels.
2092 },
2093 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
2094 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
2095 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
2096 &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.
2097 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
2098 &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 -08002099}
2100
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002101 addParents: string, A comma-separated list of parent IDs to add.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002102 enforceSingleParent: boolean, Deprecated. Adding files to multiple folders is no longer supported. Use shortcuts instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002103 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 -07002104 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002105 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
2106 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
Bu Sun Kim65020912020-05-20 12:08:20 -07002107 ocrLanguage: string, A language hint for OCR processing during image import (ISO 639-1 code).
2108 removeParents: string, A comma-separated list of parent IDs to remove.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002109 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07002110 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
2111 useContentAsIndexableText: boolean, Whether to use the uploaded content as indexable text.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002112
2113Returns:
2114 An object of the form:
2115
2116 { # The metadata for a file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002117 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
yoshi-code-bot69706592021-03-03 03:54:02 -08002118 # Entries with null values are cleared in update and copy requests. These properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002119 &quot;a_key&quot;: &quot;A String&quot;,
2120 },
2121 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
2122 &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.
2123 &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.
2124 &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.
2125 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
2126 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
2127 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
2128 &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.
2129 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
2130 &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.
2131 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
2132 &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.
2133 &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.
2134 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
2135 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
2136 &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.
2137 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
2138 &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.
2139 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
2140 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2141 &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.
2142 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2143 &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.
2144 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
2145 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
2146 &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.
2147 &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.
2148 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
2149 &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.
2150 &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.
2151 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
2152 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
2153 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
2154 &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.
2155 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
2156 },
2157 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
2158 &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.
2159 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
2160 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
2161 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
Bu Sun Kim65020912020-05-20 12:08:20 -07002162 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002163 },
2164 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
2165 { # A restriction for accessing the content of the file.
2166 &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.
2167 &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.
2168 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002169 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2170 &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.
2171 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2172 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2173 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2174 &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 -08002175 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002176 &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.
2177 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
Bu Sun Kim65020912020-05-20 12:08:20 -07002178 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002179 ],
2180 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
2181 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
2182 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
2183 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
2184 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
2185 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
2186 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
2187 },
2188 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
2189 &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.
2190 # If an unsupported color is specified, the closest color in the palette will be used instead.
2191 &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.
2192 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
2193 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
2194 &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.
2195 &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.
2196 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
2197 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
2198 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
2199 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
2200 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
2201 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
2202 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
2203 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
2204 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
2205 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
2206 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
2207 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
2208 &quot;height&quot;: 42, # The height of the image in pixels.
2209 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
2210 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
2211 &quot;location&quot;: { # Geographic location information stored in the image.
2212 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
2213 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
2214 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
2215 },
2216 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
2217 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
2218 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
2219 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
2220 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
2221 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
2222 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
2223 &quot;width&quot;: 42, # The width of the image in pixels.
2224 },
2225 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
2226 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
2227 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
2228 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2229 &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.
2230 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2231 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2232 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2233 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2234 },
2235 &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.
2236 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
2237 # 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.
2238 # 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.
2239 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
2240 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
2241 &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the file was modified by anyone (RFC 3339 date-time).
2242 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
2243 &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.
2244 &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.
2245 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
2246 &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.
2247 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07002248 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2249 &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.
2250 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2251 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2252 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2253 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2254 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002255 ],
2256 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
2257 # 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.
2258 &quot;A String&quot;,
2259 ],
2260 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
2261 &quot;A String&quot;,
2262 ],
2263 &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.
2264 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
2265 &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.
2266 &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.
2267 &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:
2268 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
2269 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
2270 # - domain - String domain name, such as &quot;thecompany.com.&quot;
2271 # - anyone - No displayName is present.
2272 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
2273 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
2274 &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:
2275 # - They can only be set on user and group permissions
2276 # - The time must be in the future
2277 # - The time cannot be more than a year in the future
2278 &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.
2279 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
2280 &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.
2281 {
2282 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2283 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
2284 &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:
2285 # - file
2286 # - member
2287 &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:
2288 # - organizer
2289 # - fileOrganizer
2290 # - writer
2291 # - commenter
2292 # - reader
2293 },
2294 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002295 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002296 &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:
2297 # - owner
2298 # - organizer
2299 # - fileOrganizer
2300 # - writer
2301 # - commenter
2302 # - reader
2303 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
2304 {
2305 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
2306 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
2307 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
2308 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
2309 },
2310 ],
2311 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
2312 # - user
2313 # - group
2314 # - domain
2315 # - 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.
2316 &quot;view&quot;: &quot;A String&quot;, # Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
Bu Sun Kim65020912020-05-20 12:08:20 -07002317 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002318 ],
2319 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
2320 # Entries with null values are cleared in update and copy requests.
2321 &quot;a_key&quot;: &quot;A String&quot;,
2322 },
2323 &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.
2324 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
2325 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
2326 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
2327 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2328 &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.
2329 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2330 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2331 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2332 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2333 },
2334 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
2335 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
2336 &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.
2337 },
2338 &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.
2339 &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;.
2340 &quot;A String&quot;,
2341 ],
2342 &quot;starred&quot;: True or False, # Whether the user has starred the file.
2343 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
2344 &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.
2345 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
2346 &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.
2347 &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.
2348 &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.
2349 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2350 &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.
2351 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2352 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2353 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2354 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2355 },
2356 &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.
2357 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
2358 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
2359 &quot;height&quot;: 42, # The height of the video in pixels.
2360 &quot;width&quot;: 42, # The width of the video in pixels.
2361 },
2362 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
2363 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
2364 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
2365 &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.
2366 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
2367 &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.
2368}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002369</div>
2370
2371<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002372 <code class="details" id="watch">watch(fileId, acknowledgeAbuse=None, body=None, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002373 <pre>Subscribes to changes to a file
2374
2375Args:
2376 fileId: string, The ID of the file. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002377 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002378 The object takes the form of:
2379
2380{ # An notification channel used to watch for resource changes.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002381 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
2382 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
2383 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
2384 &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;.
2385 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
2386 &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
2387 },
2388 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
2389 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
2390 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
2391 &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002392 &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel. Valid values are &quot;web_hook&quot; (or &quot;webhook&quot;). Both values refer to a channel where Http requests are used to deliver messages.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002393}
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002394
2395 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 -07002396 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 -07002397 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07002398 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002399
2400Returns:
2401 An object of the form:
2402
2403 { # An notification channel used to watch for resource changes.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002404 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
2405 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
2406 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
2407 &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;.
2408 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
2409 &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
2410 },
2411 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
2412 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
2413 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
2414 &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002415 &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel. Valid values are &quot;web_hook&quot; (or &quot;webhook&quot;). Both values refer to a channel where Http requests are used to deliver messages.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002416}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002417</div>
2418
2419<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002420 <code class="details" id="watch_media">watch_media(fileId, acknowledgeAbuse=None, body=None, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002421 <pre>Subscribes to changes to a file
2422
2423Args:
2424 fileId: string, The ID of the file. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002425 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002426 The object takes the form of:
2427
2428{ # An notification channel used to watch for resource changes.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002429 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
2430 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
2431 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
2432 &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;.
2433 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
2434 &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
2435 },
2436 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
2437 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
2438 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
2439 &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002440 &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel. Valid values are &quot;web_hook&quot; (or &quot;webhook&quot;). Both values refer to a channel where Http requests are used to deliver messages.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002441}
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002442
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002443 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 -07002444 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 -07002445 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07002446 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002447
2448Returns:
2449 The media object as a string.
2450
2451 </pre>
2452</div>
2453
2454</body></html>