blob: 2de3cb81dfc4d3eb91a30e715acf1c1aa3531adb [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="drive_v2.html">Drive API</a> . <a href="drive_v2.files.html">files</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070078 <code><a href="#copy">copy(fileId, body=None, convert=None, enforceSingleParent=None, ocr=None, ocrLanguage=None, pinned=None, supportsAllDrives=None, supportsTeamDrives=None, timedTextLanguage=None, timedTextTrackName=None, visibility=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070079<p class="firstline">Creates a copy of the specified file. Folders cannot be copied.</p>
John Asmuth614db982014-04-24 15:46:26 -040080<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070081 <code><a href="#delete">delete(fileId, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file or be an organizer on the parent for shared drive files.</p>
John Asmuth614db982014-04-24 15:46:26 -040083<p class="toc_element">
Craig Citro065b5302014-08-14 00:47:23 -070084 <code><a href="#emptyTrash">emptyTrash()</a></code></p>
85<p class="firstline">Permanently deletes all of the user's trashed files.</p>
86<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070087 <code><a href="#export">export(fileId, mimeType)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070089<p class="toc_element">
90 <code><a href="#export_media">export_media(fileId, mimeType)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070092<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070093 <code><a href="#generateIds">generateIds(maxResults=None, space=None)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -070094<p class="firstline">Generates a set of file IDs which can be provided in insert or copy requests.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070095<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070096 <code><a href="#get">get(fileId, acknowledgeAbuse=None, projection=None, revisionId=None, supportsAllDrives=None, supportsTeamDrives=None, updateViewedDate=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080097<p class="firstline">Gets a file's metadata by ID.</p>
98<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070099 <code><a href="#get_media">get_media(fileId, acknowledgeAbuse=None, projection=None, revisionId=None, supportsAllDrives=None, supportsTeamDrives=None, updateViewedDate=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400100<p class="firstline">Gets a file's metadata by ID.</p>
101<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700102 <code><a href="#insert">insert(body=None, convert=None, enforceSingleParent=None, ocr=None, ocrLanguage=None, pinned=None, supportsAllDrives=None, supportsTeamDrives=None, timedTextLanguage=None, timedTextTrackName=None, useContentAsIndexableText=None, visibility=None, media_body=None, media_mime_type=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400103<p class="firstline">Insert a new file.</p>
104<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700105 <code><a href="#list">list(corpora=None, corpus=None, driveId=None, includeItemsFromAllDrives=None, includeTeamDriveItems=None, maxResults=None, orderBy=None, pageToken=None, projection=None, q=None, spaces=None, supportsAllDrives=None, supportsTeamDrives=None, teamDriveId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400106<p class="firstline">Lists the user's files.</p>
107<p class="toc_element">
108 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
109<p class="firstline">Retrieves the next page of results.</p>
110<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700111 <code><a href="#patch">patch(fileId, body=None, addParents=None, convert=None, enforceSingleParent=None, modifiedDateBehavior=None, newRevision=None, ocr=None, ocrLanguage=None, pinned=None, removeParents=None, setModifiedDate=None, supportsAllDrives=None, supportsTeamDrives=None, timedTextLanguage=None, timedTextTrackName=None, updateViewedDate=None, useContentAsIndexableText=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400112<p class="firstline">Updates file metadata and/or content. This method supports patch semantics.</p>
113<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700114 <code><a href="#touch">touch(fileId, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400115<p class="firstline">Set the file's updated time to the current server time.</p>
116<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700117 <code><a href="#trash">trash(fileId, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700118<p class="firstline">Moves a file to the trash. The currently authenticated user must own the file or be at least a fileOrganizer on the parent for shared drive files. 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.</p>
John Asmuth614db982014-04-24 15:46:26 -0400119<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700120 <code><a href="#untrash">untrash(fileId, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700121<p class="firstline">Restores a file from the trash. The currently authenticated user must own the file or be at least a fileOrganizer on the parent for shared drive files. Only the owner may untrash a file.</p>
John Asmuth614db982014-04-24 15:46:26 -0400122<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700123 <code><a href="#update">update(fileId, body=None, addParents=None, convert=None, enforceSingleParent=None, modifiedDateBehavior=None, newRevision=None, ocr=None, ocrLanguage=None, pinned=None, removeParents=None, setModifiedDate=None, supportsAllDrives=None, supportsTeamDrives=None, timedTextLanguage=None, timedTextTrackName=None, updateViewedDate=None, useContentAsIndexableText=None, media_body=None, media_mime_type=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400124<p class="firstline">Updates file metadata and/or content.</p>
125<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700126 <code><a href="#watch">watch(fileId, body=None, acknowledgeAbuse=None, projection=None, revisionId=None, supportsAllDrives=None, supportsTeamDrives=None, updateViewedDate=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800127<p class="firstline">Subscribe to changes on a file</p>
128<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700129 <code><a href="#watch_media">watch_media(fileId, body=None, acknowledgeAbuse=None, projection=None, revisionId=None, supportsAllDrives=None, supportsTeamDrives=None, updateViewedDate=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400130<p class="firstline">Subscribe to changes on a file</p>
131<h3>Method Details</h3>
132<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700133 <code class="details" id="copy">copy(fileId, body=None, convert=None, enforceSingleParent=None, ocr=None, ocrLanguage=None, pinned=None, supportsAllDrives=None, supportsTeamDrives=None, timedTextLanguage=None, timedTextTrackName=None, visibility=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700134 <pre>Creates a copy of the specified file. Folders cannot be copied.
John Asmuth614db982014-04-24 15:46:26 -0400135
136Args:
137 fileId: string, The ID of the file to copy. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700138 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400139 The object takes the form of:
140
141{ # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700142 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
143 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
144 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
145 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
146 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
147 &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 -0700148 &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 -0700149 &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.
150 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
151 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
152 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
153 &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.
154 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
155 &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.
156 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
157 &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.
158 &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.
159 &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 -0700160 &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 -0700161 &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.
162 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
163 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
164 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
165 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
166 &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.
167 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
168 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
169 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
170 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
171 &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.
172 &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.
173 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
174 &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.
175 &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.
176 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
177 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
178 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
179 &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.
180 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -0400181 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700182 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
183 { # A restriction for accessing the content of the file.
184 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only.
185 &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.
186 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
187 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
188 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
189 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
190 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
191 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
192 &quot;picture&quot;: { # The user&#x27;s profile picture.
193 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
194 },
195 },
196 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
197 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
198 },
199 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700200 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
201 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
202 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
203 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
204 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
205 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
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;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
208 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
209 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
210 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
211 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
212 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -0400213 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700214 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
215 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
216 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
217 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
218 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
219 &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.
220 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
221 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
222 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
223 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
224 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
225 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
226 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
227 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
228 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
229 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
230 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
231 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
232 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
233 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
234 &quot;height&quot;: 42, # The height of the image in pixels.
235 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
236 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
237 &quot;location&quot;: { # Geographic location information stored in the image.
238 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
239 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
240 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
241 },
242 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
243 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
244 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
245 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
246 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
247 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
248 &quot;width&quot;: 42, # The width of the image in pixels.
249 },
250 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
251 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
252 },
253 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
254 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
255 &quot;labels&quot;: { # A group of labels for the file.
256 &quot;hidden&quot;: True or False, # Deprecated.
257 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
258 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
259 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700260 &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 -0700261 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
262 },
263 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
264 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
265 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
266 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
267 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
268 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
269 &quot;picture&quot;: { # The user&#x27;s profile picture.
270 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
271 },
272 },
273 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
274 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
275 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
276 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
277 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
278 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
279 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
280 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
281 &quot;a_key&quot;: &quot;A String&quot;,
282 },
283 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
284 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
285 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
286 &quot;A String&quot;,
287 ],
288 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700289 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700290 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
291 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
292 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
293 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
294 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
295 &quot;picture&quot;: { # The user&#x27;s profile picture.
296 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -0400297 },
John Asmuth614db982014-04-24 15:46:26 -0400298 },
299 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700300 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
301 # If not specified as part of an insert 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 can also use the addParents and removeParents parameters to modify the parents list.
302 { # A reference to a file&#x27;s parent.
303 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
304 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
305 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
306 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
307 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -0400308 },
309 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700310 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
311 &quot;A String&quot;,
312 ],
313 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
314 { # A permission for a file.
315 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
316 &quot;A String&quot;,
317 ],
318 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
319 &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.
320 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
321 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
322 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
323 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
324 # - They cannot be set on shared drive items
325 # - They can only be set on user and group permissions
326 # - The date must be in the future
327 # - The date cannot be more than a year in the future
328 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
329 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
330 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
331 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
332 &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.
333 {
334 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
335 &quot;A String&quot;,
336 ],
337 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
338 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
339 &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:
340 # - file
341 # - member
342 &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:
343 # - organizer
344 # - fileOrganizer
345 # - writer
346 # - reader
347 },
348 ],
349 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
350 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
351 # - owner
352 # - organizer
353 # - fileOrganizer
354 # - writer
355 # - reader
356 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
357 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
358 {
359 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
360 &quot;A String&quot;,
361 ],
362 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
363 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
364 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
365 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
366 },
367 ],
368 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
369 # - user
370 # - group
371 # - domain
372 # - anyone
373 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
374 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -0400375 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700376 ],
377 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000378 { # A key-value pair attached to a file that is either public or private to an application.
379 # The following limits apply to file properties:
380 # - Maximum of 100 properties total per file
381 # - Maximum of 30 private properties per app
382 # - Maximum of 30 public properties
383 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
Bu Sun Kim65020912020-05-20 12:08:20 -0700384 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
385 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
386 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
387 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
388 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
389 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -0400390 },
391 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700392 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
393 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
394 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
395 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
396 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
397 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
398 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
399 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
400 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
401 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
402 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
403 &quot;picture&quot;: { # The user&#x27;s profile picture.
404 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
405 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700406 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700407 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
408 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
409 &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.
410 },
411 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
412 &quot;A String&quot;,
413 ],
414 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
415 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
416 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
417 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
418 },
419 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content.
420 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
421 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
422 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
423 &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.
424 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
425 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
426 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
427 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
428 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
429 &quot;picture&quot;: { # The user&#x27;s profile picture.
430 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
431 },
432 },
433 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
434 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
435 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400436 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700437 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
438 &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.
439 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
440 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
441 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
442 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -0700443 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400444 # - They can only be set on user and group permissions
445 # - The date must be in the future
446 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700447 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -0700448 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
449 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
450 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
451 &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.
452 {
453 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
454 &quot;A String&quot;,
455 ],
456 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
457 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
458 &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:
459 # - file
460 # - member
461 &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:
462 # - organizer
463 # - fileOrganizer
464 # - writer
465 # - reader
466 },
467 ],
468 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
469 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -0400470 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700471 # - organizer
472 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -0400473 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700474 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700475 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
476 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
477 {
478 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
479 &quot;A String&quot;,
480 ],
481 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
482 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
483 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
484 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
485 },
486 ],
487 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -0400488 # - user
489 # - group
490 # - domain
491 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -0700492 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
493 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -0400494 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700495 &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 requesting user.
496 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
497 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
498 &quot;height&quot;: 42, # The height of the video in pixels.
499 &quot;width&quot;: 42, # The width of the video in pixels.
500 },
501 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
502 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
503 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -0400504}
505
Bu Sun Kim65020912020-05-20 12:08:20 -0700506 convert: boolean, Whether to convert this file to the corresponding Google Docs format.
507 enforceSingleParent: boolean, Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter only takes effect if the item is not in a shared drive. Requests that specify more than one parent fail.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700508 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Bu Sun Kim65020912020-05-20 12:08:20 -0700509 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
510 pinned: boolean, Whether to pin the head revision of the new copy. A file can have a maximum of 200 pinned revisions.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700511 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700512 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
513 timedTextLanguage: string, The language of the timed text.
514 timedTextTrackName: string, The timed text track name.
John Asmuth614db982014-04-24 15:46:26 -0400515 visibility: string, The visibility of the new file. This parameter is only relevant when the source is not a native Google Doc and convert=false.
516 Allowed values
Bu Sun Kim65020912020-05-20 12:08:20 -0700517 DEFAULT - The visibility of the new file is determined by the user&#x27;s default visibility/sharing policies.
John Asmuth614db982014-04-24 15:46:26 -0400518 PRIVATE - The new file will be visible to only the owner.
John Asmuth614db982014-04-24 15:46:26 -0400519
520Returns:
521 An object of the form:
522
523 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700524 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
525 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
526 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
527 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
528 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
529 &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 -0700530 &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 -0700531 &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.
532 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
533 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
534 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
535 &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.
536 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
537 &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.
538 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
539 &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.
540 &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.
541 &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 -0700542 &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 -0700543 &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.
544 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
545 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
546 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
547 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
548 &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.
549 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
550 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
551 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
552 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
553 &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.
554 &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.
555 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
556 &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.
557 &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.
558 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
559 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
560 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
561 &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.
562 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -0400563 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700564 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
565 { # A restriction for accessing the content of the file.
566 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only.
567 &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.
568 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
569 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
570 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
571 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
572 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
573 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
574 &quot;picture&quot;: { # The user&#x27;s profile picture.
575 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
576 },
577 },
578 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
579 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
580 },
581 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700582 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
583 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
584 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
585 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
586 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
587 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
588 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
589 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
590 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
591 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
592 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
593 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
594 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -0400595 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700596 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
597 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
598 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
599 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
600 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
601 &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.
602 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
603 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
604 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
605 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
606 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
607 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
608 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
609 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
610 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
611 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
612 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
613 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
614 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
615 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
616 &quot;height&quot;: 42, # The height of the image in pixels.
617 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
618 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
619 &quot;location&quot;: { # Geographic location information stored in the image.
620 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
621 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
622 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
623 },
624 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
625 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
626 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
627 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
628 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
629 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
630 &quot;width&quot;: 42, # The width of the image in pixels.
631 },
632 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
633 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
634 },
635 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
636 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
637 &quot;labels&quot;: { # A group of labels for the file.
638 &quot;hidden&quot;: True or False, # Deprecated.
639 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
640 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
641 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700642 &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 -0700643 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
644 },
645 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
646 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
647 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
648 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
649 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
650 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
651 &quot;picture&quot;: { # The user&#x27;s profile picture.
652 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
653 },
654 },
655 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
656 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
657 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
658 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
659 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
660 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
661 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
662 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
663 &quot;a_key&quot;: &quot;A String&quot;,
664 },
665 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
666 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
667 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
668 &quot;A String&quot;,
669 ],
670 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700671 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700672 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
673 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
674 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
675 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
676 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
677 &quot;picture&quot;: { # The user&#x27;s profile picture.
678 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -0400679 },
John Asmuth614db982014-04-24 15:46:26 -0400680 },
681 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700682 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
683 # If not specified as part of an insert 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 can also use the addParents and removeParents parameters to modify the parents list.
684 { # A reference to a file&#x27;s parent.
685 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
686 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
687 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
688 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
689 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -0400690 },
691 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700692 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
693 &quot;A String&quot;,
694 ],
695 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
696 { # A permission for a file.
697 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
698 &quot;A String&quot;,
699 ],
700 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
701 &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.
702 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
703 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
704 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
705 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
706 # - They cannot be set on shared drive items
707 # - They can only be set on user and group permissions
708 # - The date must be in the future
709 # - The date cannot be more than a year in the future
710 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
711 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
712 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
713 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
714 &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.
715 {
716 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
717 &quot;A String&quot;,
718 ],
719 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
720 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
721 &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:
722 # - file
723 # - member
724 &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:
725 # - organizer
726 # - fileOrganizer
727 # - writer
728 # - reader
729 },
730 ],
731 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
732 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
733 # - owner
734 # - organizer
735 # - fileOrganizer
736 # - writer
737 # - reader
738 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
739 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
740 {
741 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
742 &quot;A String&quot;,
743 ],
744 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
745 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
746 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
747 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
748 },
749 ],
750 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
751 # - user
752 # - group
753 # - domain
754 # - anyone
755 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
756 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -0400757 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700758 ],
759 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000760 { # A key-value pair attached to a file that is either public or private to an application.
761 # The following limits apply to file properties:
762 # - Maximum of 100 properties total per file
763 # - Maximum of 30 private properties per app
764 # - Maximum of 30 public properties
765 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
Bu Sun Kim65020912020-05-20 12:08:20 -0700766 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
767 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
768 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
769 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
770 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
771 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -0400772 },
773 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700774 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
775 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
776 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
777 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
778 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
779 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
780 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
781 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
782 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
783 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
784 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
785 &quot;picture&quot;: { # The user&#x27;s profile picture.
786 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
787 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700788 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700789 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
790 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
791 &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.
792 },
793 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
794 &quot;A String&quot;,
795 ],
796 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
797 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
798 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
799 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
800 },
801 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content.
802 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
803 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
804 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
805 &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.
806 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
807 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
808 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
809 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
810 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
811 &quot;picture&quot;: { # The user&#x27;s profile picture.
812 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
813 },
814 },
815 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
816 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
817 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400818 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700819 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
820 &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.
821 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
822 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
823 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
824 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -0700825 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400826 # - They can only be set on user and group permissions
827 # - The date must be in the future
828 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700829 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -0700830 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
831 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
832 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
833 &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.
834 {
835 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
836 &quot;A String&quot;,
837 ],
838 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
839 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
840 &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:
841 # - file
842 # - member
843 &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:
844 # - organizer
845 # - fileOrganizer
846 # - writer
847 # - reader
848 },
849 ],
850 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
851 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -0400852 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700853 # - organizer
854 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -0400855 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700856 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700857 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
858 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
859 {
860 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
861 &quot;A String&quot;,
862 ],
863 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
864 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
865 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
866 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
867 },
868 ],
869 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -0400870 # - user
871 # - group
872 # - domain
873 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -0700874 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
875 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -0400876 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700877 &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 requesting user.
878 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
879 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
880 &quot;height&quot;: 42, # The height of the video in pixels.
881 &quot;width&quot;: 42, # The width of the video in pixels.
882 },
883 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
884 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
885 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -0400886 }</pre>
887</div>
888
889<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700890 <code class="details" id="delete">delete(fileId, supportsAllDrives=None, supportsTeamDrives=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700891 <pre>Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file or be an organizer on the parent for shared drive files.
John Asmuth614db982014-04-24 15:46:26 -0400892
893Args:
894 fileId: string, The ID of the file to delete. (required)
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700895 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700896 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
John Asmuth614db982014-04-24 15:46:26 -0400897</pre>
898</div>
899
900<div class="method">
Craig Citro065b5302014-08-14 00:47:23 -0700901 <code class="details" id="emptyTrash">emptyTrash()</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700902 <pre>Permanently deletes all of the user&#x27;s trashed files.
Craig Citro065b5302014-08-14 00:47:23 -0700903
904Args:
905</pre>
906</div>
907
908<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700909 <code class="details" id="export">export(fileId, mimeType)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700910 <pre>Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700911
912Args:
913 fileId: string, The ID of the file. (required)
914 mimeType: string, The MIME type of the format requested for this export. (required)
915</pre>
916</div>
917
918<div class="method">
919 <code class="details" id="export_media">export_media(fileId, mimeType)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700920 <pre>Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700921
922Args:
923 fileId: string, The ID of the file. (required)
924 mimeType: string, The MIME type of the format requested for this export. (required)
925</pre>
926</div>
927
928<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700929 <code class="details" id="generateIds">generateIds(maxResults=None, space=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -0700930 <pre>Generates a set of file IDs which can be provided in insert or copy requests.
Takashi Matsuo06694102015-09-11 13:55:40 -0700931
932Args:
Takashi Matsuo06694102015-09-11 13:55:40 -0700933 maxResults: integer, Maximum number of IDs to return.
Bu Sun Kim65020912020-05-20 12:08:20 -0700934 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;.
Takashi Matsuo06694102015-09-11 13:55:40 -0700935
936Returns:
937 An object of the form:
938
939 { # A list of generated IDs which can be provided in insert requests
Bu Sun Kim65020912020-05-20 12:08:20 -0700940 &quot;ids&quot;: [ # The IDs generated for the requesting user in the specified space.
941 &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -0700942 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700943 &quot;kind&quot;: &quot;drive#generatedIds&quot;, # This is always drive#generatedIds
944 &quot;space&quot;: &quot;A String&quot;, # The type of file that can be created with these IDs.
Takashi Matsuo06694102015-09-11 13:55:40 -0700945 }</pre>
946</div>
947
948<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700949 <code class="details" id="get">get(fileId, acknowledgeAbuse=None, projection=None, revisionId=None, supportsAllDrives=None, supportsTeamDrives=None, updateViewedDate=None)</code>
950 <pre>Gets a file&#x27;s metadata by ID.
John Asmuth614db982014-04-24 15:46:26 -0400951
952Args:
953 fileId: string, The ID for the file in question. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700954 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files.
John Asmuth614db982014-04-24 15:46:26 -0400955 projection: string, This parameter is deprecated and has no function.
956 Allowed values
957 BASIC - Deprecated
958 FULL - Deprecated
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000959 revisionId: string, Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700960 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700961 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700962 updateViewedDate: boolean, Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
John Asmuth614db982014-04-24 15:46:26 -0400963
964Returns:
965 An object of the form:
966
967 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700968 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
969 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
970 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
971 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
972 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
973 &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 -0700974 &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 -0700975 &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.
976 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
977 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
978 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
979 &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.
980 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
981 &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.
982 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
983 &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.
984 &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.
985 &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 -0700986 &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 -0700987 &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.
988 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
989 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
990 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
991 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
992 &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.
993 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
994 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
995 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
996 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
997 &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.
998 &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.
999 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
1000 &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.
1001 &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.
1002 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
1003 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
1004 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
1005 &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.
1006 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -04001007 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001008 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
1009 { # A restriction for accessing the content of the file.
1010 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only.
1011 &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.
1012 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
1013 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1014 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1015 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1016 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1017 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1018 &quot;picture&quot;: { # The user&#x27;s profile picture.
1019 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1020 },
1021 },
1022 &quot;restrictionDate&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.
1024 },
1025 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001026 &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;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
1028 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
1029 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
1030 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
1031 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
1032 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1033 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
1034 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
1035 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
1036 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
1037 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
1038 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -04001039 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001040 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
1041 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
1042 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
1043 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
1044 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1045 &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.
1046 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
1047 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
1048 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1049 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
1050 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1051 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1052 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1053 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1054 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
1055 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1056 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1057 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1058 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1059 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1060 &quot;height&quot;: 42, # The height of the image in pixels.
1061 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1062 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1063 &quot;location&quot;: { # Geographic location information stored in the image.
1064 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1065 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1066 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1067 },
1068 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1069 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1070 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1071 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1072 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1073 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1074 &quot;width&quot;: 42, # The width of the image in pixels.
1075 },
1076 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
1077 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
1078 },
1079 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1080 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
1081 &quot;labels&quot;: { # A group of labels for the file.
1082 &quot;hidden&quot;: True or False, # Deprecated.
1083 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
1084 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
1085 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001086 &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 -07001087 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
1088 },
1089 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
1090 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1091 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1092 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1093 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1094 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1095 &quot;picture&quot;: { # The user&#x27;s profile picture.
1096 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1097 },
1098 },
1099 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
1100 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1101 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
1102 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
1103 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
1104 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
1105 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
1106 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
1107 &quot;a_key&quot;: &quot;A String&quot;,
1108 },
1109 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
1110 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
1111 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
1112 &quot;A String&quot;,
1113 ],
1114 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001115 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001116 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1117 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1118 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1119 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1120 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1121 &quot;picture&quot;: { # The user&#x27;s profile picture.
1122 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -04001123 },
John Asmuth614db982014-04-24 15:46:26 -04001124 },
1125 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001126 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
1127 # If not specified as part of an insert 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 can also use the addParents and removeParents parameters to modify the parents list.
1128 { # A reference to a file&#x27;s parent.
1129 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
1130 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
1131 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
1132 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
1133 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04001134 },
1135 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001136 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1137 &quot;A String&quot;,
1138 ],
1139 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
1140 { # A permission for a file.
1141 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
1142 &quot;A String&quot;,
1143 ],
1144 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
1145 &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.
1146 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
1147 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
1148 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
1149 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
1150 # - They cannot be set on shared drive items
1151 # - They can only be set on user and group permissions
1152 # - The date must be in the future
1153 # - The date cannot be more than a year in the future
1154 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
1155 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
1156 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
1157 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
1158 &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.
1159 {
1160 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1161 &quot;A String&quot;,
1162 ],
1163 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1164 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1165 &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:
1166 # - file
1167 # - member
1168 &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:
1169 # - organizer
1170 # - fileOrganizer
1171 # - writer
1172 # - reader
1173 },
1174 ],
1175 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
1176 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
1177 # - owner
1178 # - organizer
1179 # - fileOrganizer
1180 # - writer
1181 # - reader
1182 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
1183 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1184 {
1185 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
1186 &quot;A String&quot;,
1187 ],
1188 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1189 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1190 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1191 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1192 },
1193 ],
1194 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
1195 # - user
1196 # - group
1197 # - domain
1198 # - anyone
1199 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
1200 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04001201 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001202 ],
1203 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001204 { # A key-value pair attached to a file that is either public or private to an application.
1205 # The following limits apply to file properties:
1206 # - Maximum of 100 properties total per file
1207 # - Maximum of 30 private properties per app
1208 # - Maximum of 30 public properties
1209 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
Bu Sun Kim65020912020-05-20 12:08:20 -07001210 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
1211 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
1212 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
1213 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
1214 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
1215 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04001216 },
1217 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001218 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
1219 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
1220 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
1221 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
1222 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
1223 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
1224 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1225 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1226 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1227 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1228 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1229 &quot;picture&quot;: { # The user&#x27;s profile picture.
1230 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1231 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001232 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001233 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
1234 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
1235 &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.
1236 },
1237 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
1238 &quot;A String&quot;,
1239 ],
1240 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
1241 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
1242 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
1243 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
1244 },
1245 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content.
1246 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
1247 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
1248 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
1249 &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.
1250 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1251 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1252 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1253 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1254 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1255 &quot;picture&quot;: { # The user&#x27;s profile picture.
1256 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1257 },
1258 },
1259 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
1260 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
1261 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001262 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001263 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
1264 &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.
1265 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
1266 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
1267 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
1268 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -07001269 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001270 # - They can only be set on user and group permissions
1271 # - The date must be in the future
1272 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001273 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07001274 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
1275 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
1276 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
1277 &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.
1278 {
1279 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1280 &quot;A String&quot;,
1281 ],
1282 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1283 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1284 &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:
1285 # - file
1286 # - member
1287 &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:
1288 # - organizer
1289 # - fileOrganizer
1290 # - writer
1291 # - reader
1292 },
1293 ],
1294 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
1295 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04001296 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001297 # - organizer
1298 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04001299 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001300 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07001301 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
1302 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1303 {
1304 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
1305 &quot;A String&quot;,
1306 ],
1307 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1308 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1309 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1310 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1311 },
1312 ],
1313 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04001314 # - user
1315 # - group
1316 # - domain
1317 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07001318 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
1319 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04001320 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001321 &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 requesting user.
1322 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
1323 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
1324 &quot;height&quot;: 42, # The height of the video in pixels.
1325 &quot;width&quot;: 42, # The width of the video in pixels.
1326 },
1327 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
1328 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
1329 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04001330 }</pre>
1331</div>
1332
1333<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001334 <code class="details" id="get_media">get_media(fileId, acknowledgeAbuse=None, projection=None, revisionId=None, supportsAllDrives=None, supportsTeamDrives=None, updateViewedDate=None)</code>
1335 <pre>Gets a file&#x27;s metadata by ID.
Craig Citroe633be12015-03-02 13:40:36 -08001336
1337Args:
1338 fileId: string, The ID for the file in question. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -07001339 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files.
Craig Citroe633be12015-03-02 13:40:36 -08001340 projection: string, This parameter is deprecated and has no function.
1341 Allowed values
1342 BASIC - Deprecated
1343 FULL - Deprecated
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001344 revisionId: string, Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001345 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001346 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001347 updateViewedDate: boolean, Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
Craig Citroe633be12015-03-02 13:40:36 -08001348
1349Returns:
1350 The media object as a string.
1351
1352 </pre>
1353</div>
1354
1355<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001356 <code class="details" id="insert">insert(body=None, convert=None, enforceSingleParent=None, ocr=None, ocrLanguage=None, pinned=None, supportsAllDrives=None, supportsTeamDrives=None, timedTextLanguage=None, timedTextTrackName=None, useContentAsIndexableText=None, visibility=None, media_body=None, media_mime_type=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04001357 <pre>Insert a new file.
1358
1359Args:
1360 body: object, The request body.
1361 The object takes the form of:
1362
1363{ # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001364 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
1365 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
1366 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
1367 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
1368 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
1369 &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 -07001370 &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 -07001371 &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.
1372 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1373 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
1374 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
1375 &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.
1376 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
1377 &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.
1378 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
1379 &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.
1380 &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.
1381 &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 -07001382 &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 -07001383 &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.
1384 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
1385 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
1386 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1387 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1388 &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.
1389 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1390 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
1391 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
1392 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1393 &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.
1394 &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.
1395 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
1396 &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.
1397 &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.
1398 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
1399 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
1400 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
1401 &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.
1402 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -04001403 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001404 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
1405 { # A restriction for accessing the content of the file.
1406 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only.
1407 &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.
1408 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
1409 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1410 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1411 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1412 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1413 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1414 &quot;picture&quot;: { # The user&#x27;s profile picture.
1415 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1416 },
1417 },
1418 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
1419 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
1420 },
1421 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001422 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1423 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
1424 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
1425 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
1426 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
1427 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
1428 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1429 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
1430 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
1431 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
1432 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
1433 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
1434 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -04001435 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001436 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
1437 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
1438 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
1439 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
1440 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1441 &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.
1442 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
1443 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
1444 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1445 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
1446 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1447 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1448 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1449 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1450 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
1451 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1452 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1453 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1454 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1455 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1456 &quot;height&quot;: 42, # The height of the image in pixels.
1457 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1458 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1459 &quot;location&quot;: { # Geographic location information stored in the image.
1460 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1461 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1462 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1463 },
1464 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1465 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1466 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1467 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1468 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1469 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1470 &quot;width&quot;: 42, # The width of the image in pixels.
1471 },
1472 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
1473 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
1474 },
1475 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1476 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
1477 &quot;labels&quot;: { # A group of labels for the file.
1478 &quot;hidden&quot;: True or False, # Deprecated.
1479 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
1480 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
1481 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001482 &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 -07001483 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
1484 },
1485 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
1486 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1487 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1488 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1489 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1490 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1491 &quot;picture&quot;: { # The user&#x27;s profile picture.
1492 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1493 },
1494 },
1495 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
1496 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1497 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
1498 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
1499 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
1500 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
1501 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
1502 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
1503 &quot;a_key&quot;: &quot;A String&quot;,
1504 },
1505 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
1506 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
1507 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
1508 &quot;A String&quot;,
1509 ],
1510 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001511 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001512 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1513 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1514 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1515 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1516 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1517 &quot;picture&quot;: { # The user&#x27;s profile picture.
1518 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -04001519 },
John Asmuth614db982014-04-24 15:46:26 -04001520 },
1521 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001522 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
1523 # If not specified as part of an insert 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 can also use the addParents and removeParents parameters to modify the parents list.
1524 { # A reference to a file&#x27;s parent.
1525 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
1526 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
1527 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
1528 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
1529 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04001530 },
1531 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001532 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1533 &quot;A String&quot;,
1534 ],
1535 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
1536 { # A permission for a file.
1537 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
1538 &quot;A String&quot;,
1539 ],
1540 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
1541 &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.
1542 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
1543 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
1544 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
1545 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
1546 # - They cannot be set on shared drive items
1547 # - They can only be set on user and group permissions
1548 # - The date must be in the future
1549 # - The date cannot be more than a year in the future
1550 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
1551 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
1552 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
1553 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
1554 &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.
1555 {
1556 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1557 &quot;A String&quot;,
1558 ],
1559 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1560 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1561 &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:
1562 # - file
1563 # - member
1564 &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:
1565 # - organizer
1566 # - fileOrganizer
1567 # - writer
1568 # - reader
1569 },
1570 ],
1571 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
1572 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
1573 # - owner
1574 # - organizer
1575 # - fileOrganizer
1576 # - writer
1577 # - reader
1578 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
1579 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1580 {
1581 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
1582 &quot;A String&quot;,
1583 ],
1584 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1585 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1586 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1587 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1588 },
1589 ],
1590 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
1591 # - user
1592 # - group
1593 # - domain
1594 # - anyone
1595 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
1596 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04001597 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001598 ],
1599 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001600 { # A key-value pair attached to a file that is either public or private to an application.
1601 # The following limits apply to file properties:
1602 # - Maximum of 100 properties total per file
1603 # - Maximum of 30 private properties per app
1604 # - Maximum of 30 public properties
1605 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
Bu Sun Kim65020912020-05-20 12:08:20 -07001606 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
1607 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
1608 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
1609 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
1610 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
1611 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04001612 },
1613 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001614 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
1615 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
1616 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
1617 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
1618 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
1619 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
1620 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1621 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1622 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1623 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1624 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1625 &quot;picture&quot;: { # The user&#x27;s profile picture.
1626 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1627 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001628 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001629 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
1630 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
1631 &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.
1632 },
1633 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
1634 &quot;A String&quot;,
1635 ],
1636 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
1637 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
1638 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
1639 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
1640 },
1641 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content.
1642 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
1643 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
1644 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
1645 &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.
1646 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1647 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1648 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1649 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1650 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1651 &quot;picture&quot;: { # The user&#x27;s profile picture.
1652 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1653 },
1654 },
1655 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
1656 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
1657 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001658 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001659 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
1660 &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.
1661 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
1662 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
1663 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
1664 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -07001665 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001666 # - They can only be set on user and group permissions
1667 # - The date must be in the future
1668 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001669 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07001670 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
1671 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
1672 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
1673 &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.
1674 {
1675 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1676 &quot;A String&quot;,
1677 ],
1678 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1679 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1680 &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:
1681 # - file
1682 # - member
1683 &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:
1684 # - organizer
1685 # - fileOrganizer
1686 # - writer
1687 # - reader
1688 },
1689 ],
1690 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
1691 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04001692 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001693 # - organizer
1694 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04001695 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001696 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07001697 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
1698 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1699 {
1700 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
1701 &quot;A String&quot;,
1702 ],
1703 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1704 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1705 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1706 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1707 },
1708 ],
1709 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04001710 # - user
1711 # - group
1712 # - domain
1713 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07001714 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
1715 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04001716 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001717 &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 requesting user.
1718 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
1719 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
1720 &quot;height&quot;: 42, # The height of the video in pixels.
1721 &quot;width&quot;: 42, # The width of the video in pixels.
1722 },
1723 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
1724 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
1725 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04001726}
1727
Bu Sun Kim65020912020-05-20 12:08:20 -07001728 convert: boolean, Whether to convert this file to the corresponding Google Docs format.
1729 enforceSingleParent: boolean, Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter only takes effect if the item is not in a shared drive. Requests that specify more than one parent fail.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001730 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Bu Sun Kim65020912020-05-20 12:08:20 -07001731 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001732 pinned: boolean, Whether to pin the head revision of the uploaded file. A file can have a maximum of 200 pinned revisions.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001733 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001734 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
1735 timedTextLanguage: string, The language of the timed text.
1736 timedTextTrackName: string, The timed text track name.
1737 useContentAsIndexableText: boolean, Whether to use the content as indexable text.
John Asmuth614db982014-04-24 15:46:26 -04001738 visibility: string, The visibility of the new file. This parameter is only relevant when convert=false.
1739 Allowed values
Bu Sun Kim65020912020-05-20 12:08:20 -07001740 DEFAULT - The visibility of the new file is determined by the user&#x27;s default visibility/sharing policies.
John Asmuth614db982014-04-24 15:46:26 -04001741 PRIVATE - The new file will be visible to only the owner.
Bu Sun Kim65020912020-05-20 12:08:20 -07001742 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001743 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
John Asmuth614db982014-04-24 15:46:26 -04001744
1745Returns:
1746 An object of the form:
1747
1748 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001749 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
1750 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
1751 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
1752 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
1753 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
1754 &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 -07001755 &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 -07001756 &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.
1757 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1758 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
1759 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
1760 &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.
1761 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
1762 &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.
1763 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
1764 &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.
1765 &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.
1766 &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 -07001767 &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 -07001768 &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.
1769 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
1770 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
1771 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1772 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1773 &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.
1774 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1775 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
1776 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
1777 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1778 &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.
1779 &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.
1780 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
1781 &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.
1782 &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.
1783 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
1784 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
1785 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
1786 &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.
1787 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -04001788 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001789 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
1790 { # A restriction for accessing the content of the file.
1791 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only.
1792 &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.
1793 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
1794 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1795 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1796 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1797 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1798 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1799 &quot;picture&quot;: { # The user&#x27;s profile picture.
1800 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1801 },
1802 },
1803 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
1804 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
1805 },
1806 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001807 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1808 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
1809 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
1810 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
1811 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
1812 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
1813 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1814 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
1815 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
1816 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
1817 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
1818 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
1819 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -04001820 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001821 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
1822 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
1823 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
1824 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
1825 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1826 &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.
1827 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
1828 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
1829 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1830 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
1831 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1832 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1833 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1834 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1835 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
1836 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1837 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1838 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1839 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1840 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1841 &quot;height&quot;: 42, # The height of the image in pixels.
1842 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1843 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1844 &quot;location&quot;: { # Geographic location information stored in the image.
1845 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1846 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1847 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1848 },
1849 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1850 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1851 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1852 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1853 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1854 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1855 &quot;width&quot;: 42, # The width of the image in pixels.
1856 },
1857 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
1858 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
1859 },
1860 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1861 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
1862 &quot;labels&quot;: { # A group of labels for the file.
1863 &quot;hidden&quot;: True or False, # Deprecated.
1864 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
1865 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
1866 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001867 &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 -07001868 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
1869 },
1870 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
1871 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1872 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1873 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1874 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1875 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1876 &quot;picture&quot;: { # The user&#x27;s profile picture.
1877 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1878 },
1879 },
1880 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
1881 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1882 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
1883 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
1884 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
1885 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
1886 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
1887 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
1888 &quot;a_key&quot;: &quot;A String&quot;,
1889 },
1890 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
1891 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
1892 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
1893 &quot;A String&quot;,
1894 ],
1895 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001896 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001897 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1898 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1899 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1900 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1901 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1902 &quot;picture&quot;: { # The user&#x27;s profile picture.
1903 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -04001904 },
John Asmuth614db982014-04-24 15:46:26 -04001905 },
1906 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001907 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
1908 # If not specified as part of an insert 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 can also use the addParents and removeParents parameters to modify the parents list.
1909 { # A reference to a file&#x27;s parent.
1910 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
1911 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
1912 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
1913 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
1914 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04001915 },
1916 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001917 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1918 &quot;A String&quot;,
1919 ],
1920 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
1921 { # A permission for a file.
1922 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
1923 &quot;A String&quot;,
1924 ],
1925 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
1926 &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.
1927 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
1928 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
1929 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
1930 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
1931 # - They cannot be set on shared drive items
1932 # - They can only be set on user and group permissions
1933 # - The date must be in the future
1934 # - The date cannot be more than a year in the future
1935 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
1936 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
1937 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
1938 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
1939 &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.
1940 {
1941 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1942 &quot;A String&quot;,
1943 ],
1944 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1945 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1946 &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:
1947 # - file
1948 # - member
1949 &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:
1950 # - organizer
1951 # - fileOrganizer
1952 # - writer
1953 # - reader
1954 },
1955 ],
1956 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
1957 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
1958 # - owner
1959 # - organizer
1960 # - fileOrganizer
1961 # - writer
1962 # - reader
1963 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
1964 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1965 {
1966 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
1967 &quot;A String&quot;,
1968 ],
1969 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1970 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1971 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1972 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1973 },
1974 ],
1975 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
1976 # - user
1977 # - group
1978 # - domain
1979 # - anyone
1980 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
1981 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04001982 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001983 ],
1984 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001985 { # A key-value pair attached to a file that is either public or private to an application.
1986 # The following limits apply to file properties:
1987 # - Maximum of 100 properties total per file
1988 # - Maximum of 30 private properties per app
1989 # - Maximum of 30 public properties
1990 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
Bu Sun Kim65020912020-05-20 12:08:20 -07001991 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
1992 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
1993 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
1994 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
1995 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
1996 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04001997 },
1998 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001999 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
2000 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
2001 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
2002 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
2003 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
2004 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
2005 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2006 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2007 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2008 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2009 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2010 &quot;picture&quot;: { # The user&#x27;s profile picture.
2011 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2012 },
Takashi Matsuo06694102015-09-11 13:55:40 -07002013 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002014 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
2015 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
2016 &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.
2017 },
2018 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
2019 &quot;A String&quot;,
2020 ],
2021 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
2022 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
2023 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
2024 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
2025 },
2026 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content.
2027 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
2028 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
2029 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
2030 &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.
2031 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2032 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2033 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2034 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2035 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2036 &quot;picture&quot;: { # The user&#x27;s profile picture.
2037 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2038 },
2039 },
2040 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
2041 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
2042 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002043 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002044 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
2045 &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.
2046 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
2047 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
2048 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
2049 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -07002050 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002051 # - They can only be set on user and group permissions
2052 # - The date must be in the future
2053 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002054 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07002055 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
2056 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
2057 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
2058 &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.
2059 {
2060 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2061 &quot;A String&quot;,
2062 ],
2063 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2064 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
2065 &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:
2066 # - file
2067 # - member
2068 &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:
2069 # - organizer
2070 # - fileOrganizer
2071 # - writer
2072 # - reader
2073 },
2074 ],
2075 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
2076 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04002077 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002078 # - organizer
2079 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04002080 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002081 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07002082 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
2083 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
2084 {
2085 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
2086 &quot;A String&quot;,
2087 ],
2088 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
2089 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
2090 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
2091 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
2092 },
2093 ],
2094 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04002095 # - user
2096 # - group
2097 # - domain
2098 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07002099 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
2100 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04002101 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002102 &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 requesting user.
2103 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
2104 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
2105 &quot;height&quot;: 42, # The height of the video in pixels.
2106 &quot;width&quot;: 42, # The width of the video in pixels.
2107 },
2108 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
2109 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
2110 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04002111 }</pre>
2112</div>
2113
2114<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002115 <code class="details" id="list">list(corpora=None, corpus=None, driveId=None, includeItemsFromAllDrives=None, includeTeamDriveItems=None, maxResults=None, orderBy=None, pageToken=None, projection=None, q=None, spaces=None, supportsAllDrives=None, supportsTeamDrives=None, teamDriveId=None)</code>
2116 <pre>Lists the user&#x27;s files.
John Asmuth614db982014-04-24 15:46:26 -04002117
2118Args:
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002119 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 -07002120 corpus: string, The body of items (files/documents) to which the query applies. Deprecated: use &#x27;corpora&#x27; instead.
2121 Allowed values
2122 DEFAULT - The items that the user has accessed.
2123 DOMAIN - Items shared to the user&#x27;s domain.
2124 driveId: string, ID of the shared drive to search.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002125 includeItemsFromAllDrives: boolean, Whether both My Drive and shared drive items should be included in results.
Bu Sun Kim65020912020-05-20 12:08:20 -07002126 includeTeamDriveItems: boolean, Deprecated use includeItemsFromAllDrives instead.
2127 maxResults: integer, The maximum number of files to return per page. Partial or empty result pages are possible even before the end of the files list has been reached.
2128 orderBy: string, A comma-separated list of sort keys. Valid keys are &#x27;createdDate&#x27;, &#x27;folder&#x27;, &#x27;lastViewedByMeDate&#x27;, &#x27;modifiedByMeDate&#x27;, &#x27;modifiedDate&#x27;, &#x27;quotaBytesUsed&#x27;, &#x27;recency&#x27;, &#x27;sharedWithMeDate&#x27;, &#x27;starred&#x27;, &#x27;title&#x27;, and &#x27;title_natural&#x27;. Each key sorts ascending by default, but may be reversed with the &#x27;desc&#x27; modifier. Example usage: ?orderBy=folder,modifiedDate desc,title. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.
2129 pageToken: string, Page token for files.
John Asmuth614db982014-04-24 15:46:26 -04002130 projection: string, This parameter is deprecated and has no function.
2131 Allowed values
2132 BASIC - Deprecated
2133 FULL - Deprecated
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002134 q: string, Query string for searching files.
Bu Sun Kim65020912020-05-20 12:08:20 -07002135 spaces: string, A comma-separated list of spaces to query. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002136 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07002137 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
2138 teamDriveId: string, Deprecated use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04002139
2140Returns:
2141 An object of the form:
2142
2143 { # A list of files.
Bu Sun Kim65020912020-05-20 12:08:20 -07002144 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the list.
2145 &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;default&quot; or &quot;drive&quot;.
2146 &quot;items&quot;: [ # The list of files. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.
John Asmuth614db982014-04-24 15:46:26 -04002147 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07002148 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
2149 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
2150 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
2151 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
2152 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
2153 &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 -07002154 &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 -07002155 &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.
2156 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
2157 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
2158 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
2159 &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.
2160 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
2161 &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.
2162 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
2163 &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.
2164 &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.
2165 &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 -07002166 &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 -07002167 &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.
2168 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
2169 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
2170 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
2171 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2172 &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.
2173 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2174 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
2175 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
2176 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
2177 &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.
2178 &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.
2179 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
2180 &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.
2181 &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.
2182 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
2183 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
2184 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
2185 &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.
2186 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -04002187 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002188 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
2189 { # A restriction for accessing the content of the file.
2190 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only.
2191 &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.
2192 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
2193 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2194 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2195 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2196 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2197 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2198 &quot;picture&quot;: { # The user&#x27;s profile picture.
2199 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2200 },
2201 },
2202 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
2203 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
2204 },
2205 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002206 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
2207 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
2208 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
2209 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
2210 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
2211 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
2212 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
2213 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
2214 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
2215 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
2216 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
2217 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
2218 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -04002219 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002220 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
2221 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
2222 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
2223 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
2224 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
2225 &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.
2226 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
2227 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
2228 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
2229 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
2230 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
2231 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
2232 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
2233 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
2234 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
2235 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
2236 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
2237 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
2238 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
2239 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
2240 &quot;height&quot;: 42, # The height of the image in pixels.
2241 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
2242 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
2243 &quot;location&quot;: { # Geographic location information stored in the image.
2244 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
2245 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
2246 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
2247 },
2248 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
2249 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
2250 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
2251 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
2252 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
2253 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
2254 &quot;width&quot;: 42, # The width of the image in pixels.
2255 },
2256 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
2257 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
2258 },
2259 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
2260 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
2261 &quot;labels&quot;: { # A group of labels for the file.
2262 &quot;hidden&quot;: True or False, # Deprecated.
2263 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
2264 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
2265 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002266 &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 -07002267 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
2268 },
2269 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
2270 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2271 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2272 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2273 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2274 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2275 &quot;picture&quot;: { # The user&#x27;s profile picture.
2276 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2277 },
2278 },
2279 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
2280 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
2281 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
2282 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
2283 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
2284 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
2285 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
2286 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
2287 &quot;a_key&quot;: &quot;A String&quot;,
2288 },
2289 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
2290 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
2291 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
2292 &quot;A String&quot;,
2293 ],
2294 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002295 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07002296 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2297 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2298 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2299 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2300 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2301 &quot;picture&quot;: { # The user&#x27;s profile picture.
2302 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -04002303 },
John Asmuth614db982014-04-24 15:46:26 -04002304 },
2305 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002306 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
2307 # If not specified as part of an insert 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 can also use the addParents and removeParents parameters to modify the parents list.
2308 { # A reference to a file&#x27;s parent.
2309 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
2310 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
2311 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
2312 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
2313 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04002314 },
2315 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002316 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
2317 &quot;A String&quot;,
2318 ],
2319 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
2320 { # A permission for a file.
2321 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
2322 &quot;A String&quot;,
2323 ],
2324 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
2325 &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.
2326 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
2327 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
2328 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
2329 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
2330 # - They cannot be set on shared drive items
2331 # - They can only be set on user and group permissions
2332 # - The date must be in the future
2333 # - The date cannot be more than a year in the future
2334 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
2335 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
2336 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
2337 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
2338 &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.
2339 {
2340 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2341 &quot;A String&quot;,
2342 ],
2343 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2344 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
2345 &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:
2346 # - file
2347 # - member
2348 &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:
2349 # - organizer
2350 # - fileOrganizer
2351 # - writer
2352 # - reader
2353 },
2354 ],
2355 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
2356 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
2357 # - owner
2358 # - organizer
2359 # - fileOrganizer
2360 # - writer
2361 # - reader
2362 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
2363 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
2364 {
2365 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
2366 &quot;A String&quot;,
2367 ],
2368 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
2369 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
2370 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
2371 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
2372 },
2373 ],
2374 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
2375 # - user
2376 # - group
2377 # - domain
2378 # - anyone
2379 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
2380 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04002381 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002382 ],
2383 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002384 { # A key-value pair attached to a file that is either public or private to an application.
2385 # The following limits apply to file properties:
2386 # - Maximum of 100 properties total per file
2387 # - Maximum of 30 private properties per app
2388 # - Maximum of 30 public properties
2389 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
Bu Sun Kim65020912020-05-20 12:08:20 -07002390 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
2391 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
2392 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
2393 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
2394 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
2395 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04002396 },
2397 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002398 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
2399 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
2400 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
2401 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
2402 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
2403 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
2404 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2405 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2406 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2407 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2408 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2409 &quot;picture&quot;: { # The user&#x27;s profile picture.
2410 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2411 },
Takashi Matsuo06694102015-09-11 13:55:40 -07002412 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002413 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
2414 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
2415 &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.
2416 },
2417 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
2418 &quot;A String&quot;,
2419 ],
2420 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
2421 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
2422 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
2423 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
2424 },
2425 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content.
2426 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
2427 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
2428 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
2429 &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.
2430 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2431 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2432 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2433 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2434 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2435 &quot;picture&quot;: { # The user&#x27;s profile picture.
2436 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2437 },
2438 },
2439 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
2440 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
2441 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002442 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002443 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
2444 &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.
2445 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
2446 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
2447 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
2448 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -07002449 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002450 # - They can only be set on user and group permissions
2451 # - The date must be in the future
2452 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002453 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07002454 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
2455 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
2456 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
2457 &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.
2458 {
2459 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2460 &quot;A String&quot;,
2461 ],
2462 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2463 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
2464 &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:
2465 # - file
2466 # - member
2467 &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:
2468 # - organizer
2469 # - fileOrganizer
2470 # - writer
2471 # - reader
2472 },
2473 ],
2474 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
2475 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04002476 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002477 # - organizer
2478 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04002479 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002480 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07002481 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
2482 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
2483 {
2484 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
2485 &quot;A String&quot;,
2486 ],
2487 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
2488 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
2489 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
2490 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
2491 },
2492 ],
2493 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04002494 # - user
2495 # - group
2496 # - domain
2497 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07002498 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
2499 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04002500 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002501 &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 requesting user.
2502 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
2503 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
2504 &quot;height&quot;: 42, # The height of the video in pixels.
2505 &quot;width&quot;: 42, # The width of the video in pixels.
2506 },
2507 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
2508 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
2509 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04002510 },
2511 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002512 &quot;kind&quot;: &quot;drive#fileList&quot;, # This is always drive#fileList.
2513 &quot;nextLink&quot;: &quot;A String&quot;, # A link to the next page of files.
2514 &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.
2515 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this list.
John Asmuth614db982014-04-24 15:46:26 -04002516 }</pre>
2517</div>
2518
2519<div class="method">
2520 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2521 <pre>Retrieves the next page of results.
2522
2523Args:
2524 previous_request: The request for the previous page. (required)
2525 previous_response: The response from the request for the previous page. (required)
2526
2527Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07002528 A request object that you can call &#x27;execute()&#x27; on to request the next
John Asmuth614db982014-04-24 15:46:26 -04002529 page. Returns None if there are no more items in the collection.
2530 </pre>
2531</div>
2532
2533<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002534 <code class="details" id="patch">patch(fileId, body=None, addParents=None, convert=None, enforceSingleParent=None, modifiedDateBehavior=None, newRevision=None, ocr=None, ocrLanguage=None, pinned=None, removeParents=None, setModifiedDate=None, supportsAllDrives=None, supportsTeamDrives=None, timedTextLanguage=None, timedTextTrackName=None, updateViewedDate=None, useContentAsIndexableText=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04002535 <pre>Updates file metadata and/or content. This method supports patch semantics.
2536
2537Args:
2538 fileId: string, The ID of the file to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002539 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04002540 The object takes the form of:
2541
2542{ # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07002543 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
2544 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
2545 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
2546 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
2547 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
2548 &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 -07002549 &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 -07002550 &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.
2551 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
2552 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
2553 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
2554 &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.
2555 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
2556 &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.
2557 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
2558 &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.
2559 &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.
2560 &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 -07002561 &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 -07002562 &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.
2563 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
2564 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
2565 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
2566 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2567 &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.
2568 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2569 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
2570 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
2571 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
2572 &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.
2573 &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.
2574 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
2575 &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.
2576 &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.
2577 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
2578 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
2579 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
2580 &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.
2581 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -04002582 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002583 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
2584 { # A restriction for accessing the content of the file.
2585 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only.
2586 &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.
2587 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
2588 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2589 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2590 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2591 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2592 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2593 &quot;picture&quot;: { # The user&#x27;s profile picture.
2594 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2595 },
2596 },
2597 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
2598 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
2599 },
2600 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002601 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
2602 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
2603 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
2604 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
2605 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
2606 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
2607 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
2608 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
2609 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
2610 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
2611 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
2612 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
2613 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -04002614 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002615 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
2616 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
2617 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
2618 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
2619 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
2620 &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.
2621 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
2622 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
2623 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
2624 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
2625 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
2626 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
2627 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
2628 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
2629 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
2630 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
2631 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
2632 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
2633 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
2634 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
2635 &quot;height&quot;: 42, # The height of the image in pixels.
2636 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
2637 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
2638 &quot;location&quot;: { # Geographic location information stored in the image.
2639 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
2640 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
2641 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
2642 },
2643 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
2644 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
2645 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
2646 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
2647 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
2648 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
2649 &quot;width&quot;: 42, # The width of the image in pixels.
2650 },
2651 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
2652 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
2653 },
2654 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
2655 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
2656 &quot;labels&quot;: { # A group of labels for the file.
2657 &quot;hidden&quot;: True or False, # Deprecated.
2658 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
2659 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
2660 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002661 &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 -07002662 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
2663 },
2664 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
2665 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2666 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2667 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2668 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2669 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2670 &quot;picture&quot;: { # The user&#x27;s profile picture.
2671 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2672 },
2673 },
2674 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
2675 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
2676 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
2677 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
2678 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
2679 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
2680 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
2681 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
2682 &quot;a_key&quot;: &quot;A String&quot;,
2683 },
2684 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
2685 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
2686 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
2687 &quot;A String&quot;,
2688 ],
2689 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002690 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07002691 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2692 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2693 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2694 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2695 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2696 &quot;picture&quot;: { # The user&#x27;s profile picture.
2697 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -04002698 },
John Asmuth614db982014-04-24 15:46:26 -04002699 },
2700 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002701 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
2702 # If not specified as part of an insert 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 can also use the addParents and removeParents parameters to modify the parents list.
2703 { # A reference to a file&#x27;s parent.
2704 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
2705 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
2706 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
2707 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
2708 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04002709 },
2710 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002711 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
2712 &quot;A String&quot;,
2713 ],
2714 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
2715 { # A permission for a file.
2716 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
2717 &quot;A String&quot;,
2718 ],
2719 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
2720 &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.
2721 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
2722 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
2723 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
2724 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
2725 # - They cannot be set on shared drive items
2726 # - They can only be set on user and group permissions
2727 # - The date must be in the future
2728 # - The date cannot be more than a year in the future
2729 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
2730 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
2731 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
2732 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
2733 &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.
2734 {
2735 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2736 &quot;A String&quot;,
2737 ],
2738 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2739 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
2740 &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:
2741 # - file
2742 # - member
2743 &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:
2744 # - organizer
2745 # - fileOrganizer
2746 # - writer
2747 # - reader
2748 },
2749 ],
2750 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
2751 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
2752 # - owner
2753 # - organizer
2754 # - fileOrganizer
2755 # - writer
2756 # - reader
2757 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
2758 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
2759 {
2760 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
2761 &quot;A String&quot;,
2762 ],
2763 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
2764 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
2765 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
2766 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
2767 },
2768 ],
2769 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
2770 # - user
2771 # - group
2772 # - domain
2773 # - anyone
2774 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
2775 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04002776 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002777 ],
2778 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002779 { # A key-value pair attached to a file that is either public or private to an application.
2780 # The following limits apply to file properties:
2781 # - Maximum of 100 properties total per file
2782 # - Maximum of 30 private properties per app
2783 # - Maximum of 30 public properties
2784 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
Bu Sun Kim65020912020-05-20 12:08:20 -07002785 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
2786 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
2787 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
2788 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
2789 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
2790 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04002791 },
2792 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002793 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
2794 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
2795 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
2796 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
2797 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
2798 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
2799 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2800 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2801 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2802 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2803 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2804 &quot;picture&quot;: { # The user&#x27;s profile picture.
2805 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2806 },
Takashi Matsuo06694102015-09-11 13:55:40 -07002807 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002808 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
2809 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
2810 &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.
2811 },
2812 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
2813 &quot;A String&quot;,
2814 ],
2815 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
2816 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
2817 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
2818 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
2819 },
2820 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content.
2821 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
2822 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
2823 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
2824 &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.
2825 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2826 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2827 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2828 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2829 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2830 &quot;picture&quot;: { # The user&#x27;s profile picture.
2831 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2832 },
2833 },
2834 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
2835 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
2836 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002837 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002838 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
2839 &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.
2840 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
2841 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
2842 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
2843 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -07002844 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002845 # - They can only be set on user and group permissions
2846 # - The date must be in the future
2847 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002848 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07002849 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
2850 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
2851 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
2852 &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.
2853 {
2854 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2855 &quot;A String&quot;,
2856 ],
2857 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2858 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
2859 &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:
2860 # - file
2861 # - member
2862 &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:
2863 # - organizer
2864 # - fileOrganizer
2865 # - writer
2866 # - reader
2867 },
2868 ],
2869 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
2870 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04002871 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002872 # - organizer
2873 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04002874 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002875 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07002876 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
2877 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
2878 {
2879 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
2880 &quot;A String&quot;,
2881 ],
2882 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
2883 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
2884 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
2885 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
2886 },
2887 ],
2888 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04002889 # - user
2890 # - group
2891 # - domain
2892 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07002893 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
2894 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04002895 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002896 &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 requesting user.
2897 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
2898 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
2899 &quot;height&quot;: 42, # The height of the video in pixels.
2900 &quot;width&quot;: 42, # The width of the video in pixels.
2901 },
2902 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
2903 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
2904 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04002905}
2906
Bu Sun Kim65020912020-05-20 12:08:20 -07002907 addParents: string, Comma-separated list of parent IDs to add.
2908 convert: boolean, This parameter is deprecated and has no function.
2909 enforceSingleParent: boolean, Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter only takes effect if the item is not in a shared drive. If the item&#x27;s owner makes a request to add a single parent, the item is removed from all current folders and placed in the requested folder. Other requests that increase the number of parents fail, except when the canAddMyDriveParent file capability is true and a single parent is being added.
Takashi Matsuo06694102015-09-11 13:55:40 -07002910 modifiedDateBehavior: string, Determines the behavior in which modifiedDate is updated. This overrides setModifiedDate.
2911 Allowed values
2912 fromBody - Set modifiedDate to the value provided in the body of the request. No change if no value was provided.
2913 fromBodyIfNeeded - Set modifiedDate to the value provided in the body of the request depending on other contents of the update.
2914 fromBodyOrNow - Set modifiedDate to the value provided in the body of the request, or to the current time if no value was provided.
2915 noChange - Maintain the previous value of modifiedDate.
2916 now - Set modifiedDate to the current time.
2917 nowIfNeeded - Set modifiedDate to the current time depending on contents of the update.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002918 newRevision: boolean, Whether a blob upload should create a new revision. If false, the blob data in the current head revision is replaced. If true or not set, a new blob is created as head revision, and previous unpinned revisions are preserved for a short period of time. Pinned revisions are stored indefinitely, using additional storage quota, up to a maximum of 200 revisions. For details on how revisions are retained, see the Drive Help Center. Note that this field is ignored if there is no payload in the request.
Bu Sun Kim65020912020-05-20 12:08:20 -07002919 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002920 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002921 pinned: boolean, Whether to pin the new revision. A file can have a maximum of 200 pinned revisions. Note that this field is ignored if there is no payload in the request.
Craig Citro065b5302014-08-14 00:47:23 -07002922 removeParents: string, Comma-separated list of parent IDs to remove.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002923 setModifiedDate: boolean, Whether to set the modified date using the value supplied in the request body. Setting this field to true is equivalent to modifiedDateBehavior=fromBodyOrNow, and false is equivalent to modifiedDateBehavior=now. To prevent any changes to the modified date set modifiedDateBehavior=noChange.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002924 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07002925 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
John Asmuth614db982014-04-24 15:46:26 -04002926 timedTextLanguage: string, The language of the timed text.
Bu Sun Kim65020912020-05-20 12:08:20 -07002927 timedTextTrackName: string, The timed text track name.
2928 updateViewedDate: boolean, Whether to update the view date after successfully updating the file.
2929 useContentAsIndexableText: boolean, Whether to use the content as indexable text.
John Asmuth614db982014-04-24 15:46:26 -04002930
2931Returns:
2932 An object of the form:
2933
2934 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07002935 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
2936 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
2937 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
2938 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
2939 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
2940 &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 -07002941 &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 -07002942 &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.
2943 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
2944 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
2945 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
2946 &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.
2947 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
2948 &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.
2949 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
2950 &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.
2951 &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.
2952 &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 -07002953 &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 -07002954 &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.
2955 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
2956 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
2957 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
2958 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2959 &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.
2960 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2961 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
2962 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
2963 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
2964 &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.
2965 &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.
2966 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
2967 &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.
2968 &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.
2969 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
2970 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
2971 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
2972 &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.
2973 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -04002974 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002975 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
2976 { # A restriction for accessing the content of the file.
2977 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only.
2978 &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.
2979 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
2980 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2981 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2982 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2983 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2984 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2985 &quot;picture&quot;: { # The user&#x27;s profile picture.
2986 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2987 },
2988 },
2989 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
2990 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
2991 },
2992 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002993 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
2994 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
2995 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
2996 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
2997 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
2998 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
2999 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
3000 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
3001 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
3002 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
3003 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
3004 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
3005 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -04003006 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003007 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
3008 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
3009 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
3010 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
3011 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
3012 &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.
3013 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
3014 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
3015 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
3016 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
3017 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
3018 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
3019 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
3020 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
3021 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
3022 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
3023 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
3024 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
3025 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
3026 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
3027 &quot;height&quot;: 42, # The height of the image in pixels.
3028 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
3029 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
3030 &quot;location&quot;: { # Geographic location information stored in the image.
3031 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
3032 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
3033 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
3034 },
3035 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
3036 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
3037 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
3038 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
3039 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
3040 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
3041 &quot;width&quot;: 42, # The width of the image in pixels.
3042 },
3043 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
3044 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
3045 },
3046 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
3047 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
3048 &quot;labels&quot;: { # A group of labels for the file.
3049 &quot;hidden&quot;: True or False, # Deprecated.
3050 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
3051 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
3052 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003053 &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 -07003054 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
3055 },
3056 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
3057 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3058 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3059 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3060 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3061 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3062 &quot;picture&quot;: { # The user&#x27;s profile picture.
3063 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3064 },
3065 },
3066 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
3067 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
3068 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
3069 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
3070 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
3071 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
3072 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
3073 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
3074 &quot;a_key&quot;: &quot;A String&quot;,
3075 },
3076 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
3077 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
3078 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
3079 &quot;A String&quot;,
3080 ],
3081 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003082 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07003083 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3084 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3085 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3086 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3087 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3088 &quot;picture&quot;: { # The user&#x27;s profile picture.
3089 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -04003090 },
John Asmuth614db982014-04-24 15:46:26 -04003091 },
3092 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003093 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
3094 # If not specified as part of an insert 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 can also use the addParents and removeParents parameters to modify the parents list.
3095 { # A reference to a file&#x27;s parent.
3096 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
3097 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
3098 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
3099 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
3100 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04003101 },
3102 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003103 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
3104 &quot;A String&quot;,
3105 ],
3106 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
3107 { # A permission for a file.
3108 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
3109 &quot;A String&quot;,
3110 ],
3111 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
3112 &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.
3113 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
3114 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
3115 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
3116 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
3117 # - They cannot be set on shared drive items
3118 # - They can only be set on user and group permissions
3119 # - The date must be in the future
3120 # - The date cannot be more than a year in the future
3121 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
3122 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
3123 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
3124 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
3125 &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.
3126 {
3127 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3128 &quot;A String&quot;,
3129 ],
3130 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3131 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
3132 &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:
3133 # - file
3134 # - member
3135 &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:
3136 # - organizer
3137 # - fileOrganizer
3138 # - writer
3139 # - reader
3140 },
3141 ],
3142 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
3143 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
3144 # - owner
3145 # - organizer
3146 # - fileOrganizer
3147 # - writer
3148 # - reader
3149 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
3150 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
3151 {
3152 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
3153 &quot;A String&quot;,
3154 ],
3155 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
3156 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
3157 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
3158 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
3159 },
3160 ],
3161 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
3162 # - user
3163 # - group
3164 # - domain
3165 # - anyone
3166 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
3167 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04003168 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003169 ],
3170 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003171 { # A key-value pair attached to a file that is either public or private to an application.
3172 # The following limits apply to file properties:
3173 # - Maximum of 100 properties total per file
3174 # - Maximum of 30 private properties per app
3175 # - Maximum of 30 public properties
3176 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
Bu Sun Kim65020912020-05-20 12:08:20 -07003177 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
3178 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
3179 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
3180 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
3181 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
3182 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04003183 },
3184 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003185 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
3186 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
3187 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
3188 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
3189 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
3190 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
3191 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3192 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3193 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3194 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3195 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3196 &quot;picture&quot;: { # The user&#x27;s profile picture.
3197 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3198 },
Takashi Matsuo06694102015-09-11 13:55:40 -07003199 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003200 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
3201 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
3202 &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.
3203 },
3204 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
3205 &quot;A String&quot;,
3206 ],
3207 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
3208 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
3209 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
3210 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
3211 },
3212 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content.
3213 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
3214 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
3215 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
3216 &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.
3217 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3218 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3219 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3220 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3221 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3222 &quot;picture&quot;: { # The user&#x27;s profile picture.
3223 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3224 },
3225 },
3226 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
3227 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
3228 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003229 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003230 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
3231 &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.
3232 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
3233 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
3234 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
3235 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -07003236 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003237 # - They can only be set on user and group permissions
3238 # - The date must be in the future
3239 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003240 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07003241 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
3242 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
3243 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
3244 &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.
3245 {
3246 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3247 &quot;A String&quot;,
3248 ],
3249 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3250 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
3251 &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:
3252 # - file
3253 # - member
3254 &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:
3255 # - organizer
3256 # - fileOrganizer
3257 # - writer
3258 # - reader
3259 },
3260 ],
3261 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
3262 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04003263 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003264 # - organizer
3265 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04003266 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003267 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07003268 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
3269 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
3270 {
3271 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
3272 &quot;A String&quot;,
3273 ],
3274 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
3275 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
3276 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
3277 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
3278 },
3279 ],
3280 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04003281 # - user
3282 # - group
3283 # - domain
3284 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07003285 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
3286 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04003287 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003288 &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 requesting user.
3289 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
3290 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
3291 &quot;height&quot;: 42, # The height of the video in pixels.
3292 &quot;width&quot;: 42, # The width of the video in pixels.
3293 },
3294 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
3295 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
3296 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003297 }</pre>
3298</div>
3299
3300<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07003301 <code class="details" id="touch">touch(fileId, supportsAllDrives=None, supportsTeamDrives=None)</code>
3302 <pre>Set the file&#x27;s updated time to the current server time.
John Asmuth614db982014-04-24 15:46:26 -04003303
3304Args:
3305 fileId: string, The ID of the file to update. (required)
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003306 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07003307 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
John Asmuth614db982014-04-24 15:46:26 -04003308
3309Returns:
3310 An object of the form:
3311
3312 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07003313 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
3314 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
3315 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
3316 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
3317 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
3318 &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 -07003319 &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 -07003320 &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.
3321 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
3322 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
3323 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
3324 &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.
3325 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
3326 &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.
3327 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
3328 &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.
3329 &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.
3330 &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 -07003331 &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 -07003332 &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.
3333 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
3334 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
3335 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
3336 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3337 &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.
3338 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3339 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
3340 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
3341 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
3342 &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.
3343 &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.
3344 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
3345 &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.
3346 &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.
3347 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
3348 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
3349 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
3350 &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.
3351 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -04003352 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003353 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
3354 { # A restriction for accessing the content of the file.
3355 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only.
3356 &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.
3357 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
3358 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3359 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3360 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3361 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3362 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3363 &quot;picture&quot;: { # The user&#x27;s profile picture.
3364 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3365 },
3366 },
3367 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
3368 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
3369 },
3370 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003371 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
3372 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
3373 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
3374 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
3375 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
3376 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
3377 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
3378 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
3379 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
3380 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
3381 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
3382 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
3383 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -04003384 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003385 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
3386 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
3387 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
3388 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
3389 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
3390 &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.
3391 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
3392 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
3393 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
3394 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
3395 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
3396 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
3397 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
3398 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
3399 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
3400 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
3401 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
3402 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
3403 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
3404 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
3405 &quot;height&quot;: 42, # The height of the image in pixels.
3406 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
3407 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
3408 &quot;location&quot;: { # Geographic location information stored in the image.
3409 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
3410 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
3411 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
3412 },
3413 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
3414 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
3415 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
3416 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
3417 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
3418 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
3419 &quot;width&quot;: 42, # The width of the image in pixels.
3420 },
3421 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
3422 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
3423 },
3424 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
3425 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
3426 &quot;labels&quot;: { # A group of labels for the file.
3427 &quot;hidden&quot;: True or False, # Deprecated.
3428 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
3429 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
3430 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003431 &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 -07003432 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
3433 },
3434 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
3435 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3436 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3437 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3438 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3439 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3440 &quot;picture&quot;: { # The user&#x27;s profile picture.
3441 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3442 },
3443 },
3444 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
3445 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
3446 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
3447 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
3448 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
3449 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
3450 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
3451 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
3452 &quot;a_key&quot;: &quot;A String&quot;,
3453 },
3454 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
3455 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
3456 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
3457 &quot;A String&quot;,
3458 ],
3459 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003460 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07003461 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3462 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3463 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3464 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3465 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3466 &quot;picture&quot;: { # The user&#x27;s profile picture.
3467 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -04003468 },
John Asmuth614db982014-04-24 15:46:26 -04003469 },
3470 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003471 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
3472 # If not specified as part of an insert 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 can also use the addParents and removeParents parameters to modify the parents list.
3473 { # A reference to a file&#x27;s parent.
3474 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
3475 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
3476 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
3477 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
3478 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04003479 },
3480 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003481 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
3482 &quot;A String&quot;,
3483 ],
3484 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
3485 { # A permission for a file.
3486 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
3487 &quot;A String&quot;,
3488 ],
3489 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
3490 &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.
3491 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
3492 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
3493 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
3494 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
3495 # - They cannot be set on shared drive items
3496 # - They can only be set on user and group permissions
3497 # - The date must be in the future
3498 # - The date cannot be more than a year in the future
3499 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
3500 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
3501 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
3502 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
3503 &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.
3504 {
3505 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3506 &quot;A String&quot;,
3507 ],
3508 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3509 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
3510 &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:
3511 # - file
3512 # - member
3513 &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:
3514 # - organizer
3515 # - fileOrganizer
3516 # - writer
3517 # - reader
3518 },
3519 ],
3520 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
3521 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
3522 # - owner
3523 # - organizer
3524 # - fileOrganizer
3525 # - writer
3526 # - reader
3527 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
3528 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
3529 {
3530 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
3531 &quot;A String&quot;,
3532 ],
3533 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
3534 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
3535 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
3536 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
3537 },
3538 ],
3539 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
3540 # - user
3541 # - group
3542 # - domain
3543 # - anyone
3544 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
3545 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04003546 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003547 ],
3548 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003549 { # A key-value pair attached to a file that is either public or private to an application.
3550 # The following limits apply to file properties:
3551 # - Maximum of 100 properties total per file
3552 # - Maximum of 30 private properties per app
3553 # - Maximum of 30 public properties
3554 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
Bu Sun Kim65020912020-05-20 12:08:20 -07003555 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
3556 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
3557 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
3558 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
3559 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
3560 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04003561 },
3562 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003563 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
3564 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
3565 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
3566 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
3567 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
3568 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
3569 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3570 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3571 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3572 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3573 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3574 &quot;picture&quot;: { # The user&#x27;s profile picture.
3575 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3576 },
Takashi Matsuo06694102015-09-11 13:55:40 -07003577 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003578 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
3579 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
3580 &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.
3581 },
3582 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
3583 &quot;A String&quot;,
3584 ],
3585 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
3586 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
3587 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
3588 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
3589 },
3590 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content.
3591 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
3592 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
3593 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
3594 &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.
3595 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3596 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3597 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3598 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3599 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3600 &quot;picture&quot;: { # The user&#x27;s profile picture.
3601 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3602 },
3603 },
3604 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
3605 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
3606 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003607 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003608 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
3609 &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.
3610 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
3611 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
3612 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
3613 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -07003614 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003615 # - They can only be set on user and group permissions
3616 # - The date must be in the future
3617 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003618 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07003619 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
3620 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
3621 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
3622 &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.
3623 {
3624 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3625 &quot;A String&quot;,
3626 ],
3627 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3628 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
3629 &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:
3630 # - file
3631 # - member
3632 &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:
3633 # - organizer
3634 # - fileOrganizer
3635 # - writer
3636 # - reader
3637 },
3638 ],
3639 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
3640 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04003641 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003642 # - organizer
3643 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04003644 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003645 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07003646 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
3647 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
3648 {
3649 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
3650 &quot;A String&quot;,
3651 ],
3652 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
3653 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
3654 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
3655 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
3656 },
3657 ],
3658 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04003659 # - user
3660 # - group
3661 # - domain
3662 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07003663 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
3664 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04003665 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003666 &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 requesting user.
3667 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
3668 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
3669 &quot;height&quot;: 42, # The height of the video in pixels.
3670 &quot;width&quot;: 42, # The width of the video in pixels.
3671 },
3672 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
3673 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
3674 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04003675 }</pre>
3676</div>
3677
3678<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07003679 <code class="details" id="trash">trash(fileId, supportsAllDrives=None, supportsTeamDrives=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003680 <pre>Moves a file to the trash. The currently authenticated user must own the file or be at least a fileOrganizer on the parent for shared drive files. 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.
John Asmuth614db982014-04-24 15:46:26 -04003681
3682Args:
3683 fileId: string, The ID of the file to trash. (required)
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003684 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07003685 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
John Asmuth614db982014-04-24 15:46:26 -04003686
3687Returns:
3688 An object of the form:
3689
3690 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07003691 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
3692 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
3693 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
3694 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
3695 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
3696 &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 -07003697 &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 -07003698 &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.
3699 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
3700 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
3701 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
3702 &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.
3703 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
3704 &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.
3705 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
3706 &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.
3707 &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.
3708 &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 -07003709 &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 -07003710 &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.
3711 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
3712 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
3713 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
3714 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3715 &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.
3716 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3717 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
3718 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
3719 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
3720 &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.
3721 &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.
3722 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
3723 &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.
3724 &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.
3725 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
3726 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
3727 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
3728 &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.
3729 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -04003730 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003731 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
3732 { # A restriction for accessing the content of the file.
3733 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only.
3734 &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.
3735 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
3736 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3737 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3738 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3739 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3740 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3741 &quot;picture&quot;: { # The user&#x27;s profile picture.
3742 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3743 },
3744 },
3745 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
3746 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
3747 },
3748 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003749 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
3750 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
3751 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
3752 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
3753 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
3754 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
3755 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
3756 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
3757 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
3758 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
3759 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
3760 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
3761 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -04003762 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003763 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
3764 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
3765 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
3766 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
3767 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
3768 &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.
3769 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
3770 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
3771 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
3772 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
3773 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
3774 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
3775 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
3776 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
3777 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
3778 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
3779 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
3780 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
3781 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
3782 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
3783 &quot;height&quot;: 42, # The height of the image in pixels.
3784 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
3785 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
3786 &quot;location&quot;: { # Geographic location information stored in the image.
3787 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
3788 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
3789 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
3790 },
3791 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
3792 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
3793 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
3794 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
3795 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
3796 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
3797 &quot;width&quot;: 42, # The width of the image in pixels.
3798 },
3799 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
3800 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
3801 },
3802 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
3803 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
3804 &quot;labels&quot;: { # A group of labels for the file.
3805 &quot;hidden&quot;: True or False, # Deprecated.
3806 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
3807 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
3808 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003809 &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 -07003810 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
3811 },
3812 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
3813 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3814 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3815 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3816 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3817 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3818 &quot;picture&quot;: { # The user&#x27;s profile picture.
3819 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3820 },
3821 },
3822 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
3823 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
3824 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
3825 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
3826 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
3827 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
3828 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
3829 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
3830 &quot;a_key&quot;: &quot;A String&quot;,
3831 },
3832 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
3833 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
3834 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
3835 &quot;A String&quot;,
3836 ],
3837 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003838 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07003839 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3840 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3841 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3842 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3843 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3844 &quot;picture&quot;: { # The user&#x27;s profile picture.
3845 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -04003846 },
John Asmuth614db982014-04-24 15:46:26 -04003847 },
3848 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003849 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
3850 # If not specified as part of an insert 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 can also use the addParents and removeParents parameters to modify the parents list.
3851 { # A reference to a file&#x27;s parent.
3852 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
3853 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
3854 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
3855 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
3856 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04003857 },
3858 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003859 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
3860 &quot;A String&quot;,
3861 ],
3862 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
3863 { # A permission for a file.
3864 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
3865 &quot;A String&quot;,
3866 ],
3867 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
3868 &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.
3869 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
3870 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
3871 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
3872 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
3873 # - They cannot be set on shared drive items
3874 # - They can only be set on user and group permissions
3875 # - The date must be in the future
3876 # - The date cannot be more than a year in the future
3877 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
3878 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
3879 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
3880 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
3881 &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.
3882 {
3883 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3884 &quot;A String&quot;,
3885 ],
3886 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3887 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
3888 &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:
3889 # - file
3890 # - member
3891 &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:
3892 # - organizer
3893 # - fileOrganizer
3894 # - writer
3895 # - reader
3896 },
3897 ],
3898 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
3899 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
3900 # - owner
3901 # - organizer
3902 # - fileOrganizer
3903 # - writer
3904 # - reader
3905 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
3906 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
3907 {
3908 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
3909 &quot;A String&quot;,
3910 ],
3911 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
3912 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
3913 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
3914 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
3915 },
3916 ],
3917 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
3918 # - user
3919 # - group
3920 # - domain
3921 # - anyone
3922 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
3923 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04003924 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003925 ],
3926 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003927 { # A key-value pair attached to a file that is either public or private to an application.
3928 # The following limits apply to file properties:
3929 # - Maximum of 100 properties total per file
3930 # - Maximum of 30 private properties per app
3931 # - Maximum of 30 public properties
3932 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
Bu Sun Kim65020912020-05-20 12:08:20 -07003933 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
3934 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
3935 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
3936 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
3937 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
3938 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04003939 },
3940 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003941 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
3942 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
3943 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
3944 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
3945 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
3946 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
3947 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3948 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3949 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3950 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3951 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3952 &quot;picture&quot;: { # The user&#x27;s profile picture.
3953 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3954 },
Takashi Matsuo06694102015-09-11 13:55:40 -07003955 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003956 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
3957 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
3958 &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.
3959 },
3960 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
3961 &quot;A String&quot;,
3962 ],
3963 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
3964 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
3965 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
3966 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
3967 },
3968 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content.
3969 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
3970 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
3971 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
3972 &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.
3973 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3974 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3975 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3976 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3977 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3978 &quot;picture&quot;: { # The user&#x27;s profile picture.
3979 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3980 },
3981 },
3982 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
3983 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
3984 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003985 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003986 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
3987 &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.
3988 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
3989 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
3990 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
3991 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -07003992 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003993 # - They can only be set on user and group permissions
3994 # - The date must be in the future
3995 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003996 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07003997 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
3998 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
3999 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
4000 &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.
4001 {
4002 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4003 &quot;A String&quot;,
4004 ],
4005 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4006 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
4007 &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:
4008 # - file
4009 # - member
4010 &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:
4011 # - organizer
4012 # - fileOrganizer
4013 # - writer
4014 # - reader
4015 },
4016 ],
4017 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
4018 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04004019 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004020 # - organizer
4021 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04004022 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004023 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07004024 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
4025 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
4026 {
4027 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
4028 &quot;A String&quot;,
4029 ],
4030 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
4031 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
4032 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
4033 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
4034 },
4035 ],
4036 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04004037 # - user
4038 # - group
4039 # - domain
4040 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07004041 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
4042 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04004043 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004044 &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 requesting user.
4045 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
4046 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
4047 &quot;height&quot;: 42, # The height of the video in pixels.
4048 &quot;width&quot;: 42, # The width of the video in pixels.
4049 },
4050 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
4051 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
4052 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04004053 }</pre>
4054</div>
4055
4056<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07004057 <code class="details" id="untrash">untrash(fileId, supportsAllDrives=None, supportsTeamDrives=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004058 <pre>Restores a file from the trash. The currently authenticated user must own the file or be at least a fileOrganizer on the parent for shared drive files. Only the owner may untrash a file.
John Asmuth614db982014-04-24 15:46:26 -04004059
4060Args:
4061 fileId: string, The ID of the file to untrash. (required)
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004062 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07004063 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
John Asmuth614db982014-04-24 15:46:26 -04004064
4065Returns:
4066 An object of the form:
4067
4068 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07004069 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
4070 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
4071 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
4072 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
4073 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
4074 &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 -07004075 &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 -07004076 &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.
4077 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
4078 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
4079 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
4080 &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.
4081 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
4082 &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.
4083 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
4084 &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.
4085 &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.
4086 &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 -07004087 &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 -07004088 &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.
4089 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
4090 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
4091 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
4092 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
4093 &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.
4094 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
4095 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
4096 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
4097 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
4098 &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.
4099 &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.
4100 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
4101 &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.
4102 &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.
4103 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
4104 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
4105 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
4106 &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.
4107 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -04004108 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004109 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
4110 { # A restriction for accessing the content of the file.
4111 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only.
4112 &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.
4113 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
4114 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4115 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4116 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4117 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4118 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4119 &quot;picture&quot;: { # The user&#x27;s profile picture.
4120 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4121 },
4122 },
4123 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
4124 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
4125 },
4126 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004127 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
4128 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
4129 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
4130 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
4131 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
4132 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
4133 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
4134 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
4135 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
4136 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
4137 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
4138 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
4139 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -04004140 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004141 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
4142 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
4143 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
4144 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
4145 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
4146 &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.
4147 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
4148 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
4149 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
4150 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
4151 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
4152 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
4153 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
4154 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
4155 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
4156 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
4157 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
4158 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
4159 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
4160 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
4161 &quot;height&quot;: 42, # The height of the image in pixels.
4162 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
4163 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
4164 &quot;location&quot;: { # Geographic location information stored in the image.
4165 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
4166 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
4167 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
4168 },
4169 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
4170 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
4171 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
4172 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
4173 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
4174 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
4175 &quot;width&quot;: 42, # The width of the image in pixels.
4176 },
4177 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
4178 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
4179 },
4180 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
4181 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
4182 &quot;labels&quot;: { # A group of labels for the file.
4183 &quot;hidden&quot;: True or False, # Deprecated.
4184 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
4185 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
4186 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004187 &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 -07004188 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
4189 },
4190 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
4191 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4192 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4193 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4194 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4195 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4196 &quot;picture&quot;: { # The user&#x27;s profile picture.
4197 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4198 },
4199 },
4200 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
4201 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
4202 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
4203 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
4204 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
4205 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
4206 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
4207 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
4208 &quot;a_key&quot;: &quot;A String&quot;,
4209 },
4210 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
4211 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
4212 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
4213 &quot;A String&quot;,
4214 ],
4215 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004216 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07004217 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4218 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4219 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4220 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4221 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4222 &quot;picture&quot;: { # The user&#x27;s profile picture.
4223 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -04004224 },
John Asmuth614db982014-04-24 15:46:26 -04004225 },
4226 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004227 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
4228 # If not specified as part of an insert 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 can also use the addParents and removeParents parameters to modify the parents list.
4229 { # A reference to a file&#x27;s parent.
4230 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
4231 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
4232 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
4233 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
4234 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04004235 },
4236 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004237 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
4238 &quot;A String&quot;,
4239 ],
4240 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
4241 { # A permission for a file.
4242 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
4243 &quot;A String&quot;,
4244 ],
4245 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
4246 &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.
4247 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
4248 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
4249 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
4250 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
4251 # - They cannot be set on shared drive items
4252 # - They can only be set on user and group permissions
4253 # - The date must be in the future
4254 # - The date cannot be more than a year in the future
4255 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
4256 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
4257 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
4258 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
4259 &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.
4260 {
4261 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4262 &quot;A String&quot;,
4263 ],
4264 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4265 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
4266 &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:
4267 # - file
4268 # - member
4269 &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:
4270 # - organizer
4271 # - fileOrganizer
4272 # - writer
4273 # - reader
4274 },
4275 ],
4276 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
4277 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
4278 # - owner
4279 # - organizer
4280 # - fileOrganizer
4281 # - writer
4282 # - reader
4283 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
4284 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
4285 {
4286 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
4287 &quot;A String&quot;,
4288 ],
4289 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
4290 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
4291 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
4292 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
4293 },
4294 ],
4295 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
4296 # - user
4297 # - group
4298 # - domain
4299 # - anyone
4300 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
4301 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04004302 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004303 ],
4304 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004305 { # A key-value pair attached to a file that is either public or private to an application.
4306 # The following limits apply to file properties:
4307 # - Maximum of 100 properties total per file
4308 # - Maximum of 30 private properties per app
4309 # - Maximum of 30 public properties
4310 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
Bu Sun Kim65020912020-05-20 12:08:20 -07004311 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
4312 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
4313 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
4314 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
4315 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
4316 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04004317 },
4318 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004319 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
4320 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
4321 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
4322 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
4323 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
4324 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
4325 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4326 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4327 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4328 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4329 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4330 &quot;picture&quot;: { # The user&#x27;s profile picture.
4331 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4332 },
Takashi Matsuo06694102015-09-11 13:55:40 -07004333 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004334 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
4335 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
4336 &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.
4337 },
4338 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
4339 &quot;A String&quot;,
4340 ],
4341 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
4342 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
4343 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
4344 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
4345 },
4346 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content.
4347 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
4348 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
4349 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
4350 &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.
4351 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4352 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4353 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4354 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4355 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4356 &quot;picture&quot;: { # The user&#x27;s profile picture.
4357 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4358 },
4359 },
4360 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
4361 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
4362 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004363 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004364 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
4365 &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.
4366 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
4367 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
4368 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
4369 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -07004370 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004371 # - They can only be set on user and group permissions
4372 # - The date must be in the future
4373 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004374 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07004375 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
4376 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
4377 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
4378 &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.
4379 {
4380 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4381 &quot;A String&quot;,
4382 ],
4383 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4384 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
4385 &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:
4386 # - file
4387 # - member
4388 &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:
4389 # - organizer
4390 # - fileOrganizer
4391 # - writer
4392 # - reader
4393 },
4394 ],
4395 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
4396 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04004397 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004398 # - organizer
4399 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04004400 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004401 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07004402 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
4403 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
4404 {
4405 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
4406 &quot;A String&quot;,
4407 ],
4408 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
4409 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
4410 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
4411 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
4412 },
4413 ],
4414 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04004415 # - user
4416 # - group
4417 # - domain
4418 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07004419 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
4420 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04004421 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004422 &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 requesting user.
4423 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
4424 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
4425 &quot;height&quot;: 42, # The height of the video in pixels.
4426 &quot;width&quot;: 42, # The width of the video in pixels.
4427 },
4428 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
4429 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
4430 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04004431 }</pre>
4432</div>
4433
4434<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07004435 <code class="details" id="update">update(fileId, body=None, addParents=None, convert=None, enforceSingleParent=None, modifiedDateBehavior=None, newRevision=None, ocr=None, ocrLanguage=None, pinned=None, removeParents=None, setModifiedDate=None, supportsAllDrives=None, supportsTeamDrives=None, timedTextLanguage=None, timedTextTrackName=None, updateViewedDate=None, useContentAsIndexableText=None, media_body=None, media_mime_type=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04004436 <pre>Updates file metadata and/or content.
4437
4438Args:
4439 fileId: string, The ID of the file to update. (required)
4440 body: object, The request body.
4441 The object takes the form of:
4442
4443{ # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07004444 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
4445 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
4446 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
4447 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
4448 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
4449 &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 -07004450 &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 -07004451 &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.
4452 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
4453 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
4454 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
4455 &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.
4456 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
4457 &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.
4458 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
4459 &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.
4460 &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.
4461 &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 -07004462 &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 -07004463 &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.
4464 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
4465 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
4466 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
4467 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
4468 &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.
4469 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
4470 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
4471 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
4472 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
4473 &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.
4474 &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.
4475 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
4476 &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.
4477 &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.
4478 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
4479 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
4480 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
4481 &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.
4482 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -04004483 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004484 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
4485 { # A restriction for accessing the content of the file.
4486 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only.
4487 &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.
4488 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
4489 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4490 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4491 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4492 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4493 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4494 &quot;picture&quot;: { # The user&#x27;s profile picture.
4495 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4496 },
4497 },
4498 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
4499 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
4500 },
4501 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004502 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
4503 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
4504 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
4505 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
4506 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
4507 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
4508 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
4509 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
4510 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
4511 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
4512 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
4513 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
4514 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -04004515 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004516 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
4517 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
4518 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
4519 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
4520 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
4521 &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.
4522 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
4523 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
4524 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
4525 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
4526 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
4527 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
4528 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
4529 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
4530 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
4531 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
4532 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
4533 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
4534 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
4535 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
4536 &quot;height&quot;: 42, # The height of the image in pixels.
4537 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
4538 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
4539 &quot;location&quot;: { # Geographic location information stored in the image.
4540 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
4541 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
4542 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
4543 },
4544 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
4545 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
4546 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
4547 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
4548 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
4549 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
4550 &quot;width&quot;: 42, # The width of the image in pixels.
4551 },
4552 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
4553 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
4554 },
4555 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
4556 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
4557 &quot;labels&quot;: { # A group of labels for the file.
4558 &quot;hidden&quot;: True or False, # Deprecated.
4559 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
4560 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
4561 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004562 &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 -07004563 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
4564 },
4565 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
4566 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4567 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4568 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4569 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4570 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4571 &quot;picture&quot;: { # The user&#x27;s profile picture.
4572 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4573 },
4574 },
4575 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
4576 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
4577 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
4578 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
4579 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
4580 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
4581 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
4582 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
4583 &quot;a_key&quot;: &quot;A String&quot;,
4584 },
4585 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
4586 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
4587 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
4588 &quot;A String&quot;,
4589 ],
4590 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004591 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07004592 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4593 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4594 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4595 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4596 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4597 &quot;picture&quot;: { # The user&#x27;s profile picture.
4598 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -04004599 },
John Asmuth614db982014-04-24 15:46:26 -04004600 },
4601 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004602 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
4603 # If not specified as part of an insert 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 can also use the addParents and removeParents parameters to modify the parents list.
4604 { # A reference to a file&#x27;s parent.
4605 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
4606 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
4607 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
4608 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
4609 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04004610 },
4611 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004612 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
4613 &quot;A String&quot;,
4614 ],
4615 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
4616 { # A permission for a file.
4617 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
4618 &quot;A String&quot;,
4619 ],
4620 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
4621 &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.
4622 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
4623 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
4624 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
4625 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
4626 # - They cannot be set on shared drive items
4627 # - They can only be set on user and group permissions
4628 # - The date must be in the future
4629 # - The date cannot be more than a year in the future
4630 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
4631 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
4632 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
4633 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
4634 &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.
4635 {
4636 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4637 &quot;A String&quot;,
4638 ],
4639 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4640 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
4641 &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:
4642 # - file
4643 # - member
4644 &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:
4645 # - organizer
4646 # - fileOrganizer
4647 # - writer
4648 # - reader
4649 },
4650 ],
4651 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
4652 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
4653 # - owner
4654 # - organizer
4655 # - fileOrganizer
4656 # - writer
4657 # - reader
4658 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
4659 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
4660 {
4661 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
4662 &quot;A String&quot;,
4663 ],
4664 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
4665 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
4666 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
4667 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
4668 },
4669 ],
4670 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
4671 # - user
4672 # - group
4673 # - domain
4674 # - anyone
4675 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
4676 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04004677 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004678 ],
4679 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004680 { # A key-value pair attached to a file that is either public or private to an application.
4681 # The following limits apply to file properties:
4682 # - Maximum of 100 properties total per file
4683 # - Maximum of 30 private properties per app
4684 # - Maximum of 30 public properties
4685 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
Bu Sun Kim65020912020-05-20 12:08:20 -07004686 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
4687 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
4688 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
4689 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
4690 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
4691 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04004692 },
4693 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004694 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
4695 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
4696 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
4697 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
4698 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
4699 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
4700 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4701 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4702 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4703 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4704 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4705 &quot;picture&quot;: { # The user&#x27;s profile picture.
4706 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4707 },
Takashi Matsuo06694102015-09-11 13:55:40 -07004708 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004709 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
4710 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
4711 &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.
4712 },
4713 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
4714 &quot;A String&quot;,
4715 ],
4716 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
4717 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
4718 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
4719 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
4720 },
4721 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content.
4722 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
4723 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
4724 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
4725 &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.
4726 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4727 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4728 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4729 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4730 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4731 &quot;picture&quot;: { # The user&#x27;s profile picture.
4732 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4733 },
4734 },
4735 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
4736 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
4737 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004738 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004739 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
4740 &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.
4741 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
4742 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
4743 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
4744 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -07004745 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004746 # - They can only be set on user and group permissions
4747 # - The date must be in the future
4748 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004749 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07004750 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
4751 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
4752 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
4753 &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.
4754 {
4755 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4756 &quot;A String&quot;,
4757 ],
4758 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4759 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
4760 &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:
4761 # - file
4762 # - member
4763 &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:
4764 # - organizer
4765 # - fileOrganizer
4766 # - writer
4767 # - reader
4768 },
4769 ],
4770 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
4771 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04004772 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004773 # - organizer
4774 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04004775 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004776 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07004777 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
4778 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
4779 {
4780 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
4781 &quot;A String&quot;,
4782 ],
4783 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
4784 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
4785 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
4786 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
4787 },
4788 ],
4789 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04004790 # - user
4791 # - group
4792 # - domain
4793 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07004794 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
4795 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04004796 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004797 &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 requesting user.
4798 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
4799 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
4800 &quot;height&quot;: 42, # The height of the video in pixels.
4801 &quot;width&quot;: 42, # The width of the video in pixels.
4802 },
4803 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
4804 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
4805 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04004806}
4807
Bu Sun Kim65020912020-05-20 12:08:20 -07004808 addParents: string, Comma-separated list of parent IDs to add.
4809 convert: boolean, This parameter is deprecated and has no function.
4810 enforceSingleParent: boolean, Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter only takes effect if the item is not in a shared drive. If the item&#x27;s owner makes a request to add a single parent, the item is removed from all current folders and placed in the requested folder. Other requests that increase the number of parents fail, except when the canAddMyDriveParent file capability is true and a single parent is being added.
Takashi Matsuo06694102015-09-11 13:55:40 -07004811 modifiedDateBehavior: string, Determines the behavior in which modifiedDate is updated. This overrides setModifiedDate.
4812 Allowed values
4813 fromBody - Set modifiedDate to the value provided in the body of the request. No change if no value was provided.
4814 fromBodyIfNeeded - Set modifiedDate to the value provided in the body of the request depending on other contents of the update.
4815 fromBodyOrNow - Set modifiedDate to the value provided in the body of the request, or to the current time if no value was provided.
4816 noChange - Maintain the previous value of modifiedDate.
4817 now - Set modifiedDate to the current time.
4818 nowIfNeeded - Set modifiedDate to the current time depending on contents of the update.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004819 newRevision: boolean, Whether a blob upload should create a new revision. If false, the blob data in the current head revision is replaced. If true or not set, a new blob is created as head revision, and previous unpinned revisions are preserved for a short period of time. Pinned revisions are stored indefinitely, using additional storage quota, up to a maximum of 200 revisions. For details on how revisions are retained, see the Drive Help Center. Note that this field is ignored if there is no payload in the request.
Bu Sun Kim65020912020-05-20 12:08:20 -07004820 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004821 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004822 pinned: boolean, Whether to pin the new revision. A file can have a maximum of 200 pinned revisions. Note that this field is ignored if there is no payload in the request.
Craig Citro065b5302014-08-14 00:47:23 -07004823 removeParents: string, Comma-separated list of parent IDs to remove.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004824 setModifiedDate: boolean, Whether to set the modified date using the value supplied in the request body. Setting this field to true is equivalent to modifiedDateBehavior=fromBodyOrNow, and false is equivalent to modifiedDateBehavior=now. To prevent any changes to the modified date set modifiedDateBehavior=noChange.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004825 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07004826 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
John Asmuth614db982014-04-24 15:46:26 -04004827 timedTextLanguage: string, The language of the timed text.
Bu Sun Kim65020912020-05-20 12:08:20 -07004828 timedTextTrackName: string, The timed text track name.
4829 updateViewedDate: boolean, Whether to update the view date after successfully updating the file.
4830 useContentAsIndexableText: boolean, Whether to use the content as indexable text.
4831 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
4832 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
John Asmuth614db982014-04-24 15:46:26 -04004833
4834Returns:
4835 An object of the form:
4836
4837 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07004838 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
4839 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
4840 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
4841 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
4842 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
4843 &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 -07004844 &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 -07004845 &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.
4846 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
4847 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
4848 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
4849 &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.
4850 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
4851 &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.
4852 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
4853 &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.
4854 &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.
4855 &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 -07004856 &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 -07004857 &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.
4858 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
4859 &quot;canMoveChildrenWithinDrive&quot;: True or False, # Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
4860 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
4861 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
4862 &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.
4863 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
4864 &quot;canMoveItemWithinDrive&quot;: True or False, # Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives.
4865 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
4866 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
4867 &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.
4868 &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.
4869 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
4870 &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.
4871 &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.
4872 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
4873 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
4874 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
4875 &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.
4876 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -04004877 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004878 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
4879 { # A restriction for accessing the content of the file.
4880 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only.
4881 &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.
4882 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
4883 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4884 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4885 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4886 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4887 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4888 &quot;picture&quot;: { # The user&#x27;s profile picture.
4889 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4890 },
4891 },
4892 &quot;restrictionDate&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
4893 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
4894 },
4895 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004896 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
4897 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
4898 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
4899 &quot;defaultOpenWithLink&quot;: &quot;A String&quot;, # A link to open this file with the user&#x27;s default app for this file. Only populated when the drive.apps.readonly scope is used.
4900 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
4901 &quot;downloadUrl&quot;: &quot;A String&quot;, # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
4902 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
4903 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
4904 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
4905 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
4906 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
4907 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
4908 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -04004909 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004910 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
4911 &quot;fileSize&quot;: &quot;A String&quot;, # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
4912 &quot;folderColorRgb&quot;: &quot;A String&quot;, # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for items in shared drives.
4913 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
4914 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
4915 &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.
4916 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
4917 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
4918 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
4919 &quot;imageMediaMetadata&quot;: { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
4920 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
4921 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
4922 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
4923 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
4924 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
4925 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
4926 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
4927 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
4928 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
4929 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
4930 &quot;height&quot;: 42, # The height of the image in pixels.
4931 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
4932 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
4933 &quot;location&quot;: { # Geographic location information stored in the image.
4934 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
4935 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
4936 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
4937 },
4938 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
4939 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
4940 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
4941 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
4942 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
4943 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
4944 &quot;width&quot;: 42, # The width of the image in pixels.
4945 },
4946 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
4947 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
4948 },
4949 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
4950 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
4951 &quot;labels&quot;: { # A group of labels for the file.
4952 &quot;hidden&quot;: True or False, # Deprecated.
4953 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
4954 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
4955 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004956 &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 -07004957 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
4958 },
4959 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
4960 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4961 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4962 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4963 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4964 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4965 &quot;picture&quot;: { # The user&#x27;s profile picture.
4966 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4967 },
4968 },
4969 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
4970 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
4971 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
4972 &quot;md5Checksum&quot;: &quot;A String&quot;, # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
4973 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content&#x27;s MIME type.
4974 &quot;modifiedByMeDate&quot;: &quot;A String&quot;, # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
4975 &quot;modifiedDate&quot;: &quot;A String&quot;, # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
4976 &quot;openWithLinks&quot;: { # A map of the id of each of the user&#x27;s apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
4977 &quot;a_key&quot;: &quot;A String&quot;,
4978 },
4979 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
4980 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
4981 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
4982 &quot;A String&quot;,
4983 ],
4984 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004985 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07004986 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4987 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4988 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4989 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4990 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4991 &quot;picture&quot;: { # The user&#x27;s profile picture.
4992 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
John Asmuth614db982014-04-24 15:46:26 -04004993 },
John Asmuth614db982014-04-24 15:46:26 -04004994 },
4995 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004996 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
4997 # If not specified as part of an insert 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 can also use the addParents and removeParents parameters to modify the parents list.
4998 { # A reference to a file&#x27;s parent.
4999 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
5000 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
5001 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
5002 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
5003 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04005004 },
5005 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005006 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
5007 &quot;A String&quot;,
5008 ],
5009 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
5010 { # A permission for a file.
5011 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
5012 &quot;A String&quot;,
5013 ],
5014 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
5015 &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.
5016 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
5017 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
5018 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
5019 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
5020 # - They cannot be set on shared drive items
5021 # - They can only be set on user and group permissions
5022 # - The date must be in the future
5023 # - The date cannot be more than a year in the future
5024 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
5025 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
5026 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
5027 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
5028 &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.
5029 {
5030 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
5031 &quot;A String&quot;,
5032 ],
5033 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
5034 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
5035 &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:
5036 # - file
5037 # - member
5038 &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:
5039 # - organizer
5040 # - fileOrganizer
5041 # - writer
5042 # - reader
5043 },
5044 ],
5045 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
5046 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
5047 # - owner
5048 # - organizer
5049 # - fileOrganizer
5050 # - writer
5051 # - reader
5052 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
5053 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
5054 {
5055 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
5056 &quot;A String&quot;,
5057 ],
5058 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
5059 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
5060 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
5061 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
5062 },
5063 ],
5064 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
5065 # - user
5066 # - group
5067 # - domain
5068 # - anyone
5069 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
5070 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04005071 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005072 ],
5073 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00005074 { # A key-value pair attached to a file that is either public or private to an application.
5075 # The following limits apply to file properties:
5076 # - Maximum of 100 properties total per file
5077 # - Maximum of 30 private properties per app
5078 # - Maximum of 30 public properties
5079 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
Bu Sun Kim65020912020-05-20 12:08:20 -07005080 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
5081 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
5082 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
5083 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
5084 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
5085 &quot;visibility&quot;: &quot;A String&quot;, # The visibility of this property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
John Asmuth614db982014-04-24 15:46:26 -04005086 },
5087 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005088 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
5089 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
5090 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
5091 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
5092 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
5093 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
5094 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
5095 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
5096 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
5097 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
5098 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
5099 &quot;picture&quot;: { # The user&#x27;s profile picture.
5100 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
5101 },
Takashi Matsuo06694102015-09-11 13:55:40 -07005102 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005103 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
5104 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
5105 &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.
5106 },
5107 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
5108 &quot;A String&quot;,
5109 ],
5110 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
5111 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
5112 &quot;image&quot;: &quot;A String&quot;, # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
5113 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
5114 },
5115 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content.
5116 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
5117 &quot;title&quot;: &quot;A String&quot;, # The title of this file. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the title is constant.
5118 &quot;trashedDate&quot;: &quot;A String&quot;, # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for items in shared drives.
5119 &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.
5120 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
5121 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
5122 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
5123 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
5124 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
5125 &quot;picture&quot;: { # The user&#x27;s profile picture.
5126 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
5127 },
5128 },
5129 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
5130 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
5131 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005132 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005133 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
5134 &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.
5135 &quot;domain&quot;: &quot;A String&quot;, # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
5136 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
5137 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
5138 &quot;expirationDate&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
Dan O'Mearadd494642020-05-01 07:42:23 -07005139 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005140 # - They can only be set on user and group permissions
5141 # - The date must be in the future
5142 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005143 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07005144 &quot;id&quot;: &quot;A String&quot;, # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
5145 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
5146 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
5147 &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.
5148 {
5149 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
5150 &quot;A String&quot;,
5151 ],
5152 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
5153 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
5154 &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:
5155 # - file
5156 # - member
5157 &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:
5158 # - organizer
5159 # - fileOrganizer
5160 # - writer
5161 # - reader
5162 },
5163 ],
5164 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
5165 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
John Asmuth614db982014-04-24 15:46:26 -04005166 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005167 # - organizer
5168 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04005169 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005170 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07005171 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
5172 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
5173 {
5174 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
5175 &quot;A String&quot;,
5176 ],
5177 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
5178 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
5179 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
5180 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
5181 },
5182 ],
5183 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04005184 # - user
5185 # - group
5186 # - domain
5187 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07005188 &quot;value&quot;: &quot;A String&quot;, # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
5189 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04005190 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005191 &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 requesting user.
5192 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
5193 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
5194 &quot;height&quot;: 42, # The height of the video in pixels.
5195 &quot;width&quot;: 42, # The width of the video in pixels.
5196 },
5197 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
5198 &quot;webViewLink&quot;: &quot;A String&quot;, # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive&#x27;s Website Hosting.
5199 &quot;writersCanShare&quot;: True or False, # Whether writers can share the document with other users. Not populated for items in shared drives.
John Asmuth614db982014-04-24 15:46:26 -04005200 }</pre>
5201</div>
5202
5203<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07005204 <code class="details" id="watch">watch(fileId, body=None, acknowledgeAbuse=None, projection=None, revisionId=None, supportsAllDrives=None, supportsTeamDrives=None, updateViewedDate=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04005205 <pre>Subscribe to changes on a file
5206
5207Args:
5208 fileId: string, The ID for the file in question. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005209 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04005210 The object takes the form of:
5211
5212{ # An notification channel used to watch for resource changes.
Bu Sun Kim65020912020-05-20 12:08:20 -07005213 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
5214 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
5215 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
5216 &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;.
5217 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
5218 &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
John Asmuth614db982014-04-24 15:46:26 -04005219 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005220 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
5221 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
5222 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
5223 &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
5224 &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel.
John Asmuth614db982014-04-24 15:46:26 -04005225 }
5226
Bu Sun Kim65020912020-05-20 12:08:20 -07005227 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files.
John Asmuth614db982014-04-24 15:46:26 -04005228 projection: string, This parameter is deprecated and has no function.
5229 Allowed values
5230 BASIC - Deprecated
5231 FULL - Deprecated
Nathaniel Manista4f877e52015-06-15 16:44:50 +00005232 revisionId: string, Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005233 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07005234 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005235 updateViewedDate: boolean, Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
John Asmuth614db982014-04-24 15:46:26 -04005236
5237Returns:
5238 An object of the form:
5239
5240 { # An notification channel used to watch for resource changes.
Bu Sun Kim65020912020-05-20 12:08:20 -07005241 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
5242 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
5243 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
5244 &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;.
5245 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
5246 &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
John Asmuth614db982014-04-24 15:46:26 -04005247 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005248 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
5249 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
5250 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
5251 &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
5252 &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel.
John Asmuth614db982014-04-24 15:46:26 -04005253 }</pre>
5254</div>
5255
Craig Citroe633be12015-03-02 13:40:36 -08005256<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07005257 <code class="details" id="watch_media">watch_media(fileId, body=None, acknowledgeAbuse=None, projection=None, revisionId=None, supportsAllDrives=None, supportsTeamDrives=None, updateViewedDate=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -08005258 <pre>Subscribe to changes on a file
5259
5260Args:
5261 fileId: string, The ID for the file in question. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005262 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08005263 The object takes the form of:
5264
5265{ # An notification channel used to watch for resource changes.
Bu Sun Kim65020912020-05-20 12:08:20 -07005266 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
5267 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
5268 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
5269 &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;.
5270 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
5271 &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
Craig Citroe633be12015-03-02 13:40:36 -08005272 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005273 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
5274 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
5275 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
5276 &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
5277 &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel.
Craig Citroe633be12015-03-02 13:40:36 -08005278 }
5279
Bu Sun Kim65020912020-05-20 12:08:20 -07005280 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files.
Craig Citroe633be12015-03-02 13:40:36 -08005281 projection: string, This parameter is deprecated and has no function.
5282 Allowed values
5283 BASIC - Deprecated
5284 FULL - Deprecated
Nathaniel Manista4f877e52015-06-15 16:44:50 +00005285 revisionId: string, Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005286 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07005287 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005288 updateViewedDate: boolean, Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
Craig Citroe633be12015-03-02 13:40:36 -08005289
5290Returns:
5291 The media object as a string.
5292
5293 </pre>
5294</div>
5295
John Asmuth614db982014-04-24 15:46:26 -04005296</body></html>