blob: f43a67338c32ab79f5ed74eb787e21ba49c109c6 [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>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080079<p class="firstline">Creates a copy of a file and applies any requested updates with patch semantics.</p>
80<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>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800112<p class="firstline">Updates a file's metadata and/or content with patch semantics.</p>
113<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>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800122 <pre>Creates a copy of a file and applies any requested updates with patch semantics.
123
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.
136 &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.
137 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
138 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
139 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
140 &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.
141 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
142 &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.
143 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
144 &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.
145 &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.
146 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
147 &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.
148 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
149 &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.
150 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
151 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
152 &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.
153 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
154 &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.
155 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
156 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
157 &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.
158 &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.
159 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
160 &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.
161 &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.
162 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
163 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
164 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
165 &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.
166 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
167 },
168 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
169 &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.
170 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
171 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
172 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
173 },
174 },
175 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
176 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
177 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
178 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
179 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
180 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
181 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
182 },
183 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
184 &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.
185 # If an unsupported color is specified, the closest color in the palette will be used instead.
186 &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.
187 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
188 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
189 &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.
190 &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.
191 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
192 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
193 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
194 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
195 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
196 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
197 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
198 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
199 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
200 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
201 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
202 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
203 &quot;height&quot;: 42, # The height of the image in pixels.
204 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
205 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
206 &quot;location&quot;: { # Geographic location information stored in the image.
207 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
208 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
209 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
210 },
211 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
212 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
213 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
214 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
215 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
216 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
217 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
218 &quot;width&quot;: 42, # The width of the image in pixels.
219 },
220 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
221 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
222 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
223 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
224 &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.
225 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
226 &quot;me&quot;: True or False, # Whether this user is the requesting user.
227 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
228 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
229 },
230 &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.
231 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700232 # 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 -0800233 # 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 -0700234 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
235 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
236 &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 -0800237 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700238 &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.
239 &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.
240 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
241 &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 -0800242 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700243 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
244 &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.
245 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
246 &quot;me&quot;: True or False, # Whether this user is the requesting user.
247 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
248 &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 -0800249 },
250 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700251 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
252 # 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.
253 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800254 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700255 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
256 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700257 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700258 &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 -0700259 { # 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 -0700260 &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.
261 &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.
262 &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:
263 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
264 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
265 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700266 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -0700267 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
268 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
269 &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:
270 # - They can only be set on user and group permissions
271 # - The time must be in the future
272 # - The time cannot be more than a year in the future
273 &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.
274 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
275 &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 -0700276 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700277 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
278 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
279 &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:
280 # - file
281 # - member
282 &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 -0700283 # - organizer
284 # - fileOrganizer
285 # - writer
286 # - commenter
287 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700288 },
289 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700290 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
291 &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 -0700292 # - owner
293 # - organizer
294 # - fileOrganizer
295 # - writer
296 # - commenter
297 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700298 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
299 {
300 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
301 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
302 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
303 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
304 },
305 ],
306 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700307 # - user
308 # - group
309 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -0700310 # - 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 -0700311 },
312 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700313 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
314 # Entries with null values are cleared in update and copy requests.
315 &quot;a_key&quot;: &quot;A String&quot;,
316 },
317 &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.
318 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
319 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
320 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
321 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
322 &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.
323 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
324 &quot;me&quot;: True or False, # Whether this user is the requesting user.
325 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
326 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
327 },
328 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
329 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
330 &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.
331 },
332 &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.
333 &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;.
334 &quot;A String&quot;,
335 ],
336 &quot;starred&quot;: True or False, # Whether the user has starred the file.
337 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
338 &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.
339 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
340 &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, and other users cannot see files in the owner&#x27;s trash.
341 &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.
342 &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.
343 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
344 &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.
345 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
346 &quot;me&quot;: True or False, # Whether this user is the requesting user.
347 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
348 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
349 },
350 &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.
351 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
352 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
353 &quot;height&quot;: 42, # The height of the video in pixels.
354 &quot;width&quot;: 42, # The width of the video in pixels.
355 },
356 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
357 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
358 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
359 &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.
360 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
361 &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 -0800362}
363
Dan O'Mearadd494642020-05-01 07:42:23 -0700364 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 -0700365 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.
366 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 -0700367 ocrLanguage: string, A language hint for OCR processing during image import (ISO 639-1 code).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700368 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700369 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800370
371Returns:
372 An object of the form:
373
374 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700375 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
376 # Entries with null values are cleared in update and copy requests.
377 &quot;a_key&quot;: &quot;A String&quot;,
378 },
379 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
380 &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.
381 &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.
382 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
383 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
384 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
385 &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.
386 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
387 &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.
388 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
389 &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.
390 &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.
391 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
392 &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.
393 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
394 &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.
395 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
396 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
397 &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.
398 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
399 &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.
400 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
401 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
402 &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.
403 &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.
404 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
405 &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.
406 &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.
407 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
408 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
409 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
410 &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.
411 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
412 },
413 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
414 &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.
415 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
416 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
417 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
418 },
419 },
420 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
421 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
422 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
423 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
424 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
425 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
426 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
427 },
428 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
429 &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.
430 # If an unsupported color is specified, the closest color in the palette will be used instead.
431 &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.
432 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
433 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
434 &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.
435 &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.
436 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
437 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
438 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
439 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
440 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
441 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
442 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
443 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
444 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
445 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
446 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
447 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
448 &quot;height&quot;: 42, # The height of the image in pixels.
449 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
450 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
451 &quot;location&quot;: { # Geographic location information stored in the image.
452 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
453 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
454 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
455 },
456 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
457 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
458 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
459 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
460 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
461 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
462 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
463 &quot;width&quot;: 42, # The width of the image in pixels.
464 },
465 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
466 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
467 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
468 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
469 &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.
470 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
471 &quot;me&quot;: True or False, # Whether this user is the requesting user.
472 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
473 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
474 },
475 &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.
476 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700477 # 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 -0800478 # 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 -0700479 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
480 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
481 &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 -0800482 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700483 &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.
484 &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.
485 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
486 &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 -0800487 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700488 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
489 &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.
490 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
491 &quot;me&quot;: True or False, # Whether this user is the requesting user.
492 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
493 &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 -0800494 },
495 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700496 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
497 # 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.
498 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800499 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700500 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
501 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700502 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700503 &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 -0700504 { # 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 -0700505 &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.
506 &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.
507 &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:
508 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
509 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
510 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700511 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -0700512 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
513 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
514 &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:
515 # - They can only be set on user and group permissions
516 # - The time must be in the future
517 # - The time cannot be more than a year in the future
518 &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.
519 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
520 &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 -0700521 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700522 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
523 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
524 &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:
525 # - file
526 # - member
527 &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 -0700528 # - organizer
529 # - fileOrganizer
530 # - writer
531 # - commenter
532 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700533 },
534 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700535 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
536 &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 -0700537 # - owner
538 # - organizer
539 # - fileOrganizer
540 # - writer
541 # - commenter
542 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700543 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
544 {
545 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
546 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
547 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
548 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
549 },
550 ],
551 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700552 # - user
553 # - group
554 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -0700555 # - 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 -0700556 },
557 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700558 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
559 # Entries with null values are cleared in update and copy requests.
560 &quot;a_key&quot;: &quot;A String&quot;,
561 },
562 &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.
563 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
564 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
565 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
566 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
567 &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.
568 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
569 &quot;me&quot;: True or False, # Whether this user is the requesting user.
570 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
571 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
572 },
573 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
574 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
575 &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.
576 },
577 &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.
578 &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;.
579 &quot;A String&quot;,
580 ],
581 &quot;starred&quot;: True or False, # Whether the user has starred the file.
582 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
583 &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.
584 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
585 &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, and other users cannot see files in the owner&#x27;s trash.
586 &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.
587 &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.
588 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
589 &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.
590 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
591 &quot;me&quot;: True or False, # Whether this user is the requesting user.
592 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
593 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
594 },
595 &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.
596 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
597 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
598 &quot;height&quot;: 42, # The height of the video in pixels.
599 &quot;width&quot;: 42, # The width of the video in pixels.
600 },
601 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
602 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
603 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
604 &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.
605 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
606 &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 -0800607 }</pre>
608</div>
609
610<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700611 <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 -0800612 <pre>Creates a new file.
613
614Args:
615 body: object, The request body.
616 The object takes the form of:
617
618{ # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700619 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
620 # Entries with null values are cleared in update and copy requests.
621 &quot;a_key&quot;: &quot;A String&quot;,
622 },
623 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
624 &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.
625 &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.
626 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
627 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
628 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
629 &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.
630 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
631 &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.
632 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
633 &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.
634 &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.
635 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
636 &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.
637 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
638 &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.
639 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
640 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
641 &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.
642 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
643 &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.
644 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
645 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
646 &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.
647 &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.
648 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
649 &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.
650 &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.
651 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
652 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
653 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
654 &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.
655 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
656 },
657 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
658 &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.
659 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
660 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
661 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
662 },
663 },
664 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
665 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
666 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
667 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
668 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
669 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
670 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
671 },
672 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
673 &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.
674 # If an unsupported color is specified, the closest color in the palette will be used instead.
675 &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.
676 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
677 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
678 &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.
679 &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.
680 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
681 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
682 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
683 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
684 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
685 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
686 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
687 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
688 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
689 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
690 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
691 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
692 &quot;height&quot;: 42, # The height of the image in pixels.
693 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
694 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
695 &quot;location&quot;: { # Geographic location information stored in the image.
696 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
697 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
698 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
699 },
700 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
701 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
702 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
703 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
704 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
705 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
706 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
707 &quot;width&quot;: 42, # The width of the image in pixels.
708 },
709 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
710 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
711 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
712 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
713 &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.
714 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
715 &quot;me&quot;: True or False, # Whether this user is the requesting user.
716 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
717 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
718 },
719 &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.
720 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700721 # 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 -0800722 # 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 -0700723 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
724 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
725 &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 -0800726 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700727 &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.
728 &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.
729 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
730 &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 -0800731 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700732 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
733 &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.
734 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
735 &quot;me&quot;: True or False, # Whether this user is the requesting user.
736 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
737 &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 -0800738 },
739 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700740 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
741 # 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.
742 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800743 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700744 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
745 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700746 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700747 &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 -0700748 { # 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 -0700749 &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.
750 &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.
751 &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:
752 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
753 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
754 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700755 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -0700756 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
757 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
758 &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:
759 # - They can only be set on user and group permissions
760 # - The time must be in the future
761 # - The time cannot be more than a year in the future
762 &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.
763 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
764 &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 -0700765 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700766 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
767 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
768 &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:
769 # - file
770 # - member
771 &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 -0700772 # - organizer
773 # - fileOrganizer
774 # - writer
775 # - commenter
776 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700777 },
778 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700779 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
780 &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 -0700781 # - owner
782 # - organizer
783 # - fileOrganizer
784 # - writer
785 # - commenter
786 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -0700787 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
788 {
789 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
790 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
791 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
792 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
793 },
794 ],
795 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700796 # - user
797 # - group
798 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -0700799 # - 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 -0700800 },
801 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700802 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
803 # Entries with null values are cleared in update and copy requests.
804 &quot;a_key&quot;: &quot;A String&quot;,
805 },
806 &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.
807 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
808 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
809 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
810 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
811 &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.
812 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
813 &quot;me&quot;: True or False, # Whether this user is the requesting user.
814 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
815 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
816 },
817 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
818 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
819 &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.
820 },
821 &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.
822 &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;.
823 &quot;A String&quot;,
824 ],
825 &quot;starred&quot;: True or False, # Whether the user has starred the file.
826 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
827 &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.
828 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
829 &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, and other users cannot see files in the owner&#x27;s trash.
830 &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.
831 &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.
832 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
833 &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.
834 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
835 &quot;me&quot;: True or False, # Whether this user is the requesting user.
836 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
837 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
838 },
839 &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.
840 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
841 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
842 &quot;height&quot;: 42, # The height of the video in pixels.
843 &quot;width&quot;: 42, # The width of the video in pixels.
844 },
845 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
846 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
847 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
848 &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.
849 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
850 &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 -0800851}
852
Dan O'Mearadd494642020-05-01 07:42:23 -0700853 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 -0700854 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.
855 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 -0400856 ocrLanguage: string, A language hint for OCR processing during image import (ISO 639-1 code).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700857 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -0700858 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
859 useContentAsIndexableText: boolean, Whether to use the uploaded content as indexable text.
860 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 -0700861 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 -0800862
863Returns:
864 An object of the form:
865
866 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700867 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
868 # Entries with null values are cleared in update and copy requests.
869 &quot;a_key&quot;: &quot;A String&quot;,
870 },
871 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
872 &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.
873 &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.
874 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
875 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
876 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
877 &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.
878 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
879 &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.
880 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
881 &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.
882 &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.
883 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
884 &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.
885 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
886 &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.
887 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
888 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
889 &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.
890 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
891 &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.
892 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
893 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
894 &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.
895 &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.
896 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
897 &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.
898 &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.
899 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
900 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
901 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
902 &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.
903 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
904 },
905 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
906 &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.
907 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
908 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
909 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
910 },
911 },
912 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
913 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
914 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
915 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
916 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
917 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
918 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
919 },
920 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
921 &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.
922 # If an unsupported color is specified, the closest color in the palette will be used instead.
923 &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.
924 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
925 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
926 &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.
927 &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.
928 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
929 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
930 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
931 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
932 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
933 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
934 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
935 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
936 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
937 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
938 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
939 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
940 &quot;height&quot;: 42, # The height of the image in pixels.
941 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
942 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
943 &quot;location&quot;: { # Geographic location information stored in the image.
944 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
945 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
946 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
947 },
948 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
949 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
950 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
951 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
952 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
953 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
954 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
955 &quot;width&quot;: 42, # The width of the image in pixels.
956 },
957 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
958 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
959 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
960 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
961 &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.
962 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
963 &quot;me&quot;: True or False, # Whether this user is the requesting user.
964 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
965 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
966 },
967 &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.
968 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700969 # 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 -0800970 # 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 -0700971 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
972 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
973 &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 -0800974 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700975 &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.
976 &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.
977 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
978 &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 -0800979 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700980 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
981 &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.
982 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
983 &quot;me&quot;: True or False, # Whether this user is the requesting user.
984 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
985 &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 -0800986 },
987 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700988 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
989 # 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.
990 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800991 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700992 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
993 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700994 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700995 &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 -0700996 { # 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 -0700997 &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.
998 &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.
999 &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:
1000 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
1001 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
1002 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001003 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -07001004 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
1005 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
1006 &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:
1007 # - They can only be set on user and group permissions
1008 # - The time must be in the future
1009 # - The time cannot be more than a year in the future
1010 &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.
1011 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
1012 &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 -07001013 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001014 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1015 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1016 &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:
1017 # - file
1018 # - member
1019 &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 -07001020 # - organizer
1021 # - fileOrganizer
1022 # - writer
1023 # - commenter
1024 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001025 },
1026 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001027 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1028 &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 -07001029 # - owner
1030 # - organizer
1031 # - fileOrganizer
1032 # - writer
1033 # - commenter
1034 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07001035 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1036 {
1037 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1038 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1039 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1040 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1041 },
1042 ],
1043 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001044 # - user
1045 # - group
1046 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -07001047 # - 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 -07001048 },
1049 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001050 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
1051 # Entries with null values are cleared in update and copy requests.
1052 &quot;a_key&quot;: &quot;A String&quot;,
1053 },
1054 &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.
1055 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
1056 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
1057 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
1058 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1059 &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.
1060 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1061 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1062 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1063 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1064 },
1065 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
1066 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
1067 &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.
1068 },
1069 &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.
1070 &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;.
1071 &quot;A String&quot;,
1072 ],
1073 &quot;starred&quot;: True or False, # Whether the user has starred the file.
1074 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
1075 &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.
1076 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
1077 &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, and other users cannot see files in the owner&#x27;s trash.
1078 &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.
1079 &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.
1080 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1081 &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.
1082 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1083 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1084 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1085 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1086 },
1087 &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.
1088 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
1089 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
1090 &quot;height&quot;: 42, # The height of the video in pixels.
1091 &quot;width&quot;: 42, # The width of the video in pixels.
1092 },
1093 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
1094 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
1095 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
1096 &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.
1097 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
1098 &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 -08001099 }</pre>
1100</div>
1101
1102<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001103 <code class="details" id="delete">delete(fileId, supportsAllDrives=None, supportsTeamDrives=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001104 <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 -08001105
1106Args:
1107 fileId: string, The ID of the file. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001108 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001109 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001110</pre>
1111</div>
1112
1113<div class="method">
1114 <code class="details" id="emptyTrash">emptyTrash()</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07001115 <pre>Permanently deletes all of the user&#x27;s trashed files.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001116
1117Args:
1118</pre>
1119</div>
1120
1121<div class="method">
1122 <code class="details" id="export">export(fileId, mimeType)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001123 <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 -08001124
1125Args:
1126 fileId: string, The ID of the file. (required)
1127 mimeType: string, The MIME type of the format requested for this export. (required)
1128</pre>
1129</div>
1130
1131<div class="method">
1132 <code class="details" id="export_media">export_media(fileId, mimeType)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001133 <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 -08001134
1135Args:
1136 fileId: string, The ID of the file. (required)
1137 mimeType: string, The MIME type of the format requested for this export. (required)
1138</pre>
1139</div>
1140
1141<div class="method">
1142 <code class="details" id="generateIds">generateIds(count=None, space=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -07001143 <pre>Generates a set of file IDs which can be provided in create or copy requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001144
1145Args:
1146 count: integer, The number of IDs to return.
Bu Sun Kim65020912020-05-20 12:08:20 -07001147 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 -08001148
1149Returns:
1150 An object of the form:
1151
1152 { # A list of generated file IDs which can be provided in create requests.
Bu Sun Kim65020912020-05-20 12:08:20 -07001153 &quot;ids&quot;: [ # The IDs generated for the requesting user in the specified space.
1154 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001155 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001156 &quot;kind&quot;: &quot;drive#generatedIds&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#generatedIds&quot;.
1157 &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 -08001158 }</pre>
1159</div>
1160
1161<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001162 <code class="details" id="get">get(fileId, acknowledgeAbuse=None, supportsAllDrives=None, supportsTeamDrives=None)</code>
1163 <pre>Gets a file&#x27;s metadata or content by ID.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001164
1165Args:
1166 fileId: string, The ID of the file. (required)
1167 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 Kim65020912020-05-20 12:08:20 -07001168 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
1169 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001170
1171Returns:
1172 An object of the form:
1173
1174 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001175 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
1176 # Entries with null values are cleared in update and copy requests.
1177 &quot;a_key&quot;: &quot;A String&quot;,
1178 },
1179 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
1180 &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.
1181 &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.
1182 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1183 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
1184 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
1185 &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.
1186 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
1187 &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.
1188 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
1189 &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.
1190 &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.
1191 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
1192 &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.
1193 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
1194 &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.
1195 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1196 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1197 &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.
1198 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1199 &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.
1200 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
1201 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1202 &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.
1203 &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.
1204 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
1205 &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.
1206 &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.
1207 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
1208 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
1209 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
1210 &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.
1211 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
1212 },
1213 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
1214 &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.
1215 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
1216 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
1217 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
1218 },
1219 },
1220 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1221 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
1222 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
1223 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1224 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
1225 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
1226 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
1227 },
1228 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
1229 &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.
1230 # If an unsupported color is specified, the closest color in the palette will be used instead.
1231 &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.
1232 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
1233 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1234 &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.
1235 &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.
1236 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
1237 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1238 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
1239 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1240 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1241 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1242 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1243 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1244 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1245 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1246 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1247 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1248 &quot;height&quot;: 42, # The height of the image in pixels.
1249 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1250 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1251 &quot;location&quot;: { # Geographic location information stored in the image.
1252 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1253 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1254 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1255 },
1256 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1257 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1258 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1259 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1260 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1261 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
1262 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1263 &quot;width&quot;: 42, # The width of the image in pixels.
1264 },
1265 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1266 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
1267 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
1268 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1269 &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.
1270 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1271 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1272 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1273 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1274 },
1275 &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.
1276 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001277 # 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 -08001278 # 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 -07001279 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
1280 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
1281 &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 -08001282 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001283 &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.
1284 &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.
1285 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
1286 &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 -08001287 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001288 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1289 &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.
1290 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1291 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1292 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1293 &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 -08001294 },
1295 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001296 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
1297 # 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.
1298 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001299 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001300 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1301 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001302 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001303 &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 -07001304 { # 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 -07001305 &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.
1306 &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.
1307 &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:
1308 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
1309 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
1310 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001311 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -07001312 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
1313 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
1314 &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:
1315 # - They can only be set on user and group permissions
1316 # - The time must be in the future
1317 # - The time cannot be more than a year in the future
1318 &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.
1319 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
1320 &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 -07001321 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001322 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1323 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1324 &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:
1325 # - file
1326 # - member
1327 &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 -07001328 # - organizer
1329 # - fileOrganizer
1330 # - writer
1331 # - commenter
1332 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001333 },
1334 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001335 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1336 &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 -07001337 # - owner
1338 # - organizer
1339 # - fileOrganizer
1340 # - writer
1341 # - commenter
1342 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07001343 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1344 {
1345 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1346 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1347 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1348 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1349 },
1350 ],
1351 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001352 # - user
1353 # - group
1354 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -07001355 # - 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 -07001356 },
1357 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001358 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
1359 # Entries with null values are cleared in update and copy requests.
1360 &quot;a_key&quot;: &quot;A String&quot;,
1361 },
1362 &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.
1363 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
1364 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
1365 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
1366 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1367 &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.
1368 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1369 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1370 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1371 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1372 },
1373 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
1374 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
1375 &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.
1376 },
1377 &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.
1378 &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;.
1379 &quot;A String&quot;,
1380 ],
1381 &quot;starred&quot;: True or False, # Whether the user has starred the file.
1382 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
1383 &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.
1384 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
1385 &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, and other users cannot see files in the owner&#x27;s trash.
1386 &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.
1387 &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.
1388 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1389 &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.
1390 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1391 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1392 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1393 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1394 },
1395 &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.
1396 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
1397 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
1398 &quot;height&quot;: 42, # The height of the video in pixels.
1399 &quot;width&quot;: 42, # The width of the video in pixels.
1400 },
1401 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
1402 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
1403 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
1404 &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.
1405 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
1406 &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 -08001407 }</pre>
1408</div>
1409
1410<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001411 <code class="details" id="get_media">get_media(fileId, acknowledgeAbuse=None, supportsAllDrives=None, supportsTeamDrives=None)</code>
1412 <pre>Gets a file&#x27;s metadata or content by ID.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001413
1414Args:
1415 fileId: string, The ID of the file. (required)
1416 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 Kim65020912020-05-20 12:08:20 -07001417 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
1418 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001419
1420Returns:
1421 The media object as a string.
1422
1423 </pre>
1424</div>
1425
1426<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001427 <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 -08001428 <pre>Lists or searches files.
1429
1430Args:
Bu Sun Kim65020912020-05-20 12:08:20 -07001431 corpora: string, Bodies of items (files/documents) to which the query applies. Supported bodies are &#x27;user&#x27;, &#x27;domain&#x27;, &#x27;drive&#x27; and &#x27;allDrives&#x27;. Prefer &#x27;user&#x27; or &#x27;drive&#x27; to &#x27;allDrives&#x27; for efficiency.
1432 corpus: string, The source of files to list. Deprecated: use &#x27;corpora&#x27; instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001433 Allowed values
Bu Sun Kim65020912020-05-20 12:08:20 -07001434 domain - Files shared to the user&#x27;s domain.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001435 user - Files owned by or shared to the user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001436 driveId: string, ID of the shared drive to search.
Dan O'Mearadd494642020-05-01 07:42:23 -07001437 includeItemsFromAllDrives: boolean, Deprecated - Whether both My Drive and shared drive items should be included in results. This parameter will only be effective until June 1, 2020. Afterwards shared drive items are included in the results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001438 includeTeamDriveItems: boolean, Deprecated use includeItemsFromAllDrives instead.
Bu Sun Kim65020912020-05-20 12:08:20 -07001439 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.
1440 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.
1441 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.
1442 q: string, A query for filtering the file results. See the &quot;Search for Files&quot; guide for supported syntax.
1443 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 Kim715bd7f2019-06-14 16:50:42 -07001444 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001445 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
1446 teamDriveId: string, Deprecated use driveId instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001447
1448Returns:
1449 An object of the form:
1450
1451 { # A list of files.
Bu Sun Kim65020912020-05-20 12:08:20 -07001452 &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 -08001453 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001454 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
1455 # Entries with null values are cleared in update and copy requests.
1456 &quot;a_key&quot;: &quot;A String&quot;,
1457 },
1458 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
1459 &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.
1460 &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.
1461 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1462 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
1463 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
1464 &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.
1465 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
1466 &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.
1467 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
1468 &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.
1469 &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.
1470 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
1471 &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.
1472 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
1473 &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.
1474 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1475 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1476 &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.
1477 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1478 &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.
1479 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
1480 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1481 &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.
1482 &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.
1483 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
1484 &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.
1485 &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.
1486 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
1487 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
1488 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
1489 &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.
1490 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
1491 },
1492 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
1493 &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.
1494 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
1495 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
1496 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
1497 },
1498 },
1499 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1500 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
1501 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
1502 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1503 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
1504 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
1505 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
1506 },
1507 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
1508 &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.
1509 # If an unsupported color is specified, the closest color in the palette will be used instead.
1510 &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.
1511 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
1512 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1513 &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.
1514 &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.
1515 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
1516 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1517 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
1518 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1519 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1520 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1521 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1522 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1523 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1524 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1525 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1526 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1527 &quot;height&quot;: 42, # The height of the image in pixels.
1528 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1529 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1530 &quot;location&quot;: { # Geographic location information stored in the image.
1531 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1532 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1533 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1534 },
1535 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1536 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1537 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1538 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1539 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1540 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
1541 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1542 &quot;width&quot;: 42, # The width of the image in pixels.
1543 },
1544 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1545 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
1546 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
1547 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1548 &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.
1549 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1550 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1551 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1552 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1553 },
1554 &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.
1555 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001556 # 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 -08001557 # 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 -07001558 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
1559 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
1560 &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 -08001561 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001562 &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.
1563 &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.
1564 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
1565 &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 -08001566 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001567 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1568 &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.
1569 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1570 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1571 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1572 &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 -08001573 },
1574 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001575 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
1576 # 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.
1577 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001578 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001579 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1580 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001581 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001582 &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 -07001583 { # 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 -07001584 &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.
1585 &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.
1586 &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:
1587 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
1588 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
1589 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001590 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -07001591 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
1592 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
1593 &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:
1594 # - They can only be set on user and group permissions
1595 # - The time must be in the future
1596 # - The time cannot be more than a year in the future
1597 &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.
1598 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
1599 &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 -07001600 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001601 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1602 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1603 &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:
1604 # - file
1605 # - member
1606 &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 -07001607 # - organizer
1608 # - fileOrganizer
1609 # - writer
1610 # - commenter
1611 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001612 },
1613 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001614 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1615 &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 -07001616 # - owner
1617 # - organizer
1618 # - fileOrganizer
1619 # - writer
1620 # - commenter
1621 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07001622 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1623 {
1624 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1625 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1626 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1627 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1628 },
1629 ],
1630 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001631 # - user
1632 # - group
1633 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -07001634 # - 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 -07001635 },
1636 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001637 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
1638 # Entries with null values are cleared in update and copy requests.
1639 &quot;a_key&quot;: &quot;A String&quot;,
1640 },
1641 &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.
1642 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
1643 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
1644 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
1645 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1646 &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.
1647 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1648 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1649 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1650 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1651 },
1652 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
1653 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
1654 &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.
1655 },
1656 &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.
1657 &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;.
1658 &quot;A String&quot;,
1659 ],
1660 &quot;starred&quot;: True or False, # Whether the user has starred the file.
1661 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
1662 &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.
1663 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
1664 &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, and other users cannot see files in the owner&#x27;s trash.
1665 &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.
1666 &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.
1667 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1668 &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.
1669 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1670 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1671 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1672 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1673 },
1674 &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.
1675 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
1676 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
1677 &quot;height&quot;: 42, # The height of the video in pixels.
1678 &quot;width&quot;: 42, # The width of the video in pixels.
1679 },
1680 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
1681 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
1682 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
1683 &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.
1684 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
1685 &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 -08001686 },
1687 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001688 &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;.
1689 &quot;kind&quot;: &quot;drive#fileList&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#fileList&quot;.
1690 &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 -08001691 }</pre>
1692</div>
1693
1694<div class="method">
1695 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1696 <pre>Retrieves the next page of results.
1697
1698Args:
1699 previous_request: The request for the previous page. (required)
1700 previous_response: The response from the request for the previous page. (required)
1701
1702Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001703 A request object that you can call &#x27;execute()&#x27; on to request the next
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001704 page. Returns None if there are no more items in the collection.
1705 </pre>
1706</div>
1707
1708<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001709 <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>
1710 <pre>Updates a file&#x27;s metadata and/or content with patch semantics.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001711
1712Args:
1713 fileId: string, The ID of the file. (required)
1714 body: object, The request body.
1715 The object takes the form of:
1716
1717{ # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001718 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
1719 # Entries with null values are cleared in update and copy requests.
1720 &quot;a_key&quot;: &quot;A String&quot;,
1721 },
1722 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
1723 &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.
1724 &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.
1725 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1726 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
1727 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
1728 &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.
1729 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
1730 &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.
1731 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
1732 &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.
1733 &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.
1734 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
1735 &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.
1736 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
1737 &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.
1738 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1739 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1740 &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.
1741 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1742 &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.
1743 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
1744 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1745 &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.
1746 &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.
1747 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
1748 &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.
1749 &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.
1750 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
1751 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
1752 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
1753 &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.
1754 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
1755 },
1756 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
1757 &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.
1758 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
1759 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
1760 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
1761 },
1762 },
1763 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
1764 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
1765 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
1766 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
1767 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
1768 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
1769 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
1770 },
1771 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
1772 &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.
1773 # If an unsupported color is specified, the closest color in the palette will be used instead.
1774 &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.
1775 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
1776 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
1777 &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.
1778 &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.
1779 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
1780 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
1781 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
1782 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
1783 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
1784 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
1785 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
1786 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
1787 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
1788 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
1789 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
1790 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
1791 &quot;height&quot;: 42, # The height of the image in pixels.
1792 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
1793 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
1794 &quot;location&quot;: { # Geographic location information stored in the image.
1795 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
1796 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
1797 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
1798 },
1799 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
1800 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
1801 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
1802 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
1803 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
1804 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
1805 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
1806 &quot;width&quot;: 42, # The width of the image in pixels.
1807 },
1808 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
1809 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
1810 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
1811 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1812 &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.
1813 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1814 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1815 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1816 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1817 },
1818 &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.
1819 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001820 # 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 -08001821 # 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 -07001822 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
1823 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
1824 &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 -08001825 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001826 &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.
1827 &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.
1828 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
1829 &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 -08001830 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07001831 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1832 &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.
1833 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1834 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1835 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1836 &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 -08001837 },
1838 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001839 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
1840 # 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.
1841 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001842 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001843 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
1844 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001845 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001846 &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 -07001847 { # 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 -07001848 &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.
1849 &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.
1850 &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:
1851 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
1852 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
1853 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001854 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -07001855 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
1856 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
1857 &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:
1858 # - They can only be set on user and group permissions
1859 # - The time must be in the future
1860 # - The time cannot be more than a year in the future
1861 &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.
1862 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
1863 &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 -07001864 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001865 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
1866 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
1867 &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:
1868 # - file
1869 # - member
1870 &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 -07001871 # - organizer
1872 # - fileOrganizer
1873 # - writer
1874 # - commenter
1875 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001876 },
1877 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001878 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1879 &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 -07001880 # - owner
1881 # - organizer
1882 # - fileOrganizer
1883 # - writer
1884 # - commenter
1885 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07001886 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
1887 {
1888 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
1889 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
1890 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
1891 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
1892 },
1893 ],
1894 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001895 # - user
1896 # - group
1897 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -07001898 # - 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 -07001899 },
1900 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001901 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
1902 # Entries with null values are cleared in update and copy requests.
1903 &quot;a_key&quot;: &quot;A String&quot;,
1904 },
1905 &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.
1906 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
1907 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
1908 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
1909 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1910 &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.
1911 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1912 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1913 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1914 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1915 },
1916 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
1917 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
1918 &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.
1919 },
1920 &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.
1921 &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;.
1922 &quot;A String&quot;,
1923 ],
1924 &quot;starred&quot;: True or False, # Whether the user has starred the file.
1925 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
1926 &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.
1927 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
1928 &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, and other users cannot see files in the owner&#x27;s trash.
1929 &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.
1930 &quot;trashingUser&quot;: { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
1931 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
1932 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
1933 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
1934 &quot;me&quot;: True or False, # Whether this user is the requesting user.
1935 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
1936 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
1937 },
1938 &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.
1939 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
1940 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
1941 &quot;height&quot;: 42, # The height of the video in pixels.
1942 &quot;width&quot;: 42, # The width of the video in pixels.
1943 },
1944 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
1945 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
1946 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
1947 &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.
1948 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
1949 &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 -08001950}
1951
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001952 addParents: string, A comma-separated list of parent IDs to add.
Bu Sun Kim65020912020-05-20 12:08:20 -07001953 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.
1954 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.
1955 ocrLanguage: string, A language hint for OCR processing during image import (ISO 639-1 code).
1956 removeParents: string, A comma-separated list of parent IDs to remove.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001957 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
Bu Sun Kim65020912020-05-20 12:08:20 -07001958 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
1959 useContentAsIndexableText: boolean, Whether to use the uploaded content as indexable text.
1960 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 -07001961 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 -08001962
1963Returns:
1964 An object of the form:
1965
1966 { # The metadata for a file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001967 &quot;appProperties&quot;: { # A collection of arbitrary key-value pairs which are private to the requesting app.
1968 # Entries with null values are cleared in update and copy requests.
1969 &quot;a_key&quot;: &quot;A String&quot;,
1970 },
1971 &quot;capabilities&quot;: { # Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take.
1972 &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.
1973 &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.
1974 &quot;canChangeCopyRequiresWriterPermission&quot;: True or False, # Whether the current user can change the copyRequiresWriterPermission restriction of this file.
1975 &quot;canChangeViewersCanCopyContent&quot;: True or False, # Deprecated
1976 &quot;canComment&quot;: True or False, # Whether the current user can comment on this file.
1977 &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.
1978 &quot;canDelete&quot;: True or False, # Whether the current user can delete this file.
1979 &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.
1980 &quot;canDownload&quot;: True or False, # Whether the current user can download this file.
1981 &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.
1982 &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.
1983 &quot;canModifyContent&quot;: True or False, # Whether the current user can modify the content of this file.
1984 &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.
1985 &quot;canMoveChildrenOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
1986 &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.
1987 &quot;canMoveChildrenWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
1988 &quot;canMoveItemIntoTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1989 &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.
1990 &quot;canMoveItemOutOfTeamDrive&quot;: True or False, # Deprecated - use canMoveItemOutOfDrive instead.
1991 &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.
1992 &quot;canMoveItemWithinTeamDrive&quot;: True or False, # Deprecated - use canMoveItemWithinDrive instead.
1993 &quot;canMoveTeamDriveItem&quot;: True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1994 &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.
1995 &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.
1996 &quot;canReadTeamDrive&quot;: True or False, # Deprecated - use canReadDrive instead.
1997 &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.
1998 &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.
1999 &quot;canRename&quot;: True or False, # Whether the current user can rename this file.
2000 &quot;canShare&quot;: True or False, # Whether the current user can modify the sharing settings for this file.
2001 &quot;canTrash&quot;: True or False, # Whether the current user can move this file to trash.
2002 &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.
2003 &quot;canUntrash&quot;: True or False, # Whether the current user can restore this file from trash.
2004 },
2005 &quot;contentHints&quot;: { # Additional information about the content of the file. These fields are never populated in responses.
2006 &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.
2007 &quot;thumbnail&quot;: { # A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
2008 &quot;image&quot;: &quot;A String&quot;, # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
2009 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the thumbnail.
2010 },
2011 },
2012 &quot;copyRequiresWriterPermission&quot;: True or False, # Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
2013 &quot;createdTime&quot;: &quot;A String&quot;, # The time at which the file was created (RFC 3339 date-time).
2014 &quot;description&quot;: &quot;A String&quot;, # A short description of the file.
2015 &quot;driveId&quot;: &quot;A String&quot;, # ID of the shared drive the file resides in. Only populated for items in shared drives.
2016 &quot;explicitlyTrashed&quot;: True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
2017 &quot;exportLinks&quot;: { # Links for exporting Google Docs to specific formats.
2018 &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
2019 },
2020 &quot;fileExtension&quot;: &quot;A String&quot;, # The final component of fullFileExtension. This is only available for files with binary content in Google Drive.
2021 &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.
2022 # If an unsupported color is specified, the closest color in the palette will be used instead.
2023 &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.
2024 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
2025 &quot;hasAugmentedPermissions&quot;: True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
2026 &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.
2027 &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.
2028 &quot;iconLink&quot;: &quot;A String&quot;, # A static, unauthenticated link to the file&#x27;s icon.
2029 &quot;id&quot;: &quot;A String&quot;, # The ID of the file.
2030 &quot;imageMediaMetadata&quot;: { # Additional metadata about image media, if available.
2031 &quot;aperture&quot;: 3.14, # The aperture used to create the photo (f-number).
2032 &quot;cameraMake&quot;: &quot;A String&quot;, # The make of the camera used to create the photo.
2033 &quot;cameraModel&quot;: &quot;A String&quot;, # The model of the camera used to create the photo.
2034 &quot;colorSpace&quot;: &quot;A String&quot;, # The color space of the photo.
2035 &quot;exposureBias&quot;: 3.14, # The exposure bias of the photo (APEX value).
2036 &quot;exposureMode&quot;: &quot;A String&quot;, # The exposure mode used to create the photo.
2037 &quot;exposureTime&quot;: 3.14, # The length of the exposure, in seconds.
2038 &quot;flashUsed&quot;: True or False, # Whether a flash was used to create the photo.
2039 &quot;focalLength&quot;: 3.14, # The focal length used to create the photo, in millimeters.
2040 &quot;height&quot;: 42, # The height of the image in pixels.
2041 &quot;isoSpeed&quot;: 42, # The ISO speed used to create the photo.
2042 &quot;lens&quot;: &quot;A String&quot;, # The lens used to create the photo.
2043 &quot;location&quot;: { # Geographic location information stored in the image.
2044 &quot;altitude&quot;: 3.14, # The altitude stored in the image.
2045 &quot;latitude&quot;: 3.14, # The latitude stored in the image.
2046 &quot;longitude&quot;: 3.14, # The longitude stored in the image.
2047 },
2048 &quot;maxApertureValue&quot;: 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
2049 &quot;meteringMode&quot;: &quot;A String&quot;, # The metering mode used to create the photo.
2050 &quot;rotation&quot;: 42, # The number of clockwise 90 degree rotations applied from the image&#x27;s original orientation.
2051 &quot;sensor&quot;: &quot;A String&quot;, # The type of sensor used to create the photo.
2052 &quot;subjectDistance&quot;: 42, # The distance to the subject of the photo, in meters.
2053 &quot;time&quot;: &quot;A String&quot;, # The date and time the photo was taken (EXIF DateTime).
2054 &quot;whiteBalance&quot;: &quot;A String&quot;, # The white balance mode used to create the photo.
2055 &quot;width&quot;: 42, # The width of the image in pixels.
2056 },
2057 &quot;isAppAuthorized&quot;: True or False, # Whether the file was created or opened by the requesting app.
2058 &quot;kind&quot;: &quot;drive#file&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#file&quot;.
2059 &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify the file.
2060 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2061 &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.
2062 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2063 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2064 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2065 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2066 },
2067 &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.
2068 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002069 # 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 -08002070 # 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 -07002071 &quot;modifiedByMe&quot;: True or False, # Whether the file has been modified by this user.
2072 &quot;modifiedByMeTime&quot;: &quot;A String&quot;, # The last time the file was modified by the user (RFC 3339 date-time).
2073 &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 -08002074 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
Bu Sun Kim65020912020-05-20 12:08:20 -07002075 &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.
2076 &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.
2077 &quot;ownedByMe&quot;: True or False, # Whether the user owns the file. Not populated for items in shared drives.
2078 &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 -08002079 { # Information about a Drive user.
Bu Sun Kim65020912020-05-20 12:08:20 -07002080 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2081 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
2082 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2083 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2084 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2085 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002086 },
2087 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002088 &quot;parents&quot;: [ # The IDs of the parent folders which contain the file.
2089 # 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.
2090 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002091 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002092 &quot;permissionIds&quot;: [ # List of permission IDs for users with access to this file.
2093 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002094 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002095 &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 -07002096 { # 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 -07002097 &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.
2098 &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.
2099 &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:
2100 # - user - User&#x27;s full name, as defined for their Google account, such as &quot;Joe Smith.&quot;
2101 # - group - Name of the Google Group, such as &quot;The Company Administrators.&quot;
2102 # - domain - String domain name, such as &quot;thecompany.com.&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07002103 # - anyone - No displayName is present.
Bu Sun Kim65020912020-05-20 12:08:20 -07002104 &quot;domain&quot;: &quot;A String&quot;, # The domain to which this permission refers.
2105 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user or group to which this permission refers.
2106 &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:
2107 # - They can only be set on user and group permissions
2108 # - The time must be in the future
2109 # - The time cannot be more than a year in the future
2110 &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.
2111 &quot;kind&quot;: &quot;drive#permission&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#permission&quot;.
2112 &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 -07002113 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002114 &quot;inherited&quot;: True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
2115 &quot;inheritedFrom&quot;: &quot;A String&quot;, # The ID of the item from which this permission is inherited. This is an output-only field.
2116 &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:
2117 # - file
2118 # - member
2119 &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 -07002120 # - organizer
2121 # - fileOrganizer
2122 # - writer
2123 # - commenter
2124 # - reader
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002125 },
2126 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002127 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2128 &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 -07002129 # - owner
2130 # - organizer
2131 # - fileOrganizer
2132 # - writer
2133 # - commenter
2134 # - reader
Bu Sun Kim65020912020-05-20 12:08:20 -07002135 &quot;teamDrivePermissionDetails&quot;: [ # Deprecated - use permissionDetails instead.
2136 {
2137 &quot;inherited&quot;: True or False, # Deprecated - use permissionDetails/inherited instead.
2138 &quot;inheritedFrom&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/inheritedFrom instead.
2139 &quot;role&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/role instead.
2140 &quot;teamDrivePermissionType&quot;: &quot;A String&quot;, # Deprecated - use permissionDetails/permissionType instead.
2141 },
2142 ],
2143 &quot;type&quot;: &quot;A String&quot;, # The type of the grantee. Valid values are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002144 # - user
2145 # - group
2146 # - domain
Bu Sun Kim65020912020-05-20 12:08:20 -07002147 # - 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 -07002148 },
2149 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002150 &quot;properties&quot;: { # A collection of arbitrary key-value pairs which are visible to all apps.
2151 # Entries with null values are cleared in update and copy requests.
2152 &quot;a_key&quot;: &quot;A String&quot;,
2153 },
2154 &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.
2155 &quot;shared&quot;: True or False, # Whether the file has been shared. Not populated for items in shared drives.
2156 &quot;sharedWithMeTime&quot;: &quot;A String&quot;, # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
2157 &quot;sharingUser&quot;: { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
2158 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2159 &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.
2160 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2161 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2162 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2163 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2164 },
2165 &quot;shortcutDetails&quot;: { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
2166 &quot;targetId&quot;: &quot;A String&quot;, # The ID of the file that this shortcut points to.
2167 &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.
2168 },
2169 &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.
2170 &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;.
2171 &quot;A String&quot;,
2172 ],
2173 &quot;starred&quot;: True or False, # Whether the user has starred the file.
2174 &quot;teamDriveId&quot;: &quot;A String&quot;, # Deprecated - use driveId instead.
2175 &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.
2176 &quot;thumbnailVersion&quot;: &quot;A String&quot;, # The thumbnail version for use in thumbnail cache invalidation.
2177 &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, and other users cannot see files in the owner&#x27;s trash.
2178 &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.
2179 &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.
2180 &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
2181 &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.
2182 &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
2183 &quot;me&quot;: True or False, # Whether this user is the requesting user.
2184 &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
2185 &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
2186 },
2187 &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.
2188 &quot;videoMediaMetadata&quot;: { # Additional metadata about video media. This may not be available immediately upon upload.
2189 &quot;durationMillis&quot;: &quot;A String&quot;, # The duration of the video in milliseconds.
2190 &quot;height&quot;: 42, # The height of the video in pixels.
2191 &quot;width&quot;: 42, # The width of the video in pixels.
2192 },
2193 &quot;viewedByMe&quot;: True or False, # Whether the file has been viewed by this user.
2194 &quot;viewedByMeTime&quot;: &quot;A String&quot;, # The last time the file was viewed by the user (RFC 3339 date-time).
2195 &quot;viewersCanCopyContent&quot;: True or False, # Deprecated - use copyRequiresWriterPermission instead.
2196 &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.
2197 &quot;webViewLink&quot;: &quot;A String&quot;, # A link for opening the file in a relevant Google editor or viewer in a browser.
2198 &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 -08002199 }</pre>
2200</div>
2201
2202<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002203 <code class="details" id="watch">watch(fileId, body=None, acknowledgeAbuse=None, supportsAllDrives=None, supportsTeamDrives=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002204 <pre>Subscribes to changes to a file
2205
2206Args:
2207 fileId: string, The ID of the file. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002208 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002209 The object takes the form of:
2210
2211{ # An notification channel used to watch for resource changes.
Bu Sun Kim65020912020-05-20 12:08:20 -07002212 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
2213 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
2214 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
2215 &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;.
2216 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
2217 &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002218 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002219 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
2220 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
2221 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
2222 &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
2223 &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002224 }
2225
2226 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 Kim65020912020-05-20 12:08:20 -07002227 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
2228 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002229
2230Returns:
2231 An object of the form:
2232
2233 { # An notification channel used to watch for resource changes.
Bu Sun Kim65020912020-05-20 12:08:20 -07002234 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
2235 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
2236 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
2237 &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;.
2238 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
2239 &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002240 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002241 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
2242 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
2243 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
2244 &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
2245 &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002246 }</pre>
2247</div>
2248
2249<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002250 <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 -08002251 <pre>Subscribes to changes to a file
2252
2253Args:
2254 fileId: string, The ID of the file. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002255 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002256 The object takes the form of:
2257
2258{ # An notification channel used to watch for resource changes.
Bu Sun Kim65020912020-05-20 12:08:20 -07002259 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
2260 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
2261 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
2262 &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;.
2263 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
2264 &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002265 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002266 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
2267 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
2268 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
2269 &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
2270 &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002271 }
2272
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002273 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 Kim65020912020-05-20 12:08:20 -07002274 supportsAllDrives: boolean, Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
2275 supportsTeamDrives: boolean, Deprecated use supportsAllDrives instead.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002276
2277Returns:
2278 The media object as a string.
2279
2280 </pre>
2281</div>
2282
2283</body></html>