blob: 83e68005988d7bd55a5b9f8cf0eb1b9bf4c1af38 [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>
John Asmuth614db982014-04-24 15:46:26 -040079<p class="firstline">Creates a copy of the specified file.</p>
80<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 Kim715bd7f2019-06-14 16:50:42 -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.</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>
John Asmuth614db982014-04-24 15:46:26 -0400121<p class="firstline">Restores a file from the trash.</p>
122<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>
John Asmuth614db982014-04-24 15:46:26 -0400134 <pre>Creates a copy of the specified file.
135
136Args:
137 fileId: string, The ID of the file to copy. (required)
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.
148 &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.
149 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
150 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
151 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
152 &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.
153 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
154 &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.
155 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
156 &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.
157 &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.
158 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
159 &quot;canMoveChildrenOutOfDrive&quot;: True or False, # Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.
160 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
161 &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.
162 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
163 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
164 &quot;canMoveItemOutOfDrive&quot;: True or False, # Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
165 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
166 &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.
167 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
168 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
169 &quot;canReadDrive&quot;: True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
170 &quot;canReadRevisions&quot;: True or False, # Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
171 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
172 &quot;canRemoveChildren&quot;: True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.
173 &quot;canRemoveMyDriveParent&quot;: True or False, # Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
174 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
175 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
176 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
177 &quot;canTrashChildren&quot;: True or False, # Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
178 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -0400179 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700180 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
181 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
182 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
183 &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.
184 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
185 &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.
186 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
187 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
188 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
189 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
190 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
191 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
192 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -0400193 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700194 &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.
195 &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.
196 &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.
197 &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.
198 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
199 &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.
200 &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.
201 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
202 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
203 &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.
204 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
205 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
206 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
207 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
208 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
209 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
210 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
211 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
212 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
213 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
214 &quot;height&quot;: 42, # The height of the image in pixels.
215 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
216 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
217 &quot;location&quot;: { # Geographic location information stored in the image.
218 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
219 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
220 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
221 },
222 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
223 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
224 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
225 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
226 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
227 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
228 &quot;width&quot;: 42, # The width of the image in pixels.
229 },
230 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
231 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
232 },
233 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
234 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
235 &quot;labels&quot;: { # A group of labels for the file.
236 &quot;hidden&quot;: True or False, # Deprecated.
237 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
238 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
239 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
240 &quot;trashed&quot;: True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
241 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
242 },
243 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
244 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
245 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
246 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
247 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
248 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
249 &quot;picture&quot;: { # The user&#x27;s profile picture.
250 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
251 },
252 },
253 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
254 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
255 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
256 &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.
257 &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.
258 &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.
259 &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.
260 &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.
261 &quot;a_key&quot;: &quot;A String&quot;,
262 },
263 &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.
264 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
265 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
266 &quot;A String&quot;,
267 ],
268 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700269 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700270 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
271 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
272 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
273 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
274 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
275 &quot;picture&quot;: { # The user&#x27;s profile picture.
276 &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 -0400277 },
John Asmuth614db982014-04-24 15:46:26 -0400278 },
279 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700280 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
281 # 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.
282 { # A reference to a file&#x27;s parent.
283 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
284 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
285 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
286 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
287 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -0400288 },
289 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700290 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
291 &quot;A String&quot;,
292 ],
293 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
294 { # A permission for a file.
295 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
296 &quot;A String&quot;,
297 ],
298 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
299 &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.
300 &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.
301 &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.
302 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
303 &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:
304 # - They cannot be set on shared drive items
305 # - They can only be set on user and group permissions
306 # - The date must be in the future
307 # - The date cannot be more than a year in the future
308 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
309 &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.
310 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
311 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
312 &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.
313 {
314 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
315 &quot;A String&quot;,
316 ],
317 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
318 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
319 &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:
320 # - file
321 # - member
322 &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:
323 # - organizer
324 # - fileOrganizer
325 # - writer
326 # - reader
327 },
328 ],
329 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
330 &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:
331 # - owner
332 # - organizer
333 # - fileOrganizer
334 # - writer
335 # - reader
336 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
337 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
338 {
339 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
340 &quot;A String&quot;,
341 ],
342 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
343 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
344 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
345 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
346 },
347 ],
348 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
349 # - user
350 # - group
351 # - domain
352 # - anyone
353 &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.
354 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -0400355 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700356 ],
357 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000358 { # A key-value pair attached to a file that is either public or private to an application.
359 # The following limits apply to file properties:
360 # - Maximum of 100 properties total per file
361 # - Maximum of 30 private properties per app
362 # - Maximum of 30 public properties
363 # - 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 -0700364 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
365 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
366 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
367 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
368 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
369 &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 -0400370 },
371 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700372 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
373 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
374 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
375 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
376 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
377 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
378 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
379 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
380 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
381 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
382 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
383 &quot;picture&quot;: { # The user&#x27;s profile picture.
384 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
385 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700386 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700387 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
388 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
389 &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.
390 },
391 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
392 &quot;A String&quot;,
393 ],
394 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
395 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
396 &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.
397 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
398 },
399 &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.
400 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
401 &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.
402 &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.
403 &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.
404 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
405 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
406 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
407 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
408 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
409 &quot;picture&quot;: { # The user&#x27;s profile picture.
410 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
411 },
412 },
413 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
414 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
415 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400416 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700417 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
418 &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.
419 &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.
420 &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.
421 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
422 &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 -0700423 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400424 # - They can only be set on user and group permissions
425 # - The date must be in the future
426 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700427 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -0700428 &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.
429 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
430 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
431 &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.
432 {
433 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
434 &quot;A String&quot;,
435 ],
436 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
437 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
438 &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:
439 # - file
440 # - member
441 &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:
442 # - organizer
443 # - fileOrganizer
444 # - writer
445 # - reader
446 },
447 ],
448 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
449 &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 -0400450 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700451 # - organizer
452 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -0400453 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700454 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700455 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
456 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
457 {
458 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
459 &quot;A String&quot;,
460 ],
461 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
462 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
463 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
464 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
465 },
466 ],
467 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -0400468 # - user
469 # - group
470 # - domain
471 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -0700472 &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.
473 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -0400474 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700475 &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.
476 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
477 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
478 &quot;height&quot;: 42, # The height of the video in pixels.
479 &quot;width&quot;: 42, # The width of the video in pixels.
480 },
481 &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.
482 &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.
483 &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 -0400484}
485
Bu Sun Kim65020912020-05-20 12:08:20 -0700486 convert: boolean, Whether to convert this file to the corresponding Google Docs format.
487 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 -0700488 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Bu Sun Kim65020912020-05-20 12:08:20 -0700489 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
490 pinned: boolean, Whether to pin the head revision of the new copy. A file can have a maximum of 200 pinned revisions.
491 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
492 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
493 timedTextLanguage: string, The language of the timed text.
494 timedTextTrackName: string, The timed text track name.
John Asmuth614db982014-04-24 15:46:26 -0400495 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.
496 Allowed values
Bu Sun Kim65020912020-05-20 12:08:20 -0700497 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 -0400498 PRIVATE - The new file will be visible to only the owner.
John Asmuth614db982014-04-24 15:46:26 -0400499
500Returns:
501 An object of the form:
502
503 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700504 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
505 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
506 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
507 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
508 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
509 &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.
510 &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.
511 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
512 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
513 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
514 &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.
515 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
516 &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.
517 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
518 &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.
519 &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.
520 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
521 &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.
522 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
523 &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.
524 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
525 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
526 &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.
527 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
528 &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.
529 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
530 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
531 &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.
532 &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.
533 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
534 &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.
535 &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.
536 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
537 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
538 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
539 &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.
540 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -0400541 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700542 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
543 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
544 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
545 &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.
546 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
547 &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.
548 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
549 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
550 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
551 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
552 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
553 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
554 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -0400555 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700556 &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.
557 &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.
558 &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.
559 &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.
560 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
561 &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.
562 &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.
563 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
564 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
565 &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.
566 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
567 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
568 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
569 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
570 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
571 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
572 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
573 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
574 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
575 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
576 &quot;height&quot;: 42, # The height of the image in pixels.
577 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
578 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
579 &quot;location&quot;: { # Geographic location information stored in the image.
580 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
581 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
582 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
583 },
584 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
585 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
586 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
587 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
588 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
589 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
590 &quot;width&quot;: 42, # The width of the image in pixels.
591 },
592 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
593 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
594 },
595 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
596 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
597 &quot;labels&quot;: { # A group of labels for the file.
598 &quot;hidden&quot;: True or False, # Deprecated.
599 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
600 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
601 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
602 &quot;trashed&quot;: True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
603 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
604 },
605 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
606 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
607 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
608 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
609 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
610 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
611 &quot;picture&quot;: { # The user&#x27;s profile picture.
612 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
613 },
614 },
615 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
616 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
617 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
618 &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.
619 &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.
620 &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.
621 &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.
622 &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.
623 &quot;a_key&quot;: &quot;A String&quot;,
624 },
625 &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.
626 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
627 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
628 &quot;A String&quot;,
629 ],
630 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700631 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700632 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
633 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
634 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
635 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
636 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
637 &quot;picture&quot;: { # The user&#x27;s profile picture.
638 &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 -0400639 },
John Asmuth614db982014-04-24 15:46:26 -0400640 },
641 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700642 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
643 # 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.
644 { # A reference to a file&#x27;s parent.
645 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
646 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
647 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
648 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
649 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -0400650 },
651 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700652 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
653 &quot;A String&quot;,
654 ],
655 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
656 { # A permission for a file.
657 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
658 &quot;A String&quot;,
659 ],
660 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
661 &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.
662 &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.
663 &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.
664 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
665 &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:
666 # - They cannot be set on shared drive items
667 # - They can only be set on user and group permissions
668 # - The date must be in the future
669 # - The date cannot be more than a year in the future
670 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
671 &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.
672 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
673 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
674 &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.
675 {
676 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
677 &quot;A String&quot;,
678 ],
679 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
680 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
681 &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:
682 # - file
683 # - member
684 &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:
685 # - organizer
686 # - fileOrganizer
687 # - writer
688 # - reader
689 },
690 ],
691 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
692 &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:
693 # - owner
694 # - organizer
695 # - fileOrganizer
696 # - writer
697 # - reader
698 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
699 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
700 {
701 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
702 &quot;A String&quot;,
703 ],
704 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
705 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
706 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
707 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
708 },
709 ],
710 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
711 # - user
712 # - group
713 # - domain
714 # - anyone
715 &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.
716 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -0400717 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700718 ],
719 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000720 { # A key-value pair attached to a file that is either public or private to an application.
721 # The following limits apply to file properties:
722 # - Maximum of 100 properties total per file
723 # - Maximum of 30 private properties per app
724 # - Maximum of 30 public properties
725 # - 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 -0700726 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
727 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
728 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
729 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
730 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
731 &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 -0400732 },
733 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700734 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
735 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
736 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
737 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
738 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
739 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
740 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
741 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
742 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
743 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
744 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
745 &quot;picture&quot;: { # The user&#x27;s profile picture.
746 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
747 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700748 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700749 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
750 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
751 &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.
752 },
753 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
754 &quot;A String&quot;,
755 ],
756 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
757 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
758 &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.
759 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
760 },
761 &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.
762 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
763 &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.
764 &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.
765 &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.
766 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
767 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
768 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
769 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
770 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
771 &quot;picture&quot;: { # The user&#x27;s profile picture.
772 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
773 },
774 },
775 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
776 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
777 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400778 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700779 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
780 &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.
781 &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.
782 &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.
783 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
784 &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 -0700785 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400786 # - They can only be set on user and group permissions
787 # - The date must be in the future
788 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700789 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -0700790 &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.
791 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
792 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
793 &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.
794 {
795 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
796 &quot;A String&quot;,
797 ],
798 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
799 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
800 &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:
801 # - file
802 # - member
803 &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:
804 # - organizer
805 # - fileOrganizer
806 # - writer
807 # - reader
808 },
809 ],
810 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
811 &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 -0400812 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700813 # - organizer
814 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -0400815 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700816 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700817 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
818 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
819 {
820 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
821 &quot;A String&quot;,
822 ],
823 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
824 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
825 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
826 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
827 },
828 ],
829 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -0400830 # - user
831 # - group
832 # - domain
833 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -0700834 &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.
835 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -0400836 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700837 &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.
838 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
839 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
840 &quot;height&quot;: 42, # The height of the video in pixels.
841 &quot;width&quot;: 42, # The width of the video in pixels.
842 },
843 &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.
844 &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.
845 &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 -0400846 }</pre>
847</div>
848
849<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700850 <code class="details" id="delete">delete(fileId, supportsAllDrives=None, supportsTeamDrives=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700851 <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 -0400852
853Args:
854 fileId: string, The ID of the file to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700855 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700856 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
John Asmuth614db982014-04-24 15:46:26 -0400857</pre>
858</div>
859
860<div class="method">
Craig Citro065b5302014-08-14 00:47:23 -0700861 <code class="details" id="emptyTrash">emptyTrash()</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700862 <pre>Permanently deletes all of the user&#x27;s trashed files.
Craig Citro065b5302014-08-14 00:47:23 -0700863
864Args:
865</pre>
866</div>
867
868<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700869 <code class="details" id="export">export(fileId, mimeType)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700870 <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 -0700871
872Args:
873 fileId: string, The ID of the file. (required)
874 mimeType: string, The MIME type of the format requested for this export. (required)
875</pre>
876</div>
877
878<div class="method">
879 <code class="details" id="export_media">export_media(fileId, mimeType)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700880 <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 -0700881
882Args:
883 fileId: string, The ID of the file. (required)
884 mimeType: string, The MIME type of the format requested for this export. (required)
885</pre>
886</div>
887
888<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700889 <code class="details" id="generateIds">generateIds(maxResults=None, space=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -0700890 <pre>Generates a set of file IDs which can be provided in insert or copy requests.
Takashi Matsuo06694102015-09-11 13:55:40 -0700891
892Args:
Takashi Matsuo06694102015-09-11 13:55:40 -0700893 maxResults: integer, Maximum number of IDs to return.
Bu Sun Kim65020912020-05-20 12:08:20 -0700894 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 -0700895
896Returns:
897 An object of the form:
898
899 { # A list of generated IDs which can be provided in insert requests
Bu Sun Kim65020912020-05-20 12:08:20 -0700900 &quot;ids&quot;: [ # The IDs generated for the requesting user in the specified space.
901 &quot;A String&quot;,
Takashi Matsuo06694102015-09-11 13:55:40 -0700902 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700903 &quot;kind&quot;: &quot;drive#generatedIds&quot;, # This is always drive#generatedIds
904 &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 -0700905 }</pre>
906</div>
907
908<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700909 <code class="details" id="get">get(fileId, acknowledgeAbuse=None, projection=None, revisionId=None, supportsAllDrives=None, supportsTeamDrives=None, updateViewedDate=None)</code>
910 <pre>Gets a file&#x27;s metadata by ID.
John Asmuth614db982014-04-24 15:46:26 -0400911
912Args:
913 fileId: string, The ID for the file in question. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700914 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files.
John Asmuth614db982014-04-24 15:46:26 -0400915 projection: string, This parameter is deprecated and has no function.
916 Allowed values
917 BASIC - Deprecated
918 FULL - Deprecated
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000919 revisionId: string, Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700920 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700921 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700922 updateViewedDate: boolean, Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
John Asmuth614db982014-04-24 15:46:26 -0400923
924Returns:
925 An object of the form:
926
927 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700928 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
929 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
930 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
931 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
932 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
933 &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.
934 &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.
935 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
936 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
937 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
938 &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.
939 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
940 &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.
941 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
942 &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.
943 &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.
944 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
945 &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.
946 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
947 &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.
948 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
949 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
950 &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.
951 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
952 &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.
953 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
954 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
955 &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.
956 &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.
957 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
958 &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.
959 &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.
960 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
961 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
962 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
963 &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.
964 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -0400965 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700966 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
967 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
968 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
969 &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.
970 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
971 &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.
972 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
973 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
974 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
975 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
976 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
977 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
978 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -0400979 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700980 &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.
981 &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.
982 &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.
983 &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.
984 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
985 &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.
986 &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.
987 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
988 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
989 &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.
990 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
991 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
992 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
993 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
994 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
995 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
996 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
997 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
998 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
999 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1000 &quot;height&quot;: 42, # The height of the image in pixels.
1001 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1002 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1003 &quot;location&quot;: { # Geographic location information stored in the image.
1004 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1005 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1006 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1007 },
1008 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1009 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1010 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1011 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1012 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1013 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1014 &quot;width&quot;: 42, # The width of the image in pixels.
1015 },
1016 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
1017 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
1018 },
1019 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1020 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
1021 &quot;labels&quot;: { # A group of labels for the file.
1022 &quot;hidden&quot;: True or False, # Deprecated.
1023 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
1024 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
1025 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
1026 &quot;trashed&quot;: True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
1027 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
1028 },
1029 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
1030 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1031 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1032 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1033 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1034 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1035 &quot;picture&quot;: { # The user&#x27;s profile picture.
1036 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1037 },
1038 },
1039 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
1040 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1041 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
1042 &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.
1043 &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.
1044 &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.
1045 &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.
1046 &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.
1047 &quot;a_key&quot;: &quot;A String&quot;,
1048 },
1049 &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.
1050 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
1051 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
1052 &quot;A String&quot;,
1053 ],
1054 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001055 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001056 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1057 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1058 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1059 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1060 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1061 &quot;picture&quot;: { # The user&#x27;s profile picture.
1062 &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 -04001063 },
John Asmuth614db982014-04-24 15:46:26 -04001064 },
1065 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001066 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
1067 # 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.
1068 { # A reference to a file&#x27;s parent.
1069 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
1070 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
1071 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
1072 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
1073 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04001074 },
1075 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001076 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1077 &quot;A String&quot;,
1078 ],
1079 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
1080 { # A permission for a file.
1081 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
1082 &quot;A String&quot;,
1083 ],
1084 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
1085 &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.
1086 &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.
1087 &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.
1088 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
1089 &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:
1090 # - They cannot be set on shared drive items
1091 # - They can only be set on user and group permissions
1092 # - The date must be in the future
1093 # - The date cannot be more than a year in the future
1094 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
1095 &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.
1096 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
1097 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
1098 &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.
1099 {
1100 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1101 &quot;A String&quot;,
1102 ],
1103 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1104 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1105 &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:
1106 # - file
1107 # - member
1108 &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:
1109 # - organizer
1110 # - fileOrganizer
1111 # - writer
1112 # - reader
1113 },
1114 ],
1115 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
1116 &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:
1117 # - owner
1118 # - organizer
1119 # - fileOrganizer
1120 # - writer
1121 # - reader
1122 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
1123 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1124 {
1125 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
1126 &quot;A String&quot;,
1127 ],
1128 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1129 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1130 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1131 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1132 },
1133 ],
1134 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
1135 # - user
1136 # - group
1137 # - domain
1138 # - anyone
1139 &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.
1140 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04001141 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001142 ],
1143 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001144 { # A key-value pair attached to a file that is either public or private to an application.
1145 # The following limits apply to file properties:
1146 # - Maximum of 100 properties total per file
1147 # - Maximum of 30 private properties per app
1148 # - Maximum of 30 public properties
1149 # - 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 -07001150 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
1151 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
1152 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
1153 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
1154 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
1155 &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 -04001156 },
1157 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001158 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
1159 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
1160 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
1161 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
1162 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
1163 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
1164 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1165 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1166 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1167 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1168 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1169 &quot;picture&quot;: { # The user&#x27;s profile picture.
1170 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1171 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001172 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001173 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
1174 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
1175 &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.
1176 },
1177 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
1178 &quot;A String&quot;,
1179 ],
1180 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
1181 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
1182 &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.
1183 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
1184 },
1185 &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.
1186 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
1187 &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.
1188 &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.
1189 &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.
1190 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1191 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1192 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1193 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1194 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1195 &quot;picture&quot;: { # The user&#x27;s profile picture.
1196 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1197 },
1198 },
1199 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
1200 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
1201 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001202 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001203 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
1204 &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.
1205 &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.
1206 &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.
1207 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
1208 &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 -07001209 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001210 # - They can only be set on user and group permissions
1211 # - The date must be in the future
1212 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001213 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07001214 &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.
1215 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
1216 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
1217 &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.
1218 {
1219 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1220 &quot;A String&quot;,
1221 ],
1222 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1223 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1224 &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:
1225 # - file
1226 # - member
1227 &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:
1228 # - organizer
1229 # - fileOrganizer
1230 # - writer
1231 # - reader
1232 },
1233 ],
1234 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
1235 &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 -04001236 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001237 # - organizer
1238 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04001239 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001240 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07001241 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
1242 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1243 {
1244 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
1245 &quot;A String&quot;,
1246 ],
1247 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1248 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1249 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1250 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1251 },
1252 ],
1253 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04001254 # - user
1255 # - group
1256 # - domain
1257 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07001258 &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.
1259 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04001260 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001261 &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.
1262 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
1263 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
1264 &quot;height&quot;: 42, # The height of the video in pixels.
1265 &quot;width&quot;: 42, # The width of the video in pixels.
1266 },
1267 &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.
1268 &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.
1269 &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 -04001270 }</pre>
1271</div>
1272
1273<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001274 <code class="details" id="get_media">get_media(fileId, acknowledgeAbuse=None, projection=None, revisionId=None, supportsAllDrives=None, supportsTeamDrives=None, updateViewedDate=None)</code>
1275 <pre>Gets a file&#x27;s metadata by ID.
Craig Citroe633be12015-03-02 13:40:36 -08001276
1277Args:
1278 fileId: string, The ID for the file in question. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -07001279 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files.
Craig Citroe633be12015-03-02 13:40:36 -08001280 projection: string, This parameter is deprecated and has no function.
1281 Allowed values
1282 BASIC - Deprecated
1283 FULL - Deprecated
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001284 revisionId: string, Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001285 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001286 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001287 updateViewedDate: boolean, Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
Craig Citroe633be12015-03-02 13:40:36 -08001288
1289Returns:
1290 The media object as a string.
1291
1292 </pre>
1293</div>
1294
1295<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001296 <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 -04001297 <pre>Insert a new file.
1298
1299Args:
1300 body: object, The request body.
1301 The object takes the form of:
1302
1303{ # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001304 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
1305 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
1306 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
1307 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
1308 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
1309 &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.
1310 &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.
1311 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1312 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
1313 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
1314 &quot;canCopy&quot;: True or False, # Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
1315 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
1316 &quot;canDeleteChildren&quot;: True or False, # Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
1317 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
1318 &quot;canEdit&quot;: True or False, # Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent.
1319 &quot;canListChildren&quot;: True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
1320 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
1321 &quot;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.
1322 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
1323 &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.
1324 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1325 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1326 &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.
1327 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1328 &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.
1329 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
1330 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1331 &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.
1332 &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.
1333 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
1334 &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.
1335 &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.
1336 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
1337 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
1338 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
1339 &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.
1340 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -04001341 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001342 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1343 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
1344 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
1345 &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.
1346 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
1347 &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.
1348 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1349 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
1350 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
1351 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
1352 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
1353 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
1354 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -04001355 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001356 &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.
1357 &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.
1358 &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.
1359 &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.
1360 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1361 &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.
1362 &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.
1363 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
1364 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1365 &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.
1366 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1367 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1368 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1369 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1370 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
1371 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1372 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1373 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1374 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1375 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1376 &quot;height&quot;: 42, # The height of the image in pixels.
1377 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1378 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1379 &quot;location&quot;: { # Geographic location information stored in the image.
1380 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1381 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1382 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1383 },
1384 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1385 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1386 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1387 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1388 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1389 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1390 &quot;width&quot;: 42, # The width of the image in pixels.
1391 },
1392 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
1393 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
1394 },
1395 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1396 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
1397 &quot;labels&quot;: { # A group of labels for the file.
1398 &quot;hidden&quot;: True or False, # Deprecated.
1399 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
1400 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
1401 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
1402 &quot;trashed&quot;: True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
1403 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
1404 },
1405 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
1406 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1407 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1408 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1409 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1410 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1411 &quot;picture&quot;: { # The user&#x27;s profile picture.
1412 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1413 },
1414 },
1415 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
1416 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1417 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
1418 &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.
1419 &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.
1420 &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.
1421 &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.
1422 &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.
1423 &quot;a_key&quot;: &quot;A String&quot;,
1424 },
1425 &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.
1426 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
1427 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
1428 &quot;A String&quot;,
1429 ],
1430 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001431 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001432 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1433 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1434 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1435 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1436 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1437 &quot;picture&quot;: { # The user&#x27;s profile picture.
1438 &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 -04001439 },
John Asmuth614db982014-04-24 15:46:26 -04001440 },
1441 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001442 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
1443 # 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.
1444 { # A reference to a file&#x27;s parent.
1445 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
1446 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
1447 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
1448 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
1449 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04001450 },
1451 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001452 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1453 &quot;A String&quot;,
1454 ],
1455 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
1456 { # A permission for a file.
1457 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
1458 &quot;A String&quot;,
1459 ],
1460 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
1461 &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.
1462 &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.
1463 &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.
1464 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
1465 &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:
1466 # - They cannot be set on shared drive items
1467 # - They can only be set on user and group permissions
1468 # - The date must be in the future
1469 # - The date cannot be more than a year in the future
1470 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
1471 &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.
1472 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
1473 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
1474 &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.
1475 {
1476 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1477 &quot;A String&quot;,
1478 ],
1479 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1480 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1481 &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:
1482 # - file
1483 # - member
1484 &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:
1485 # - organizer
1486 # - fileOrganizer
1487 # - writer
1488 # - reader
1489 },
1490 ],
1491 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
1492 &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:
1493 # - owner
1494 # - organizer
1495 # - fileOrganizer
1496 # - writer
1497 # - reader
1498 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
1499 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1500 {
1501 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
1502 &quot;A String&quot;,
1503 ],
1504 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1505 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1506 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1507 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1508 },
1509 ],
1510 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
1511 # - user
1512 # - group
1513 # - domain
1514 # - anyone
1515 &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.
1516 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04001517 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001518 ],
1519 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001520 { # A key-value pair attached to a file that is either public or private to an application.
1521 # The following limits apply to file properties:
1522 # - Maximum of 100 properties total per file
1523 # - Maximum of 30 private properties per app
1524 # - Maximum of 30 public properties
1525 # - 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 -07001526 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
1527 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
1528 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
1529 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
1530 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
1531 &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 -04001532 },
1533 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001534 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
1535 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
1536 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
1537 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
1538 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
1539 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
1540 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1541 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1542 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1543 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1544 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1545 &quot;picture&quot;: { # The user&#x27;s profile picture.
1546 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1547 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001548 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001549 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
1550 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
1551 &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.
1552 },
1553 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
1554 &quot;A String&quot;,
1555 ],
1556 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
1557 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
1558 &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.
1559 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
1560 },
1561 &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.
1562 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
1563 &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.
1564 &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.
1565 &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.
1566 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1567 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1568 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1569 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1570 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1571 &quot;picture&quot;: { # The user&#x27;s profile picture.
1572 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1573 },
1574 },
1575 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
1576 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
1577 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001578 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001579 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
1580 &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.
1581 &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.
1582 &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.
1583 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
1584 &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 -07001585 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001586 # - They can only be set on user and group permissions
1587 # - The date must be in the future
1588 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001589 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07001590 &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.
1591 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
1592 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
1593 &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.
1594 {
1595 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1596 &quot;A String&quot;,
1597 ],
1598 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1599 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1600 &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:
1601 # - file
1602 # - member
1603 &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:
1604 # - organizer
1605 # - fileOrganizer
1606 # - writer
1607 # - reader
1608 },
1609 ],
1610 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
1611 &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 -04001612 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001613 # - organizer
1614 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04001615 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001616 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07001617 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
1618 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1619 {
1620 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
1621 &quot;A String&quot;,
1622 ],
1623 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1624 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1625 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1626 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1627 },
1628 ],
1629 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04001630 # - user
1631 # - group
1632 # - domain
1633 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07001634 &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.
1635 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04001636 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001637 &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.
1638 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
1639 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
1640 &quot;height&quot;: 42, # The height of the video in pixels.
1641 &quot;width&quot;: 42, # The width of the video in pixels.
1642 },
1643 &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.
1644 &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.
1645 &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 -04001646}
1647
Bu Sun Kim65020912020-05-20 12:08:20 -07001648 convert: boolean, Whether to convert this file to the corresponding Google Docs format.
1649 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 -08001650 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Bu Sun Kim65020912020-05-20 12:08:20 -07001651 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 -08001652 pinned: boolean, Whether to pin the head revision of the uploaded file. A file can have a maximum of 200 pinned revisions.
Bu Sun Kim65020912020-05-20 12:08:20 -07001653 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
1654 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
1655 timedTextLanguage: string, The language of the timed text.
1656 timedTextTrackName: string, The timed text track name.
1657 useContentAsIndexableText: boolean, Whether to use the content as indexable text.
John Asmuth614db982014-04-24 15:46:26 -04001658 visibility: string, The visibility of the new file. This parameter is only relevant when convert=false.
1659 Allowed values
Bu Sun Kim65020912020-05-20 12:08:20 -07001660 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 -04001661 PRIVATE - The new file will be visible to only the owner.
Bu Sun Kim65020912020-05-20 12:08:20 -07001662 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 -08001663 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 -04001664
1665Returns:
1666 An object of the form:
1667
1668 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001669 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
1670 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
1671 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
1672 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
1673 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
1674 &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.
1675 &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.
1676 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1677 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
1678 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
1679 &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.
1680 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
1681 &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.
1682 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
1683 &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.
1684 &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.
1685 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
1686 &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.
1687 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
1688 &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.
1689 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1690 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1691 &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.
1692 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1693 &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.
1694 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
1695 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1696 &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.
1697 &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.
1698 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
1699 &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.
1700 &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.
1701 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
1702 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
1703 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
1704 &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.
1705 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -04001706 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001707 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1708 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
1709 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
1710 &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.
1711 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
1712 &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.
1713 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1714 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
1715 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
1716 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
1717 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
1718 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
1719 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -04001720 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001721 &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.
1722 &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.
1723 &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.
1724 &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.
1725 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1726 &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.
1727 &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.
1728 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
1729 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1730 &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.
1731 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1732 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1733 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1734 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1735 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
1736 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1737 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1738 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1739 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1740 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1741 &quot;height&quot;: 42, # The height of the image in pixels.
1742 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1743 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1744 &quot;location&quot;: { # Geographic location information stored in the image.
1745 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1746 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1747 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1748 },
1749 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1750 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1751 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1752 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1753 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1754 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1755 &quot;width&quot;: 42, # The width of the image in pixels.
1756 },
1757 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
1758 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
1759 },
1760 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1761 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
1762 &quot;labels&quot;: { # A group of labels for the file.
1763 &quot;hidden&quot;: True or False, # Deprecated.
1764 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
1765 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
1766 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
1767 &quot;trashed&quot;: True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
1768 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
1769 },
1770 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
1771 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1772 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1773 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1774 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1775 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1776 &quot;picture&quot;: { # The user&#x27;s profile picture.
1777 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1778 },
1779 },
1780 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
1781 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1782 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
1783 &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.
1784 &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.
1785 &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.
1786 &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.
1787 &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.
1788 &quot;a_key&quot;: &quot;A String&quot;,
1789 },
1790 &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.
1791 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
1792 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
1793 &quot;A String&quot;,
1794 ],
1795 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001796 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001797 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1798 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1799 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1800 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1801 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1802 &quot;picture&quot;: { # The user&#x27;s profile picture.
1803 &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 -04001804 },
John Asmuth614db982014-04-24 15:46:26 -04001805 },
1806 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001807 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
1808 # 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.
1809 { # A reference to a file&#x27;s parent.
1810 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
1811 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
1812 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
1813 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
1814 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04001815 },
1816 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001817 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1818 &quot;A String&quot;,
1819 ],
1820 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
1821 { # A permission for a file.
1822 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
1823 &quot;A String&quot;,
1824 ],
1825 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
1826 &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.
1827 &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.
1828 &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.
1829 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
1830 &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:
1831 # - They cannot be set on shared drive items
1832 # - They can only be set on user and group permissions
1833 # - The date must be in the future
1834 # - The date cannot be more than a year in the future
1835 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
1836 &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.
1837 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
1838 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
1839 &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.
1840 {
1841 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1842 &quot;A String&quot;,
1843 ],
1844 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1845 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1846 &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:
1847 # - file
1848 # - member
1849 &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:
1850 # - organizer
1851 # - fileOrganizer
1852 # - writer
1853 # - reader
1854 },
1855 ],
1856 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
1857 &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:
1858 # - owner
1859 # - organizer
1860 # - fileOrganizer
1861 # - writer
1862 # - reader
1863 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
1864 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1865 {
1866 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
1867 &quot;A String&quot;,
1868 ],
1869 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1870 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1871 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1872 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1873 },
1874 ],
1875 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
1876 # - user
1877 # - group
1878 # - domain
1879 # - anyone
1880 &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.
1881 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04001882 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001883 ],
1884 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001885 { # A key-value pair attached to a file that is either public or private to an application.
1886 # The following limits apply to file properties:
1887 # - Maximum of 100 properties total per file
1888 # - Maximum of 30 private properties per app
1889 # - Maximum of 30 public properties
1890 # - 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 -07001891 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
1892 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
1893 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
1894 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
1895 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
1896 &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 -04001897 },
1898 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001899 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
1900 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
1901 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
1902 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
1903 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
1904 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
1905 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1906 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1907 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1908 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1909 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1910 &quot;picture&quot;: { # The user&#x27;s profile picture.
1911 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1912 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001913 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001914 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
1915 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
1916 &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.
1917 },
1918 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
1919 &quot;A String&quot;,
1920 ],
1921 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
1922 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
1923 &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.
1924 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
1925 },
1926 &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.
1927 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
1928 &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.
1929 &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.
1930 &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.
1931 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1932 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
1933 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1934 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
1935 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
1936 &quot;picture&quot;: { # The user&#x27;s profile picture.
1937 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
1938 },
1939 },
1940 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
1941 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
1942 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001943 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001944 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
1945 &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.
1946 &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.
1947 &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.
1948 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
1949 &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 -07001950 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001951 # - They can only be set on user and group permissions
1952 # - The date must be in the future
1953 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001954 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07001955 &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.
1956 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
1957 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
1958 &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.
1959 {
1960 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
1961 &quot;A String&quot;,
1962 ],
1963 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1964 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1965 &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:
1966 # - file
1967 # - member
1968 &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:
1969 # - organizer
1970 # - fileOrganizer
1971 # - writer
1972 # - reader
1973 },
1974 ],
1975 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
1976 &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 -04001977 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001978 # - organizer
1979 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04001980 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001981 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07001982 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
1983 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1984 {
1985 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
1986 &quot;A String&quot;,
1987 ],
1988 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1989 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1990 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1991 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1992 },
1993 ],
1994 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04001995 # - user
1996 # - group
1997 # - domain
1998 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07001999 &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.
2000 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04002001 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002002 &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.
2003 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
2004 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
2005 &quot;height&quot;: 42, # The height of the video in pixels.
2006 &quot;width&quot;: 42, # The width of the video in pixels.
2007 },
2008 &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.
2009 &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.
2010 &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 -04002011 }</pre>
2012</div>
2013
2014<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002015 <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>
2016 <pre>Lists the user&#x27;s files.
John Asmuth614db982014-04-24 15:46:26 -04002017
2018Args:
Bu Sun Kim65020912020-05-20 12:08:20 -07002019 corpora: string, Bodies of items (files/documents) to which the query applies. Supported bodies are &#x27;default&#x27;, &#x27;domain&#x27;, &#x27;drive&#x27; and &#x27;allDrives&#x27;. Prefer &#x27;default&#x27; or &#x27;drive&#x27; to &#x27;allDrives&#x27; for efficiency.
2020 corpus: string, The body of items (files/documents) to which the query applies. Deprecated: use &#x27;corpora&#x27; instead.
2021 Allowed values
2022 DEFAULT - The items that the user has accessed.
2023 DOMAIN - Items shared to the user&#x27;s domain.
2024 driveId: string, ID of the shared drive to search.
2025 includeItemsFromAllDrives: boolean, Deprecated - Whether both My Drive and shared drive items should be included in results. This parameter will only be effective until June 1, 2020. Afterwards shared drive items will be included in the results.
2026 includeTeamDriveItems: boolean, Deprecated use includeItemsFromAllDrives instead.
2027 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.
2028 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.
2029 pageToken: string, Page token for files.
John Asmuth614db982014-04-24 15:46:26 -04002030 projection: string, This parameter is deprecated and has no function.
2031 Allowed values
2032 BASIC - Deprecated
2033 FULL - Deprecated
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002034 q: string, Query string for searching files.
Bu Sun Kim65020912020-05-20 12:08:20 -07002035 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 Kim715bd7f2019-06-14 16:50:42 -07002036 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07002037 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
2038 teamDriveId: string, Deprecated use driveId instead.
John Asmuth614db982014-04-24 15:46:26 -04002039
2040Returns:
2041 An object of the form:
2042
2043 { # A list of files.
Bu Sun Kim65020912020-05-20 12:08:20 -07002044 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the list.
2045 &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;.
2046 &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 -04002047 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07002048 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
2049 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
2050 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
2051 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
2052 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
2053 &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.
2054 &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.
2055 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
2056 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
2057 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
2058 &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.
2059 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
2060 &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.
2061 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
2062 &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.
2063 &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.
2064 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
2065 &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.
2066 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
2067 &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.
2068 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
2069 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2070 &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.
2071 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2072 &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.
2073 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
2074 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
2075 &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.
2076 &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.
2077 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
2078 &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.
2079 &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.
2080 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
2081 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
2082 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
2083 &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.
2084 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -04002085 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002086 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
2087 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
2088 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
2089 &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.
2090 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
2091 &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.
2092 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
2093 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
2094 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
2095 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
2096 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
2097 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
2098 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -04002099 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002100 &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.
2101 &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.
2102 &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.
2103 &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.
2104 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
2105 &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.
2106 &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.
2107 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
2108 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
2109 &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.
2110 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
2111 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
2112 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
2113 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
2114 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
2115 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
2116 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
2117 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
2118 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
2119 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
2120 &quot;height&quot;: 42, # The height of the image in pixels.
2121 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
2122 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
2123 &quot;location&quot;: { # Geographic location information stored in the image.
2124 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
2125 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
2126 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
2127 },
2128 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
2129 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
2130 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
2131 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
2132 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
2133 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
2134 &quot;width&quot;: 42, # The width of the image in pixels.
2135 },
2136 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
2137 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
2138 },
2139 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
2140 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
2141 &quot;labels&quot;: { # A group of labels for the file.
2142 &quot;hidden&quot;: True or False, # Deprecated.
2143 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
2144 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
2145 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
2146 &quot;trashed&quot;: True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
2147 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
2148 },
2149 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
2150 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2151 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2152 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2153 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2154 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2155 &quot;picture&quot;: { # The user&#x27;s profile picture.
2156 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2157 },
2158 },
2159 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
2160 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
2161 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
2162 &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.
2163 &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.
2164 &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.
2165 &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.
2166 &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.
2167 &quot;a_key&quot;: &quot;A String&quot;,
2168 },
2169 &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.
2170 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
2171 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
2172 &quot;A String&quot;,
2173 ],
2174 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002175 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07002176 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2177 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2178 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2179 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2180 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2181 &quot;picture&quot;: { # The user&#x27;s profile picture.
2182 &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 -04002183 },
John Asmuth614db982014-04-24 15:46:26 -04002184 },
2185 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002186 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
2187 # 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.
2188 { # A reference to a file&#x27;s parent.
2189 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
2190 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
2191 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
2192 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
2193 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04002194 },
2195 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002196 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
2197 &quot;A String&quot;,
2198 ],
2199 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
2200 { # A permission for a file.
2201 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
2202 &quot;A String&quot;,
2203 ],
2204 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
2205 &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.
2206 &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.
2207 &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.
2208 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
2209 &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:
2210 # - They cannot be set on shared drive items
2211 # - They can only be set on user and group permissions
2212 # - The date must be in the future
2213 # - The date cannot be more than a year in the future
2214 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
2215 &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.
2216 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
2217 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
2218 &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.
2219 {
2220 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2221 &quot;A String&quot;,
2222 ],
2223 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2224 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
2225 &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:
2226 # - file
2227 # - member
2228 &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:
2229 # - organizer
2230 # - fileOrganizer
2231 # - writer
2232 # - reader
2233 },
2234 ],
2235 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
2236 &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:
2237 # - owner
2238 # - organizer
2239 # - fileOrganizer
2240 # - writer
2241 # - reader
2242 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
2243 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
2244 {
2245 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
2246 &quot;A String&quot;,
2247 ],
2248 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
2249 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
2250 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
2251 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
2252 },
2253 ],
2254 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
2255 # - user
2256 # - group
2257 # - domain
2258 # - anyone
2259 &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.
2260 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04002261 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002262 ],
2263 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002264 { # A key-value pair attached to a file that is either public or private to an application.
2265 # The following limits apply to file properties:
2266 # - Maximum of 100 properties total per file
2267 # - Maximum of 30 private properties per app
2268 # - Maximum of 30 public properties
2269 # - 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 -07002270 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
2271 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
2272 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
2273 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
2274 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
2275 &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 -04002276 },
2277 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002278 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
2279 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
2280 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
2281 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
2282 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
2283 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
2284 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2285 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2286 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2287 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2288 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2289 &quot;picture&quot;: { # The user&#x27;s profile picture.
2290 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2291 },
Takashi Matsuo06694102015-09-11 13:55:40 -07002292 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002293 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
2294 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
2295 &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.
2296 },
2297 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
2298 &quot;A String&quot;,
2299 ],
2300 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
2301 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
2302 &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.
2303 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
2304 },
2305 &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.
2306 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
2307 &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.
2308 &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.
2309 &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.
2310 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2311 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2312 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2313 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2314 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2315 &quot;picture&quot;: { # The user&#x27;s profile picture.
2316 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2317 },
2318 },
2319 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
2320 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
2321 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002322 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002323 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
2324 &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.
2325 &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.
2326 &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.
2327 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
2328 &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 -07002329 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002330 # - They can only be set on user and group permissions
2331 # - The date must be in the future
2332 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002333 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07002334 &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.
2335 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
2336 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
2337 &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.
2338 {
2339 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2340 &quot;A String&quot;,
2341 ],
2342 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2343 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
2344 &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:
2345 # - file
2346 # - member
2347 &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:
2348 # - organizer
2349 # - fileOrganizer
2350 # - writer
2351 # - reader
2352 },
2353 ],
2354 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
2355 &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 -04002356 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002357 # - organizer
2358 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04002359 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002360 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07002361 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
2362 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
2363 {
2364 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
2365 &quot;A String&quot;,
2366 ],
2367 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
2368 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
2369 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
2370 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
2371 },
2372 ],
2373 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04002374 # - user
2375 # - group
2376 # - domain
2377 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07002378 &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.
2379 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04002380 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002381 &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.
2382 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
2383 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
2384 &quot;height&quot;: 42, # The height of the video in pixels.
2385 &quot;width&quot;: 42, # The width of the video in pixels.
2386 },
2387 &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.
2388 &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.
2389 &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 -04002390 },
2391 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002392 &quot;kind&quot;: &quot;drive#fileList&quot;, # This is always drive#fileList.
2393 &quot;nextLink&quot;: &quot;A String&quot;, # A link to the next page of files.
2394 &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.
2395 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this list.
John Asmuth614db982014-04-24 15:46:26 -04002396 }</pre>
2397</div>
2398
2399<div class="method">
2400 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2401 <pre>Retrieves the next page of results.
2402
2403Args:
2404 previous_request: The request for the previous page. (required)
2405 previous_response: The response from the request for the previous page. (required)
2406
2407Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07002408 A request object that you can call &#x27;execute()&#x27; on to request the next
John Asmuth614db982014-04-24 15:46:26 -04002409 page. Returns None if there are no more items in the collection.
2410 </pre>
2411</div>
2412
2413<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002414 <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 -04002415 <pre>Updates file metadata and/or content. This method supports patch semantics.
2416
2417Args:
2418 fileId: string, The ID of the file to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002419 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04002420 The object takes the form of:
2421
2422{ # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07002423 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
2424 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
2425 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
2426 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
2427 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
2428 &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.
2429 &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.
2430 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
2431 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
2432 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
2433 &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.
2434 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
2435 &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.
2436 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
2437 &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.
2438 &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.
2439 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
2440 &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.
2441 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
2442 &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.
2443 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
2444 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2445 &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.
2446 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2447 &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.
2448 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
2449 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
2450 &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.
2451 &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.
2452 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
2453 &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.
2454 &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.
2455 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
2456 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
2457 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
2458 &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.
2459 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -04002460 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002461 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
2462 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
2463 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
2464 &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.
2465 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
2466 &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.
2467 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
2468 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
2469 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
2470 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
2471 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
2472 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
2473 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -04002474 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002475 &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.
2476 &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.
2477 &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.
2478 &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.
2479 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
2480 &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.
2481 &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.
2482 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
2483 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
2484 &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.
2485 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
2486 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
2487 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
2488 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
2489 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
2490 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
2491 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
2492 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
2493 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
2494 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
2495 &quot;height&quot;: 42, # The height of the image in pixels.
2496 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
2497 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
2498 &quot;location&quot;: { # Geographic location information stored in the image.
2499 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
2500 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
2501 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
2502 },
2503 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
2504 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
2505 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
2506 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
2507 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
2508 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
2509 &quot;width&quot;: 42, # The width of the image in pixels.
2510 },
2511 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
2512 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
2513 },
2514 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
2515 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
2516 &quot;labels&quot;: { # A group of labels for the file.
2517 &quot;hidden&quot;: True or False, # Deprecated.
2518 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
2519 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
2520 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
2521 &quot;trashed&quot;: True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
2522 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
2523 },
2524 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
2525 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2526 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2527 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2528 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2529 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2530 &quot;picture&quot;: { # The user&#x27;s profile picture.
2531 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2532 },
2533 },
2534 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
2535 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
2536 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
2537 &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.
2538 &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.
2539 &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.
2540 &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.
2541 &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.
2542 &quot;a_key&quot;: &quot;A String&quot;,
2543 },
2544 &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.
2545 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
2546 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
2547 &quot;A String&quot;,
2548 ],
2549 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002550 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07002551 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2552 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2553 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2554 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2555 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2556 &quot;picture&quot;: { # The user&#x27;s profile picture.
2557 &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 -04002558 },
John Asmuth614db982014-04-24 15:46:26 -04002559 },
2560 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002561 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
2562 # 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.
2563 { # A reference to a file&#x27;s parent.
2564 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
2565 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
2566 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
2567 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
2568 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04002569 },
2570 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002571 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
2572 &quot;A String&quot;,
2573 ],
2574 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
2575 { # A permission for a file.
2576 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
2577 &quot;A String&quot;,
2578 ],
2579 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
2580 &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.
2581 &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.
2582 &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.
2583 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
2584 &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:
2585 # - They cannot be set on shared drive items
2586 # - They can only be set on user and group permissions
2587 # - The date must be in the future
2588 # - The date cannot be more than a year in the future
2589 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
2590 &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.
2591 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
2592 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
2593 &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.
2594 {
2595 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2596 &quot;A String&quot;,
2597 ],
2598 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2599 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
2600 &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:
2601 # - file
2602 # - member
2603 &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:
2604 # - organizer
2605 # - fileOrganizer
2606 # - writer
2607 # - reader
2608 },
2609 ],
2610 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
2611 &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:
2612 # - owner
2613 # - organizer
2614 # - fileOrganizer
2615 # - writer
2616 # - reader
2617 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
2618 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
2619 {
2620 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
2621 &quot;A String&quot;,
2622 ],
2623 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
2624 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
2625 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
2626 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
2627 },
2628 ],
2629 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
2630 # - user
2631 # - group
2632 # - domain
2633 # - anyone
2634 &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.
2635 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04002636 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002637 ],
2638 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002639 { # A key-value pair attached to a file that is either public or private to an application.
2640 # The following limits apply to file properties:
2641 # - Maximum of 100 properties total per file
2642 # - Maximum of 30 private properties per app
2643 # - Maximum of 30 public properties
2644 # - 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 -07002645 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
2646 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
2647 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
2648 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
2649 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
2650 &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 -04002651 },
2652 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002653 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
2654 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
2655 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
2656 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
2657 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
2658 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
2659 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2660 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2661 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2662 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2663 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2664 &quot;picture&quot;: { # The user&#x27;s profile picture.
2665 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2666 },
Takashi Matsuo06694102015-09-11 13:55:40 -07002667 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002668 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
2669 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
2670 &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.
2671 },
2672 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
2673 &quot;A String&quot;,
2674 ],
2675 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
2676 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
2677 &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.
2678 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
2679 },
2680 &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.
2681 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
2682 &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.
2683 &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.
2684 &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.
2685 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2686 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2687 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2688 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2689 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2690 &quot;picture&quot;: { # The user&#x27;s profile picture.
2691 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2692 },
2693 },
2694 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
2695 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
2696 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002697 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002698 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
2699 &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.
2700 &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.
2701 &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.
2702 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
2703 &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 -07002704 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002705 # - They can only be set on user and group permissions
2706 # - The date must be in the future
2707 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002708 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07002709 &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.
2710 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
2711 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
2712 &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.
2713 {
2714 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2715 &quot;A String&quot;,
2716 ],
2717 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2718 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
2719 &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:
2720 # - file
2721 # - member
2722 &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:
2723 # - organizer
2724 # - fileOrganizer
2725 # - writer
2726 # - reader
2727 },
2728 ],
2729 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
2730 &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 -04002731 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002732 # - organizer
2733 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04002734 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002735 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07002736 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
2737 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
2738 {
2739 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
2740 &quot;A String&quot;,
2741 ],
2742 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
2743 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
2744 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
2745 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
2746 },
2747 ],
2748 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04002749 # - user
2750 # - group
2751 # - domain
2752 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07002753 &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.
2754 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04002755 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002756 &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.
2757 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
2758 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
2759 &quot;height&quot;: 42, # The height of the video in pixels.
2760 &quot;width&quot;: 42, # The width of the video in pixels.
2761 },
2762 &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.
2763 &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.
2764 &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 -04002765}
2766
Bu Sun Kim65020912020-05-20 12:08:20 -07002767 addParents: string, Comma-separated list of parent IDs to add.
2768 convert: boolean, This parameter is deprecated and has no function.
2769 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 -07002770 modifiedDateBehavior: string, Determines the behavior in which modifiedDate is updated. This overrides setModifiedDate.
2771 Allowed values
2772 fromBody - Set modifiedDate to the value provided in the body of the request. No change if no value was provided.
2773 fromBodyIfNeeded - Set modifiedDate to the value provided in the body of the request depending on other contents of the update.
2774 fromBodyOrNow - Set modifiedDate to the value provided in the body of the request, or to the current time if no value was provided.
2775 noChange - Maintain the previous value of modifiedDate.
2776 now - Set modifiedDate to the current time.
2777 nowIfNeeded - Set modifiedDate to the current time depending on contents of the update.
Bu Sun Kim65020912020-05-20 12:08:20 -07002778 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.
2779 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00002780 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
Dan O'Mearadd494642020-05-01 07:42:23 -07002781 pinned: boolean, Whether to pin the new revision. A file can have a maximum of 200 pinned revisions.
Craig Citro065b5302014-08-14 00:47:23 -07002782 removeParents: string, Comma-separated list of parent IDs to remove.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002783 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 Kim65020912020-05-20 12:08:20 -07002784 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
2785 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
John Asmuth614db982014-04-24 15:46:26 -04002786 timedTextLanguage: string, The language of the timed text.
Bu Sun Kim65020912020-05-20 12:08:20 -07002787 timedTextTrackName: string, The timed text track name.
2788 updateViewedDate: boolean, Whether to update the view date after successfully updating the file.
2789 useContentAsIndexableText: boolean, Whether to use the content as indexable text.
John Asmuth614db982014-04-24 15:46:26 -04002790
2791Returns:
2792 An object of the form:
2793
2794 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07002795 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
2796 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
2797 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
2798 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
2799 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
2800 &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.
2801 &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.
2802 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
2803 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
2804 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
2805 &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.
2806 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
2807 &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.
2808 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
2809 &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.
2810 &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.
2811 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
2812 &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.
2813 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
2814 &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.
2815 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
2816 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2817 &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.
2818 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2819 &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.
2820 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
2821 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
2822 &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.
2823 &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.
2824 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
2825 &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.
2826 &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.
2827 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
2828 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
2829 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
2830 &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.
2831 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -04002832 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002833 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
2834 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
2835 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
2836 &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.
2837 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
2838 &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.
2839 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
2840 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
2841 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
2842 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
2843 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
2844 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
2845 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -04002846 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002847 &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.
2848 &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.
2849 &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.
2850 &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.
2851 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
2852 &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.
2853 &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.
2854 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
2855 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
2856 &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.
2857 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
2858 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
2859 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
2860 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
2861 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
2862 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
2863 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
2864 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
2865 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
2866 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
2867 &quot;height&quot;: 42, # The height of the image in pixels.
2868 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
2869 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
2870 &quot;location&quot;: { # Geographic location information stored in the image.
2871 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
2872 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
2873 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
2874 },
2875 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
2876 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
2877 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
2878 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
2879 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
2880 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
2881 &quot;width&quot;: 42, # The width of the image in pixels.
2882 },
2883 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
2884 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
2885 },
2886 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
2887 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
2888 &quot;labels&quot;: { # A group of labels for the file.
2889 &quot;hidden&quot;: True or False, # Deprecated.
2890 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
2891 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
2892 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
2893 &quot;trashed&quot;: True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
2894 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
2895 },
2896 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
2897 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2898 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2899 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2900 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2901 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2902 &quot;picture&quot;: { # The user&#x27;s profile picture.
2903 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
2904 },
2905 },
2906 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
2907 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
2908 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
2909 &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.
2910 &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.
2911 &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.
2912 &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.
2913 &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.
2914 &quot;a_key&quot;: &quot;A String&quot;,
2915 },
2916 &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.
2917 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
2918 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
2919 &quot;A String&quot;,
2920 ],
2921 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002922 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07002923 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2924 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
2925 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
2926 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
2927 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
2928 &quot;picture&quot;: { # The user&#x27;s profile picture.
2929 &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 -04002930 },
John Asmuth614db982014-04-24 15:46:26 -04002931 },
2932 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002933 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
2934 # 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.
2935 { # A reference to a file&#x27;s parent.
2936 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
2937 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
2938 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
2939 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
2940 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04002941 },
2942 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002943 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
2944 &quot;A String&quot;,
2945 ],
2946 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
2947 { # A permission for a file.
2948 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
2949 &quot;A String&quot;,
2950 ],
2951 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
2952 &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.
2953 &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.
2954 &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.
2955 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
2956 &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:
2957 # - They cannot be set on shared drive items
2958 # - They can only be set on user and group permissions
2959 # - The date must be in the future
2960 # - The date cannot be more than a year in the future
2961 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
2962 &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.
2963 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
2964 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
2965 &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.
2966 {
2967 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
2968 &quot;A String&quot;,
2969 ],
2970 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2971 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
2972 &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:
2973 # - file
2974 # - member
2975 &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:
2976 # - organizer
2977 # - fileOrganizer
2978 # - writer
2979 # - reader
2980 },
2981 ],
2982 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
2983 &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:
2984 # - owner
2985 # - organizer
2986 # - fileOrganizer
2987 # - writer
2988 # - reader
2989 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
2990 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
2991 {
2992 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
2993 &quot;A String&quot;,
2994 ],
2995 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
2996 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
2997 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
2998 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
2999 },
3000 ],
3001 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
3002 # - user
3003 # - group
3004 # - domain
3005 # - anyone
3006 &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.
3007 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04003008 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003009 ],
3010 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003011 { # A key-value pair attached to a file that is either public or private to an application.
3012 # The following limits apply to file properties:
3013 # - Maximum of 100 properties total per file
3014 # - Maximum of 30 private properties per app
3015 # - Maximum of 30 public properties
3016 # - 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 -07003017 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
3018 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
3019 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
3020 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
3021 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
3022 &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 -04003023 },
3024 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003025 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
3026 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
3027 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
3028 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
3029 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
3030 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
3031 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3032 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3033 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3034 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3035 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3036 &quot;picture&quot;: { # The user&#x27;s profile picture.
3037 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3038 },
Takashi Matsuo06694102015-09-11 13:55:40 -07003039 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003040 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
3041 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
3042 &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.
3043 },
3044 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
3045 &quot;A String&quot;,
3046 ],
3047 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
3048 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
3049 &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.
3050 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
3051 },
3052 &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.
3053 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
3054 &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.
3055 &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.
3056 &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.
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;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
3067 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
3068 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003069 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003070 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
3071 &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.
3072 &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.
3073 &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.
3074 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
3075 &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 -07003076 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003077 # - They can only be set on user and group permissions
3078 # - The date must be in the future
3079 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003080 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07003081 &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.
3082 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
3083 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
3084 &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.
3085 {
3086 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3087 &quot;A String&quot;,
3088 ],
3089 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3090 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
3091 &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:
3092 # - file
3093 # - member
3094 &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:
3095 # - organizer
3096 # - fileOrganizer
3097 # - writer
3098 # - reader
3099 },
3100 ],
3101 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
3102 &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 -04003103 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003104 # - organizer
3105 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04003106 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003107 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07003108 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
3109 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
3110 {
3111 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
3112 &quot;A String&quot;,
3113 ],
3114 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
3115 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
3116 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
3117 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
3118 },
3119 ],
3120 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04003121 # - user
3122 # - group
3123 # - domain
3124 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07003125 &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.
3126 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04003127 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003128 &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.
3129 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
3130 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
3131 &quot;height&quot;: 42, # The height of the video in pixels.
3132 &quot;width&quot;: 42, # The width of the video in pixels.
3133 },
3134 &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.
3135 &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.
3136 &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 -04003137 }</pre>
3138</div>
3139
3140<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07003141 <code class="details" id="touch">touch(fileId, supportsAllDrives=None, supportsTeamDrives=None)</code>
3142 <pre>Set the file&#x27;s updated time to the current server time.
John Asmuth614db982014-04-24 15:46:26 -04003143
3144Args:
3145 fileId: string, The ID of the file to update. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003146 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07003147 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
John Asmuth614db982014-04-24 15:46:26 -04003148
3149Returns:
3150 An object of the form:
3151
3152 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07003153 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
3154 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
3155 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
3156 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
3157 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
3158 &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.
3159 &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.
3160 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
3161 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
3162 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
3163 &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.
3164 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
3165 &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.
3166 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
3167 &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.
3168 &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.
3169 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
3170 &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.
3171 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
3172 &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.
3173 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
3174 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3175 &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.
3176 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3177 &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.
3178 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
3179 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
3180 &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.
3181 &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.
3182 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
3183 &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.
3184 &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.
3185 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
3186 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
3187 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
3188 &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.
3189 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -04003190 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003191 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
3192 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
3193 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
3194 &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.
3195 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
3196 &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.
3197 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
3198 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
3199 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
3200 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
3201 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
3202 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
3203 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -04003204 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003205 &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.
3206 &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.
3207 &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.
3208 &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.
3209 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
3210 &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.
3211 &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.
3212 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
3213 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
3214 &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.
3215 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
3216 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
3217 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
3218 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
3219 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
3220 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
3221 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
3222 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
3223 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
3224 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
3225 &quot;height&quot;: 42, # The height of the image in pixels.
3226 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
3227 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
3228 &quot;location&quot;: { # Geographic location information stored in the image.
3229 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
3230 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
3231 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
3232 },
3233 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
3234 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
3235 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
3236 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
3237 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
3238 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
3239 &quot;width&quot;: 42, # The width of the image in pixels.
3240 },
3241 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
3242 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
3243 },
3244 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
3245 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
3246 &quot;labels&quot;: { # A group of labels for the file.
3247 &quot;hidden&quot;: True or False, # Deprecated.
3248 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
3249 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
3250 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
3251 &quot;trashed&quot;: True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
3252 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
3253 },
3254 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
3255 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3256 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3257 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3258 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3259 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3260 &quot;picture&quot;: { # The user&#x27;s profile picture.
3261 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3262 },
3263 },
3264 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
3265 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
3266 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
3267 &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.
3268 &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.
3269 &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.
3270 &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.
3271 &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.
3272 &quot;a_key&quot;: &quot;A String&quot;,
3273 },
3274 &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.
3275 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
3276 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
3277 &quot;A String&quot;,
3278 ],
3279 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003280 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07003281 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3282 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3283 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3284 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3285 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3286 &quot;picture&quot;: { # The user&#x27;s profile picture.
3287 &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 -04003288 },
John Asmuth614db982014-04-24 15:46:26 -04003289 },
3290 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003291 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
3292 # 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.
3293 { # A reference to a file&#x27;s parent.
3294 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
3295 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
3296 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
3297 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
3298 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04003299 },
3300 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003301 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
3302 &quot;A String&quot;,
3303 ],
3304 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
3305 { # A permission for a file.
3306 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
3307 &quot;A String&quot;,
3308 ],
3309 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
3310 &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.
3311 &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.
3312 &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.
3313 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
3314 &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:
3315 # - They cannot be set on shared drive items
3316 # - They can only be set on user and group permissions
3317 # - The date must be in the future
3318 # - The date cannot be more than a year in the future
3319 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
3320 &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.
3321 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
3322 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
3323 &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.
3324 {
3325 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3326 &quot;A String&quot;,
3327 ],
3328 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3329 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
3330 &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:
3331 # - file
3332 # - member
3333 &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:
3334 # - organizer
3335 # - fileOrganizer
3336 # - writer
3337 # - reader
3338 },
3339 ],
3340 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
3341 &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:
3342 # - owner
3343 # - organizer
3344 # - fileOrganizer
3345 # - writer
3346 # - reader
3347 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
3348 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
3349 {
3350 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
3351 &quot;A String&quot;,
3352 ],
3353 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
3354 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
3355 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
3356 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
3357 },
3358 ],
3359 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
3360 # - user
3361 # - group
3362 # - domain
3363 # - anyone
3364 &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.
3365 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04003366 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003367 ],
3368 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003369 { # A key-value pair attached to a file that is either public or private to an application.
3370 # The following limits apply to file properties:
3371 # - Maximum of 100 properties total per file
3372 # - Maximum of 30 private properties per app
3373 # - Maximum of 30 public properties
3374 # - 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 -07003375 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
3376 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
3377 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
3378 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
3379 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
3380 &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 -04003381 },
3382 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003383 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
3384 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
3385 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
3386 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
3387 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
3388 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
3389 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3390 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3391 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3392 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3393 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3394 &quot;picture&quot;: { # The user&#x27;s profile picture.
3395 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3396 },
Takashi Matsuo06694102015-09-11 13:55:40 -07003397 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003398 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
3399 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
3400 &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.
3401 },
3402 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
3403 &quot;A String&quot;,
3404 ],
3405 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
3406 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
3407 &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.
3408 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
3409 },
3410 &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.
3411 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
3412 &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.
3413 &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.
3414 &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.
3415 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3416 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3417 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3418 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3419 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3420 &quot;picture&quot;: { # The user&#x27;s profile picture.
3421 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3422 },
3423 },
3424 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
3425 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
3426 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003427 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003428 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
3429 &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.
3430 &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.
3431 &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.
3432 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
3433 &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 -07003434 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003435 # - They can only be set on user and group permissions
3436 # - The date must be in the future
3437 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003438 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07003439 &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.
3440 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
3441 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
3442 &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.
3443 {
3444 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3445 &quot;A String&quot;,
3446 ],
3447 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3448 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
3449 &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:
3450 # - file
3451 # - member
3452 &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:
3453 # - organizer
3454 # - fileOrganizer
3455 # - writer
3456 # - reader
3457 },
3458 ],
3459 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
3460 &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 -04003461 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003462 # - organizer
3463 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04003464 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003465 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07003466 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
3467 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
3468 {
3469 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
3470 &quot;A String&quot;,
3471 ],
3472 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
3473 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
3474 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
3475 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
3476 },
3477 ],
3478 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04003479 # - user
3480 # - group
3481 # - domain
3482 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07003483 &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.
3484 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04003485 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003486 &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.
3487 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
3488 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
3489 &quot;height&quot;: 42, # The height of the video in pixels.
3490 &quot;width&quot;: 42, # The width of the video in pixels.
3491 },
3492 &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.
3493 &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.
3494 &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 -04003495 }</pre>
3496</div>
3497
3498<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07003499 <code class="details" id="trash">trash(fileId, supportsAllDrives=None, supportsTeamDrives=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003500 <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.
John Asmuth614db982014-04-24 15:46:26 -04003501
3502Args:
3503 fileId: string, The ID of the file to trash. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003504 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07003505 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
John Asmuth614db982014-04-24 15:46:26 -04003506
3507Returns:
3508 An object of the form:
3509
3510 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07003511 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
3512 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
3513 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
3514 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
3515 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
3516 &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.
3517 &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.
3518 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
3519 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
3520 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
3521 &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.
3522 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
3523 &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.
3524 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
3525 &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.
3526 &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.
3527 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
3528 &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.
3529 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
3530 &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.
3531 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
3532 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3533 &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.
3534 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3535 &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.
3536 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
3537 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
3538 &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.
3539 &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.
3540 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
3541 &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.
3542 &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.
3543 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
3544 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
3545 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
3546 &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.
3547 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -04003548 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003549 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
3550 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
3551 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
3552 &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.
3553 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
3554 &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.
3555 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
3556 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
3557 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
3558 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
3559 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
3560 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
3561 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -04003562 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003563 &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.
3564 &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.
3565 &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.
3566 &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.
3567 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
3568 &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.
3569 &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.
3570 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
3571 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
3572 &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.
3573 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
3574 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
3575 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
3576 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
3577 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
3578 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
3579 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
3580 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
3581 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
3582 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
3583 &quot;height&quot;: 42, # The height of the image in pixels.
3584 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
3585 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
3586 &quot;location&quot;: { # Geographic location information stored in the image.
3587 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
3588 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
3589 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
3590 },
3591 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
3592 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
3593 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
3594 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
3595 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
3596 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
3597 &quot;width&quot;: 42, # The width of the image in pixels.
3598 },
3599 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
3600 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
3601 },
3602 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
3603 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
3604 &quot;labels&quot;: { # A group of labels for the file.
3605 &quot;hidden&quot;: True or False, # Deprecated.
3606 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
3607 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
3608 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
3609 &quot;trashed&quot;: True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
3610 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
3611 },
3612 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
3613 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3614 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3615 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3616 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3617 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3618 &quot;picture&quot;: { # The user&#x27;s profile picture.
3619 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3620 },
3621 },
3622 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
3623 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
3624 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
3625 &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.
3626 &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.
3627 &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.
3628 &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.
3629 &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.
3630 &quot;a_key&quot;: &quot;A String&quot;,
3631 },
3632 &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.
3633 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
3634 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
3635 &quot;A String&quot;,
3636 ],
3637 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003638 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07003639 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3640 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3641 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3642 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3643 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3644 &quot;picture&quot;: { # The user&#x27;s profile picture.
3645 &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 -04003646 },
John Asmuth614db982014-04-24 15:46:26 -04003647 },
3648 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003649 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
3650 # 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.
3651 { # A reference to a file&#x27;s parent.
3652 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
3653 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
3654 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
3655 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
3656 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04003657 },
3658 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003659 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
3660 &quot;A String&quot;,
3661 ],
3662 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
3663 { # A permission for a file.
3664 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
3665 &quot;A String&quot;,
3666 ],
3667 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
3668 &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.
3669 &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.
3670 &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.
3671 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
3672 &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:
3673 # - They cannot be set on shared drive items
3674 # - They can only be set on user and group permissions
3675 # - The date must be in the future
3676 # - The date cannot be more than a year in the future
3677 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
3678 &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.
3679 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
3680 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
3681 &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.
3682 {
3683 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3684 &quot;A String&quot;,
3685 ],
3686 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3687 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
3688 &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:
3689 # - file
3690 # - member
3691 &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:
3692 # - organizer
3693 # - fileOrganizer
3694 # - writer
3695 # - reader
3696 },
3697 ],
3698 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
3699 &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:
3700 # - owner
3701 # - organizer
3702 # - fileOrganizer
3703 # - writer
3704 # - reader
3705 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
3706 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
3707 {
3708 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
3709 &quot;A String&quot;,
3710 ],
3711 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
3712 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
3713 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
3714 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
3715 },
3716 ],
3717 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
3718 # - user
3719 # - group
3720 # - domain
3721 # - anyone
3722 &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.
3723 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04003724 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003725 ],
3726 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00003727 { # A key-value pair attached to a file that is either public or private to an application.
3728 # The following limits apply to file properties:
3729 # - Maximum of 100 properties total per file
3730 # - Maximum of 30 private properties per app
3731 # - Maximum of 30 public properties
3732 # - 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 -07003733 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
3734 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
3735 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
3736 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
3737 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
3738 &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 -04003739 },
3740 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003741 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
3742 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
3743 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
3744 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
3745 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
3746 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
3747 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3748 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3749 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3750 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3751 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3752 &quot;picture&quot;: { # The user&#x27;s profile picture.
3753 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3754 },
Takashi Matsuo06694102015-09-11 13:55:40 -07003755 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003756 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
3757 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
3758 &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.
3759 },
3760 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
3761 &quot;A String&quot;,
3762 ],
3763 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
3764 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
3765 &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.
3766 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
3767 },
3768 &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.
3769 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
3770 &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.
3771 &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.
3772 &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.
3773 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3774 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3775 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3776 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3777 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3778 &quot;picture&quot;: { # The user&#x27;s profile picture.
3779 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3780 },
3781 },
3782 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
3783 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
3784 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003785 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003786 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
3787 &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.
3788 &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.
3789 &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.
3790 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
3791 &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 -07003792 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003793 # - They can only be set on user and group permissions
3794 # - The date must be in the future
3795 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003796 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07003797 &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.
3798 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
3799 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
3800 &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.
3801 {
3802 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
3803 &quot;A String&quot;,
3804 ],
3805 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
3806 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
3807 &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:
3808 # - file
3809 # - member
3810 &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:
3811 # - organizer
3812 # - fileOrganizer
3813 # - writer
3814 # - reader
3815 },
3816 ],
3817 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
3818 &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 -04003819 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003820 # - organizer
3821 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04003822 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003823 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07003824 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
3825 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
3826 {
3827 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
3828 &quot;A String&quot;,
3829 ],
3830 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
3831 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
3832 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
3833 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
3834 },
3835 ],
3836 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04003837 # - user
3838 # - group
3839 # - domain
3840 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07003841 &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.
3842 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04003843 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003844 &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.
3845 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
3846 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
3847 &quot;height&quot;: 42, # The height of the video in pixels.
3848 &quot;width&quot;: 42, # The width of the video in pixels.
3849 },
3850 &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.
3851 &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.
3852 &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 -04003853 }</pre>
3854</div>
3855
3856<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07003857 <code class="details" id="untrash">untrash(fileId, supportsAllDrives=None, supportsTeamDrives=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04003858 <pre>Restores a file from the trash.
3859
3860Args:
3861 fileId: string, The ID of the file to untrash. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003862 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07003863 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
John Asmuth614db982014-04-24 15:46:26 -04003864
3865Returns:
3866 An object of the form:
3867
3868 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07003869 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
3870 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
3871 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
3872 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
3873 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
3874 &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.
3875 &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.
3876 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
3877 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
3878 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
3879 &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.
3880 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
3881 &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.
3882 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
3883 &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.
3884 &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.
3885 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
3886 &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.
3887 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
3888 &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.
3889 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
3890 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3891 &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.
3892 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
3893 &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.
3894 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
3895 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
3896 &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.
3897 &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.
3898 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
3899 &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.
3900 &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.
3901 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
3902 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
3903 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
3904 &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.
3905 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -04003906 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003907 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
3908 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
3909 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
3910 &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.
3911 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
3912 &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.
3913 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
3914 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
3915 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
3916 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
3917 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
3918 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
3919 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -04003920 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003921 &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.
3922 &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.
3923 &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.
3924 &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.
3925 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
3926 &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.
3927 &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.
3928 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
3929 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
3930 &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.
3931 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
3932 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
3933 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
3934 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
3935 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
3936 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
3937 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
3938 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
3939 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
3940 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
3941 &quot;height&quot;: 42, # The height of the image in pixels.
3942 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
3943 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
3944 &quot;location&quot;: { # Geographic location information stored in the image.
3945 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
3946 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
3947 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
3948 },
3949 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
3950 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
3951 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
3952 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
3953 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
3954 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
3955 &quot;width&quot;: 42, # The width of the image in pixels.
3956 },
3957 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
3958 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
3959 },
3960 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
3961 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
3962 &quot;labels&quot;: { # A group of labels for the file.
3963 &quot;hidden&quot;: True or False, # Deprecated.
3964 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
3965 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
3966 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
3967 &quot;trashed&quot;: True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
3968 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
3969 },
3970 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
3971 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3972 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3973 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
3974 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
3975 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
3976 &quot;picture&quot;: { # The user&#x27;s profile picture.
3977 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
3978 },
3979 },
3980 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
3981 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
3982 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
3983 &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.
3984 &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.
3985 &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.
3986 &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.
3987 &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.
3988 &quot;a_key&quot;: &quot;A String&quot;,
3989 },
3990 &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.
3991 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
3992 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
3993 &quot;A String&quot;,
3994 ],
3995 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003996 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07003997 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
3998 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
3999 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4000 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4001 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4002 &quot;picture&quot;: { # The user&#x27;s profile picture.
4003 &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 -04004004 },
John Asmuth614db982014-04-24 15:46:26 -04004005 },
4006 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004007 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
4008 # 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.
4009 { # A reference to a file&#x27;s parent.
4010 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
4011 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
4012 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
4013 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
4014 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04004015 },
4016 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004017 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
4018 &quot;A String&quot;,
4019 ],
4020 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
4021 { # A permission for a file.
4022 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
4023 &quot;A String&quot;,
4024 ],
4025 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
4026 &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.
4027 &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.
4028 &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.
4029 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
4030 &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:
4031 # - They cannot be set on shared drive items
4032 # - They can only be set on user and group permissions
4033 # - The date must be in the future
4034 # - The date cannot be more than a year in the future
4035 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
4036 &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.
4037 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
4038 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
4039 &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.
4040 {
4041 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4042 &quot;A String&quot;,
4043 ],
4044 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4045 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
4046 &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:
4047 # - file
4048 # - member
4049 &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:
4050 # - organizer
4051 # - fileOrganizer
4052 # - writer
4053 # - reader
4054 },
4055 ],
4056 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
4057 &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:
4058 # - owner
4059 # - organizer
4060 # - fileOrganizer
4061 # - writer
4062 # - reader
4063 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
4064 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
4065 {
4066 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
4067 &quot;A String&quot;,
4068 ],
4069 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
4070 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
4071 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
4072 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
4073 },
4074 ],
4075 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
4076 # - user
4077 # - group
4078 # - domain
4079 # - anyone
4080 &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.
4081 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04004082 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004083 ],
4084 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004085 { # A key-value pair attached to a file that is either public or private to an application.
4086 # The following limits apply to file properties:
4087 # - Maximum of 100 properties total per file
4088 # - Maximum of 30 private properties per app
4089 # - Maximum of 30 public properties
4090 # - 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 -07004091 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
4092 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
4093 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
4094 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
4095 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
4096 &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 -04004097 },
4098 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004099 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
4100 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
4101 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
4102 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
4103 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
4104 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
4105 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4106 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4107 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4108 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4109 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4110 &quot;picture&quot;: { # The user&#x27;s profile picture.
4111 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4112 },
Takashi Matsuo06694102015-09-11 13:55:40 -07004113 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004114 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
4115 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
4116 &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.
4117 },
4118 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
4119 &quot;A String&quot;,
4120 ],
4121 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
4122 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
4123 &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.
4124 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
4125 },
4126 &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.
4127 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
4128 &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.
4129 &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.
4130 &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.
4131 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4132 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4133 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4134 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4135 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4136 &quot;picture&quot;: { # The user&#x27;s profile picture.
4137 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4138 },
4139 },
4140 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
4141 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
4142 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004143 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004144 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
4145 &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.
4146 &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.
4147 &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.
4148 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
4149 &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 -07004150 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004151 # - They can only be set on user and group permissions
4152 # - The date must be in the future
4153 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004154 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07004155 &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.
4156 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
4157 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
4158 &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.
4159 {
4160 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4161 &quot;A String&quot;,
4162 ],
4163 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4164 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
4165 &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:
4166 # - file
4167 # - member
4168 &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:
4169 # - organizer
4170 # - fileOrganizer
4171 # - writer
4172 # - reader
4173 },
4174 ],
4175 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
4176 &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 -04004177 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004178 # - organizer
4179 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04004180 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004181 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07004182 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
4183 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
4184 {
4185 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
4186 &quot;A String&quot;,
4187 ],
4188 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
4189 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
4190 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
4191 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
4192 },
4193 ],
4194 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04004195 # - user
4196 # - group
4197 # - domain
4198 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07004199 &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.
4200 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04004201 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004202 &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.
4203 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
4204 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
4205 &quot;height&quot;: 42, # The height of the video in pixels.
4206 &quot;width&quot;: 42, # The width of the video in pixels.
4207 },
4208 &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.
4209 &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.
4210 &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 -04004211 }</pre>
4212</div>
4213
4214<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07004215 <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 -04004216 <pre>Updates file metadata and/or content.
4217
4218Args:
4219 fileId: string, The ID of the file to update. (required)
4220 body: object, The request body.
4221 The object takes the form of:
4222
4223{ # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07004224 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
4225 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
4226 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
4227 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
4228 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
4229 &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.
4230 &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.
4231 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
4232 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
4233 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
4234 &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.
4235 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
4236 &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.
4237 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
4238 &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.
4239 &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.
4240 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
4241 &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.
4242 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
4243 &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.
4244 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
4245 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
4246 &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.
4247 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
4248 &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.
4249 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
4250 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
4251 &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.
4252 &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.
4253 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
4254 &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.
4255 &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.
4256 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
4257 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
4258 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
4259 &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.
4260 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -04004261 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004262 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
4263 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
4264 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
4265 &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.
4266 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
4267 &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.
4268 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
4269 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
4270 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
4271 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
4272 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
4273 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
4274 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -04004275 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004276 &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.
4277 &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.
4278 &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.
4279 &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.
4280 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
4281 &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.
4282 &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.
4283 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
4284 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
4285 &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.
4286 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
4287 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
4288 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
4289 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
4290 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
4291 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
4292 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
4293 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
4294 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
4295 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
4296 &quot;height&quot;: 42, # The height of the image in pixels.
4297 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
4298 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
4299 &quot;location&quot;: { # Geographic location information stored in the image.
4300 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
4301 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
4302 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
4303 },
4304 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
4305 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
4306 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
4307 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
4308 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
4309 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
4310 &quot;width&quot;: 42, # The width of the image in pixels.
4311 },
4312 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
4313 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
4314 },
4315 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
4316 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
4317 &quot;labels&quot;: { # A group of labels for the file.
4318 &quot;hidden&quot;: True or False, # Deprecated.
4319 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
4320 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
4321 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
4322 &quot;trashed&quot;: True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
4323 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
4324 },
4325 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
4326 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4327 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4328 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4329 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4330 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4331 &quot;picture&quot;: { # The user&#x27;s profile picture.
4332 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4333 },
4334 },
4335 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
4336 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
4337 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
4338 &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.
4339 &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.
4340 &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.
4341 &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.
4342 &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.
4343 &quot;a_key&quot;: &quot;A String&quot;,
4344 },
4345 &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.
4346 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
4347 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
4348 &quot;A String&quot;,
4349 ],
4350 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004351 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07004352 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4353 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4354 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4355 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4356 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4357 &quot;picture&quot;: { # The user&#x27;s profile picture.
4358 &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 -04004359 },
John Asmuth614db982014-04-24 15:46:26 -04004360 },
4361 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004362 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
4363 # 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.
4364 { # A reference to a file&#x27;s parent.
4365 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
4366 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
4367 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
4368 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
4369 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04004370 },
4371 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004372 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
4373 &quot;A String&quot;,
4374 ],
4375 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
4376 { # A permission for a file.
4377 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
4378 &quot;A String&quot;,
4379 ],
4380 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
4381 &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.
4382 &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.
4383 &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.
4384 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
4385 &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:
4386 # - They cannot be set on shared drive items
4387 # - They can only be set on user and group permissions
4388 # - The date must be in the future
4389 # - The date cannot be more than a year in the future
4390 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
4391 &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.
4392 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
4393 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
4394 &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.
4395 {
4396 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4397 &quot;A String&quot;,
4398 ],
4399 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4400 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
4401 &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:
4402 # - file
4403 # - member
4404 &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:
4405 # - organizer
4406 # - fileOrganizer
4407 # - writer
4408 # - reader
4409 },
4410 ],
4411 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
4412 &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:
4413 # - owner
4414 # - organizer
4415 # - fileOrganizer
4416 # - writer
4417 # - reader
4418 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
4419 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
4420 {
4421 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
4422 &quot;A String&quot;,
4423 ],
4424 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
4425 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
4426 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
4427 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
4428 },
4429 ],
4430 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
4431 # - user
4432 # - group
4433 # - domain
4434 # - anyone
4435 &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.
4436 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04004437 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004438 ],
4439 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004440 { # A key-value pair attached to a file that is either public or private to an application.
4441 # The following limits apply to file properties:
4442 # - Maximum of 100 properties total per file
4443 # - Maximum of 30 private properties per app
4444 # - Maximum of 30 public properties
4445 # - 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 -07004446 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
4447 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
4448 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
4449 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
4450 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
4451 &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 -04004452 },
4453 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004454 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
4455 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
4456 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
4457 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
4458 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
4459 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
4460 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4461 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4462 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4463 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4464 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4465 &quot;picture&quot;: { # The user&#x27;s profile picture.
4466 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4467 },
Takashi Matsuo06694102015-09-11 13:55:40 -07004468 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004469 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
4470 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
4471 &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.
4472 },
4473 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
4474 &quot;A String&quot;,
4475 ],
4476 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
4477 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
4478 &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.
4479 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
4480 },
4481 &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.
4482 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
4483 &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.
4484 &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.
4485 &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.
4486 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4487 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4488 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4489 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4490 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4491 &quot;picture&quot;: { # The user&#x27;s profile picture.
4492 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4493 },
4494 },
4495 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
4496 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
4497 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004498 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004499 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
4500 &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.
4501 &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.
4502 &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.
4503 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
4504 &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 -07004505 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004506 # - They can only be set on user and group permissions
4507 # - The date must be in the future
4508 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004509 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07004510 &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.
4511 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
4512 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
4513 &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.
4514 {
4515 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4516 &quot;A String&quot;,
4517 ],
4518 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4519 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
4520 &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:
4521 # - file
4522 # - member
4523 &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:
4524 # - organizer
4525 # - fileOrganizer
4526 # - writer
4527 # - reader
4528 },
4529 ],
4530 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
4531 &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 -04004532 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004533 # - organizer
4534 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04004535 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004536 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07004537 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
4538 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
4539 {
4540 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
4541 &quot;A String&quot;,
4542 ],
4543 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
4544 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
4545 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
4546 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
4547 },
4548 ],
4549 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04004550 # - user
4551 # - group
4552 # - domain
4553 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07004554 &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.
4555 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04004556 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004557 &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.
4558 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
4559 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
4560 &quot;height&quot;: 42, # The height of the video in pixels.
4561 &quot;width&quot;: 42, # The width of the video in pixels.
4562 },
4563 &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.
4564 &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.
4565 &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 -04004566}
4567
Bu Sun Kim65020912020-05-20 12:08:20 -07004568 addParents: string, Comma-separated list of parent IDs to add.
4569 convert: boolean, This parameter is deprecated and has no function.
4570 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 -07004571 modifiedDateBehavior: string, Determines the behavior in which modifiedDate is updated. This overrides setModifiedDate.
4572 Allowed values
4573 fromBody - Set modifiedDate to the value provided in the body of the request. No change if no value was provided.
4574 fromBodyIfNeeded - Set modifiedDate to the value provided in the body of the request depending on other contents of the update.
4575 fromBodyOrNow - Set modifiedDate to the value provided in the body of the request, or to the current time if no value was provided.
4576 noChange - Maintain the previous value of modifiedDate.
4577 now - Set modifiedDate to the current time.
4578 nowIfNeeded - Set modifiedDate to the current time depending on contents of the update.
Bu Sun Kim65020912020-05-20 12:08:20 -07004579 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.
4580 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004581 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07004582 pinned: boolean, Whether to pin the new revision. A file can have a maximum of 200 pinned revisions.
Craig Citro065b5302014-08-14 00:47:23 -07004583 removeParents: string, Comma-separated list of parent IDs to remove.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004584 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 Kim65020912020-05-20 12:08:20 -07004585 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
4586 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
John Asmuth614db982014-04-24 15:46:26 -04004587 timedTextLanguage: string, The language of the timed text.
Bu Sun Kim65020912020-05-20 12:08:20 -07004588 timedTextTrackName: string, The timed text track name.
4589 updateViewedDate: boolean, Whether to update the view date after successfully updating the file.
4590 useContentAsIndexableText: boolean, Whether to use the content as indexable text.
4591 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
4592 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 -04004593
4594Returns:
4595 An object of the form:
4596
4597 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07004598 &quot;alternateLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer.
4599 &quot;appDataContents&quot;: True or False, # Whether this file is in the Application Data folder.
4600 &quot;canComment&quot;: True or False, # Deprecated: use capabilities/canComment.
4601 &quot;canReadRevisions&quot;: True or False, # Deprecated: use capabilities/canReadRevisions.
4602 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
4603 &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.
4604 &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.
4605 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
4606 &quot;canChangeRestrictedDownload&quot;: True or False, # Deprecated
4607 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
4608 &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.
4609 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
4610 &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.
4611 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
4612 &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.
4613 &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.
4614 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
4615 &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.
4616 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
4617 &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.
4618 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
4619 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
4620 &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.
4621 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
4622 &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.
4623 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
4624 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
4625 &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.
4626 &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.
4627 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
4628 &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.
4629 &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.
4630 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
4631 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
4632 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
4633 &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.
4634 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
John Asmuth614db982014-04-24 15:46:26 -04004635 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004636 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
4637 &quot;copyable&quot;: True or False, # Deprecated: use capabilities/canCopy.
4638 &quot;createdDate&quot;: &quot;A String&quot;, # Create time for this file (formatted RFC 3339 timestamp).
4639 &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.
4640 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
4641 &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.
4642 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
4643 &quot;editable&quot;: True or False, # Deprecated: use capabilities/canEdit.
4644 &quot;embedLink&quot;: &quot;A String&quot;, # A link for embedding the file.
4645 &quot;etag&quot;: &quot;A String&quot;, # ETag of the file.
4646 &quot;explicitlyTrashed&quot;: True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
4647 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
4648 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
John Asmuth614db982014-04-24 15:46:26 -04004649 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004650 &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.
4651 &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.
4652 &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.
4653 &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.
4654 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
4655 &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.
4656 &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.
4657 &quot;iconLink&quot;: &quot;A String&quot;, # A link to the file&#x27;s icon.
4658 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
4659 &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.
4660 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
4661 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
4662 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
4663 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
4664 &quot;date&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF format timestamp).
4665 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
4666 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
4667 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
4668 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
4669 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
4670 &quot;height&quot;: 42, # The height of the image in pixels.
4671 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
4672 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
4673 &quot;location&quot;: { # Geographic location information stored in the image.
4674 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
4675 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
4676 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
4677 },
4678 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
4679 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
4680 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
4681 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
4682 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
4683 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
4684 &quot;width&quot;: 42, # The width of the image in pixels.
4685 },
4686 &quot;indexableText&quot;: { # Indexable text attributes for the file (can only be written)
4687 &quot;text&quot;: &quot;A String&quot;, # The text to be indexed for this file.
4688 },
4689 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
4690 &quot;kind&quot;: &quot;drive#file&quot;, # The type of file. This is always drive#file.
4691 &quot;labels&quot;: { # A group of labels for the file.
4692 &quot;hidden&quot;: True or False, # Deprecated.
4693 &quot;modified&quot;: True or False, # Whether the file has been modified by this user.
4694 &quot;restricted&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
4695 &quot;starred&quot;: True or False, # Whether this file is starred by the user.
4696 &quot;trashed&quot;: True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
4697 &quot;viewed&quot;: True or False, # Whether this file has been viewed by this user.
4698 },
4699 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this file.
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 },
4708 },
4709 &quot;lastModifyingUserName&quot;: &quot;A String&quot;, # Name of the last user to modify this file.
4710 &quot;lastViewedByMeDate&quot;: &quot;A String&quot;, # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
4711 &quot;markedViewedByMeDate&quot;: &quot;A String&quot;, # Deprecated.
4712 &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.
4713 &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.
4714 &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.
4715 &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.
4716 &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.
4717 &quot;a_key&quot;: &quot;A String&quot;,
4718 },
4719 &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.
4720 &quot;ownedByMe&quot;: True or False, # Whether the file is owned by the current user. Not populated for items in shared drives.
4721 &quot;ownerNames&quot;: [ # Name(s) of the owner(s) of this file. Not populated for items in shared drives.
4722 &quot;A String&quot;,
4723 ],
4724 &quot;owners&quot;: [ # The owner(s) of this file. Not populated for items in shared drives.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004725 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07004726 &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.
John Asmuth614db982014-04-24 15:46:26 -04004733 },
John Asmuth614db982014-04-24 15:46:26 -04004734 },
4735 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004736 &quot;parents&quot;: [ # Collection of parent folders which contain this file.
4737 # 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.
4738 { # A reference to a file&#x27;s parent.
4739 &quot;id&quot;: &quot;A String&quot;, # The ID of the parent.
4740 &quot;isRoot&quot;: True or False, # Whether or not the parent is the root folder.
4741 &quot;kind&quot;: &quot;drive#parentReference&quot;, # This is always drive#parentReference.
4742 &quot;parentLink&quot;: &quot;A String&quot;, # A link to the parent.
4743 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this reference.
John Asmuth614db982014-04-24 15:46:26 -04004744 },
4745 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004746 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
4747 &quot;A String&quot;,
4748 ],
4749 &quot;permissions&quot;: [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
4750 { # A permission for a file.
4751 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
4752 &quot;A String&quot;,
4753 ],
4754 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
4755 &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.
4756 &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.
4757 &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.
4758 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
4759 &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:
4760 # - They cannot be set on shared drive items
4761 # - They can only be set on user and group permissions
4762 # - The date must be in the future
4763 # - The date cannot be more than a year in the future
4764 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
4765 &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.
4766 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
4767 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
4768 &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.
4769 {
4770 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4771 &quot;A String&quot;,
4772 ],
4773 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4774 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
4775 &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:
4776 # - file
4777 # - member
4778 &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:
4779 # - organizer
4780 # - fileOrganizer
4781 # - writer
4782 # - reader
4783 },
4784 ],
4785 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
4786 &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:
4787 # - owner
4788 # - organizer
4789 # - fileOrganizer
4790 # - writer
4791 # - reader
4792 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
4793 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
4794 {
4795 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
4796 &quot;A String&quot;,
4797 ],
4798 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
4799 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
4800 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
4801 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
4802 },
4803 ],
4804 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
4805 # - user
4806 # - group
4807 # - domain
4808 # - anyone
4809 &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.
4810 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04004811 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004812 ],
4813 &quot;properties&quot;: [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004814 { # A key-value pair attached to a file that is either public or private to an application.
4815 # The following limits apply to file properties:
4816 # - Maximum of 100 properties total per file
4817 # - Maximum of 30 private properties per app
4818 # - Maximum of 30 public properties
4819 # - 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 -07004820 &quot;etag&quot;: &quot;A String&quot;, # ETag of the property.
4821 &quot;key&quot;: &quot;A String&quot;, # The key of this property.
4822 &quot;kind&quot;: &quot;drive#property&quot;, # This is always drive#property.
4823 &quot;selfLink&quot;: &quot;A String&quot;, # The link back to this property.
4824 &quot;value&quot;: &quot;A String&quot;, # The value of this property.
4825 &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 -04004826 },
4827 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004828 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of quota bytes used by this file.
4829 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this file.
4830 &quot;shareable&quot;: True or False, # Deprecated: use capabilities/canShare.
4831 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
4832 &quot;sharedWithMeDate&quot;: &quot;A String&quot;, # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
4833 &quot;sharingUser&quot;: { # Information about a Drive user. # User that shared the item with the current user, if available.
4834 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4835 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4836 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4837 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4838 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4839 &quot;picture&quot;: { # The user&#x27;s profile picture.
4840 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4841 },
Takashi Matsuo06694102015-09-11 13:55:40 -07004842 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004843 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
4844 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
4845 &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.
4846 },
4847 &quot;spaces&quot;: [ # The list of spaces which contain the file. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
4848 &quot;A String&quot;,
4849 ],
4850 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
4851 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if a standard thumbnail cannot be generated.
4852 &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.
4853 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
4854 },
4855 &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.
4856 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
4857 &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.
4858 &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.
4859 &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.
4860 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
4861 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user.
4862 &quot;isAuthenticatedUser&quot;: True or False, # Whether this user is the same as the authenticated user for whom the request was made.
4863 &quot;kind&quot;: &quot;drive#user&quot;, # This is always drive#user.
4864 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in the permissions collection.
4865 &quot;picture&quot;: { # The user&#x27;s profile picture.
4866 &quot;url&quot;: &quot;A String&quot;, # A URL that points to a profile picture of this user.
4867 },
4868 },
4869 &quot;userPermission&quot;: { # A permission for a file. # The permissions for the authenticated user on this file.
4870 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
4871 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004872 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004873 &quot;authKey&quot;: &quot;A String&quot;, # Deprecated.
4874 &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.
4875 &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.
4876 &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.
4877 &quot;etag&quot;: &quot;A String&quot;, # The ETag of the permission.
4878 &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 -07004879 # - They cannot be set on shared drive items
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004880 # - They can only be set on user and group permissions
4881 # - The date must be in the future
4882 # - The date cannot be more than a year in the future
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004883 # - The date can only be set on drive.permissions.update or drive.permissions.patch requests
Bu Sun Kim65020912020-05-20 12:08:20 -07004884 &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.
4885 &quot;kind&quot;: &quot;drive#permission&quot;, # This is always drive#permission.
4886 &quot;name&quot;: &quot;A String&quot;, # The name for this permission.
4887 &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.
4888 {
4889 &quot;additionalRoles&quot;: [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
4890 &quot;A String&quot;,
4891 ],
4892 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
4893 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
4894 &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:
4895 # - file
4896 # - member
4897 &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:
4898 # - organizer
4899 # - fileOrganizer
4900 # - writer
4901 # - reader
4902 },
4903 ],
4904 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the profile photo, if available.
4905 &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 -04004906 # - owner
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004907 # - organizer
4908 # - fileOrganizer
John Asmuth614db982014-04-24 15:46:26 -04004909 # - writer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004910 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07004911 &quot;selfLink&quot;: &quot;A String&quot;, # A link back to this permission.
4912 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
4913 {
4914 &quot;additionalRoles&quot;: [ # Deprecated - use permissionDetails/additionalRoles instead.
4915 &quot;A String&quot;,
4916 ],
4917 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
4918 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
4919 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
4920 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
4921 },
4922 ],
4923 &quot;type&quot;: &quot;A String&quot;, # The account type. Allowed values are:
John Asmuth614db982014-04-24 15:46:26 -04004924 # - user
4925 # - group
4926 # - domain
4927 # - anyone
Bu Sun Kim65020912020-05-20 12:08:20 -07004928 &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.
4929 &quot;withLink&quot;: True or False, # Whether the link is required for this permission.
John Asmuth614db982014-04-24 15:46:26 -04004930 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004931 &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.
4932 &quot;videoMediaMetadata&quot;: { # Metadata about video media. This will only be present for video types.
4933 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
4934 &quot;height&quot;: 42, # The height of the video in pixels.
4935 &quot;width&quot;: 42, # The width of the video in pixels.
4936 },
4937 &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.
4938 &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.
4939 &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 -04004940 }</pre>
4941</div>
4942
4943<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07004944 <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 -04004945 <pre>Subscribe to changes on a file
4946
4947Args:
4948 fileId: string, The ID for the file in question. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004949 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04004950 The object takes the form of:
4951
4952{ # An notification channel used to watch for resource changes.
Bu Sun Kim65020912020-05-20 12:08:20 -07004953 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
4954 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
4955 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
4956 &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;.
4957 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
4958 &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
John Asmuth614db982014-04-24 15:46:26 -04004959 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004960 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
4961 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
4962 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
4963 &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
4964 &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel.
John Asmuth614db982014-04-24 15:46:26 -04004965 }
4966
Bu Sun Kim65020912020-05-20 12:08:20 -07004967 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files.
John Asmuth614db982014-04-24 15:46:26 -04004968 projection: string, This parameter is deprecated and has no function.
4969 Allowed values
4970 BASIC - Deprecated
4971 FULL - Deprecated
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004972 revisionId: string, Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004973 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07004974 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004975 updateViewedDate: boolean, Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
John Asmuth614db982014-04-24 15:46:26 -04004976
4977Returns:
4978 An object of the form:
4979
4980 { # An notification channel used to watch for resource changes.
Bu Sun Kim65020912020-05-20 12:08:20 -07004981 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
4982 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
4983 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
4984 &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;.
4985 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
4986 &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
John Asmuth614db982014-04-24 15:46:26 -04004987 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004988 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
4989 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
4990 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
4991 &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
4992 &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel.
John Asmuth614db982014-04-24 15:46:26 -04004993 }</pre>
4994</div>
4995
Craig Citroe633be12015-03-02 13:40:36 -08004996<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07004997 <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 -08004998 <pre>Subscribe to changes on a file
4999
5000Args:
5001 fileId: string, The ID for the file in question. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005002 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -08005003 The object takes the form of:
5004
5005{ # An notification channel used to watch for resource changes.
Bu Sun Kim65020912020-05-20 12:08:20 -07005006 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
5007 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
5008 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
5009 &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;.
5010 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
5011 &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
Craig Citroe633be12015-03-02 13:40:36 -08005012 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005013 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
5014 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
5015 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
5016 &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
5017 &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel.
Craig Citroe633be12015-03-02 13:40:36 -08005018 }
5019
Bu Sun Kim65020912020-05-20 12:08:20 -07005020 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files.
Craig Citroe633be12015-03-02 13:40:36 -08005021 projection: string, This parameter is deprecated and has no function.
5022 Allowed values
5023 BASIC - Deprecated
5024 FULL - Deprecated
Nathaniel Manista4f877e52015-06-15 16:44:50 +00005025 revisionId: string, Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005026 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07005027 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005028 updateViewedDate: boolean, Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
Craig Citroe633be12015-03-02 13:40:36 -08005029
5030Returns:
5031 The media object as a string.
5032
5033 </pre>
5034</div>
5035
John Asmuth614db982014-04-24 15:46:26 -04005036</body></html>