blob: 5d6e96405ef6323fe6d21c952c351ea5ded39be1 [file] [log] [blame]
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="drive_v3.html">Drive API</a> . <a href="drive_v3.files.html">files</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070078 <code><a href="#copy">copy(fileId, body=None, enforceSingleParent=None, ignoreDefaultVisibility=None, keepRevisionForever=None, ocrLanguage=None, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070079<p class="firstline">Creates a copy of a file and applies any requested updates with patch semantics. Folders cannot be copied.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080080<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070081 <code><a href="#create">create(body=None, enforceSingleParent=None, ignoreDefaultVisibility=None, keepRevisionForever=None, ocrLanguage=None, supportsAllDrives=None, supportsTeamDrives=None, useContentAsIndexableText=None, media_body=None, media_mime_type=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080082<p class="firstline">Creates a new file.</p>
83<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070084 <code><a href="#delete">delete(fileId, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070085<p class="firstline">Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080086<p class="toc_element">
87 <code><a href="#emptyTrash">emptyTrash()</a></code></p>
88<p class="firstline">Permanently deletes all of the user's trashed files.</p>
89<p class="toc_element">
90 <code><a href="#export">export(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>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080092<p class="toc_element">
93 <code><a href="#export_media">export_media(fileId, mimeType)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080095<p class="toc_element">
96 <code><a href="#generateIds">generateIds(count=None, space=None)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -070097<p class="firstline">Generates a set of file IDs which can be provided in create or copy requests.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080098<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070099 <code><a href="#get">get(fileId, acknowledgeAbuse=None, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800100<p class="firstline">Gets a file's metadata or content by ID.</p>
101<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700102 <code><a href="#get_media">get_media(fileId, acknowledgeAbuse=None, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800103<p class="firstline">Gets a file's metadata or content by ID.</p>
104<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700105 <code><a href="#list">list(corpora=None, corpus=None, driveId=None, includeItemsFromAllDrives=None, includeTeamDriveItems=None, orderBy=None, pageSize=None, pageToken=None, q=None, spaces=None, supportsAllDrives=None, supportsTeamDrives=None, teamDriveId=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800106<p class="firstline">Lists or searches 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="#update">update(fileId, body=None, addParents=None, enforceSingleParent=None, keepRevisionForever=None, ocrLanguage=None, removeParents=None, supportsAllDrives=None, supportsTeamDrives=None, useContentAsIndexableText=None, media_body=None, media_mime_type=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700112<p class="firstline">Updates a file's metadata and/or content. This method supports patch semantics.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800113<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700114 <code><a href="#watch">watch(fileId, body=None, acknowledgeAbuse=None, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800115<p class="firstline">Subscribes to changes to a file</p>
116<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700117 <code><a href="#watch_media">watch_media(fileId, body=None, acknowledgeAbuse=None, supportsAllDrives=None, supportsTeamDrives=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800118<p class="firstline">Subscribes to changes to a file</p>
119<h3>Method Details</h3>
120<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700121 <code class="details" id="copy">copy(fileId, body=None, enforceSingleParent=None, ignoreDefaultVisibility=None, keepRevisionForever=None, ocrLanguage=None, supportsAllDrives=None, supportsTeamDrives=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700122 <pre>Creates a copy of a file and applies any requested updates with patch semantics. Folders cannot be copied.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800123
124Args:
125 fileId: string, The ID of the file. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700126 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800127 The object takes the form of:
128
129{ # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700130 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
131 # Entries with null values are cleared in update and copy requests.
132 &quot;a_key&quot;: &quot;A String&quot;,
133 },
134 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
135 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700136 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700137 &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.
138 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
139 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
140 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
141 &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.
142 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
143 &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.
144 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
145 &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.
146 &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.
147 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700148 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700149 &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.
150 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
151 &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.
152 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
153 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
154 &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.
155 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
156 &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.
157 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
158 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
159 &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.
160 &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.
161 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
162 &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.
163 &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.
164 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
165 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
166 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
167 &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.
168 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
169 },
170 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
171 &quot;indexableText&quot;: &quot;A String&quot;, # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements.
172 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
173 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
174 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
175 },
176 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700177 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
178 { # A restriction for accessing the content of the file.
179 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only.
180 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
181 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
182 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
183 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
184 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
185 &quot;me&quot;: True or False, # Whether this user is the requesting user.
186 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
187 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
188 },
189 &quot;restrictionTime&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
190 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
191 },
192 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700193 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
194 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
195 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
196 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
197 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
198 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
199 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
200 },
201 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
202 &quot;folderColorRgb&quot;: &quot;A String&quot;, # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
203 # If an unsupported color is specified, the closest color in the palette will be used instead.
204 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. This is only available for files with binary content in Google Drive.
205 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
206 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
207 &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.
208 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This is currently only available for files with binary content in Google Drive.
209 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
210 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
211 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
212 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
213 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
214 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
215 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
216 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
217 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
218 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
219 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
220 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
221 &quot;height&quot;: 42, # The height of the image in pixels.
222 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
223 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
224 &quot;location&quot;: { # Geographic location information stored in the image.
225 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
226 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
227 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
228 },
229 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
230 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
231 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
232 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
233 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
234 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
235 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
236 &quot;width&quot;: 42, # The width of the image in pixels.
237 },
238 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
239 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
240 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
241 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
242 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
243 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
244 &quot;me&quot;: True or False, # Whether this user is the requesting user.
245 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
246 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
247 },
248 &quot;md5Checksum&quot;: &quot;A String&quot;, # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.
249 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700250 # Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800251 # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700252 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
253 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
254 &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the file was modified by anyone (RFC 3339 date-time).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800255 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700256 &quot;name&quot;: &quot;A String&quot;, # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant.
257 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive.
258 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
259 &quot;owners&quot;: [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800260 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700261 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
262 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
263 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
264 &quot;me&quot;: True or False, # Whether this user is the requesting user.
265 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
266 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800267 },
268 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700269 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
270 # If not specified as part of a create request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list.
271 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800272 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700273 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
274 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700275 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700276 &quot;permissions&quot;: [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700277 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700278 &quot;allowFileDiscovery&quot;: True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
279 &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.
280 &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
281 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
282 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
283 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700284 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -0700285 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
286 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
287 &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
288 # - They can only be set on user and group permissions
289 # - The time must be in the future
290 # - The time cannot be more than a year in the future
291 &quot;id&quot;: &quot;A String&quot;, # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.
292 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
293 &quot;permissionDetails&quot;: [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700294 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700295 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
296 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
297 &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:
298 # - file
299 # - member
300 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700301 # - organizer
302 # - fileOrganizer
303 # - writer
304 # - commenter
305 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700306 },
307 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700308 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
309 &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700310 # - owner
311 # - organizer
312 # - fileOrganizer
313 # - writer
314 # - commenter
315 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700316 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
317 {
318 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
319 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
320 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
321 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
322 },
323 ],
324 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700325 # - user
326 # - group
327 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -0700328 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn&#x27;t extra information required for a anyone type.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700329 },
330 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700331 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
332 # Entries with null values are cleared in update and copy requests.
333 &quot;a_key&quot;: &quot;A String&quot;,
334 },
335 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.
336 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
337 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
338 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
339 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
340 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
341 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
342 &quot;me&quot;: True or False, # Whether this user is the requesting user.
343 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
344 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
345 },
346 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
347 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
348 &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.
349 },
350 &quot;size&quot;: &quot;A String&quot;, # The size of the file&#x27;s content in bytes. This is only applicable to files with binary content in Google Drive.
351 &quot;spaces&quot;: [ # The list of spaces which contain the file. The currently supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
352 &quot;A String&quot;,
353 ],
354 &quot;starred&quot;: True or False, # Whether the user has starred the file.
355 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
356 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content.
357 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700358 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700359 &quot;trashedTime&quot;: &quot;A String&quot;, # The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives.
360 &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.
361 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
362 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
363 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
364 &quot;me&quot;: True or False, # Whether this user is the requesting user.
365 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
366 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
367 },
368 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.
369 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
370 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
371 &quot;height&quot;: 42, # The height of the video in pixels.
372 &quot;width&quot;: 42, # The width of the video in pixels.
373 },
374 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
375 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
376 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
377 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.
378 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
379 &quot;writersCanShare&quot;: True or False, # Whether users with only writer permission can modify the file&#x27;s permissions. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800380}
381
Dan O'Mearadd494642020-05-01 07:42:23 -0700382 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 Kim65020912020-05-20 12:08:20 -0700383 ignoreDefaultVisibility: boolean, Whether to ignore the domain&#x27;s default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders.
384 keepRevisionForever: boolean, Whether to set the &#x27;keepForever&#x27; field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions.
Dan O'Mearadd494642020-05-01 07:42:23 -0700385 ocrLanguage: string, A language hint for OCR processing during image import (ISO 639-1 code).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700386 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700387 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800388
389Returns:
390 An object of the form:
391
392 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700393 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
394 # Entries with null values are cleared in update and copy requests.
395 &quot;a_key&quot;: &quot;A String&quot;,
396 },
397 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
398 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700399 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700400 &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.
401 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
402 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
403 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
404 &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.
405 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
406 &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.
407 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
408 &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.
409 &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.
410 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700411 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700412 &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.
413 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
414 &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.
415 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
416 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
417 &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.
418 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
419 &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.
420 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
421 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
422 &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.
423 &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.
424 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
425 &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.
426 &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.
427 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
428 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
429 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
430 &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.
431 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
432 },
433 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
434 &quot;indexableText&quot;: &quot;A String&quot;, # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements.
435 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
436 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
437 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
438 },
439 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700440 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
441 { # A restriction for accessing the content of the file.
442 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only.
443 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
444 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
445 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
446 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
447 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
448 &quot;me&quot;: True or False, # Whether this user is the requesting user.
449 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
450 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
451 },
452 &quot;restrictionTime&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
453 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
454 },
455 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700456 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
457 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
458 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
459 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
460 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
461 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
462 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
463 },
464 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
465 &quot;folderColorRgb&quot;: &quot;A String&quot;, # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
466 # If an unsupported color is specified, the closest color in the palette will be used instead.
467 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. This is only available for files with binary content in Google Drive.
468 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
469 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
470 &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.
471 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This is currently only available for files with binary content in Google Drive.
472 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
473 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
474 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
475 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
476 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
477 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
478 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
479 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
480 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
481 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
482 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
483 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
484 &quot;height&quot;: 42, # The height of the image in pixels.
485 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
486 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
487 &quot;location&quot;: { # Geographic location information stored in the image.
488 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
489 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
490 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
491 },
492 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
493 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
494 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
495 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
496 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
497 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
498 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
499 &quot;width&quot;: 42, # The width of the image in pixels.
500 },
501 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
502 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
503 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
504 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
505 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
506 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
507 &quot;me&quot;: True or False, # Whether this user is the requesting user.
508 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
509 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
510 },
511 &quot;md5Checksum&quot;: &quot;A String&quot;, # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.
512 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700513 # Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800514 # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700515 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
516 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
517 &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the file was modified by anyone (RFC 3339 date-time).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800518 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700519 &quot;name&quot;: &quot;A String&quot;, # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant.
520 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive.
521 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
522 &quot;owners&quot;: [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800523 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700524 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
525 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
526 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
527 &quot;me&quot;: True or False, # Whether this user is the requesting user.
528 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
529 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800530 },
531 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700532 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
533 # If not specified as part of a create request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list.
534 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800535 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700536 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
537 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700538 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700539 &quot;permissions&quot;: [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700540 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700541 &quot;allowFileDiscovery&quot;: True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
542 &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.
543 &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
544 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
545 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
546 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700547 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -0700548 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
549 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
550 &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
551 # - They can only be set on user and group permissions
552 # - The time must be in the future
553 # - The time cannot be more than a year in the future
554 &quot;id&quot;: &quot;A String&quot;, # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.
555 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
556 &quot;permissionDetails&quot;: [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700557 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700558 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
559 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
560 &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:
561 # - file
562 # - member
563 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700564 # - organizer
565 # - fileOrganizer
566 # - writer
567 # - commenter
568 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700569 },
570 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700571 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
572 &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700573 # - owner
574 # - organizer
575 # - fileOrganizer
576 # - writer
577 # - commenter
578 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700579 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
580 {
581 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
582 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
583 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
584 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
585 },
586 ],
587 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700588 # - user
589 # - group
590 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -0700591 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn&#x27;t extra information required for a anyone type.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700592 },
593 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700594 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
595 # Entries with null values are cleared in update and copy requests.
596 &quot;a_key&quot;: &quot;A String&quot;,
597 },
598 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.
599 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
600 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
601 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
602 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
603 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
604 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
605 &quot;me&quot;: True or False, # Whether this user is the requesting user.
606 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
607 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
608 },
609 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
610 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
611 &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.
612 },
613 &quot;size&quot;: &quot;A String&quot;, # The size of the file&#x27;s content in bytes. This is only applicable to files with binary content in Google Drive.
614 &quot;spaces&quot;: [ # The list of spaces which contain the file. The currently supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
615 &quot;A String&quot;,
616 ],
617 &quot;starred&quot;: True or False, # Whether the user has starred the file.
618 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
619 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content.
620 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700621 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700622 &quot;trashedTime&quot;: &quot;A String&quot;, # The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives.
623 &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.
624 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
625 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
626 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
627 &quot;me&quot;: True or False, # Whether this user is the requesting user.
628 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
629 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
630 },
631 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.
632 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
633 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
634 &quot;height&quot;: 42, # The height of the video in pixels.
635 &quot;width&quot;: 42, # The width of the video in pixels.
636 },
637 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
638 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
639 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
640 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.
641 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
642 &quot;writersCanShare&quot;: True or False, # Whether users with only writer permission can modify the file&#x27;s permissions. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800643 }</pre>
644</div>
645
646<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700647 <code class="details" id="create">create(body=None, enforceSingleParent=None, ignoreDefaultVisibility=None, keepRevisionForever=None, ocrLanguage=None, supportsAllDrives=None, supportsTeamDrives=None, useContentAsIndexableText=None, media_body=None, media_mime_type=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800648 <pre>Creates a new file.
649
650Args:
651 body: object, The request body.
652 The object takes the form of:
653
654{ # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700655 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
656 # Entries with null values are cleared in update and copy requests.
657 &quot;a_key&quot;: &quot;A String&quot;,
658 },
659 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
660 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700661 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700662 &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.
663 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
664 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
665 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
666 &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.
667 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
668 &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.
669 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
670 &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.
671 &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.
672 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700673 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700674 &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.
675 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
676 &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.
677 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
678 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
679 &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.
680 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
681 &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.
682 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
683 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
684 &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.
685 &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.
686 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
687 &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.
688 &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.
689 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
690 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
691 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
692 &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.
693 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
694 },
695 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
696 &quot;indexableText&quot;: &quot;A String&quot;, # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements.
697 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
698 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
699 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
700 },
701 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700702 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
703 { # A restriction for accessing the content of the file.
704 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only.
705 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
706 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
707 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
708 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
709 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
710 &quot;me&quot;: True or False, # Whether this user is the requesting user.
711 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
712 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
713 },
714 &quot;restrictionTime&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
715 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
716 },
717 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700718 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
719 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
720 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
721 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
722 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
723 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
724 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
725 },
726 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
727 &quot;folderColorRgb&quot;: &quot;A String&quot;, # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
728 # If an unsupported color is specified, the closest color in the palette will be used instead.
729 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. This is only available for files with binary content in Google Drive.
730 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
731 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
732 &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.
733 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This is currently only available for files with binary content in Google Drive.
734 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
735 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
736 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
737 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
738 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
739 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
740 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
741 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
742 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
743 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
744 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
745 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
746 &quot;height&quot;: 42, # The height of the image in pixels.
747 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
748 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
749 &quot;location&quot;: { # Geographic location information stored in the image.
750 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
751 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
752 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
753 },
754 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
755 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
756 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
757 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
758 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
759 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
760 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
761 &quot;width&quot;: 42, # The width of the image in pixels.
762 },
763 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
764 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
765 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
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. This may not be present in certain contexts if the user has not made their email address visible to the requester.
768 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
769 &quot;me&quot;: True or False, # Whether this user is the requesting user.
770 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
771 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
772 },
773 &quot;md5Checksum&quot;: &quot;A String&quot;, # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.
774 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700775 # Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800776 # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700777 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
778 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
779 &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the file was modified by anyone (RFC 3339 date-time).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800780 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700781 &quot;name&quot;: &quot;A String&quot;, # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant.
782 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive.
783 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
784 &quot;owners&quot;: [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800785 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700786 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
787 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
788 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
789 &quot;me&quot;: True or False, # Whether this user is the requesting user.
790 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
791 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800792 },
793 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700794 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
795 # If not specified as part of a create request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list.
796 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800797 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700798 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
799 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700800 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700801 &quot;permissions&quot;: [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700802 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700803 &quot;allowFileDiscovery&quot;: True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
804 &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.
805 &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
806 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
807 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
808 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700809 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -0700810 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
811 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
812 &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
813 # - They can only be set on user and group permissions
814 # - The time must be in the future
815 # - The time cannot be more than a year in the future
816 &quot;id&quot;: &quot;A String&quot;, # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.
817 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
818 &quot;permissionDetails&quot;: [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700819 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700820 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
821 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
822 &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:
823 # - file
824 # - member
825 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700826 # - organizer
827 # - fileOrganizer
828 # - writer
829 # - commenter
830 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700831 },
832 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700833 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
834 &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700835 # - owner
836 # - organizer
837 # - fileOrganizer
838 # - writer
839 # - commenter
840 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700841 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
842 {
843 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
844 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
845 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
846 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
847 },
848 ],
849 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700850 # - user
851 # - group
852 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -0700853 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn&#x27;t extra information required for a anyone type.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700854 },
855 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700856 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
857 # Entries with null values are cleared in update and copy requests.
858 &quot;a_key&quot;: &quot;A String&quot;,
859 },
860 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.
861 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
862 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
863 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
864 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
865 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
866 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
867 &quot;me&quot;: True or False, # Whether this user is the requesting user.
868 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
869 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
870 },
871 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
872 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
873 &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.
874 },
875 &quot;size&quot;: &quot;A String&quot;, # The size of the file&#x27;s content in bytes. This is only applicable to files with binary content in Google Drive.
876 &quot;spaces&quot;: [ # The list of spaces which contain the file. The currently supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
877 &quot;A String&quot;,
878 ],
879 &quot;starred&quot;: True or False, # Whether the user has starred the file.
880 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
881 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content.
882 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700883 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700884 &quot;trashedTime&quot;: &quot;A String&quot;, # The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives.
885 &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.
886 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
887 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
888 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
889 &quot;me&quot;: True or False, # Whether this user is the requesting user.
890 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
891 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
892 },
893 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.
894 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
895 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
896 &quot;height&quot;: 42, # The height of the video in pixels.
897 &quot;width&quot;: 42, # The width of the video in pixels.
898 },
899 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
900 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
901 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
902 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.
903 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
904 &quot;writersCanShare&quot;: True or False, # Whether users with only writer permission can modify the file&#x27;s permissions. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800905}
906
Dan O'Mearadd494642020-05-01 07:42:23 -0700907 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 Kim65020912020-05-20 12:08:20 -0700908 ignoreDefaultVisibility: boolean, Whether to ignore the domain&#x27;s default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders.
909 keepRevisionForever: boolean, Whether to set the &#x27;keepForever&#x27; field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400910 ocrLanguage: string, A language hint for OCR processing during image import (ISO 639-1 code).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700911 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700912 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
913 useContentAsIndexableText: boolean, Whether to use the uploaded content as indexable text.
914 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700915 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800916
917Returns:
918 An object of the form:
919
920 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700921 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
922 # Entries with null values are cleared in update and copy requests.
923 &quot;a_key&quot;: &quot;A String&quot;,
924 },
925 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
926 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700927 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700928 &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.
929 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
930 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
931 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
932 &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.
933 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
934 &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.
935 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
936 &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.
937 &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.
938 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700939 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700940 &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.
941 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
942 &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.
943 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
944 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
945 &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.
946 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
947 &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.
948 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
949 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
950 &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.
951 &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.
952 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
953 &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.
954 &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.
955 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
956 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
957 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
958 &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.
959 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
960 },
961 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
962 &quot;indexableText&quot;: &quot;A String&quot;, # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements.
963 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
964 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
965 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
966 },
967 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700968 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
969 { # A restriction for accessing the content of the file.
970 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only.
971 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
972 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
973 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
974 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
975 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
976 &quot;me&quot;: True or False, # Whether this user is the requesting user.
977 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
978 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
979 },
980 &quot;restrictionTime&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
981 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
982 },
983 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700984 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
985 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
986 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
987 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
988 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
989 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
990 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
991 },
992 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
993 &quot;folderColorRgb&quot;: &quot;A String&quot;, # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
994 # If an unsupported color is specified, the closest color in the palette will be used instead.
995 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. This is only available for files with binary content in Google Drive.
996 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
997 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
998 &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.
999 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This is currently only available for files with binary content in Google Drive.
1000 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
1001 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1002 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
1003 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1004 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1005 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1006 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1007 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1008 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1009 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1010 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1011 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1012 &quot;height&quot;: 42, # The height of the image in pixels.
1013 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1014 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1015 &quot;location&quot;: { # Geographic location information stored in the image.
1016 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1017 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1018 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1019 },
1020 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1021 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1022 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1023 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1024 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1025 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
1026 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1027 &quot;width&quot;: 42, # The width of the image in pixels.
1028 },
1029 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1030 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
1031 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
1032 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1033 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1034 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1035 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1036 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1037 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1038 },
1039 &quot;md5Checksum&quot;: &quot;A String&quot;, # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.
1040 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001041 # Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001042 # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001043 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
1044 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
1045 &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the file was modified by anyone (RFC 3339 date-time).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001046 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001047 &quot;name&quot;: &quot;A String&quot;, # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant.
1048 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive.
1049 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
1050 &quot;owners&quot;: [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001051 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001052 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1053 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1054 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1055 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1056 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1057 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001058 },
1059 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001060 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
1061 # If not specified as part of a create request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list.
1062 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001063 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001064 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1065 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001066 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001067 &quot;permissions&quot;: [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001068 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001069 &quot;allowFileDiscovery&quot;: True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
1070 &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.
1071 &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
1072 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
1073 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
1074 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001075 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -07001076 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
1077 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
1078 &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
1079 # - They can only be set on user and group permissions
1080 # - The time must be in the future
1081 # - The time cannot be more than a year in the future
1082 &quot;id&quot;: &quot;A String&quot;, # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.
1083 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
1084 &quot;permissionDetails&quot;: [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001085 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001086 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1087 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1088 &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:
1089 # - file
1090 # - member
1091 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001092 # - organizer
1093 # - fileOrganizer
1094 # - writer
1095 # - commenter
1096 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001097 },
1098 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001099 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1100 &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001101 # - owner
1102 # - organizer
1103 # - fileOrganizer
1104 # - writer
1105 # - commenter
1106 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07001107 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1108 {
1109 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1110 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1111 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1112 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1113 },
1114 ],
1115 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001116 # - user
1117 # - group
1118 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -07001119 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn&#x27;t extra information required for a anyone type.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001120 },
1121 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001122 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
1123 # Entries with null values are cleared in update and copy requests.
1124 &quot;a_key&quot;: &quot;A String&quot;,
1125 },
1126 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.
1127 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
1128 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
1129 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
1130 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1131 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1132 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1133 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1134 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1135 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1136 },
1137 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
1138 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
1139 &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.
1140 },
1141 &quot;size&quot;: &quot;A String&quot;, # The size of the file&#x27;s content in bytes. This is only applicable to files with binary content in Google Drive.
1142 &quot;spaces&quot;: [ # The list of spaces which contain the file. The currently supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
1143 &quot;A String&quot;,
1144 ],
1145 &quot;starred&quot;: True or False, # Whether the user has starred the file.
1146 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
1147 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content.
1148 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001149 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001150 &quot;trashedTime&quot;: &quot;A String&quot;, # The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives.
1151 &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.
1152 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1153 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1154 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1155 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1156 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1157 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1158 },
1159 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.
1160 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
1161 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
1162 &quot;height&quot;: 42, # The height of the video in pixels.
1163 &quot;width&quot;: 42, # The width of the video in pixels.
1164 },
1165 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
1166 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
1167 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
1168 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.
1169 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
1170 &quot;writersCanShare&quot;: True or False, # Whether users with only writer permission can modify the file&#x27;s permissions. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001171 }</pre>
1172</div>
1173
1174<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001175 <code class="details" id="delete">delete(fileId, supportsAllDrives=None, supportsTeamDrives=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001176 <pre>Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001177
1178Args:
1179 fileId: string, The ID of the file. (required)
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001180 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001181 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001182</pre>
1183</div>
1184
1185<div class="method">
1186 <code class="details" id="emptyTrash">emptyTrash()</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07001187 <pre>Permanently deletes all of the user&#x27;s trashed files.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001188
1189Args:
1190</pre>
1191</div>
1192
1193<div class="method">
1194 <code class="details" id="export">export(fileId, mimeType)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001195 <pre>Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001196
1197Args:
1198 fileId: string, The ID of the file. (required)
1199 mimeType: string, The MIME type of the format requested for this export. (required)
1200</pre>
1201</div>
1202
1203<div class="method">
1204 <code class="details" id="export_media">export_media(fileId, mimeType)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001205 <pre>Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001206
1207Args:
1208 fileId: string, The ID of the file. (required)
1209 mimeType: string, The MIME type of the format requested for this export. (required)
1210</pre>
1211</div>
1212
1213<div class="method">
1214 <code class="details" id="generateIds">generateIds(count=None, space=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -07001215 <pre>Generates a set of file IDs which can be provided in create or copy requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001216
1217Args:
1218 count: integer, The number of IDs to return.
Bu Sun Kim65020912020-05-20 12:08:20 -07001219 space: string, The space in which the IDs can be used to create new files. Supported values are &#x27;drive&#x27; and &#x27;appDataFolder&#x27;.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001220
1221Returns:
1222 An object of the form:
1223
1224 { # A list of generated file IDs which can be provided in create requests.
Bu Sun Kim65020912020-05-20 12:08:20 -07001225 &quot;ids&quot;: [ # The IDs generated for the requesting user in the specified space.
1226 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001227 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001228 &quot;kind&quot;: &quot;drive#generatedIds&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#generatedIds&quot;.
1229 &quot;space&quot;: &quot;A String&quot;, # The type of file that can be created with these IDs.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001230 }</pre>
1231</div>
1232
1233<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001234 <code class="details" id="get">get(fileId, acknowledgeAbuse=None, supportsAllDrives=None, supportsTeamDrives=None)</code>
1235 <pre>Gets a file&#x27;s metadata or content by ID.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001236
1237Args:
1238 fileId: string, The ID of the file. (required)
1239 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001240 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001241 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001242
1243Returns:
1244 An object of the form:
1245
1246 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001247 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
1248 # Entries with null values are cleared in update and copy requests.
1249 &quot;a_key&quot;: &quot;A String&quot;,
1250 },
1251 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
1252 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001253 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001254 &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.
1255 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1256 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
1257 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
1258 &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.
1259 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
1260 &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.
1261 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
1262 &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.
1263 &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.
1264 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001265 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001266 &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.
1267 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
1268 &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.
1269 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1270 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1271 &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.
1272 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1273 &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.
1274 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
1275 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1276 &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.
1277 &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.
1278 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
1279 &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.
1280 &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.
1281 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
1282 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
1283 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
1284 &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.
1285 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
1286 },
1287 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
1288 &quot;indexableText&quot;: &quot;A String&quot;, # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements.
1289 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
1290 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
1291 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
1292 },
1293 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001294 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
1295 { # A restriction for accessing the content of the file.
1296 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only.
1297 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
1298 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
1299 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1300 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1301 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1302 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1303 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1304 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1305 },
1306 &quot;restrictionTime&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
1307 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
1308 },
1309 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001310 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1311 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
1312 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
1313 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1314 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
1315 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
1316 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
1317 },
1318 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
1319 &quot;folderColorRgb&quot;: &quot;A String&quot;, # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
1320 # If an unsupported color is specified, the closest color in the palette will be used instead.
1321 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. This is only available for files with binary content in Google Drive.
1322 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
1323 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1324 &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.
1325 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This is currently only available for files with binary content in Google Drive.
1326 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
1327 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1328 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
1329 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1330 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1331 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1332 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1333 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1334 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1335 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1336 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1337 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1338 &quot;height&quot;: 42, # The height of the image in pixels.
1339 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1340 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1341 &quot;location&quot;: { # Geographic location information stored in the image.
1342 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1343 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1344 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1345 },
1346 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1347 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1348 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1349 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1350 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1351 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
1352 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1353 &quot;width&quot;: 42, # The width of the image in pixels.
1354 },
1355 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1356 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
1357 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
1358 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1359 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1360 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1361 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1362 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1363 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1364 },
1365 &quot;md5Checksum&quot;: &quot;A String&quot;, # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.
1366 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001367 # Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001368 # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001369 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
1370 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
1371 &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the file was modified by anyone (RFC 3339 date-time).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001372 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001373 &quot;name&quot;: &quot;A String&quot;, # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant.
1374 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive.
1375 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
1376 &quot;owners&quot;: [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001377 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001378 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1379 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1380 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1381 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1382 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1383 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001384 },
1385 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001386 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
1387 # If not specified as part of a create request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list.
1388 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001389 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001390 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1391 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001392 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001393 &quot;permissions&quot;: [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001394 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001395 &quot;allowFileDiscovery&quot;: True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
1396 &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.
1397 &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
1398 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
1399 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
1400 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001401 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -07001402 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
1403 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
1404 &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
1405 # - They can only be set on user and group permissions
1406 # - The time must be in the future
1407 # - The time cannot be more than a year in the future
1408 &quot;id&quot;: &quot;A String&quot;, # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.
1409 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
1410 &quot;permissionDetails&quot;: [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001411 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001412 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1413 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1414 &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:
1415 # - file
1416 # - member
1417 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001418 # - organizer
1419 # - fileOrganizer
1420 # - writer
1421 # - commenter
1422 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001423 },
1424 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001425 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1426 &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001427 # - owner
1428 # - organizer
1429 # - fileOrganizer
1430 # - writer
1431 # - commenter
1432 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07001433 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1434 {
1435 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1436 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1437 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1438 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1439 },
1440 ],
1441 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001442 # - user
1443 # - group
1444 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -07001445 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn&#x27;t extra information required for a anyone type.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001446 },
1447 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001448 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
1449 # Entries with null values are cleared in update and copy requests.
1450 &quot;a_key&quot;: &quot;A String&quot;,
1451 },
1452 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.
1453 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
1454 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
1455 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
1456 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1457 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1458 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1459 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1460 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1461 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1462 },
1463 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
1464 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
1465 &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.
1466 },
1467 &quot;size&quot;: &quot;A String&quot;, # The size of the file&#x27;s content in bytes. This is only applicable to files with binary content in Google Drive.
1468 &quot;spaces&quot;: [ # The list of spaces which contain the file. The currently supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
1469 &quot;A String&quot;,
1470 ],
1471 &quot;starred&quot;: True or False, # Whether the user has starred the file.
1472 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
1473 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content.
1474 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001475 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001476 &quot;trashedTime&quot;: &quot;A String&quot;, # The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives.
1477 &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.
1478 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1479 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1480 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1481 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1482 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1483 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1484 },
1485 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.
1486 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
1487 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
1488 &quot;height&quot;: 42, # The height of the video in pixels.
1489 &quot;width&quot;: 42, # The width of the video in pixels.
1490 },
1491 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
1492 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
1493 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
1494 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.
1495 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
1496 &quot;writersCanShare&quot;: True or False, # Whether users with only writer permission can modify the file&#x27;s permissions. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001497 }</pre>
1498</div>
1499
1500<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001501 <code class="details" id="get_media">get_media(fileId, acknowledgeAbuse=None, supportsAllDrives=None, supportsTeamDrives=None)</code>
1502 <pre>Gets a file&#x27;s metadata or content by ID.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001503
1504Args:
1505 fileId: string, The ID of the file. (required)
1506 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001507 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001508 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001509
1510Returns:
1511 The media object as a string.
1512
1513 </pre>
1514</div>
1515
1516<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001517 <code class="details" id="list">list(corpora=None, corpus=None, driveId=None, includeItemsFromAllDrives=None, includeTeamDriveItems=None, orderBy=None, pageSize=None, pageToken=None, q=None, spaces=None, supportsAllDrives=None, supportsTeamDrives=None, teamDriveId=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001518 <pre>Lists or searches files.
1519
1520Args:
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001521 corpora: string, Groupings of files to which the query applies. Supported groupings are: &#x27;user&#x27; (files created by, opened by, or shared directly with the user), &#x27;drive&#x27; (files in the specified shared drive as indicated by the &#x27;driveId&#x27;), &#x27;domain&#x27; (files shared to the user&#x27;s domain), and &#x27;allDrives&#x27; (A combination of &#x27;user&#x27; and &#x27;drive&#x27; for all drives where the user is a member). When able, use &#x27;user&#x27; or &#x27;drive&#x27;, instead of &#x27;allDrives&#x27;, for efficiency.
Bu Sun Kim65020912020-05-20 12:08:20 -07001522 corpus: string, The source of files to list. Deprecated: use &#x27;corpora&#x27; instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001523 Allowed values
Bu Sun Kim65020912020-05-20 12:08:20 -07001524 domain - Files shared to the user&#x27;s domain.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001525 user - Files owned by or shared to the user. If a user has permissions on a Shared Drive, the files inside it won&#x27;t be retrieved unless the user has created, opened, or shared the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001526 driveId: string, ID of the shared drive to search.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001527 includeItemsFromAllDrives: boolean, Whether both My Drive and shared drive items should be included in results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001528 includeTeamDriveItems: boolean, Deprecated use includeItemsFromAllDrives instead.
Bu Sun Kim65020912020-05-20 12:08:20 -07001529 orderBy: string, A comma-separated list of sort keys. Valid keys are &#x27;createdTime&#x27;, &#x27;folder&#x27;, &#x27;modifiedByMeTime&#x27;, &#x27;modifiedTime&#x27;, &#x27;name&#x27;, &#x27;name_natural&#x27;, &#x27;quotaBytesUsed&#x27;, &#x27;recency&#x27;, &#x27;sharedWithMeTime&#x27;, &#x27;starred&#x27;, and &#x27;viewedByMeTime&#x27;. Each key sorts ascending by default, but may be reversed with the &#x27;desc&#x27; modifier. Example usage: ?orderBy=folder,modifiedTime desc,name. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.
1530 pageSize: integer, The maximum number of files to return per page. Partial or empty result pages are possible even before the end of the files list has been reached.
1531 pageToken: string, The token for continuing a previous list request on the next page. This should be set to the value of &#x27;nextPageToken&#x27; from the previous response.
1532 q: string, A query for filtering the file results. See the &quot;Search for Files&quot; guide for supported syntax.
1533 spaces: string, A comma-separated list of spaces to query within the corpus. Supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001534 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001535 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
1536 teamDriveId: string, Deprecated use driveId instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001537
1538Returns:
1539 An object of the form:
1540
1541 { # A list of files.
Bu Sun Kim65020912020-05-20 12:08:20 -07001542 &quot;files&quot;: [ # The list of files. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001543 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001544 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
1545 # Entries with null values are cleared in update and copy requests.
1546 &quot;a_key&quot;: &quot;A String&quot;,
1547 },
1548 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
1549 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001550 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001551 &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.
1552 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1553 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
1554 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
1555 &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.
1556 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
1557 &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.
1558 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
1559 &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.
1560 &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.
1561 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001562 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001563 &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.
1564 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
1565 &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.
1566 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1567 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1568 &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.
1569 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1570 &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.
1571 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
1572 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1573 &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.
1574 &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.
1575 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
1576 &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.
1577 &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.
1578 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
1579 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
1580 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
1581 &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.
1582 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
1583 },
1584 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
1585 &quot;indexableText&quot;: &quot;A String&quot;, # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements.
1586 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
1587 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
1588 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
1589 },
1590 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001591 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
1592 { # A restriction for accessing the content of the file.
1593 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only.
1594 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
1595 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
1596 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1597 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1598 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1599 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1600 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1601 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1602 },
1603 &quot;restrictionTime&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
1604 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
1605 },
1606 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001607 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1608 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
1609 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
1610 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1611 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
1612 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
1613 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
1614 },
1615 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
1616 &quot;folderColorRgb&quot;: &quot;A String&quot;, # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
1617 # If an unsupported color is specified, the closest color in the palette will be used instead.
1618 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. This is only available for files with binary content in Google Drive.
1619 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
1620 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1621 &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.
1622 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This is currently only available for files with binary content in Google Drive.
1623 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
1624 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1625 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
1626 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1627 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1628 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1629 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1630 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1631 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1632 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1633 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1634 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1635 &quot;height&quot;: 42, # The height of the image in pixels.
1636 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1637 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1638 &quot;location&quot;: { # Geographic location information stored in the image.
1639 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1640 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1641 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1642 },
1643 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1644 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1645 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1646 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1647 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1648 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
1649 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1650 &quot;width&quot;: 42, # The width of the image in pixels.
1651 },
1652 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1653 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
1654 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
1655 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1656 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1657 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1658 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1659 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1660 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1661 },
1662 &quot;md5Checksum&quot;: &quot;A String&quot;, # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.
1663 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001664 # Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001665 # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001666 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
1667 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
1668 &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the file was modified by anyone (RFC 3339 date-time).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001669 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001670 &quot;name&quot;: &quot;A String&quot;, # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant.
1671 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive.
1672 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
1673 &quot;owners&quot;: [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001674 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001675 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1676 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1677 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1678 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1679 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1680 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001681 },
1682 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001683 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
1684 # If not specified as part of a create request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list.
1685 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001686 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001687 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1688 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001689 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001690 &quot;permissions&quot;: [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001691 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001692 &quot;allowFileDiscovery&quot;: True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
1693 &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.
1694 &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
1695 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
1696 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
1697 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001698 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -07001699 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
1700 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
1701 &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
1702 # - They can only be set on user and group permissions
1703 # - The time must be in the future
1704 # - The time cannot be more than a year in the future
1705 &quot;id&quot;: &quot;A String&quot;, # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.
1706 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
1707 &quot;permissionDetails&quot;: [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001708 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001709 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1710 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1711 &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:
1712 # - file
1713 # - member
1714 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001715 # - organizer
1716 # - fileOrganizer
1717 # - writer
1718 # - commenter
1719 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001720 },
1721 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001722 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1723 &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001724 # - owner
1725 # - organizer
1726 # - fileOrganizer
1727 # - writer
1728 # - commenter
1729 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07001730 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1731 {
1732 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1733 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1734 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1735 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1736 },
1737 ],
1738 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001739 # - user
1740 # - group
1741 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -07001742 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn&#x27;t extra information required for a anyone type.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001743 },
1744 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001745 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
1746 # Entries with null values are cleared in update and copy requests.
1747 &quot;a_key&quot;: &quot;A String&quot;,
1748 },
1749 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.
1750 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
1751 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
1752 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
1753 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1754 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1755 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1756 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1757 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1758 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1759 },
1760 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
1761 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
1762 &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.
1763 },
1764 &quot;size&quot;: &quot;A String&quot;, # The size of the file&#x27;s content in bytes. This is only applicable to files with binary content in Google Drive.
1765 &quot;spaces&quot;: [ # The list of spaces which contain the file. The currently supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
1766 &quot;A String&quot;,
1767 ],
1768 &quot;starred&quot;: True or False, # Whether the user has starred the file.
1769 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
1770 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content.
1771 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001772 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001773 &quot;trashedTime&quot;: &quot;A String&quot;, # The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives.
1774 &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.
1775 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1776 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1777 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1778 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1779 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1780 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1781 },
1782 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.
1783 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
1784 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
1785 &quot;height&quot;: 42, # The height of the video in pixels.
1786 &quot;width&quot;: 42, # The width of the video in pixels.
1787 },
1788 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
1789 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
1790 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
1791 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.
1792 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
1793 &quot;writersCanShare&quot;: True or False, # Whether users with only writer permission can modify the file&#x27;s permissions. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001794 },
1795 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001796 &quot;incompleteSearch&quot;: True or False, # Whether the search process was incomplete. If true, then some search results may be missing, since all documents were not searched. This may occur when searching multiple drives with the &quot;allDrives&quot; corpora, but all corpora could not be searched. When this happens, it is suggested that clients narrow their query by choosing a different corpus such as &quot;user&quot; or &quot;drive&quot;.
1797 &quot;kind&quot;: &quot;drive#fileList&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#fileList&quot;.
1798 &quot;nextPageToken&quot;: &quot;A String&quot;, # The page token for the next page of files. This will be absent if the end of the files list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001799 }</pre>
1800</div>
1801
1802<div class="method">
1803 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1804 <pre>Retrieves the next page of results.
1805
1806Args:
1807 previous_request: The request for the previous page. (required)
1808 previous_response: The response from the request for the previous page. (required)
1809
1810Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001811 A request object that you can call &#x27;execute()&#x27; on to request the next
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001812 page. Returns None if there are no more items in the collection.
1813 </pre>
1814</div>
1815
1816<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001817 <code class="details" id="update">update(fileId, body=None, addParents=None, enforceSingleParent=None, keepRevisionForever=None, ocrLanguage=None, removeParents=None, supportsAllDrives=None, supportsTeamDrives=None, useContentAsIndexableText=None, media_body=None, media_mime_type=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001818 <pre>Updates a file&#x27;s metadata and/or content. This method supports patch semantics.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001819
1820Args:
1821 fileId: string, The ID of the file. (required)
1822 body: object, The request body.
1823 The object takes the form of:
1824
1825{ # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001826 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
1827 # Entries with null values are cleared in update and copy requests.
1828 &quot;a_key&quot;: &quot;A String&quot;,
1829 },
1830 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
1831 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001832 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001833 &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.
1834 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1835 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
1836 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
1837 &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.
1838 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
1839 &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.
1840 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
1841 &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.
1842 &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.
1843 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001844 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001845 &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.
1846 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
1847 &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.
1848 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1849 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1850 &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.
1851 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1852 &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.
1853 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
1854 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1855 &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.
1856 &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.
1857 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
1858 &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.
1859 &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.
1860 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
1861 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
1862 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
1863 &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.
1864 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
1865 },
1866 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
1867 &quot;indexableText&quot;: &quot;A String&quot;, # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements.
1868 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
1869 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
1870 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
1871 },
1872 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001873 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
1874 { # A restriction for accessing the content of the file.
1875 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only.
1876 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
1877 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
1878 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1879 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1880 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1881 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1882 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1883 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1884 },
1885 &quot;restrictionTime&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
1886 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
1887 },
1888 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001889 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1890 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
1891 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
1892 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1893 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
1894 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
1895 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
1896 },
1897 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
1898 &quot;folderColorRgb&quot;: &quot;A String&quot;, # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
1899 # If an unsupported color is specified, the closest color in the palette will be used instead.
1900 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. This is only available for files with binary content in Google Drive.
1901 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
1902 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1903 &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.
1904 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This is currently only available for files with binary content in Google Drive.
1905 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
1906 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1907 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
1908 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1909 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1910 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1911 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1912 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1913 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1914 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1915 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1916 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1917 &quot;height&quot;: 42, # The height of the image in pixels.
1918 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1919 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1920 &quot;location&quot;: { # Geographic location information stored in the image.
1921 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1922 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1923 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1924 },
1925 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1926 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1927 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1928 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1929 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1930 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
1931 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1932 &quot;width&quot;: 42, # The width of the image in pixels.
1933 },
1934 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1935 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
1936 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
1937 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1938 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1939 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1940 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1941 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1942 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1943 },
1944 &quot;md5Checksum&quot;: &quot;A String&quot;, # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.
1945 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001946 # Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001947 # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001948 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
1949 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
1950 &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the file was modified by anyone (RFC 3339 date-time).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001951 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001952 &quot;name&quot;: &quot;A String&quot;, # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant.
1953 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive.
1954 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
1955 &quot;owners&quot;: [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001956 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001957 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1958 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1959 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1960 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1961 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1962 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001963 },
1964 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001965 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
1966 # If not specified as part of a create request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list.
1967 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001968 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001969 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1970 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001971 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001972 &quot;permissions&quot;: [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001973 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001974 &quot;allowFileDiscovery&quot;: True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
1975 &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.
1976 &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
1977 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
1978 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
1979 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001980 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -07001981 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
1982 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
1983 &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
1984 # - They can only be set on user and group permissions
1985 # - The time must be in the future
1986 # - The time cannot be more than a year in the future
1987 &quot;id&quot;: &quot;A String&quot;, # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.
1988 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
1989 &quot;permissionDetails&quot;: [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001990 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001991 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1992 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1993 &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:
1994 # - file
1995 # - member
1996 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001997 # - organizer
1998 # - fileOrganizer
1999 # - writer
2000 # - commenter
2001 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002002 },
2003 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002004 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2005 &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002006 # - owner
2007 # - organizer
2008 # - fileOrganizer
2009 # - writer
2010 # - commenter
2011 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07002012 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
2013 {
2014 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
2015 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
2016 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
2017 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
2018 },
2019 ],
2020 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002021 # - user
2022 # - group
2023 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -07002024 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn&#x27;t extra information required for a anyone type.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002025 },
2026 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002027 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
2028 # Entries with null values are cleared in update and copy requests.
2029 &quot;a_key&quot;: &quot;A String&quot;,
2030 },
2031 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.
2032 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
2033 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
2034 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
2035 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2036 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
2037 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2038 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2039 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2040 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2041 },
2042 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
2043 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
2044 &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.
2045 },
2046 &quot;size&quot;: &quot;A String&quot;, # The size of the file&#x27;s content in bytes. This is only applicable to files with binary content in Google Drive.
2047 &quot;spaces&quot;: [ # The list of spaces which contain the file. The currently supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
2048 &quot;A String&quot;,
2049 ],
2050 &quot;starred&quot;: True or False, # Whether the user has starred the file.
2051 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
2052 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content.
2053 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002054 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07002055 &quot;trashedTime&quot;: &quot;A String&quot;, # The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives.
2056 &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.
2057 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2058 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
2059 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2060 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2061 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2062 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2063 },
2064 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.
2065 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
2066 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
2067 &quot;height&quot;: 42, # The height of the video in pixels.
2068 &quot;width&quot;: 42, # The width of the video in pixels.
2069 },
2070 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
2071 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
2072 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
2073 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.
2074 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
2075 &quot;writersCanShare&quot;: True or False, # Whether users with only writer permission can modify the file&#x27;s permissions. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002076}
2077
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002078 addParents: string, A comma-separated list of parent IDs to add.
Bu Sun Kim65020912020-05-20 12:08:20 -07002079 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.
2080 keepRevisionForever: boolean, Whether to set the &#x27;keepForever&#x27; field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions.
2081 ocrLanguage: string, A language hint for OCR processing during image import (ISO 639-1 code).
2082 removeParents: string, A comma-separated list of parent IDs to remove.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002083 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07002084 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
2085 useContentAsIndexableText: boolean, Whether to use the uploaded content as indexable text.
2086 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002087 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002088
2089Returns:
2090 An object of the form:
2091
2092 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07002093 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
2094 # Entries with null values are cleared in update and copy requests.
2095 &quot;a_key&quot;: &quot;A String&quot;,
2096 },
2097 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
2098 &quot;canAddChildren&quot;: True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002099 &quot;canAddFolderFromAnotherDrive&quot;: True or False, # Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item is not a folder. Only populated for items in shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07002100 &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.
2101 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
2102 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
2103 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
2104 &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.
2105 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
2106 &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.
2107 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
2108 &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.
2109 &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.
2110 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002111 &quot;canModifyContentRestriction&quot;: True or False, # Whether the current user can modify restrictions on content of this file.
Bu Sun Kim65020912020-05-20 12:08:20 -07002112 &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.
2113 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
2114 &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.
2115 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
2116 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2117 &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.
2118 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
2119 &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.
2120 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
2121 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
2122 &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.
2123 &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.
2124 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
2125 &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.
2126 &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.
2127 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
2128 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
2129 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
2130 &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.
2131 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
2132 },
2133 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
2134 &quot;indexableText&quot;: &quot;A String&quot;, # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements.
2135 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
2136 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
2137 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
2138 },
2139 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002140 &quot;contentRestrictions&quot;: [ # Restrictions for accessing the content of the file. Only populated if such a restriction exists.
2141 { # A restriction for accessing the content of the file.
2142 &quot;readOnly&quot;: True or False, # Whether the content of the file is read-only.
2143 &quot;reason&quot;: &quot;A String&quot;, # Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
2144 &quot;restrictingUser&quot;: { # Information about a Drive user. # The user who set the content restriction. Only populated if readOnly is true.
2145 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2146 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
2147 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2148 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2149 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2150 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2151 },
2152 &quot;restrictionTime&quot;: &quot;A String&quot;, # The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
2153 &quot;type&quot;: &quot;A String&quot;, # The type of the content restriction. Currently the only possible value is globalContentRestriction.
2154 },
2155 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002156 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
2157 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
2158 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
2159 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
2160 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
2161 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
2162 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
2163 },
2164 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
2165 &quot;folderColorRgb&quot;: &quot;A String&quot;, # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
2166 # If an unsupported color is specified, the closest color in the palette will be used instead.
2167 &quot;fullFileExtension&quot;: &quot;A String&quot;, # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as &quot;tar.gz&quot;. This is only available for files with binary content in Google Drive.
2168 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
2169 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
2170 &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.
2171 &quot;headRevisionId&quot;: &quot;A String&quot;, # The ID of the file&#x27;s head revision. This is currently only available for files with binary content in Google Drive.
2172 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
2173 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
2174 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
2175 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
2176 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
2177 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
2178 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
2179 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
2180 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
2181 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
2182 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
2183 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
2184 &quot;height&quot;: 42, # The height of the image in pixels.
2185 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
2186 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
2187 &quot;location&quot;: { # Geographic location information stored in the image.
2188 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
2189 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
2190 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
2191 },
2192 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
2193 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
2194 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
2195 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
2196 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
2197 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
2198 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
2199 &quot;width&quot;: 42, # The width of the image in pixels.
2200 },
2201 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
2202 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
2203 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
2204 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2205 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
2206 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2207 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2208 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2209 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2210 },
2211 &quot;md5Checksum&quot;: &quot;A String&quot;, # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.
2212 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002213 # Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002214 # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002215 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
2216 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
2217 &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the file was modified by anyone (RFC 3339 date-time).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002218 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -07002219 &quot;name&quot;: &quot;A String&quot;, # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant.
2220 &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive.
2221 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
2222 &quot;owners&quot;: [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002223 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07002224 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2225 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
2226 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2227 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2228 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2229 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002230 },
2231 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002232 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
2233 # If not specified as part of a create request, the file will be placed directly in the user&#x27;s My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list.
2234 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002235 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002236 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
2237 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002238 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002239 &quot;permissions&quot;: [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002240 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002241 &quot;allowFileDiscovery&quot;: True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
2242 &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.
2243 &quot;displayName&quot;: &quot;A String&quot;, # The &quot;pretty&quot; name of the value of the permission. The following is a list of examples for each type of permission:
2244 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
2245 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
2246 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07002247 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -07002248 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
2249 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
2250 &quot;expirationTime&quot;: &quot;A String&quot;, # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
2251 # - They can only be set on user and group permissions
2252 # - The time must be in the future
2253 # - The time cannot be more than a year in the future
2254 &quot;id&quot;: &quot;A String&quot;, # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.
2255 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
2256 &quot;permissionDetails&quot;: [ # Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002257 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002258 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2259 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
2260 &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:
2261 # - file
2262 # - member
2263 &quot;role&quot;: &quot;A String&quot;, # The primary role for this user. While new values may be added in the future, the following are currently possible:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002264 # - organizer
2265 # - fileOrganizer
2266 # - writer
2267 # - commenter
2268 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002269 },
2270 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002271 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2272 &quot;role&quot;: &quot;A String&quot;, # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002273 # - owner
2274 # - organizer
2275 # - fileOrganizer
2276 # - writer
2277 # - commenter
2278 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07002279 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
2280 {
2281 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
2282 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
2283 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
2284 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
2285 },
2286 ],
2287 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002288 # - user
2289 # - group
2290 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -07002291 # - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn&#x27;t extra information required for a anyone type.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002292 },
2293 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002294 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
2295 # Entries with null values are cleared in update and copy requests.
2296 &quot;a_key&quot;: &quot;A String&quot;,
2297 },
2298 &quot;quotaBytesUsed&quot;: &quot;A String&quot;, # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.
2299 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
2300 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
2301 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
2302 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2303 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
2304 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2305 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2306 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2307 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2308 },
2309 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
2310 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
2311 &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.
2312 },
2313 &quot;size&quot;: &quot;A String&quot;, # The size of the file&#x27;s content in bytes. This is only applicable to files with binary content in Google Drive.
2314 &quot;spaces&quot;: [ # The list of spaces which contain the file. The currently supported values are &#x27;drive&#x27;, &#x27;appDataFolder&#x27; and &#x27;photos&#x27;.
2315 &quot;A String&quot;,
2316 ],
2317 &quot;starred&quot;: True or False, # Whether the user has starred the file.
2318 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
2319 &quot;thumbnailLink&quot;: &quot;A String&quot;, # A short-lived link to the file&#x27;s thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file&#x27;s content.
2320 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002321 &quot;trashed&quot;: True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07002322 &quot;trashedTime&quot;: &quot;A String&quot;, # The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives.
2323 &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.
2324 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2325 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
2326 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2327 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2328 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2329 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2330 },
2331 &quot;version&quot;: &quot;A String&quot;, # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.
2332 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
2333 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
2334 &quot;height&quot;: 42, # The height of the video in pixels.
2335 &quot;width&quot;: 42, # The width of the video in pixels.
2336 },
2337 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
2338 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
2339 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
2340 &quot;webContentLink&quot;: &quot;A String&quot;, # A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.
2341 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
2342 &quot;writersCanShare&quot;: True or False, # Whether users with only writer permission can modify the file&#x27;s permissions. Not populated for items in shared drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002343 }</pre>
2344</div>
2345
2346<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002347 <code class="details" id="watch">watch(fileId, body=None, acknowledgeAbuse=None, supportsAllDrives=None, supportsTeamDrives=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002348 <pre>Subscribes to changes to a file
2349
2350Args:
2351 fileId: string, The ID of the file. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002352 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002353 The object takes the form of:
2354
2355{ # An notification channel used to watch for resource changes.
Bu Sun Kim65020912020-05-20 12:08:20 -07002356 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
2357 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
2358 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
2359 &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;.
2360 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
2361 &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002362 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002363 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
2364 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
2365 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
2366 &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
2367 &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002368 }
2369
2370 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002371 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07002372 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002373
2374Returns:
2375 An object of the form:
2376
2377 { # An notification channel used to watch for resource changes.
Bu Sun Kim65020912020-05-20 12:08:20 -07002378 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
2379 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
2380 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
2381 &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;.
2382 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
2383 &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002384 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002385 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
2386 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
2387 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
2388 &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
2389 &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002390 }</pre>
2391</div>
2392
2393<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002394 <code class="details" id="watch_media">watch_media(fileId, body=None, acknowledgeAbuse=None, supportsAllDrives=None, supportsTeamDrives=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002395 <pre>Subscribes to changes to a file
2396
2397Args:
2398 fileId: string, The ID of the file. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002399 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002400 The object takes the form of:
2401
2402{ # An notification channel used to watch for resource changes.
Bu Sun Kim65020912020-05-20 12:08:20 -07002403 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
2404 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
2405 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
2406 &quot;kind&quot;: &quot;api#channel&quot;, # Identifies this as a notification channel used to watch for changes to a resource, which is &quot;api#channel&quot;.
2407 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
2408 &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002409 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002410 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
2411 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
2412 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
2413 &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
2414 &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002415 }
2416
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002417 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002418 supportsAllDrives: boolean, Whether the requesting application supports both My Drives and shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07002419 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002420
2421Returns:
2422 The media object as a string.
2423
2424 </pre>
2425</div>
2426
2427</body></html>