blob: 6a11dfe3cc2f96bbc96ee6009b82fe91385f88bb [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>
yoshi-code-bot12d387c2021-10-26 00:24:32 -070094<p class="firstline">Exports a Google Workspace document to the requested MIME type and returns exported byte content. 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>
yoshi-code-bot12d387c2021-10-26 00:24:32 -070097<p class="firstline">Exports a Google Workspace document to the requested MIME type and returns exported byte content. 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>
yoshi-code-botad81f3d2021-09-28 00:22:30 -0700115<p class="firstline">Updates a file's metadata and/or content. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might change automatically, such as modifiedDate. 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.
yoshi-code-bot815c1ac2021-11-15 23:24:17 -0800143 &quot;canAcceptOwnership&quot;: True or False, # Whether the current user is the pending owner of the file. Not populated for shared drive files.
Bu Sun Kim65020912020-05-20 12:08:20 -0700144 &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 -0700145 &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 -0700146 &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.
147 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
yoshi-code-bot04bafe12021-06-29 00:20:25 -0700148 &quot;canChangeSecurityUpdateEnabled&quot;: True or False, # Whether the current user can change the securityUpdateEnabled field on link share metadata.
Bu Sun Kim65020912020-05-20 12:08:20 -0700149 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
150 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
151 &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.
152 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
153 &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.
154 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
155 &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.
156 &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.
157 &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 -0700158 &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 -0700159 &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.
160 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700161 &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 -0700162 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
163 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
164 &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.
165 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700166 &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 -0700167 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
168 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
169 &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.
170 &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.
171 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
172 &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.
173 &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.
174 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
175 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
176 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
177 &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.
178 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
179 },
180 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
181 &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.
182 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
183 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
184 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
185 },
186 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700187 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
188 { # A restriction for accessing the content of the file.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700189 &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 -0700190 &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.
191 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
192 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
193 &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.
194 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
195 &quot;me&quot;: True or False, # Whether this user is the requesting user.
196 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
197 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
198 },
199 &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.
200 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
201 },
202 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700203 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
204 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
205 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
206 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
207 &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 -0700208 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
Bu Sun Kim65020912020-05-20 12:08:20 -0700209 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
210 },
211 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
yoshi-code-botb539cc42021-08-03 00:20:27 -0700212 &quot;folderColorRgb&quot;: &quot;A String&quot;, # The color for a folder or shortcut to a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700213 # If an unsupported color is specified, the closest color in the palette will be used instead.
214 &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.
215 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
216 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
217 &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.
218 &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.
219 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
220 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
221 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
222 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
223 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
224 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
225 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
226 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
227 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
228 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
229 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
230 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
231 &quot;height&quot;: 42, # The height of the image in pixels.
232 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
233 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
234 &quot;location&quot;: { # Geographic location information stored in the image.
235 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
236 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
237 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
238 },
239 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
240 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
241 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
242 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
243 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
244 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
245 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
246 &quot;width&quot;: 42, # The width of the image in pixels.
247 },
248 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
249 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
250 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
251 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
252 &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.
253 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
254 &quot;me&quot;: True or False, # Whether this user is the requesting user.
255 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
256 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
257 },
yoshi-code-bot04bafe12021-06-29 00:20:25 -0700258 &quot;linkShareMetadata&quot;: { # Contains details about the link URLs that clients are using to refer to this item.
259 &quot;securityUpdateEligible&quot;: True or False, # Whether the file is eligible for security update.
260 &quot;securityUpdateEnabled&quot;: True or False, # Whether the security update is enabled for this file.
261 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700262 &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.
263 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700264 # 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 -0800265 # 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 -0700266 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
267 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
268 &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 -0800269 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700270 &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.
271 &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.
272 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
yoshi-code-botab1d6dc2021-05-28 00:42:02 -0700273 &quot;owners&quot;: [ # The owner of this file. Only certain legacy files may have more than one owner. This field isn&#x27;t populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800274 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700275 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
276 &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.
277 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
278 &quot;me&quot;: True or False, # Whether this user is the requesting user.
279 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
280 &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 -0800281 },
282 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700283 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
284 # 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.
285 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800286 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700287 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
288 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700289 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700290 &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 -0700291 { # 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 -0700292 &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.
293 &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.
294 &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:
295 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
296 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
297 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700298 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -0700299 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
300 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
301 &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:
302 # - They can only be set on user and group permissions
303 # - The time must be in the future
304 # - The time cannot be more than a year in the future
305 &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.
306 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
yoshi-code-bot815c1ac2021-11-15 23:24:17 -0800307 &quot;pendingOwner&quot;: True or False, # Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that are not in a shared drive.
Bu Sun Kim65020912020-05-20 12:08:20 -0700308 &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 -0700309 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700310 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
311 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
312 &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:
313 # - file
314 # - member
315 &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 -0700316 # - organizer
317 # - fileOrganizer
318 # - writer
319 # - commenter
320 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700321 },
322 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700323 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
324 &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 -0700325 # - owner
326 # - organizer
327 # - fileOrganizer
328 # - writer
329 # - commenter
330 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700331 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
332 {
333 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
334 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
335 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
336 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
337 },
338 ],
339 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700340 # - user
341 # - group
342 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -0700343 # - 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 -0700344 &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 -0700345 },
346 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700347 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
348 # Entries with null values are cleared in update and copy requests.
349 &quot;a_key&quot;: &quot;A String&quot;,
350 },
351 &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.
yoshi-code-bot04bafe12021-06-29 00:20:25 -0700352 &quot;resourceKey&quot;: &quot;A String&quot;, # A key needed to access the item via a shared link.
Bu Sun Kim65020912020-05-20 12:08:20 -0700353 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
354 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
355 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
356 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
357 &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.
358 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
359 &quot;me&quot;: True or False, # Whether this user is the requesting user.
360 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
361 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
362 },
363 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
364 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
365 &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.
yoshi-code-bot04bafe12021-06-29 00:20:25 -0700366 &quot;targetResourceKey&quot;: &quot;A String&quot;, # The ResourceKey for the target file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700367 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700368 &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 -0700369 &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;.
370 &quot;A String&quot;,
371 ],
372 &quot;starred&quot;: True or False, # Whether the user has starred the file.
373 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700374 &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 -0700375 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700376 &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 -0700377 &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.
378 &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.
379 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
380 &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.
381 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
382 &quot;me&quot;: True or False, # Whether this user is the requesting user.
383 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
384 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
385 },
386 &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.
387 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
388 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
389 &quot;height&quot;: 42, # The height of the video in pixels.
390 &quot;width&quot;: 42, # The width of the video in pixels.
391 },
392 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
393 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
394 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
395 &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.
396 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
397 &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 -0800398}
399
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800400 enforceSingleParent: boolean, Deprecated. Copying files into multiple folders is no longer supported. Use shortcuts instead.
Bu Sun Kim65020912020-05-20 12:08:20 -0700401 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 -0700402 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 -0700403 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 -0700404 ocrLanguage: string, A language hint for OCR processing during image import (ISO 639-1 code).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700405 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700406 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800407
408Returns:
409 An object of the form:
410
411 { # The metadata for a file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800412 &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 -0800413 # 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 -0800414 &quot;a_key&quot;: &quot;A String&quot;,
415 },
416 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
yoshi-code-bot815c1ac2021-11-15 23:24:17 -0800417 &quot;canAcceptOwnership&quot;: True or False, # Whether the current user is the pending owner of the file. Not populated for shared drive files.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800418 &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.
419 &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.
420 &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.
421 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
yoshi-code-bot04bafe12021-06-29 00:20:25 -0700422 &quot;canChangeSecurityUpdateEnabled&quot;: True or False, # Whether the current user can change the securityUpdateEnabled field on link share metadata.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800423 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
424 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
425 &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.
426 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
427 &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.
428 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
429 &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.
430 &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.
431 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
432 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
433 &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.
434 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
435 &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.
436 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
437 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
438 &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.
439 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
440 &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.
441 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
442 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
443 &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.
444 &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.
445 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
446 &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.
447 &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.
448 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
449 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
450 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
451 &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.
452 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
453 },
454 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
455 &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.
456 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
457 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
458 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
Bu Sun Kim65020912020-05-20 12:08:20 -0700459 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800460 },
461 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
462 { # A restriction for accessing the content of the file.
463 &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.
464 &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.
465 &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 -0700466 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
467 &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.
468 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
469 &quot;me&quot;: True or False, # Whether this user is the requesting user.
470 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
471 &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 -0800472 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800473 &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.
474 &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 -0700475 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800476 ],
477 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
478 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
479 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
480 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
481 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
482 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
483 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
484 },
485 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
yoshi-code-botb539cc42021-08-03 00:20:27 -0700486 &quot;folderColorRgb&quot;: &quot;A String&quot;, # The color for a folder or shortcut to a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800487 # If an unsupported color is specified, the closest color in the palette will be used instead.
488 &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.
489 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
490 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
491 &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.
492 &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.
493 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
494 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
495 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
496 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
497 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
498 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
499 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
500 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
501 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
502 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
503 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
504 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
505 &quot;height&quot;: 42, # The height of the image in pixels.
506 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
507 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
508 &quot;location&quot;: { # Geographic location information stored in the image.
509 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
510 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
511 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
512 },
513 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
514 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
515 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
516 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
517 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
518 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
519 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
520 &quot;width&quot;: 42, # The width of the image in pixels.
521 },
522 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
523 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
524 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
525 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
526 &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.
527 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
528 &quot;me&quot;: True or False, # Whether this user is the requesting user.
529 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
530 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
531 },
yoshi-code-bot04bafe12021-06-29 00:20:25 -0700532 &quot;linkShareMetadata&quot;: { # Contains details about the link URLs that clients are using to refer to this item.
533 &quot;securityUpdateEligible&quot;: True or False, # Whether the file is eligible for security update.
534 &quot;securityUpdateEnabled&quot;: True or False, # Whether the security update is enabled for this file.
535 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800536 &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.
537 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
538 # 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.
539 # 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.
540 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
541 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
542 &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the file was modified by anyone (RFC 3339 date-time).
543 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
544 &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.
545 &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.
546 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
yoshi-code-botab1d6dc2021-05-28 00:42:02 -0700547 &quot;owners&quot;: [ # The owner of this file. Only certain legacy files may have more than one owner. This field isn&#x27;t populated for items in shared drives.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800548 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700549 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
550 &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.
551 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
552 &quot;me&quot;: True or False, # Whether this user is the requesting user.
553 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
554 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
555 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800556 ],
557 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
558 # 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.
559 &quot;A String&quot;,
560 ],
561 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
562 &quot;A String&quot;,
563 ],
564 &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.
565 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
566 &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.
567 &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.
568 &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:
569 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
570 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
571 # - domain - String domain name, such as &quot;thecompany.com.&quot;
572 # - anyone - No displayName is present.
573 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
574 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
575 &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:
576 # - They can only be set on user and group permissions
577 # - The time must be in the future
578 # - The time cannot be more than a year in the future
579 &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.
580 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
yoshi-code-bot815c1ac2021-11-15 23:24:17 -0800581 &quot;pendingOwner&quot;: True or False, # Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that are not in a shared drive.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800582 &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.
583 {
584 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
585 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
586 &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:
587 # - file
588 # - member
589 &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:
590 # - organizer
591 # - fileOrganizer
592 # - writer
593 # - commenter
594 # - reader
595 },
596 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700597 &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 -0800598 &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:
599 # - owner
600 # - organizer
601 # - fileOrganizer
602 # - writer
603 # - commenter
604 # - reader
605 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
606 {
607 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
608 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
609 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
610 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
611 },
612 ],
613 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
614 # - user
615 # - group
616 # - domain
617 # - 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.
618 &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 -0700619 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800620 ],
621 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
622 # Entries with null values are cleared in update and copy requests.
623 &quot;a_key&quot;: &quot;A String&quot;,
624 },
625 &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.
yoshi-code-bot04bafe12021-06-29 00:20:25 -0700626 &quot;resourceKey&quot;: &quot;A String&quot;, # A key needed to access the item via a shared link.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800627 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
628 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
629 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
630 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
631 &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.
632 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
633 &quot;me&quot;: True or False, # Whether this user is the requesting user.
634 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
635 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
636 },
637 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
638 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
639 &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.
yoshi-code-bot04bafe12021-06-29 00:20:25 -0700640 &quot;targetResourceKey&quot;: &quot;A String&quot;, # The ResourceKey for the target file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800641 },
642 &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.
643 &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;.
644 &quot;A String&quot;,
645 ],
646 &quot;starred&quot;: True or False, # Whether the user has starred the file.
647 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
648 &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.
649 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
650 &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.
651 &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.
652 &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.
653 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
654 &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.
655 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
656 &quot;me&quot;: True or False, # Whether this user is the requesting user.
657 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
658 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
659 },
660 &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.
661 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
662 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
663 &quot;height&quot;: 42, # The height of the video in pixels.
664 &quot;width&quot;: 42, # The width of the video in pixels.
665 },
666 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
667 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
668 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
669 &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.
670 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
671 &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.
672}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800673</div>
674
675<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800676 <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 -0800677 <pre>Creates a new file.
678
679Args:
680 body: object, The request body.
681 The object takes the form of:
682
683{ # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700684 &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 -0800685 # 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 -0700686 &quot;a_key&quot;: &quot;A String&quot;,
687 },
688 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
yoshi-code-bot815c1ac2021-11-15 23:24:17 -0800689 &quot;canAcceptOwnership&quot;: True or False, # Whether the current user is the pending owner of the file. Not populated for shared drive files.
Bu Sun Kim65020912020-05-20 12:08:20 -0700690 &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 -0700691 &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 -0700692 &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.
693 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
yoshi-code-bot04bafe12021-06-29 00:20:25 -0700694 &quot;canChangeSecurityUpdateEnabled&quot;: True or False, # Whether the current user can change the securityUpdateEnabled field on link share metadata.
Bu Sun Kim65020912020-05-20 12:08:20 -0700695 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
696 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
697 &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.
698 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
699 &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.
700 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
701 &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.
702 &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.
703 &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 -0700704 &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 -0700705 &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.
706 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700707 &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 -0700708 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
709 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
710 &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.
711 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700712 &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 -0700713 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
714 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
715 &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.
716 &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.
717 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
718 &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.
719 &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.
720 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
721 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
722 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
723 &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.
724 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
725 },
726 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
727 &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.
728 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
729 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
730 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
731 },
732 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700733 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
734 { # A restriction for accessing the content of the file.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700735 &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 -0700736 &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.
737 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
738 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
739 &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.
740 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
741 &quot;me&quot;: True or False, # Whether this user is the requesting user.
742 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
743 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
744 },
745 &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.
746 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
747 },
748 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700749 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
750 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
751 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
752 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
753 &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 -0700754 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
Bu Sun Kim65020912020-05-20 12:08:20 -0700755 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
756 },
757 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
yoshi-code-botb539cc42021-08-03 00:20:27 -0700758 &quot;folderColorRgb&quot;: &quot;A String&quot;, # The color for a folder or shortcut to a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700759 # If an unsupported color is specified, the closest color in the palette will be used instead.
760 &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.
761 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
762 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
763 &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.
764 &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.
765 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
766 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
767 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
768 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
769 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
770 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
771 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
772 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
773 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
774 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
775 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
776 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
777 &quot;height&quot;: 42, # The height of the image in pixels.
778 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
779 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
780 &quot;location&quot;: { # Geographic location information stored in the image.
781 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
782 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
783 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
784 },
785 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
786 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
787 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
788 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
789 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
790 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
791 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
792 &quot;width&quot;: 42, # The width of the image in pixels.
793 },
794 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
795 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
796 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
797 &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.
803 },
yoshi-code-bot04bafe12021-06-29 00:20:25 -0700804 &quot;linkShareMetadata&quot;: { # Contains details about the link URLs that clients are using to refer to this item.
805 &quot;securityUpdateEligible&quot;: True or False, # Whether the file is eligible for security update.
806 &quot;securityUpdateEnabled&quot;: True or False, # Whether the security update is enabled for this file.
807 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700808 &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.
809 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700810 # 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 -0800811 # 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 -0700812 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
813 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
814 &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 -0800815 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700816 &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.
817 &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.
818 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
yoshi-code-botab1d6dc2021-05-28 00:42:02 -0700819 &quot;owners&quot;: [ # The owner of this file. Only certain legacy files may have more than one owner. This field isn&#x27;t populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800820 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700821 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
822 &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.
823 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
824 &quot;me&quot;: True or False, # Whether this user is the requesting user.
825 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
826 &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 -0800827 },
828 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700829 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
830 # 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.
831 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800832 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700833 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
834 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700835 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700836 &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 -0700837 { # 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 -0700838 &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.
839 &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.
840 &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:
841 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
842 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
843 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700844 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -0700845 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
846 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
847 &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:
848 # - They can only be set on user and group permissions
849 # - The time must be in the future
850 # - The time cannot be more than a year in the future
851 &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.
852 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
yoshi-code-bot815c1ac2021-11-15 23:24:17 -0800853 &quot;pendingOwner&quot;: True or False, # Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that are not in a shared drive.
Bu Sun Kim65020912020-05-20 12:08:20 -0700854 &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 -0700855 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700856 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
857 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
858 &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:
859 # - file
860 # - member
861 &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 -0700862 # - organizer
863 # - fileOrganizer
864 # - writer
865 # - commenter
866 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700867 },
868 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700869 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
870 &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 -0700871 # - owner
872 # - organizer
873 # - fileOrganizer
874 # - writer
875 # - commenter
876 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700877 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
878 {
879 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
880 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
881 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
882 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
883 },
884 ],
885 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700886 # - user
887 # - group
888 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -0700889 # - 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 -0700890 &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 -0700891 },
892 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700893 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
894 # Entries with null values are cleared in update and copy requests.
895 &quot;a_key&quot;: &quot;A String&quot;,
896 },
897 &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.
yoshi-code-bot04bafe12021-06-29 00:20:25 -0700898 &quot;resourceKey&quot;: &quot;A String&quot;, # A key needed to access the item via a shared link.
Bu Sun Kim65020912020-05-20 12:08:20 -0700899 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
900 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
901 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
902 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
903 &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.
904 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
905 &quot;me&quot;: True or False, # Whether this user is the requesting user.
906 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
907 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
908 },
909 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
910 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
911 &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.
yoshi-code-bot04bafe12021-06-29 00:20:25 -0700912 &quot;targetResourceKey&quot;: &quot;A String&quot;, # The ResourceKey for the target file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700913 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700914 &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 -0700915 &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;.
916 &quot;A String&quot;,
917 ],
918 &quot;starred&quot;: True or False, # Whether the user has starred the file.
919 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700920 &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 -0700921 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700922 &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 -0700923 &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.
924 &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.
925 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
926 &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.
927 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
928 &quot;me&quot;: True or False, # Whether this user is the requesting user.
929 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
930 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
931 },
932 &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.
933 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
934 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
935 &quot;height&quot;: 42, # The height of the video in pixels.
936 &quot;width&quot;: 42, # The width of the video in pixels.
937 },
938 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
939 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
940 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
941 &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.
942 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
943 &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 -0800944}
945
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800946 enforceSingleParent: boolean, Deprecated. Creating files in multiple folders is no longer supported.
Bu Sun Kim65020912020-05-20 12:08:20 -0700947 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 -0700948 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 -0700949 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 -0800950 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
951 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 -0400952 ocrLanguage: string, A language hint for OCR processing during image import (ISO 639-1 code).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700953 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700954 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
955 useContentAsIndexableText: boolean, Whether to use the uploaded content as indexable text.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800956
957Returns:
958 An object of the form:
959
960 { # The metadata for a file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800961 &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 -0800962 # 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 -0800963 &quot;a_key&quot;: &quot;A String&quot;,
964 },
965 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
yoshi-code-bot815c1ac2021-11-15 23:24:17 -0800966 &quot;canAcceptOwnership&quot;: True or False, # Whether the current user is the pending owner of the file. Not populated for shared drive files.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800967 &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.
968 &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.
969 &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.
970 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
yoshi-code-bot04bafe12021-06-29 00:20:25 -0700971 &quot;canChangeSecurityUpdateEnabled&quot;: True or False, # Whether the current user can change the securityUpdateEnabled field on link share metadata.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800972 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
973 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
974 &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.
975 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
976 &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.
977 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
978 &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.
979 &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.
980 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
981 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
982 &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.
983 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
984 &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.
985 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
986 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
987 &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.
988 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
989 &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.
990 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
991 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
992 &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.
993 &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.
994 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
995 &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.
996 &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.
997 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
998 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
999 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
1000 &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.
1001 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
1002 },
1003 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
1004 &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.
1005 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
1006 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
1007 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
Bu Sun Kim65020912020-05-20 12:08:20 -07001008 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001009 },
1010 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
1011 { # A restriction for accessing the content of the file.
1012 &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.
1013 &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.
1014 &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 -07001015 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1016 &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.
1017 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1018 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1019 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1020 &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 -08001021 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001022 &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.
1023 &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 -07001024 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001025 ],
1026 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1027 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
1028 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
1029 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1030 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
1031 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
1032 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
1033 },
1034 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
yoshi-code-botb539cc42021-08-03 00:20:27 -07001035 &quot;folderColorRgb&quot;: &quot;A String&quot;, # The color for a folder or shortcut to a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001036 # If an unsupported color is specified, the closest color in the palette will be used instead.
1037 &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.
1038 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
1039 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1040 &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.
1041 &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.
1042 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
1043 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1044 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
1045 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1046 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1047 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1048 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1049 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1050 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1051 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1052 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1053 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1054 &quot;height&quot;: 42, # The height of the image in pixels.
1055 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1056 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1057 &quot;location&quot;: { # Geographic location information stored in the image.
1058 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1059 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1060 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1061 },
1062 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1063 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1064 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1065 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1066 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1067 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
1068 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1069 &quot;width&quot;: 42, # The width of the image in pixels.
1070 },
1071 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1072 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
1073 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
1074 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1075 &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.
1076 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1077 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1078 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1079 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1080 },
yoshi-code-bot04bafe12021-06-29 00:20:25 -07001081 &quot;linkShareMetadata&quot;: { # Contains details about the link URLs that clients are using to refer to this item.
1082 &quot;securityUpdateEligible&quot;: True or False, # Whether the file is eligible for security update.
1083 &quot;securityUpdateEnabled&quot;: True or False, # Whether the security update is enabled for this file.
1084 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001085 &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.
1086 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
1087 # 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.
1088 # 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.
1089 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
1090 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
1091 &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the file was modified by anyone (RFC 3339 date-time).
1092 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
1093 &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.
1094 &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.
1095 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
yoshi-code-botab1d6dc2021-05-28 00:42:02 -07001096 &quot;owners&quot;: [ # The owner of this file. Only certain legacy files may have more than one owner. This field isn&#x27;t populated for items in shared drives.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001097 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001098 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1099 &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.
1100 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1101 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1102 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1103 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1104 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001105 ],
1106 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
1107 # 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.
1108 &quot;A String&quot;,
1109 ],
1110 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1111 &quot;A String&quot;,
1112 ],
1113 &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.
1114 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
1115 &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.
1116 &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.
1117 &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:
1118 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
1119 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
1120 # - domain - String domain name, such as &quot;thecompany.com.&quot;
1121 # - anyone - No displayName is present.
1122 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
1123 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
1124 &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:
1125 # - They can only be set on user and group permissions
1126 # - The time must be in the future
1127 # - The time cannot be more than a year in the future
1128 &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.
1129 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
yoshi-code-bot815c1ac2021-11-15 23:24:17 -08001130 &quot;pendingOwner&quot;: True or False, # Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that are not in a shared drive.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001131 &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.
1132 {
1133 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1134 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1135 &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:
1136 # - file
1137 # - member
1138 &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:
1139 # - organizer
1140 # - fileOrganizer
1141 # - writer
1142 # - commenter
1143 # - reader
1144 },
1145 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001146 &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 -08001147 &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:
1148 # - owner
1149 # - organizer
1150 # - fileOrganizer
1151 # - writer
1152 # - commenter
1153 # - reader
1154 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1155 {
1156 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1157 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1158 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1159 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1160 },
1161 ],
1162 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
1163 # - user
1164 # - group
1165 # - domain
1166 # - 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.
1167 &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 -07001168 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001169 ],
1170 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
1171 # Entries with null values are cleared in update and copy requests.
1172 &quot;a_key&quot;: &quot;A String&quot;,
1173 },
1174 &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.
yoshi-code-bot04bafe12021-06-29 00:20:25 -07001175 &quot;resourceKey&quot;: &quot;A String&quot;, # A key needed to access the item via a shared link.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001176 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
1177 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
1178 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
1179 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1180 &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.
1181 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1182 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1183 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1184 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1185 },
1186 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
1187 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
1188 &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.
yoshi-code-bot04bafe12021-06-29 00:20:25 -07001189 &quot;targetResourceKey&quot;: &quot;A String&quot;, # The ResourceKey for the target file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001190 },
1191 &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.
1192 &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;.
1193 &quot;A String&quot;,
1194 ],
1195 &quot;starred&quot;: True or False, # Whether the user has starred the file.
1196 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
1197 &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.
1198 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
1199 &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.
1200 &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.
1201 &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.
1202 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1203 &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.
1204 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1205 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1206 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1207 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1208 },
1209 &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.
1210 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
1211 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
1212 &quot;height&quot;: 42, # The height of the video in pixels.
1213 &quot;width&quot;: 42, # The width of the video in pixels.
1214 },
1215 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
1216 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
1217 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
1218 &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.
1219 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
1220 &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.
1221}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001222</div>
1223
1224<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001225 <code class="details" id="delete">delete(fileId, enforceSingleParent=None, supportsAllDrives=None, supportsTeamDrives=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001226 <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 -08001227
1228Args:
1229 fileId: string, The ID of the file. (required)
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001230 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 -07001231 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001232 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001233</pre>
1234</div>
1235
1236<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001237 <code class="details" id="emptyTrash">emptyTrash(enforceSingleParent=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07001238 <pre>Permanently deletes all of the user&#x27;s trashed files.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001239
1240Args:
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001241 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 -08001242</pre>
1243</div>
1244
1245<div class="method">
1246 <code class="details" id="export">export(fileId, mimeType)</code>
yoshi-code-bot12d387c2021-10-26 00:24:32 -07001247 <pre>Exports a Google Workspace document to the requested MIME type and returns exported byte content. Note that the exported content is limited to 10MB.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001248
1249Args:
1250 fileId: string, The ID of the file. (required)
1251 mimeType: string, The MIME type of the format requested for this export. (required)
1252</pre>
1253</div>
1254
1255<div class="method">
1256 <code class="details" id="export_media">export_media(fileId, mimeType)</code>
yoshi-code-bot12d387c2021-10-26 00:24:32 -07001257 <pre>Exports a Google Workspace document to the requested MIME type and returns exported byte content. Note that the exported content is limited to 10MB.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001258
1259Args:
1260 fileId: string, The ID of the file. (required)
1261 mimeType: string, The MIME type of the format requested for this export. (required)
1262</pre>
1263</div>
1264
1265<div class="method">
yoshi-code-botc2cd3262021-05-16 02:16:04 -07001266 <code class="details" id="generateIds">generateIds(count=None, space=None, type=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -07001267 <pre>Generates a set of file IDs which can be provided in create or copy requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001268
1269Args:
1270 count: integer, The number of IDs to return.
yoshi-code-botc2cd3262021-05-16 02:16:04 -07001271 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;)
1272 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 -08001273
1274Returns:
1275 An object of the form:
1276
1277 { # A list of generated file IDs which can be provided in create requests.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001278 &quot;ids&quot;: [ # The IDs generated for the requesting user in the specified space.
1279 &quot;A String&quot;,
1280 ],
1281 &quot;kind&quot;: &quot;drive#generatedIds&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#generatedIds&quot;.
1282 &quot;space&quot;: &quot;A String&quot;, # The type of file that can be created with these IDs.
1283}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001284</div>
1285
1286<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001287 <code class="details" id="get">get(fileId, acknowledgeAbuse=None, includePermissionsForView=None, supportsAllDrives=None, supportsTeamDrives=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07001288 <pre>Gets a file&#x27;s metadata or content by ID.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001289
1290Args:
1291 fileId: string, The ID of the file. (required)
1292 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 -07001293 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 -07001294 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001295 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001296
1297Returns:
1298 An object of the form:
1299
1300 { # The metadata for a file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001301 &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 -08001302 # 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 -08001303 &quot;a_key&quot;: &quot;A String&quot;,
1304 },
1305 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
yoshi-code-bot815c1ac2021-11-15 23:24:17 -08001306 &quot;canAcceptOwnership&quot;: True or False, # Whether the current user is the pending owner of the file. Not populated for shared drive files.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001307 &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.
1308 &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.
1309 &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.
1310 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
yoshi-code-bot04bafe12021-06-29 00:20:25 -07001311 &quot;canChangeSecurityUpdateEnabled&quot;: True or False, # Whether the current user can change the securityUpdateEnabled field on link share metadata.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001312 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
1313 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
1314 &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.
1315 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
1316 &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.
1317 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
1318 &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.
1319 &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.
1320 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
1321 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
1322 &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.
1323 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
1324 &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.
1325 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1326 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1327 &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.
1328 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1329 &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.
1330 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
1331 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1332 &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.
1333 &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.
1334 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
1335 &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.
1336 &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.
1337 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
1338 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
1339 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
1340 &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.
1341 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
1342 },
1343 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
1344 &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.
1345 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
1346 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
1347 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
Bu Sun Kim65020912020-05-20 12:08:20 -07001348 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001349 },
1350 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
1351 { # A restriction for accessing the content of the file.
1352 &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.
1353 &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.
1354 &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 -07001355 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1356 &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.
1357 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1358 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1359 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1360 &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 -08001361 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001362 &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.
1363 &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 -07001364 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001365 ],
1366 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1367 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
1368 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
1369 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1370 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
1371 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
1372 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
1373 },
1374 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
yoshi-code-botb539cc42021-08-03 00:20:27 -07001375 &quot;folderColorRgb&quot;: &quot;A String&quot;, # The color for a folder or shortcut to a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001376 # If an unsupported color is specified, the closest color in the palette will be used instead.
1377 &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.
1378 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
1379 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1380 &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.
1381 &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.
1382 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
1383 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1384 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
1385 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1386 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1387 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1388 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1389 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1390 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1391 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1392 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1393 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1394 &quot;height&quot;: 42, # The height of the image in pixels.
1395 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1396 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1397 &quot;location&quot;: { # Geographic location information stored in the image.
1398 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1399 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1400 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1401 },
1402 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1403 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1404 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1405 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1406 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1407 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
1408 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1409 &quot;width&quot;: 42, # The width of the image in pixels.
1410 },
1411 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1412 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
1413 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
1414 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1415 &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.
1416 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1417 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1418 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1419 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1420 },
yoshi-code-bot04bafe12021-06-29 00:20:25 -07001421 &quot;linkShareMetadata&quot;: { # Contains details about the link URLs that clients are using to refer to this item.
1422 &quot;securityUpdateEligible&quot;: True or False, # Whether the file is eligible for security update.
1423 &quot;securityUpdateEnabled&quot;: True or False, # Whether the security update is enabled for this file.
1424 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001425 &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.
1426 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
1427 # 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.
1428 # 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.
1429 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
1430 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
1431 &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the file was modified by anyone (RFC 3339 date-time).
1432 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
1433 &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.
1434 &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.
1435 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
yoshi-code-botab1d6dc2021-05-28 00:42:02 -07001436 &quot;owners&quot;: [ # The owner of this file. Only certain legacy files may have more than one owner. This field isn&#x27;t populated for items in shared drives.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001437 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001438 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1439 &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.
1440 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1441 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1442 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1443 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1444 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001445 ],
1446 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
1447 # 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.
1448 &quot;A String&quot;,
1449 ],
1450 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1451 &quot;A String&quot;,
1452 ],
1453 &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.
1454 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
1455 &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.
1456 &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.
1457 &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:
1458 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
1459 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
1460 # - domain - String domain name, such as &quot;thecompany.com.&quot;
1461 # - anyone - No displayName is present.
1462 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
1463 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
1464 &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:
1465 # - They can only be set on user and group permissions
1466 # - The time must be in the future
1467 # - The time cannot be more than a year in the future
1468 &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.
1469 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
yoshi-code-bot815c1ac2021-11-15 23:24:17 -08001470 &quot;pendingOwner&quot;: True or False, # Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that are not in a shared drive.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001471 &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.
1472 {
1473 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1474 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1475 &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:
1476 # - file
1477 # - member
1478 &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:
1479 # - organizer
1480 # - fileOrganizer
1481 # - writer
1482 # - commenter
1483 # - reader
1484 },
1485 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001486 &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 -08001487 &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:
1488 # - owner
1489 # - organizer
1490 # - fileOrganizer
1491 # - writer
1492 # - commenter
1493 # - reader
1494 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1495 {
1496 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1497 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1498 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1499 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1500 },
1501 ],
1502 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
1503 # - user
1504 # - group
1505 # - domain
1506 # - 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.
1507 &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 -07001508 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001509 ],
1510 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
1511 # Entries with null values are cleared in update and copy requests.
1512 &quot;a_key&quot;: &quot;A String&quot;,
1513 },
1514 &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.
yoshi-code-bot04bafe12021-06-29 00:20:25 -07001515 &quot;resourceKey&quot;: &quot;A String&quot;, # A key needed to access the item via a shared link.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001516 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
1517 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
1518 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
1519 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1520 &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.
1521 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1522 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1523 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1524 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1525 },
1526 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
1527 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
1528 &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.
yoshi-code-bot04bafe12021-06-29 00:20:25 -07001529 &quot;targetResourceKey&quot;: &quot;A String&quot;, # The ResourceKey for the target file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001530 },
1531 &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.
1532 &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;.
1533 &quot;A String&quot;,
1534 ],
1535 &quot;starred&quot;: True or False, # Whether the user has starred the file.
1536 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
1537 &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.
1538 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
1539 &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.
1540 &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.
1541 &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.
1542 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1543 &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.
1544 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1545 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1546 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1547 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1548 },
1549 &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.
1550 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
1551 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
1552 &quot;height&quot;: 42, # The height of the video in pixels.
1553 &quot;width&quot;: 42, # The width of the video in pixels.
1554 },
1555 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
1556 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
1557 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
1558 &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.
1559 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
1560 &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.
1561}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001562</div>
1563
1564<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001565 <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 -07001566 <pre>Gets a file&#x27;s metadata or content by ID.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001567
1568Args:
1569 fileId: string, The ID of the file. (required)
1570 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 -07001571 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 -07001572 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001573 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001574
1575Returns:
1576 The media object as a string.
1577
1578 </pre>
1579</div>
1580
1581<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001582 <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 -08001583 <pre>Lists or searches files.
1584
1585Args:
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001586 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 -07001587 corpus: string, The source of files to list. Deprecated: use &#x27;corpora&#x27; instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001588 Allowed values
Bu Sun Kim65020912020-05-20 12:08:20 -07001589 domain - Files shared to the user&#x27;s domain.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001590 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 -07001591 driveId: string, ID of the shared drive to search.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001592 includeItemsFromAllDrives: boolean, Whether both My Drive and shared drive items should be included in results.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001593 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 -07001594 includeTeamDriveItems: boolean, Deprecated use includeItemsFromAllDrives instead.
Bu Sun Kim65020912020-05-20 12:08:20 -07001595 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.
1596 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.
1597 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.
1598 q: string, A query for filtering the file results. See the &quot;Search for Files&quot; guide for supported syntax.
yoshi-code-botb539cc42021-08-03 00:20:27 -07001599 spaces: string, A comma-separated list of spaces to query within the corpus. Supported values are &#x27;drive&#x27; and &#x27;appDataFolder&#x27;.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001600 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001601 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
1602 teamDriveId: string, Deprecated use driveId instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001603
1604Returns:
1605 An object of the form:
1606
1607 { # A list of files.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001608 &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.
1609 { # The metadata for a file.
1610 &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 -08001611 # 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 -08001612 &quot;a_key&quot;: &quot;A String&quot;,
1613 },
1614 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
yoshi-code-bot815c1ac2021-11-15 23:24:17 -08001615 &quot;canAcceptOwnership&quot;: True or False, # Whether the current user is the pending owner of the file. Not populated for shared drive files.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001616 &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.
1617 &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.
1618 &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.
1619 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
yoshi-code-bot04bafe12021-06-29 00:20:25 -07001620 &quot;canChangeSecurityUpdateEnabled&quot;: True or False, # Whether the current user can change the securityUpdateEnabled field on link share metadata.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001621 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
1622 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
1623 &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.
1624 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
1625 &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.
1626 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
1627 &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.
1628 &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.
1629 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
1630 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
1631 &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.
1632 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
1633 &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.
1634 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1635 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1636 &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.
1637 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1638 &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.
1639 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
1640 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1641 &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.
1642 &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.
1643 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
1644 &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.
1645 &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.
1646 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
1647 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
1648 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
1649 &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.
1650 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
1651 },
1652 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
1653 &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.
1654 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
1655 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
1656 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
Bu Sun Kim65020912020-05-20 12:08:20 -07001657 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001658 },
1659 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
1660 { # A restriction for accessing the content of the file.
1661 &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.
1662 &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.
1663 &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 -07001664 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1665 &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.
1666 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1667 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1668 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1669 &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 -08001670 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001671 &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.
1672 &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 -07001673 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001674 ],
1675 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1676 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
1677 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
1678 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1679 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
1680 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
1681 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001682 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001683 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
yoshi-code-botb539cc42021-08-03 00:20:27 -07001684 &quot;folderColorRgb&quot;: &quot;A String&quot;, # The color for a folder or shortcut to a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001685 # If an unsupported color is specified, the closest color in the palette will be used instead.
1686 &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.
1687 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
1688 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1689 &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.
1690 &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.
1691 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
1692 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1693 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
1694 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1695 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1696 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1697 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1698 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1699 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1700 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1701 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1702 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1703 &quot;height&quot;: 42, # The height of the image in pixels.
1704 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1705 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1706 &quot;location&quot;: { # Geographic location information stored in the image.
1707 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1708 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1709 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1710 },
1711 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1712 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1713 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1714 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1715 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1716 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
1717 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1718 &quot;width&quot;: 42, # The width of the image in pixels.
1719 },
1720 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1721 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
1722 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
1723 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1724 &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.
1725 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1726 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1727 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1728 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1729 },
yoshi-code-bot04bafe12021-06-29 00:20:25 -07001730 &quot;linkShareMetadata&quot;: { # Contains details about the link URLs that clients are using to refer to this item.
1731 &quot;securityUpdateEligible&quot;: True or False, # Whether the file is eligible for security update.
1732 &quot;securityUpdateEnabled&quot;: True or False, # Whether the security update is enabled for this file.
1733 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001734 &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.
1735 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
1736 # 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.
1737 # 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.
1738 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
1739 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
1740 &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the file was modified by anyone (RFC 3339 date-time).
1741 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
1742 &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.
1743 &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.
1744 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
yoshi-code-botab1d6dc2021-05-28 00:42:02 -07001745 &quot;owners&quot;: [ # The owner of this file. Only certain legacy files may have more than one owner. This field isn&#x27;t populated for items in shared drives.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001746 { # Information about a Drive user.
1747 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1748 &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.
1749 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1750 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1751 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1752 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1753 },
1754 ],
1755 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
1756 # 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.
1757 &quot;A String&quot;,
1758 ],
1759 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1760 &quot;A String&quot;,
1761 ],
1762 &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.
1763 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
1764 &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.
1765 &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.
1766 &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:
1767 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
1768 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
1769 # - domain - String domain name, such as &quot;thecompany.com.&quot;
1770 # - anyone - No displayName is present.
1771 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
1772 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
1773 &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:
1774 # - They can only be set on user and group permissions
1775 # - The time must be in the future
1776 # - The time cannot be more than a year in the future
1777 &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.
1778 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
yoshi-code-bot815c1ac2021-11-15 23:24:17 -08001779 &quot;pendingOwner&quot;: True or False, # Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that are not in a shared drive.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001780 &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.
1781 {
1782 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1783 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1784 &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:
1785 # - file
1786 # - member
1787 &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:
1788 # - organizer
1789 # - fileOrganizer
1790 # - writer
1791 # - commenter
1792 # - reader
1793 },
1794 ],
1795 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1796 &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:
1797 # - owner
1798 # - organizer
1799 # - fileOrganizer
1800 # - writer
1801 # - commenter
1802 # - reader
1803 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1804 {
1805 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1806 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1807 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1808 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1809 },
1810 ],
1811 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
1812 # - user
1813 # - group
1814 # - domain
1815 # - 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.
1816 &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.
1817 },
1818 ],
1819 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
1820 # Entries with null values are cleared in update and copy requests.
1821 &quot;a_key&quot;: &quot;A String&quot;,
1822 },
1823 &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.
yoshi-code-bot04bafe12021-06-29 00:20:25 -07001824 &quot;resourceKey&quot;: &quot;A String&quot;, # A key needed to access the item via a shared link.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001825 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
1826 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
1827 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
1828 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1829 &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.
1830 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1831 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1832 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1833 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1834 },
1835 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
1836 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
1837 &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.
yoshi-code-bot04bafe12021-06-29 00:20:25 -07001838 &quot;targetResourceKey&quot;: &quot;A String&quot;, # The ResourceKey for the target file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001839 },
1840 &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.
1841 &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;.
1842 &quot;A String&quot;,
1843 ],
1844 &quot;starred&quot;: True or False, # Whether the user has starred the file.
1845 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
1846 &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.
1847 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
1848 &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.
1849 &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.
1850 &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.
1851 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1852 &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.
1853 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1854 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1855 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1856 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1857 },
1858 &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.
1859 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
1860 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
1861 &quot;height&quot;: 42, # The height of the video in pixels.
1862 &quot;width&quot;: 42, # The width of the video in pixels.
1863 },
1864 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
1865 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
1866 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
1867 &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.
1868 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
1869 &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.
1870 },
1871 ],
1872 &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;.
1873 &quot;kind&quot;: &quot;drive#fileList&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#fileList&quot;.
1874 &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.
1875}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001876</div>
1877
1878<div class="method">
1879 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1880 <pre>Retrieves the next page of results.
1881
1882Args:
1883 previous_request: The request for the previous page. (required)
1884 previous_response: The response from the request for the previous page. (required)
1885
1886Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001887 A request object that you can call &#x27;execute()&#x27; on to request the next
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001888 page. Returns None if there are no more items in the collection.
1889 </pre>
1890</div>
1891
1892<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001893 <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>
yoshi-code-botad81f3d2021-09-28 00:22:30 -07001894 <pre>Updates a file&#x27;s metadata and/or content. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might change automatically, such as modifiedDate. This method supports patch semantics.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001895
1896Args:
1897 fileId: string, The ID of the file. (required)
1898 body: object, The request body.
1899 The object takes the form of:
1900
1901{ # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001902 &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 -08001903 # 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 -07001904 &quot;a_key&quot;: &quot;A String&quot;,
1905 },
1906 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
yoshi-code-bot815c1ac2021-11-15 23:24:17 -08001907 &quot;canAcceptOwnership&quot;: True or False, # Whether the current user is the pending owner of the file. Not populated for shared drive files.
Bu Sun Kim65020912020-05-20 12:08:20 -07001908 &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 -07001909 &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 -07001910 &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.
1911 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
yoshi-code-bot04bafe12021-06-29 00:20:25 -07001912 &quot;canChangeSecurityUpdateEnabled&quot;: True or False, # Whether the current user can change the securityUpdateEnabled field on link share metadata.
Bu Sun Kim65020912020-05-20 12:08:20 -07001913 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
1914 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
1915 &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.
1916 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
1917 &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.
1918 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
1919 &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.
1920 &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.
1921 &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 -07001922 &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 -07001923 &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.
1924 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001925 &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 -07001926 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1927 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1928 &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.
1929 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001930 &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 -07001931 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
1932 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1933 &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.
1934 &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.
1935 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
1936 &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.
1937 &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.
1938 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
1939 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
1940 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
1941 &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.
1942 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
1943 },
1944 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
1945 &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.
1946 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
1947 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
1948 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
1949 },
1950 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001951 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
1952 { # A restriction for accessing the content of the file.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001953 &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 -07001954 &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.
1955 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
1956 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1957 &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.
1958 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1959 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1960 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1961 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1962 },
1963 &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.
1964 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
1965 },
1966 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001967 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1968 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
1969 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
1970 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1971 &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 -07001972 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
Bu Sun Kim65020912020-05-20 12:08:20 -07001973 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
1974 },
1975 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
yoshi-code-botb539cc42021-08-03 00:20:27 -07001976 &quot;folderColorRgb&quot;: &quot;A String&quot;, # The color for a folder or shortcut to a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001977 # If an unsupported color is specified, the closest color in the palette will be used instead.
1978 &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.
1979 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
1980 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1981 &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.
1982 &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.
1983 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
1984 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1985 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
1986 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1987 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1988 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1989 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1990 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1991 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1992 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1993 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1994 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1995 &quot;height&quot;: 42, # The height of the image in pixels.
1996 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1997 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1998 &quot;location&quot;: { # Geographic location information stored in the image.
1999 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
2000 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
2001 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
2002 },
2003 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
2004 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
2005 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
2006 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
2007 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
2008 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
2009 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
2010 &quot;width&quot;: 42, # The width of the image in pixels.
2011 },
2012 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
2013 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
2014 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
2015 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2016 &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.
2017 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2018 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2019 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2020 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2021 },
yoshi-code-bot04bafe12021-06-29 00:20:25 -07002022 &quot;linkShareMetadata&quot;: { # Contains details about the link URLs that clients are using to refer to this item.
2023 &quot;securityUpdateEligible&quot;: True or False, # Whether the file is eligible for security update.
2024 &quot;securityUpdateEnabled&quot;: True or False, # Whether the security update is enabled for this file.
2025 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002026 &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.
2027 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002028 # 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 -08002029 # 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 -07002030 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
2031 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
2032 &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 -08002033 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -07002034 &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.
2035 &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.
2036 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
yoshi-code-botab1d6dc2021-05-28 00:42:02 -07002037 &quot;owners&quot;: [ # The owner of this file. Only certain legacy files may have more than one owner. This field isn&#x27;t populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002038 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07002039 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2040 &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.
2041 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2042 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2043 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2044 &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 -08002045 },
2046 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002047 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
2048 # 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.
2049 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002050 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002051 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
2052 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002053 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002054 &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 -07002055 { # 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 -07002056 &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.
2057 &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.
2058 &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:
2059 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
2060 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
2061 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07002062 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -07002063 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
2064 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
2065 &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:
2066 # - They can only be set on user and group permissions
2067 # - The time must be in the future
2068 # - The time cannot be more than a year in the future
2069 &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.
2070 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
yoshi-code-bot815c1ac2021-11-15 23:24:17 -08002071 &quot;pendingOwner&quot;: True or False, # Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that are not in a shared drive.
Bu Sun Kim65020912020-05-20 12:08:20 -07002072 &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 -07002073 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002074 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2075 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
2076 &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:
2077 # - file
2078 # - member
2079 &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 -07002080 # - organizer
2081 # - fileOrganizer
2082 # - writer
2083 # - commenter
2084 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002085 },
2086 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002087 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2088 &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 -07002089 # - owner
2090 # - organizer
2091 # - fileOrganizer
2092 # - writer
2093 # - commenter
2094 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07002095 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
2096 {
2097 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
2098 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
2099 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
2100 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
2101 },
2102 ],
2103 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002104 # - user
2105 # - group
2106 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -07002107 # - 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 -07002108 &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 -07002109 },
2110 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002111 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
2112 # Entries with null values are cleared in update and copy requests.
2113 &quot;a_key&quot;: &quot;A String&quot;,
2114 },
2115 &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.
yoshi-code-bot04bafe12021-06-29 00:20:25 -07002116 &quot;resourceKey&quot;: &quot;A String&quot;, # A key needed to access the item via a shared link.
Bu Sun Kim65020912020-05-20 12:08:20 -07002117 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
2118 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
2119 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
2120 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2121 &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.
2122 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2123 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2124 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2125 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2126 },
2127 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
2128 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
2129 &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.
yoshi-code-bot04bafe12021-06-29 00:20:25 -07002130 &quot;targetResourceKey&quot;: &quot;A String&quot;, # The ResourceKey for the target file.
Bu Sun Kim65020912020-05-20 12:08:20 -07002131 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002132 &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 -07002133 &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;.
2134 &quot;A String&quot;,
2135 ],
2136 &quot;starred&quot;: True or False, # Whether the user has starred the file.
2137 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002138 &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 -07002139 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002140 &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 -07002141 &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.
2142 &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.
2143 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2144 &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.
2145 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2146 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2147 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2148 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2149 },
2150 &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.
2151 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
2152 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
2153 &quot;height&quot;: 42, # The height of the video in pixels.
2154 &quot;width&quot;: 42, # The width of the video in pixels.
2155 },
2156 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
2157 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
2158 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
2159 &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.
2160 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
2161 &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 -08002162}
2163
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002164 addParents: string, A comma-separated list of parent IDs to add.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08002165 enforceSingleParent: boolean, Deprecated. Adding files to multiple folders is no longer supported. Use shortcuts instead.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002166 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 -07002167 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 -08002168 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
2169 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 -07002170 ocrLanguage: string, A language hint for OCR processing during image import (ISO 639-1 code).
2171 removeParents: string, A comma-separated list of parent IDs to remove.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002172 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07002173 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
2174 useContentAsIndexableText: boolean, Whether to use the uploaded content as indexable text.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002175
2176Returns:
2177 An object of the form:
2178
2179 { # The metadata for a file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002180 &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 -08002181 # 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 -08002182 &quot;a_key&quot;: &quot;A String&quot;,
2183 },
2184 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
yoshi-code-bot815c1ac2021-11-15 23:24:17 -08002185 &quot;canAcceptOwnership&quot;: True or False, # Whether the current user is the pending owner of the file. Not populated for shared drive files.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002186 &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.
2187 &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.
2188 &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.
2189 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
yoshi-code-bot04bafe12021-06-29 00:20:25 -07002190 &quot;canChangeSecurityUpdateEnabled&quot;: True or False, # Whether the current user can change the securityUpdateEnabled field on link share metadata.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002191 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
2192 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
2193 &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.
2194 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
2195 &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.
2196 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
2197 &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.
2198 &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.
2199 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
2200 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
2201 &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.
2202 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
2203 &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.
2204 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
2205 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2206 &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.
2207 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2208 &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.
2209 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
2210 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
2211 &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.
2212 &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.
2213 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
2214 &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.
2215 &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.
2216 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
2217 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
2218 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
2219 &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.
2220 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
2221 },
2222 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
2223 &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.
2224 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
2225 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
2226 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
Bu Sun Kim65020912020-05-20 12:08:20 -07002227 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002228 },
2229 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
2230 { # A restriction for accessing the content of the file.
2231 &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.
2232 &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.
2233 &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 -07002234 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2235 &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.
2236 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2237 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2238 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2239 &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 -08002240 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002241 &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.
2242 &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 -07002243 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002244 ],
2245 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
2246 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
2247 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
2248 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
2249 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
2250 &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
2251 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
2252 },
2253 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
yoshi-code-botb539cc42021-08-03 00:20:27 -07002254 &quot;folderColorRgb&quot;: &quot;A String&quot;, # The color for a folder or shortcut to a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002255 # If an unsupported color is specified, the closest color in the palette will be used instead.
2256 &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.
2257 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
2258 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
2259 &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.
2260 &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.
2261 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
2262 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
2263 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
2264 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
2265 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
2266 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
2267 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
2268 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
2269 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
2270 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
2271 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
2272 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
2273 &quot;height&quot;: 42, # The height of the image in pixels.
2274 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
2275 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
2276 &quot;location&quot;: { # Geographic location information stored in the image.
2277 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
2278 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
2279 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
2280 },
2281 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
2282 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
2283 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
2284 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
2285 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
2286 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
2287 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
2288 &quot;width&quot;: 42, # The width of the image in pixels.
2289 },
2290 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
2291 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
2292 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
2293 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2294 &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.
2295 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2296 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2297 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2298 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2299 },
yoshi-code-bot04bafe12021-06-29 00:20:25 -07002300 &quot;linkShareMetadata&quot;: { # Contains details about the link URLs that clients are using to refer to this item.
2301 &quot;securityUpdateEligible&quot;: True or False, # Whether the file is eligible for security update.
2302 &quot;securityUpdateEnabled&quot;: True or False, # Whether the security update is enabled for this file.
2303 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002304 &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.
2305 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
2306 # 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.
2307 # 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.
2308 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
2309 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
2310 &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the file was modified by anyone (RFC 3339 date-time).
2311 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
2312 &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.
2313 &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.
2314 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
yoshi-code-botab1d6dc2021-05-28 00:42:02 -07002315 &quot;owners&quot;: [ # The owner of this file. Only certain legacy files may have more than one owner. This field isn&#x27;t populated for items in shared drives.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002316 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07002317 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2318 &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.
2319 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2320 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2321 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2322 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2323 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002324 ],
2325 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
2326 # 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.
2327 &quot;A String&quot;,
2328 ],
2329 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
2330 &quot;A String&quot;,
2331 ],
2332 &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.
2333 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
2334 &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.
2335 &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.
2336 &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:
2337 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
2338 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
2339 # - domain - String domain name, such as &quot;thecompany.com.&quot;
2340 # - anyone - No displayName is present.
2341 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
2342 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
2343 &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:
2344 # - They can only be set on user and group permissions
2345 # - The time must be in the future
2346 # - The time cannot be more than a year in the future
2347 &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.
2348 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
yoshi-code-bot815c1ac2021-11-15 23:24:17 -08002349 &quot;pendingOwner&quot;: True or False, # Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that are not in a shared drive.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002350 &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.
2351 {
2352 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2353 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
2354 &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:
2355 # - file
2356 # - member
2357 &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:
2358 # - organizer
2359 # - fileOrganizer
2360 # - writer
2361 # - commenter
2362 # - reader
2363 },
2364 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002365 &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 -08002366 &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:
2367 # - owner
2368 # - organizer
2369 # - fileOrganizer
2370 # - writer
2371 # - commenter
2372 # - reader
2373 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
2374 {
2375 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
2376 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
2377 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
2378 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
2379 },
2380 ],
2381 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
2382 # - user
2383 # - group
2384 # - domain
2385 # - 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.
2386 &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 -07002387 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002388 ],
2389 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
2390 # Entries with null values are cleared in update and copy requests.
2391 &quot;a_key&quot;: &quot;A String&quot;,
2392 },
2393 &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.
yoshi-code-bot04bafe12021-06-29 00:20:25 -07002394 &quot;resourceKey&quot;: &quot;A String&quot;, # A key needed to access the item via a shared link.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002395 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
2396 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
2397 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
2398 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2399 &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.
2400 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2401 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2402 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2403 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2404 },
2405 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
2406 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
2407 &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.
yoshi-code-bot04bafe12021-06-29 00:20:25 -07002408 &quot;targetResourceKey&quot;: &quot;A String&quot;, # The ResourceKey for the target file.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002409 },
2410 &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.
2411 &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;.
2412 &quot;A String&quot;,
2413 ],
2414 &quot;starred&quot;: True or False, # Whether the user has starred the file.
2415 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
2416 &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.
2417 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
2418 &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.
2419 &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.
2420 &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.
2421 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2422 &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.
2423 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2424 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2425 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2426 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2427 },
2428 &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.
2429 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
2430 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
2431 &quot;height&quot;: 42, # The height of the video in pixels.
2432 &quot;width&quot;: 42, # The width of the video in pixels.
2433 },
2434 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
2435 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
2436 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
2437 &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.
2438 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
2439 &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.
2440}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002441</div>
2442
2443<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002444 <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 -08002445 <pre>Subscribes to changes to a file
2446
2447Args:
2448 fileId: string, The ID of the file. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002449 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002450 The object takes the form of:
2451
2452{ # An notification channel used to watch for resource changes.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002453 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
2454 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
2455 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
2456 &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;.
2457 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
2458 &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
2459 },
2460 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
2461 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
2462 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
2463 &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 -07002464 &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 -08002465}
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002466
2467 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 -07002468 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 -07002469 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07002470 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002471
2472Returns:
2473 An object of the form:
2474
2475 { # An notification channel used to watch for resource changes.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002476 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
2477 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
2478 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
2479 &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;.
2480 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
2481 &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
2482 },
2483 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
2484 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
2485 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
2486 &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 -07002487 &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 -08002488}</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002489</div>
2490
2491<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002492 <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 -08002493 <pre>Subscribes to changes to a file
2494
2495Args:
2496 fileId: string, The ID of the file. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002497 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002498 The object takes the form of:
2499
2500{ # An notification channel used to watch for resource changes.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002501 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
2502 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
2503 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
2504 &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;.
2505 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
2506 &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
2507 },
2508 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
2509 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
2510 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
2511 &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 -07002512 &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 -08002513}
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002514
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002515 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 -07002516 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 -07002517 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07002518 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002519
2520Returns:
2521 The media object as a string.
2522
2523 </pre>
2524</div>
2525
2526</body></html>