chore: regens API reference docs (#889)
diff --git a/docs/dyn/drive_v2.files.html b/docs/dyn/drive_v2.files.html
index fed6fae..f720b58 100644
--- a/docs/dyn/drive_v2.files.html
+++ b/docs/dyn/drive_v2.files.html
@@ -75,7 +75,7 @@
<h1><a href="drive_v2.html">Drive API</a> . <a href="drive_v2.files.html">files</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
- <code><a href="#copy">copy(fileId, body, supportsTeamDrives=None, pinned=None, ocrLanguage=None, ocr=None, visibility=None, timedTextTrackName=None, convert=None, supportsAllDrives=None, timedTextLanguage=None)</a></code></p>
+ <code><a href="#copy">copy(fileId, body=None, supportsTeamDrives=None, pinned=None, ocrLanguage=None, ocr=None, visibility=None, timedTextTrackName=None, enforceSingleParent=None, convert=None, supportsAllDrives=None, timedTextLanguage=None)</a></code></p>
<p class="firstline">Creates a copy of the specified file.</p>
<p class="toc_element">
<code><a href="#delete">delete(fileId, supportsTeamDrives=None, supportsAllDrives=None)</a></code></p>
@@ -91,7 +91,7 @@
<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>
<p class="toc_element">
<code><a href="#generateIds">generateIds(space=None, maxResults=None)</a></code></p>
-<p class="firstline">Generates a set of file IDs which can be provided in insert requests.</p>
+<p class="firstline">Generates a set of file IDs which can be provided in insert or copy requests.</p>
<p class="toc_element">
<code><a href="#get">get(fileId, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</a></code></p>
<p class="firstline">Gets a file's metadata by ID.</p>
@@ -99,7 +99,7 @@
<code><a href="#get_media">get_media(fileId, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</a></code></p>
<p class="firstline">Gets a file's metadata by ID.</p>
<p class="toc_element">
- <code><a href="#insert">insert(body=None, supportsTeamDrives=None, media_body=None, ocrLanguage=None, ocr=None, pinned=None, visibility=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=None, supportsAllDrives=None, media_mime_type=None, timedTextLanguage=None)</a></code></p>
+ <code><a href="#insert">insert(body=None, supportsTeamDrives=None, media_body=None, ocrLanguage=None, ocr=None, pinned=None, visibility=None, timedTextTrackName=None, enforceSingleParent=None, convert=None, useContentAsIndexableText=None, supportsAllDrives=None, media_mime_type=None, timedTextLanguage=None)</a></code></p>
<p class="firstline">Insert a new file.</p>
<p class="toc_element">
<code><a href="#list">list(orderBy=None, projection=None, supportsTeamDrives=None, spaces=None, q=None, pageToken=None, corpus=None, maxResults=None, teamDriveId=None, includeItemsFromAllDrives=None, includeTeamDriveItems=None, corpora=None, supportsAllDrives=None, driveId=None)</a></code></p>
@@ -108,7 +108,7 @@
<code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
- <code><a href="#patch">patch(fileId, body, supportsTeamDrives=None, newRevision=None, modifiedDateBehavior=None, pinned=None, ocrLanguage=None, ocr=None, addParents=None, removeParents=None, updateViewedDate=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=None, supportsAllDrives=None, setModifiedDate=None, timedTextLanguage=None)</a></code></p>
+ <code><a href="#patch">patch(fileId, body=None, supportsTeamDrives=None, newRevision=None, modifiedDateBehavior=None, ocrLanguage=None, pinned=None, ocr=None, addParents=None, removeParents=None, updateViewedDate=None, timedTextTrackName=None, enforceSingleParent=None, convert=None, useContentAsIndexableText=None, supportsAllDrives=None, setModifiedDate=None, timedTextLanguage=None)</a></code></p>
<p class="firstline">Updates file metadata and/or content. This method supports patch semantics.</p>
<p class="toc_element">
<code><a href="#touch">touch(fileId, supportsTeamDrives=None, supportsAllDrives=None)</a></code></p>
@@ -120,22 +120,22 @@
<code><a href="#untrash">untrash(fileId, supportsTeamDrives=None, supportsAllDrives=None)</a></code></p>
<p class="firstline">Restores a file from the trash.</p>
<p class="toc_element">
- <code><a href="#update">update(fileId, body=None, supportsTeamDrives=None, newRevision=None, modifiedDateBehavior=None, media_body=None, ocrLanguage=None, ocr=None, pinned=None, addParents=None, removeParents=None, updateViewedDate=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=None, supportsAllDrives=None, media_mime_type=None, setModifiedDate=None, timedTextLanguage=None)</a></code></p>
+ <code><a href="#update">update(fileId, body=None, supportsTeamDrives=None, newRevision=None, modifiedDateBehavior=None, media_body=None, ocrLanguage=None, pinned=None, ocr=None, addParents=None, removeParents=None, updateViewedDate=None, timedTextTrackName=None, enforceSingleParent=None, convert=None, useContentAsIndexableText=None, supportsAllDrives=None, media_mime_type=None, setModifiedDate=None, timedTextLanguage=None)</a></code></p>
<p class="firstline">Updates file metadata and/or content.</p>
<p class="toc_element">
- <code><a href="#watch">watch(fileId, body, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</a></code></p>
+ <code><a href="#watch">watch(fileId, body=None, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</a></code></p>
<p class="firstline">Subscribe to changes on a file</p>
<p class="toc_element">
- <code><a href="#watch_media">watch_media(fileId, body, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</a></code></p>
+ <code><a href="#watch_media">watch_media(fileId, body=None, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</a></code></p>
<p class="firstline">Subscribe to changes on a file</p>
<h3>Method Details</h3>
<div class="method">
- <code class="details" id="copy">copy(fileId, body, supportsTeamDrives=None, pinned=None, ocrLanguage=None, ocr=None, visibility=None, timedTextTrackName=None, convert=None, supportsAllDrives=None, timedTextLanguage=None)</code>
+ <code class="details" id="copy">copy(fileId, body=None, supportsTeamDrives=None, pinned=None, ocrLanguage=None, ocr=None, visibility=None, timedTextTrackName=None, enforceSingleParent=None, convert=None, supportsAllDrives=None, timedTextLanguage=None)</code>
<pre>Creates a copy of the specified file.
Args:
fileId: string, The ID of the file to copy. (required)
- body: object, The request body. (required)
+ body: object, The request body.
The object takes the form of:
{ # The metadata for a file.
@@ -185,15 +185,9 @@
"isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
"emailAddress": "A String", # The email address of the user.
},
- "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
- "picture": { # The user's profile picture.
- "url": "A String", # A URL that points to a profile picture of this user.
- },
- "kind": "drive#user", # This is always drive#user.
- "displayName": "A String", # A plain text displayable name for this user.
- "permissionId": "A String", # The user's ID as visible in the permissions collection.
- "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
- "emailAddress": "A String", # The email address of the user.
+ "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
+ "targetId": "A String", # The ID of the file that this shortcut points to.
+ "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
},
"downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
@@ -221,11 +215,13 @@
"canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
"canListChildren": 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.
"canRename": True or False, # Whether the current user can rename this file.
+ "canModifyContent": True or False, # Whether the current user can modify the content of this file.
"canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
"canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
"canChangeRestrictedDownload": True or False, # Deprecated
"canShare": True or False, # Whether the current user can modify the sharing settings for this file.
"canTrashChildren": 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.
+ "canAddMyDriveParent": 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.
"canMoveChildrenWithinDrive": 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.
"canReadRevisions": 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.
"canMoveItemWithinDrive": 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.
@@ -235,6 +231,7 @@
"canComment": True or False, # Whether the current user can comment on this file.
"canMoveChildrenOutOfDrive": 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.
"canTrash": True or False, # Whether the current user can move this file to trash.
+ "canRemoveMyDriveParent": 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.
"canDelete": True or False, # Whether the current user can delete this file.
"canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
"canDownload": True or False, # Whether the current user can download this file.
@@ -242,7 +239,7 @@
"canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
"canRemoveChildren": 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.
"canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
- "canEdit": True or False, # Whether the current user can edit this file.
+ "canEdit": 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.
},
"sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
"webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
@@ -289,7 +286,7 @@
"meteringMode": "A String", # The metering mode used to create the photo.
"flashUsed": True or False, # Whether a flash was used to create the photo.
"aperture": 3.14, # The aperture used to create the photo (f-number).
- "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
+ "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
"sensor": "A String", # The type of sensor used to create the photo.
"whiteBalance": "A String", # The white balance mode used to create the photo.
"cameraModel": "A String", # The model of the camera used to create the photo.
@@ -305,6 +302,16 @@
"kind": "drive#file", # The type of file. This is always drive#file.
"canComment": True or False, # Deprecated: use capabilities/canComment.
"quotaBytesUsed": "A String", # The number of quota bytes used by this file.
+ "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
+ "picture": { # The user's profile picture.
+ "url": "A String", # A URL that points to a profile picture of this user.
+ },
+ "kind": "drive#user", # This is always drive#user.
+ "displayName": "A String", # A plain text displayable name for this user.
+ "permissionId": "A String", # The user's ID as visible in the permissions collection.
+ "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
+ "emailAddress": "A String", # The email address of the user.
+ },
"fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
"teamDriveId": "A String", # Deprecated - use driveId instead.
@@ -346,7 +353,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -376,6 +383,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -405,7 +413,7 @@
],
"originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
"fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
- "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
+ "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
"permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
{ # A permission for a file.
"withLink": True or False, # Whether the link is required for this permission.
@@ -417,7 +425,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -447,6 +455,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -483,6 +492,7 @@
DEFAULT - The visibility of the new file is determined by the user's default visibility/sharing policies.
PRIVATE - The new file will be visible to only the owner.
timedTextTrackName: string, The timed text track name.
+ 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.
convert: boolean, Whether to convert this file to the corresponding Google Docs format.
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.
timedTextLanguage: string, The language of the timed text.
@@ -537,15 +547,9 @@
"isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
"emailAddress": "A String", # The email address of the user.
},
- "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
- "picture": { # The user's profile picture.
- "url": "A String", # A URL that points to a profile picture of this user.
- },
- "kind": "drive#user", # This is always drive#user.
- "displayName": "A String", # A plain text displayable name for this user.
- "permissionId": "A String", # The user's ID as visible in the permissions collection.
- "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
- "emailAddress": "A String", # The email address of the user.
+ "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
+ "targetId": "A String", # The ID of the file that this shortcut points to.
+ "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
},
"downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
@@ -573,11 +577,13 @@
"canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
"canListChildren": 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.
"canRename": True or False, # Whether the current user can rename this file.
+ "canModifyContent": True or False, # Whether the current user can modify the content of this file.
"canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
"canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
"canChangeRestrictedDownload": True or False, # Deprecated
"canShare": True or False, # Whether the current user can modify the sharing settings for this file.
"canTrashChildren": 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.
+ "canAddMyDriveParent": 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.
"canMoveChildrenWithinDrive": 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.
"canReadRevisions": 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.
"canMoveItemWithinDrive": 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.
@@ -587,6 +593,7 @@
"canComment": True or False, # Whether the current user can comment on this file.
"canMoveChildrenOutOfDrive": 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.
"canTrash": True or False, # Whether the current user can move this file to trash.
+ "canRemoveMyDriveParent": 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.
"canDelete": True or False, # Whether the current user can delete this file.
"canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
"canDownload": True or False, # Whether the current user can download this file.
@@ -594,7 +601,7 @@
"canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
"canRemoveChildren": 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.
"canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
- "canEdit": True or False, # Whether the current user can edit this file.
+ "canEdit": 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.
},
"sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
"webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
@@ -641,7 +648,7 @@
"meteringMode": "A String", # The metering mode used to create the photo.
"flashUsed": True or False, # Whether a flash was used to create the photo.
"aperture": 3.14, # The aperture used to create the photo (f-number).
- "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
+ "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
"sensor": "A String", # The type of sensor used to create the photo.
"whiteBalance": "A String", # The white balance mode used to create the photo.
"cameraModel": "A String", # The model of the camera used to create the photo.
@@ -657,6 +664,16 @@
"kind": "drive#file", # The type of file. This is always drive#file.
"canComment": True or False, # Deprecated: use capabilities/canComment.
"quotaBytesUsed": "A String", # The number of quota bytes used by this file.
+ "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
+ "picture": { # The user's profile picture.
+ "url": "A String", # A URL that points to a profile picture of this user.
+ },
+ "kind": "drive#user", # This is always drive#user.
+ "displayName": "A String", # A plain text displayable name for this user.
+ "permissionId": "A String", # The user's ID as visible in the permissions collection.
+ "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
+ "emailAddress": "A String", # The email address of the user.
+ },
"fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
"teamDriveId": "A String", # Deprecated - use driveId instead.
@@ -698,7 +715,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -728,6 +745,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -757,7 +775,7 @@
],
"originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
"fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
- "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
+ "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
"permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
{ # A permission for a file.
"withLink": True or False, # Whether the link is required for this permission.
@@ -769,7 +787,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -799,6 +817,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -868,7 +887,7 @@
<div class="method">
<code class="details" id="generateIds">generateIds(space=None, maxResults=None)</code>
- <pre>Generates a set of file IDs which can be provided in insert requests.
+ <pre>Generates a set of file IDs which can be provided in insert or copy requests.
Args:
space: string, The space in which the IDs can be used to create new files. Supported values are 'drive' and 'appDataFolder'.
@@ -952,15 +971,9 @@
"isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
"emailAddress": "A String", # The email address of the user.
},
- "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
- "picture": { # The user's profile picture.
- "url": "A String", # A URL that points to a profile picture of this user.
- },
- "kind": "drive#user", # This is always drive#user.
- "displayName": "A String", # A plain text displayable name for this user.
- "permissionId": "A String", # The user's ID as visible in the permissions collection.
- "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
- "emailAddress": "A String", # The email address of the user.
+ "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
+ "targetId": "A String", # The ID of the file that this shortcut points to.
+ "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
},
"downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
@@ -988,11 +1001,13 @@
"canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
"canListChildren": 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.
"canRename": True or False, # Whether the current user can rename this file.
+ "canModifyContent": True or False, # Whether the current user can modify the content of this file.
"canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
"canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
"canChangeRestrictedDownload": True or False, # Deprecated
"canShare": True or False, # Whether the current user can modify the sharing settings for this file.
"canTrashChildren": 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.
+ "canAddMyDriveParent": 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.
"canMoveChildrenWithinDrive": 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.
"canReadRevisions": 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.
"canMoveItemWithinDrive": 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.
@@ -1002,6 +1017,7 @@
"canComment": True or False, # Whether the current user can comment on this file.
"canMoveChildrenOutOfDrive": 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.
"canTrash": True or False, # Whether the current user can move this file to trash.
+ "canRemoveMyDriveParent": 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.
"canDelete": True or False, # Whether the current user can delete this file.
"canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
"canDownload": True or False, # Whether the current user can download this file.
@@ -1009,7 +1025,7 @@
"canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
"canRemoveChildren": 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.
"canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
- "canEdit": True or False, # Whether the current user can edit this file.
+ "canEdit": 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.
},
"sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
"webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
@@ -1056,7 +1072,7 @@
"meteringMode": "A String", # The metering mode used to create the photo.
"flashUsed": True or False, # Whether a flash was used to create the photo.
"aperture": 3.14, # The aperture used to create the photo (f-number).
- "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
+ "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
"sensor": "A String", # The type of sensor used to create the photo.
"whiteBalance": "A String", # The white balance mode used to create the photo.
"cameraModel": "A String", # The model of the camera used to create the photo.
@@ -1072,6 +1088,16 @@
"kind": "drive#file", # The type of file. This is always drive#file.
"canComment": True or False, # Deprecated: use capabilities/canComment.
"quotaBytesUsed": "A String", # The number of quota bytes used by this file.
+ "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
+ "picture": { # The user's profile picture.
+ "url": "A String", # A URL that points to a profile picture of this user.
+ },
+ "kind": "drive#user", # This is always drive#user.
+ "displayName": "A String", # A plain text displayable name for this user.
+ "permissionId": "A String", # The user's ID as visible in the permissions collection.
+ "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
+ "emailAddress": "A String", # The email address of the user.
+ },
"fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
"teamDriveId": "A String", # Deprecated - use driveId instead.
@@ -1113,7 +1139,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -1143,6 +1169,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -1172,7 +1199,7 @@
],
"originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
"fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
- "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
+ "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
"permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
{ # A permission for a file.
"withLink": True or False, # Whether the link is required for this permission.
@@ -1184,7 +1211,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -1214,6 +1241,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -1265,7 +1293,7 @@
</div>
<div class="method">
- <code class="details" id="insert">insert(body=None, supportsTeamDrives=None, media_body=None, ocrLanguage=None, ocr=None, pinned=None, visibility=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=None, supportsAllDrives=None, media_mime_type=None, timedTextLanguage=None)</code>
+ <code class="details" id="insert">insert(body=None, supportsTeamDrives=None, media_body=None, ocrLanguage=None, ocr=None, pinned=None, visibility=None, timedTextTrackName=None, enforceSingleParent=None, convert=None, useContentAsIndexableText=None, supportsAllDrives=None, media_mime_type=None, timedTextLanguage=None)</code>
<pre>Insert a new file.
Args:
@@ -1319,15 +1347,9 @@
"isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
"emailAddress": "A String", # The email address of the user.
},
- "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
- "picture": { # The user's profile picture.
- "url": "A String", # A URL that points to a profile picture of this user.
- },
- "kind": "drive#user", # This is always drive#user.
- "displayName": "A String", # A plain text displayable name for this user.
- "permissionId": "A String", # The user's ID as visible in the permissions collection.
- "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
- "emailAddress": "A String", # The email address of the user.
+ "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
+ "targetId": "A String", # The ID of the file that this shortcut points to.
+ "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
},
"downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
@@ -1355,11 +1377,13 @@
"canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
"canListChildren": 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.
"canRename": True or False, # Whether the current user can rename this file.
+ "canModifyContent": True or False, # Whether the current user can modify the content of this file.
"canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
"canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
"canChangeRestrictedDownload": True or False, # Deprecated
"canShare": True or False, # Whether the current user can modify the sharing settings for this file.
"canTrashChildren": 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.
+ "canAddMyDriveParent": 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.
"canMoveChildrenWithinDrive": 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.
"canReadRevisions": 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.
"canMoveItemWithinDrive": 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.
@@ -1369,6 +1393,7 @@
"canComment": True or False, # Whether the current user can comment on this file.
"canMoveChildrenOutOfDrive": 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.
"canTrash": True or False, # Whether the current user can move this file to trash.
+ "canRemoveMyDriveParent": 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.
"canDelete": True or False, # Whether the current user can delete this file.
"canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
"canDownload": True or False, # Whether the current user can download this file.
@@ -1376,7 +1401,7 @@
"canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
"canRemoveChildren": 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.
"canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
- "canEdit": True or False, # Whether the current user can edit this file.
+ "canEdit": 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.
},
"sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
"webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
@@ -1423,7 +1448,7 @@
"meteringMode": "A String", # The metering mode used to create the photo.
"flashUsed": True or False, # Whether a flash was used to create the photo.
"aperture": 3.14, # The aperture used to create the photo (f-number).
- "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
+ "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
"sensor": "A String", # The type of sensor used to create the photo.
"whiteBalance": "A String", # The white balance mode used to create the photo.
"cameraModel": "A String", # The model of the camera used to create the photo.
@@ -1439,6 +1464,16 @@
"kind": "drive#file", # The type of file. This is always drive#file.
"canComment": True or False, # Deprecated: use capabilities/canComment.
"quotaBytesUsed": "A String", # The number of quota bytes used by this file.
+ "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
+ "picture": { # The user's profile picture.
+ "url": "A String", # A URL that points to a profile picture of this user.
+ },
+ "kind": "drive#user", # This is always drive#user.
+ "displayName": "A String", # A plain text displayable name for this user.
+ "permissionId": "A String", # The user's ID as visible in the permissions collection.
+ "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
+ "emailAddress": "A String", # The email address of the user.
+ },
"fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
"teamDriveId": "A String", # Deprecated - use driveId instead.
@@ -1480,7 +1515,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -1510,6 +1545,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -1539,7 +1575,7 @@
],
"originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
"fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
- "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
+ "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
"permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
{ # A permission for a file.
"withLink": True or False, # Whether the link is required for this permission.
@@ -1551,7 +1587,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -1581,6 +1617,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -1618,6 +1655,7 @@
DEFAULT - The visibility of the new file is determined by the user's default visibility/sharing policies.
PRIVATE - The new file will be visible to only the owner.
timedTextTrackName: string, The timed text track name.
+ 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.
convert: boolean, Whether to convert this file to the corresponding Google Docs format.
useContentAsIndexableText: boolean, Whether to use the content as indexable text.
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.
@@ -1674,15 +1712,9 @@
"isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
"emailAddress": "A String", # The email address of the user.
},
- "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
- "picture": { # The user's profile picture.
- "url": "A String", # A URL that points to a profile picture of this user.
- },
- "kind": "drive#user", # This is always drive#user.
- "displayName": "A String", # A plain text displayable name for this user.
- "permissionId": "A String", # The user's ID as visible in the permissions collection.
- "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
- "emailAddress": "A String", # The email address of the user.
+ "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
+ "targetId": "A String", # The ID of the file that this shortcut points to.
+ "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
},
"downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
@@ -1710,11 +1742,13 @@
"canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
"canListChildren": 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.
"canRename": True or False, # Whether the current user can rename this file.
+ "canModifyContent": True or False, # Whether the current user can modify the content of this file.
"canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
"canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
"canChangeRestrictedDownload": True or False, # Deprecated
"canShare": True or False, # Whether the current user can modify the sharing settings for this file.
"canTrashChildren": 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.
+ "canAddMyDriveParent": 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.
"canMoveChildrenWithinDrive": 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.
"canReadRevisions": 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.
"canMoveItemWithinDrive": 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.
@@ -1724,6 +1758,7 @@
"canComment": True or False, # Whether the current user can comment on this file.
"canMoveChildrenOutOfDrive": 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.
"canTrash": True or False, # Whether the current user can move this file to trash.
+ "canRemoveMyDriveParent": 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.
"canDelete": True or False, # Whether the current user can delete this file.
"canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
"canDownload": True or False, # Whether the current user can download this file.
@@ -1731,7 +1766,7 @@
"canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
"canRemoveChildren": 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.
"canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
- "canEdit": True or False, # Whether the current user can edit this file.
+ "canEdit": 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.
},
"sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
"webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
@@ -1778,7 +1813,7 @@
"meteringMode": "A String", # The metering mode used to create the photo.
"flashUsed": True or False, # Whether a flash was used to create the photo.
"aperture": 3.14, # The aperture used to create the photo (f-number).
- "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
+ "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
"sensor": "A String", # The type of sensor used to create the photo.
"whiteBalance": "A String", # The white balance mode used to create the photo.
"cameraModel": "A String", # The model of the camera used to create the photo.
@@ -1794,6 +1829,16 @@
"kind": "drive#file", # The type of file. This is always drive#file.
"canComment": True or False, # Deprecated: use capabilities/canComment.
"quotaBytesUsed": "A String", # The number of quota bytes used by this file.
+ "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
+ "picture": { # The user's profile picture.
+ "url": "A String", # A URL that points to a profile picture of this user.
+ },
+ "kind": "drive#user", # This is always drive#user.
+ "displayName": "A String", # A plain text displayable name for this user.
+ "permissionId": "A String", # The user's ID as visible in the permissions collection.
+ "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
+ "emailAddress": "A String", # The email address of the user.
+ },
"fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
"teamDriveId": "A String", # Deprecated - use driveId instead.
@@ -1835,7 +1880,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -1865,6 +1910,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -1894,7 +1940,7 @@
],
"originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
"fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
- "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
+ "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
"permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
{ # A permission for a file.
"withLink": True or False, # Whether the link is required for this permission.
@@ -1906,7 +1952,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -1936,6 +1982,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -2045,15 +2092,9 @@
"isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
"emailAddress": "A String", # The email address of the user.
},
- "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
- "picture": { # The user's profile picture.
- "url": "A String", # A URL that points to a profile picture of this user.
- },
- "kind": "drive#user", # This is always drive#user.
- "displayName": "A String", # A plain text displayable name for this user.
- "permissionId": "A String", # The user's ID as visible in the permissions collection.
- "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
- "emailAddress": "A String", # The email address of the user.
+ "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
+ "targetId": "A String", # The ID of the file that this shortcut points to.
+ "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
},
"downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
@@ -2081,11 +2122,13 @@
"canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
"canListChildren": 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.
"canRename": True or False, # Whether the current user can rename this file.
+ "canModifyContent": True or False, # Whether the current user can modify the content of this file.
"canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
"canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
"canChangeRestrictedDownload": True or False, # Deprecated
"canShare": True or False, # Whether the current user can modify the sharing settings for this file.
"canTrashChildren": 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.
+ "canAddMyDriveParent": 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.
"canMoveChildrenWithinDrive": 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.
"canReadRevisions": 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.
"canMoveItemWithinDrive": 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.
@@ -2095,6 +2138,7 @@
"canComment": True or False, # Whether the current user can comment on this file.
"canMoveChildrenOutOfDrive": 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.
"canTrash": True or False, # Whether the current user can move this file to trash.
+ "canRemoveMyDriveParent": 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.
"canDelete": True or False, # Whether the current user can delete this file.
"canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
"canDownload": True or False, # Whether the current user can download this file.
@@ -2102,7 +2146,7 @@
"canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
"canRemoveChildren": 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.
"canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
- "canEdit": True or False, # Whether the current user can edit this file.
+ "canEdit": 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.
},
"sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
"webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
@@ -2149,7 +2193,7 @@
"meteringMode": "A String", # The metering mode used to create the photo.
"flashUsed": True or False, # Whether a flash was used to create the photo.
"aperture": 3.14, # The aperture used to create the photo (f-number).
- "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
+ "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
"sensor": "A String", # The type of sensor used to create the photo.
"whiteBalance": "A String", # The white balance mode used to create the photo.
"cameraModel": "A String", # The model of the camera used to create the photo.
@@ -2165,6 +2209,16 @@
"kind": "drive#file", # The type of file. This is always drive#file.
"canComment": True or False, # Deprecated: use capabilities/canComment.
"quotaBytesUsed": "A String", # The number of quota bytes used by this file.
+ "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
+ "picture": { # The user's profile picture.
+ "url": "A String", # A URL that points to a profile picture of this user.
+ },
+ "kind": "drive#user", # This is always drive#user.
+ "displayName": "A String", # A plain text displayable name for this user.
+ "permissionId": "A String", # The user's ID as visible in the permissions collection.
+ "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
+ "emailAddress": "A String", # The email address of the user.
+ },
"fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
"teamDriveId": "A String", # Deprecated - use driveId instead.
@@ -2206,7 +2260,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -2236,6 +2290,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -2265,7 +2320,7 @@
],
"originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
"fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
- "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
+ "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
"permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
{ # A permission for a file.
"withLink": True or False, # Whether the link is required for this permission.
@@ -2277,7 +2332,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -2307,6 +2362,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -2355,12 +2411,12 @@
</div>
<div class="method">
- <code class="details" id="patch">patch(fileId, body, supportsTeamDrives=None, newRevision=None, modifiedDateBehavior=None, pinned=None, ocrLanguage=None, ocr=None, addParents=None, removeParents=None, updateViewedDate=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=None, supportsAllDrives=None, setModifiedDate=None, timedTextLanguage=None)</code>
+ <code class="details" id="patch">patch(fileId, body=None, supportsTeamDrives=None, newRevision=None, modifiedDateBehavior=None, ocrLanguage=None, pinned=None, ocr=None, addParents=None, removeParents=None, updateViewedDate=None, timedTextTrackName=None, enforceSingleParent=None, convert=None, useContentAsIndexableText=None, supportsAllDrives=None, setModifiedDate=None, timedTextLanguage=None)</code>
<pre>Updates file metadata and/or content. This method supports patch semantics.
Args:
fileId: string, The ID of the file to update. (required)
- body: object, The request body. (required)
+ body: object, The request body.
The object takes the form of:
{ # The metadata for a file.
@@ -2410,15 +2466,9 @@
"isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
"emailAddress": "A String", # The email address of the user.
},
- "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
- "picture": { # The user's profile picture.
- "url": "A String", # A URL that points to a profile picture of this user.
- },
- "kind": "drive#user", # This is always drive#user.
- "displayName": "A String", # A plain text displayable name for this user.
- "permissionId": "A String", # The user's ID as visible in the permissions collection.
- "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
- "emailAddress": "A String", # The email address of the user.
+ "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
+ "targetId": "A String", # The ID of the file that this shortcut points to.
+ "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
},
"downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
@@ -2446,11 +2496,13 @@
"canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
"canListChildren": 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.
"canRename": True or False, # Whether the current user can rename this file.
+ "canModifyContent": True or False, # Whether the current user can modify the content of this file.
"canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
"canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
"canChangeRestrictedDownload": True or False, # Deprecated
"canShare": True or False, # Whether the current user can modify the sharing settings for this file.
"canTrashChildren": 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.
+ "canAddMyDriveParent": 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.
"canMoveChildrenWithinDrive": 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.
"canReadRevisions": 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.
"canMoveItemWithinDrive": 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.
@@ -2460,6 +2512,7 @@
"canComment": True or False, # Whether the current user can comment on this file.
"canMoveChildrenOutOfDrive": 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.
"canTrash": True or False, # Whether the current user can move this file to trash.
+ "canRemoveMyDriveParent": 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.
"canDelete": True or False, # Whether the current user can delete this file.
"canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
"canDownload": True or False, # Whether the current user can download this file.
@@ -2467,7 +2520,7 @@
"canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
"canRemoveChildren": 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.
"canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
- "canEdit": True or False, # Whether the current user can edit this file.
+ "canEdit": 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.
},
"sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
"webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
@@ -2514,7 +2567,7 @@
"meteringMode": "A String", # The metering mode used to create the photo.
"flashUsed": True or False, # Whether a flash was used to create the photo.
"aperture": 3.14, # The aperture used to create the photo (f-number).
- "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
+ "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
"sensor": "A String", # The type of sensor used to create the photo.
"whiteBalance": "A String", # The white balance mode used to create the photo.
"cameraModel": "A String", # The model of the camera used to create the photo.
@@ -2530,6 +2583,16 @@
"kind": "drive#file", # The type of file. This is always drive#file.
"canComment": True or False, # Deprecated: use capabilities/canComment.
"quotaBytesUsed": "A String", # The number of quota bytes used by this file.
+ "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
+ "picture": { # The user's profile picture.
+ "url": "A String", # A URL that points to a profile picture of this user.
+ },
+ "kind": "drive#user", # This is always drive#user.
+ "displayName": "A String", # A plain text displayable name for this user.
+ "permissionId": "A String", # The user's ID as visible in the permissions collection.
+ "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
+ "emailAddress": "A String", # The email address of the user.
+ },
"fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
"teamDriveId": "A String", # Deprecated - use driveId instead.
@@ -2571,7 +2634,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -2601,6 +2664,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -2630,7 +2694,7 @@
],
"originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
"fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
- "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
+ "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
"permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
{ # A permission for a file.
"withLink": True or False, # Whether the link is required for this permission.
@@ -2642,7 +2706,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -2672,6 +2736,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -2709,13 +2774,14 @@
noChange - Maintain the previous value of modifiedDate.
now - Set modifiedDate to the current time.
nowIfNeeded - Set modifiedDate to the current time depending on contents of the update.
- pinned: boolean, Whether to pin the new revision. A file can have a maximum of 200 pinned revisions.
ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
+ pinned: boolean, Whether to pin the new revision. A file can have a maximum of 200 pinned revisions.
ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
addParents: string, Comma-separated list of parent IDs to add.
removeParents: string, Comma-separated list of parent IDs to remove.
updateViewedDate: boolean, Whether to update the view date after successfully updating the file.
timedTextTrackName: string, The timed text track name.
+ 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'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.
convert: boolean, This parameter is deprecated and has no function.
useContentAsIndexableText: boolean, Whether to use the content as indexable text.
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.
@@ -2772,15 +2838,9 @@
"isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
"emailAddress": "A String", # The email address of the user.
},
- "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
- "picture": { # The user's profile picture.
- "url": "A String", # A URL that points to a profile picture of this user.
- },
- "kind": "drive#user", # This is always drive#user.
- "displayName": "A String", # A plain text displayable name for this user.
- "permissionId": "A String", # The user's ID as visible in the permissions collection.
- "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
- "emailAddress": "A String", # The email address of the user.
+ "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
+ "targetId": "A String", # The ID of the file that this shortcut points to.
+ "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
},
"downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
@@ -2808,11 +2868,13 @@
"canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
"canListChildren": 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.
"canRename": True or False, # Whether the current user can rename this file.
+ "canModifyContent": True or False, # Whether the current user can modify the content of this file.
"canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
"canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
"canChangeRestrictedDownload": True or False, # Deprecated
"canShare": True or False, # Whether the current user can modify the sharing settings for this file.
"canTrashChildren": 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.
+ "canAddMyDriveParent": 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.
"canMoveChildrenWithinDrive": 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.
"canReadRevisions": 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.
"canMoveItemWithinDrive": 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.
@@ -2822,6 +2884,7 @@
"canComment": True or False, # Whether the current user can comment on this file.
"canMoveChildrenOutOfDrive": 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.
"canTrash": True or False, # Whether the current user can move this file to trash.
+ "canRemoveMyDriveParent": 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.
"canDelete": True or False, # Whether the current user can delete this file.
"canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
"canDownload": True or False, # Whether the current user can download this file.
@@ -2829,7 +2892,7 @@
"canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
"canRemoveChildren": 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.
"canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
- "canEdit": True or False, # Whether the current user can edit this file.
+ "canEdit": 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.
},
"sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
"webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
@@ -2876,7 +2939,7 @@
"meteringMode": "A String", # The metering mode used to create the photo.
"flashUsed": True or False, # Whether a flash was used to create the photo.
"aperture": 3.14, # The aperture used to create the photo (f-number).
- "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
+ "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
"sensor": "A String", # The type of sensor used to create the photo.
"whiteBalance": "A String", # The white balance mode used to create the photo.
"cameraModel": "A String", # The model of the camera used to create the photo.
@@ -2892,6 +2955,16 @@
"kind": "drive#file", # The type of file. This is always drive#file.
"canComment": True or False, # Deprecated: use capabilities/canComment.
"quotaBytesUsed": "A String", # The number of quota bytes used by this file.
+ "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
+ "picture": { # The user's profile picture.
+ "url": "A String", # A URL that points to a profile picture of this user.
+ },
+ "kind": "drive#user", # This is always drive#user.
+ "displayName": "A String", # A plain text displayable name for this user.
+ "permissionId": "A String", # The user's ID as visible in the permissions collection.
+ "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
+ "emailAddress": "A String", # The email address of the user.
+ },
"fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
"teamDriveId": "A String", # Deprecated - use driveId instead.
@@ -2933,7 +3006,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -2963,6 +3036,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -2992,7 +3066,7 @@
],
"originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
"fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
- "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
+ "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
"permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
{ # A permission for a file.
"withLink": True or False, # Whether the link is required for this permission.
@@ -3004,7 +3078,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -3034,6 +3108,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -3121,15 +3196,9 @@
"isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
"emailAddress": "A String", # The email address of the user.
},
- "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
- "picture": { # The user's profile picture.
- "url": "A String", # A URL that points to a profile picture of this user.
- },
- "kind": "drive#user", # This is always drive#user.
- "displayName": "A String", # A plain text displayable name for this user.
- "permissionId": "A String", # The user's ID as visible in the permissions collection.
- "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
- "emailAddress": "A String", # The email address of the user.
+ "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
+ "targetId": "A String", # The ID of the file that this shortcut points to.
+ "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
},
"downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
@@ -3157,11 +3226,13 @@
"canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
"canListChildren": 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.
"canRename": True or False, # Whether the current user can rename this file.
+ "canModifyContent": True or False, # Whether the current user can modify the content of this file.
"canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
"canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
"canChangeRestrictedDownload": True or False, # Deprecated
"canShare": True or False, # Whether the current user can modify the sharing settings for this file.
"canTrashChildren": 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.
+ "canAddMyDriveParent": 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.
"canMoveChildrenWithinDrive": 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.
"canReadRevisions": 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.
"canMoveItemWithinDrive": 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.
@@ -3171,6 +3242,7 @@
"canComment": True or False, # Whether the current user can comment on this file.
"canMoveChildrenOutOfDrive": 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.
"canTrash": True or False, # Whether the current user can move this file to trash.
+ "canRemoveMyDriveParent": 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.
"canDelete": True or False, # Whether the current user can delete this file.
"canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
"canDownload": True or False, # Whether the current user can download this file.
@@ -3178,7 +3250,7 @@
"canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
"canRemoveChildren": 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.
"canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
- "canEdit": True or False, # Whether the current user can edit this file.
+ "canEdit": 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.
},
"sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
"webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
@@ -3225,7 +3297,7 @@
"meteringMode": "A String", # The metering mode used to create the photo.
"flashUsed": True or False, # Whether a flash was used to create the photo.
"aperture": 3.14, # The aperture used to create the photo (f-number).
- "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
+ "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
"sensor": "A String", # The type of sensor used to create the photo.
"whiteBalance": "A String", # The white balance mode used to create the photo.
"cameraModel": "A String", # The model of the camera used to create the photo.
@@ -3241,6 +3313,16 @@
"kind": "drive#file", # The type of file. This is always drive#file.
"canComment": True or False, # Deprecated: use capabilities/canComment.
"quotaBytesUsed": "A String", # The number of quota bytes used by this file.
+ "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
+ "picture": { # The user's profile picture.
+ "url": "A String", # A URL that points to a profile picture of this user.
+ },
+ "kind": "drive#user", # This is always drive#user.
+ "displayName": "A String", # A plain text displayable name for this user.
+ "permissionId": "A String", # The user's ID as visible in the permissions collection.
+ "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
+ "emailAddress": "A String", # The email address of the user.
+ },
"fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
"teamDriveId": "A String", # Deprecated - use driveId instead.
@@ -3282,7 +3364,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -3312,6 +3394,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -3341,7 +3424,7 @@
],
"originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
"fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
- "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
+ "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
"permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
{ # A permission for a file.
"withLink": True or False, # Whether the link is required for this permission.
@@ -3353,7 +3436,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -3383,6 +3466,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -3470,15 +3554,9 @@
"isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
"emailAddress": "A String", # The email address of the user.
},
- "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
- "picture": { # The user's profile picture.
- "url": "A String", # A URL that points to a profile picture of this user.
- },
- "kind": "drive#user", # This is always drive#user.
- "displayName": "A String", # A plain text displayable name for this user.
- "permissionId": "A String", # The user's ID as visible in the permissions collection.
- "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
- "emailAddress": "A String", # The email address of the user.
+ "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
+ "targetId": "A String", # The ID of the file that this shortcut points to.
+ "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
},
"downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
@@ -3506,11 +3584,13 @@
"canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
"canListChildren": 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.
"canRename": True or False, # Whether the current user can rename this file.
+ "canModifyContent": True or False, # Whether the current user can modify the content of this file.
"canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
"canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
"canChangeRestrictedDownload": True or False, # Deprecated
"canShare": True or False, # Whether the current user can modify the sharing settings for this file.
"canTrashChildren": 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.
+ "canAddMyDriveParent": 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.
"canMoveChildrenWithinDrive": 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.
"canReadRevisions": 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.
"canMoveItemWithinDrive": 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.
@@ -3520,6 +3600,7 @@
"canComment": True or False, # Whether the current user can comment on this file.
"canMoveChildrenOutOfDrive": 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.
"canTrash": True or False, # Whether the current user can move this file to trash.
+ "canRemoveMyDriveParent": 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.
"canDelete": True or False, # Whether the current user can delete this file.
"canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
"canDownload": True or False, # Whether the current user can download this file.
@@ -3527,7 +3608,7 @@
"canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
"canRemoveChildren": 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.
"canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
- "canEdit": True or False, # Whether the current user can edit this file.
+ "canEdit": 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.
},
"sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
"webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
@@ -3574,7 +3655,7 @@
"meteringMode": "A String", # The metering mode used to create the photo.
"flashUsed": True or False, # Whether a flash was used to create the photo.
"aperture": 3.14, # The aperture used to create the photo (f-number).
- "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
+ "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
"sensor": "A String", # The type of sensor used to create the photo.
"whiteBalance": "A String", # The white balance mode used to create the photo.
"cameraModel": "A String", # The model of the camera used to create the photo.
@@ -3590,6 +3671,16 @@
"kind": "drive#file", # The type of file. This is always drive#file.
"canComment": True or False, # Deprecated: use capabilities/canComment.
"quotaBytesUsed": "A String", # The number of quota bytes used by this file.
+ "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
+ "picture": { # The user's profile picture.
+ "url": "A String", # A URL that points to a profile picture of this user.
+ },
+ "kind": "drive#user", # This is always drive#user.
+ "displayName": "A String", # A plain text displayable name for this user.
+ "permissionId": "A String", # The user's ID as visible in the permissions collection.
+ "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
+ "emailAddress": "A String", # The email address of the user.
+ },
"fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
"teamDriveId": "A String", # Deprecated - use driveId instead.
@@ -3631,7 +3722,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -3661,6 +3752,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -3690,7 +3782,7 @@
],
"originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
"fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
- "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
+ "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
"permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
{ # A permission for a file.
"withLink": True or False, # Whether the link is required for this permission.
@@ -3702,7 +3794,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -3732,6 +3824,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -3819,15 +3912,9 @@
"isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
"emailAddress": "A String", # The email address of the user.
},
- "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
- "picture": { # The user's profile picture.
- "url": "A String", # A URL that points to a profile picture of this user.
- },
- "kind": "drive#user", # This is always drive#user.
- "displayName": "A String", # A plain text displayable name for this user.
- "permissionId": "A String", # The user's ID as visible in the permissions collection.
- "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
- "emailAddress": "A String", # The email address of the user.
+ "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
+ "targetId": "A String", # The ID of the file that this shortcut points to.
+ "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
},
"downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
@@ -3855,11 +3942,13 @@
"canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
"canListChildren": 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.
"canRename": True or False, # Whether the current user can rename this file.
+ "canModifyContent": True or False, # Whether the current user can modify the content of this file.
"canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
"canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
"canChangeRestrictedDownload": True or False, # Deprecated
"canShare": True or False, # Whether the current user can modify the sharing settings for this file.
"canTrashChildren": 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.
+ "canAddMyDriveParent": 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.
"canMoveChildrenWithinDrive": 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.
"canReadRevisions": 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.
"canMoveItemWithinDrive": 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.
@@ -3869,6 +3958,7 @@
"canComment": True or False, # Whether the current user can comment on this file.
"canMoveChildrenOutOfDrive": 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.
"canTrash": True or False, # Whether the current user can move this file to trash.
+ "canRemoveMyDriveParent": 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.
"canDelete": True or False, # Whether the current user can delete this file.
"canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
"canDownload": True or False, # Whether the current user can download this file.
@@ -3876,7 +3966,7 @@
"canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
"canRemoveChildren": 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.
"canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
- "canEdit": True or False, # Whether the current user can edit this file.
+ "canEdit": 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.
},
"sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
"webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
@@ -3923,7 +4013,7 @@
"meteringMode": "A String", # The metering mode used to create the photo.
"flashUsed": True or False, # Whether a flash was used to create the photo.
"aperture": 3.14, # The aperture used to create the photo (f-number).
- "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
+ "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
"sensor": "A String", # The type of sensor used to create the photo.
"whiteBalance": "A String", # The white balance mode used to create the photo.
"cameraModel": "A String", # The model of the camera used to create the photo.
@@ -3939,6 +4029,16 @@
"kind": "drive#file", # The type of file. This is always drive#file.
"canComment": True or False, # Deprecated: use capabilities/canComment.
"quotaBytesUsed": "A String", # The number of quota bytes used by this file.
+ "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
+ "picture": { # The user's profile picture.
+ "url": "A String", # A URL that points to a profile picture of this user.
+ },
+ "kind": "drive#user", # This is always drive#user.
+ "displayName": "A String", # A plain text displayable name for this user.
+ "permissionId": "A String", # The user's ID as visible in the permissions collection.
+ "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
+ "emailAddress": "A String", # The email address of the user.
+ },
"fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
"teamDriveId": "A String", # Deprecated - use driveId instead.
@@ -3980,7 +4080,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -4010,6 +4110,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -4039,7 +4140,7 @@
],
"originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
"fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
- "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
+ "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
"permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
{ # A permission for a file.
"withLink": True or False, # Whether the link is required for this permission.
@@ -4051,7 +4152,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -4081,6 +4182,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -4110,7 +4212,7 @@
</div>
<div class="method">
- <code class="details" id="update">update(fileId, body=None, supportsTeamDrives=None, newRevision=None, modifiedDateBehavior=None, media_body=None, ocrLanguage=None, ocr=None, pinned=None, addParents=None, removeParents=None, updateViewedDate=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=None, supportsAllDrives=None, media_mime_type=None, setModifiedDate=None, timedTextLanguage=None)</code>
+ <code class="details" id="update">update(fileId, body=None, supportsTeamDrives=None, newRevision=None, modifiedDateBehavior=None, media_body=None, ocrLanguage=None, pinned=None, ocr=None, addParents=None, removeParents=None, updateViewedDate=None, timedTextTrackName=None, enforceSingleParent=None, convert=None, useContentAsIndexableText=None, supportsAllDrives=None, media_mime_type=None, setModifiedDate=None, timedTextLanguage=None)</code>
<pre>Updates file metadata and/or content.
Args:
@@ -4165,15 +4267,9 @@
"isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
"emailAddress": "A String", # The email address of the user.
},
- "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
- "picture": { # The user's profile picture.
- "url": "A String", # A URL that points to a profile picture of this user.
- },
- "kind": "drive#user", # This is always drive#user.
- "displayName": "A String", # A plain text displayable name for this user.
- "permissionId": "A String", # The user's ID as visible in the permissions collection.
- "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
- "emailAddress": "A String", # The email address of the user.
+ "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
+ "targetId": "A String", # The ID of the file that this shortcut points to.
+ "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
},
"downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
@@ -4201,11 +4297,13 @@
"canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
"canListChildren": 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.
"canRename": True or False, # Whether the current user can rename this file.
+ "canModifyContent": True or False, # Whether the current user can modify the content of this file.
"canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
"canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
"canChangeRestrictedDownload": True or False, # Deprecated
"canShare": True or False, # Whether the current user can modify the sharing settings for this file.
"canTrashChildren": 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.
+ "canAddMyDriveParent": 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.
"canMoveChildrenWithinDrive": 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.
"canReadRevisions": 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.
"canMoveItemWithinDrive": 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.
@@ -4215,6 +4313,7 @@
"canComment": True or False, # Whether the current user can comment on this file.
"canMoveChildrenOutOfDrive": 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.
"canTrash": True or False, # Whether the current user can move this file to trash.
+ "canRemoveMyDriveParent": 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.
"canDelete": True or False, # Whether the current user can delete this file.
"canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
"canDownload": True or False, # Whether the current user can download this file.
@@ -4222,7 +4321,7 @@
"canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
"canRemoveChildren": 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.
"canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
- "canEdit": True or False, # Whether the current user can edit this file.
+ "canEdit": 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.
},
"sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
"webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
@@ -4269,7 +4368,7 @@
"meteringMode": "A String", # The metering mode used to create the photo.
"flashUsed": True or False, # Whether a flash was used to create the photo.
"aperture": 3.14, # The aperture used to create the photo (f-number).
- "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
+ "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
"sensor": "A String", # The type of sensor used to create the photo.
"whiteBalance": "A String", # The white balance mode used to create the photo.
"cameraModel": "A String", # The model of the camera used to create the photo.
@@ -4285,6 +4384,16 @@
"kind": "drive#file", # The type of file. This is always drive#file.
"canComment": True or False, # Deprecated: use capabilities/canComment.
"quotaBytesUsed": "A String", # The number of quota bytes used by this file.
+ "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
+ "picture": { # The user's profile picture.
+ "url": "A String", # A URL that points to a profile picture of this user.
+ },
+ "kind": "drive#user", # This is always drive#user.
+ "displayName": "A String", # A plain text displayable name for this user.
+ "permissionId": "A String", # The user's ID as visible in the permissions collection.
+ "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
+ "emailAddress": "A String", # The email address of the user.
+ },
"fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
"teamDriveId": "A String", # Deprecated - use driveId instead.
@@ -4326,7 +4435,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -4356,6 +4465,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -4385,7 +4495,7 @@
],
"originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
"fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
- "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
+ "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
"permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
{ # A permission for a file.
"withLink": True or False, # Whether the link is required for this permission.
@@ -4397,7 +4507,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -4427,6 +4537,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -4466,12 +4577,13 @@
nowIfNeeded - Set modifiedDate to the current time depending on contents of the update.
media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
- ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
pinned: boolean, Whether to pin the new revision. A file can have a maximum of 200 pinned revisions.
+ ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
addParents: string, Comma-separated list of parent IDs to add.
removeParents: string, Comma-separated list of parent IDs to remove.
updateViewedDate: boolean, Whether to update the view date after successfully updating the file.
timedTextTrackName: string, The timed text track name.
+ 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'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.
convert: boolean, This parameter is deprecated and has no function.
useContentAsIndexableText: boolean, Whether to use the content as indexable text.
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.
@@ -4529,15 +4641,9 @@
"isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
"emailAddress": "A String", # The email address of the user.
},
- "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
- "picture": { # The user's profile picture.
- "url": "A String", # A URL that points to a profile picture of this user.
- },
- "kind": "drive#user", # This is always drive#user.
- "displayName": "A String", # A plain text displayable name for this user.
- "permissionId": "A String", # The user's ID as visible in the permissions collection.
- "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
- "emailAddress": "A String", # The email address of the user.
+ "shortcutDetails": { # Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.
+ "targetId": "A String", # The ID of the file that this shortcut points to.
+ "targetMimeType": "A String", # The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
},
"downloadUrl": "A String", # Short lived download URL for the file. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
@@ -4565,11 +4671,13 @@
"canMoveChildrenWithinTeamDrive": True or False, # Deprecated - use canMoveChildrenWithinDrive instead.
"canListChildren": 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.
"canRename": True or False, # Whether the current user can rename this file.
+ "canModifyContent": True or False, # Whether the current user can modify the content of this file.
"canReadDrive": True or False, # Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
"canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
"canChangeRestrictedDownload": True or False, # Deprecated
"canShare": True or False, # Whether the current user can modify the sharing settings for this file.
"canTrashChildren": 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.
+ "canAddMyDriveParent": 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.
"canMoveChildrenWithinDrive": 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.
"canReadRevisions": 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.
"canMoveItemWithinDrive": 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.
@@ -4579,6 +4687,7 @@
"canComment": True or False, # Whether the current user can comment on this file.
"canMoveChildrenOutOfDrive": 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.
"canTrash": True or False, # Whether the current user can move this file to trash.
+ "canRemoveMyDriveParent": 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.
"canDelete": True or False, # Whether the current user can delete this file.
"canMoveTeamDriveItem": True or False, # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
"canDownload": True or False, # Whether the current user can download this file.
@@ -4586,7 +4695,7 @@
"canMoveChildrenOutOfTeamDrive": True or False, # Deprecated - use canMoveChildrenOutOfDrive instead.
"canRemoveChildren": 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.
"canReadTeamDrive": True or False, # Deprecated - use canReadDrive instead.
- "canEdit": True or False, # Whether the current user can edit this file.
+ "canEdit": 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.
},
"sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
"webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
@@ -4633,7 +4742,7 @@
"meteringMode": "A String", # The metering mode used to create the photo.
"flashUsed": True or False, # Whether a flash was used to create the photo.
"aperture": 3.14, # The aperture used to create the photo (f-number).
- "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
+ "rotation": 42, # The number of clockwise 90 degree rotations applied from the image's original orientation.
"sensor": "A String", # The type of sensor used to create the photo.
"whiteBalance": "A String", # The white balance mode used to create the photo.
"cameraModel": "A String", # The model of the camera used to create the photo.
@@ -4649,6 +4758,16 @@
"kind": "drive#file", # The type of file. This is always drive#file.
"canComment": True or False, # Deprecated: use capabilities/canComment.
"quotaBytesUsed": "A String", # The number of quota bytes used by this file.
+ "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
+ "picture": { # The user's profile picture.
+ "url": "A String", # A URL that points to a profile picture of this user.
+ },
+ "kind": "drive#user", # This is always drive#user.
+ "displayName": "A String", # A plain text displayable name for this user.
+ "permissionId": "A String", # The user's ID as visible in the permissions collection.
+ "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
+ "emailAddress": "A String", # The email address of the user.
+ },
"fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
"createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
"teamDriveId": "A String", # Deprecated - use driveId instead.
@@ -4690,7 +4809,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -4720,6 +4839,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -4749,7 +4869,7 @@
],
"originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Google Drive.
"fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Google Drive; it is not populated for Google Docs or shortcut files.
- "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for items in shared drives.
+ "hasAugmentedPermissions": True or False, # Whether there are permissions directly on this file. This field is only populated for items in shared drives.
"permissions": [ # The list of permissions for users with access to this file. Not populated for items in shared drives.
{ # A permission for a file.
"withLink": True or False, # Whether the link is required for this permission.
@@ -4761,7 +4881,7 @@
# - fileOrganizer
# - writer
# - reader
- "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive.
+ "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field.
"permissionType": "A String", # The permission type for this user. While new values may be added in future, the following are currently possible:
# - file
# - member
@@ -4791,6 +4911,7 @@
"etag": "A String", # The ETag of the permission.
"emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
"expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - They cannot be set on shared drive items
# - They can only be set on user and group permissions
# - The date must be in the future
# - The date cannot be more than a year in the future
@@ -4820,17 +4941,17 @@
</div>
<div class="method">
- <code class="details" id="watch">watch(fileId, body, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</code>
+ <code class="details" id="watch">watch(fileId, body=None, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</code>
<pre>Subscribe to changes on a file
Args:
fileId: string, The ID for the file in question. (required)
- body: object, The request body. (required)
+ body: object, The request body.
The object takes the form of:
{ # An notification channel used to watch for resource changes.
"resourceUri": "A String", # A version-specific identifier for the watched resource.
- "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel".
+ "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource, which is "api#channel".
"resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
"payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional.
"token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
@@ -4858,7 +4979,7 @@
{ # An notification channel used to watch for resource changes.
"resourceUri": "A String", # A version-specific identifier for the watched resource.
- "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel".
+ "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource, which is "api#channel".
"resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
"payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional.
"token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
@@ -4873,17 +4994,17 @@
</div>
<div class="method">
- <code class="details" id="watch_media">watch_media(fileId, body, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</code>
+ <code class="details" id="watch_media">watch_media(fileId, body=None, projection=None, revisionId=None, supportsTeamDrives=None, supportsAllDrives=None, acknowledgeAbuse=None, updateViewedDate=None)</code>
<pre>Subscribe to changes on a file
Args:
fileId: string, The ID for the file in question. (required)
- body: object, The request body. (required)
+ body: object, The request body.
The object takes the form of:
{ # An notification channel used to watch for resource changes.
"resourceUri": "A String", # A version-specific identifier for the watched resource.
- "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel".
+ "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource, which is "api#channel".
"resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
"payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional.
"token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.