Regen docs (#364)
diff --git a/docs/dyn/drive_v2.changes.html b/docs/dyn/drive_v2.changes.html
index e0a37c5..431b105 100644
--- a/docs/dyn/drive_v2.changes.html
+++ b/docs/dyn/drive_v2.changes.html
@@ -75,34 +75,60 @@
<h1><a href="drive_v2.html">Drive API</a> . <a href="drive_v2.changes.html">changes</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
- <code><a href="#get">get(changeId)</a></code></p>
+ <code><a href="#get">get(changeId, supportsTeamDrives=None, teamDriveId=None)</a></code></p>
<p class="firstline">Gets a specific change.</p>
<p class="toc_element">
- <code><a href="#list">list(includeSubscribed=None, includeDeleted=None, pageToken=None, maxResults=None, startChangeId=None, spaces=None)</a></code></p>
-<p class="firstline">Lists the changes for a user.</p>
+ <code><a href="#getStartPageToken">getStartPageToken(supportsTeamDrives=None, teamDriveId=None)</a></code></p>
+<p class="firstline">Gets the starting pageToken for listing future changes.</p>
+<p class="toc_element">
+ <code><a href="#list">list(includeSubscribed=None, includeDeleted=None, includeTeamDriveItems=None, pageToken=None, supportsTeamDrives=None, maxResults=None, startChangeId=None, spaces=None, teamDriveId=None, includeCorpusRemovals=None)</a></code></p>
+<p class="firstline">Lists the changes for a user or Team Drive.</p>
<p class="toc_element">
<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="#watch">watch(body, includeSubscribed=None, includeDeleted=None, pageToken=None, maxResults=None, startChangeId=None, spaces=None)</a></code></p>
+ <code><a href="#watch">watch(body, supportsTeamDrives=None, spaces=None, startChangeId=None, pageToken=None, includeSubscribed=None, includeDeleted=None, maxResults=None, teamDriveId=None, includeTeamDriveItems=None, includeCorpusRemovals=None)</a></code></p>
<p class="firstline">Subscribe to changes for a user.</p>
<h3>Method Details</h3>
<div class="method">
- <code class="details" id="get">get(changeId)</code>
+ <code class="details" id="get">get(changeId, supportsTeamDrives=None, teamDriveId=None)</code>
<pre>Gets a specific change.
Args:
changeId: string, The ID of the change. (required)
+ supportsTeamDrives: boolean, Whether the requesting application supports Team Drives.
+ teamDriveId: string, The Team Drive from which the change will be returned.
Returns:
An object of the form:
- { # Representation of a change to a file.
+ { # Representation of a change to a file or Team Drive.
+ "teamDrive": { # Representation of a Team Drive. # The updated state of the Team Drive. Present if the type is teamDrive, the user is still a member of the Team Drive, and the Team Drive has not been deleted.
+ "kind": "drive#teamDrive", # This is always drive#teamDrive
+ "id": "A String", # The ID of this Team Drive which is also the ID of the top level folder for this Team Drive.
+ "capabilities": { # Capabilities the current user has on this Team Drive.
+ "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of files in this Team Drive.
+ "canCopy": True or False, # Whether files in this Team Drive can be copied by the current user.
+ "canRename": True or False, # Whether files or folders in this Team Drive can be renamed by the current user.
+ "canListChildren": True or False, # Whether the current user can list the children of folders in this Team Drive.
+ "canShare": True or False, # Whether the current user can share files or folders in this Team Drive.
+ "canManageMembers": True or False, # Whether the current user can add members to this Team Drive or remove them or change their role.
+ "canDownload": True or False, # Whether files in this Team Drive can be downloaded by the current user.
+ "canComment": True or False, # Whether the current user can comment on files in this Team Drive.
+ "canDeleteTeamDrive": True or False, # Whether this Team Drive can be deleted by the current user.
+ "canRenameTeamDrive": True or False, # Whether this Team Drive can be renamed by the current user.
+ "canRemoveChildren": True or False, # Whether the current user can remove children from folders in this Team Drive.
+ "canAddChildren": True or False, # Whether the current user can add children to folders in this Team Drive.
+ "canEdit": True or False, # Whether files in this Team Drive can be edited by the current user.
+ },
+ "name": "A String", # The name of this Team Drive.
+ },
"kind": "drive#change", # This is always drive#change.
- "deleted": True or False, # Whether the file has been deleted.
- "file": { # The metadata for a file. # The updated state of the file. Present if the file has not been deleted.
+ "deleted": True or False, # Whether the file or Team Drive has been removed from this list of changes, for example by deletion or loss of access.
+ "file": { # The metadata for a file. # The updated state of the file. Present if the type is file and the file has not been removed from this list of changes.
"hasThumbnail": True or False, # Whether this file has a thumbnail.
"lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
+ "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for Team Drive files.
"version": "A String", # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
"appDataContents": True or False, # Whether this file is in the Application Data folder.
"thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
@@ -117,12 +143,12 @@
"indexableText": { # Indexable text attributes for the file (can only be written)
"text": "A String", # The text to be indexed for this file.
},
- "thumbnailVersion": "A String", # The thumbnail version for use in client-contructable thumbnail URLs or thumbnail cache invalidation.
+ "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
"explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
"isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
"lastModifyingUserName": "A String", # Name of the last user to modify this file.
- "writersCanShare": True or False, # Whether writers can share the document with other users.
- "owners": [ # The owner(s) of this file.
+ "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for Team Drive files.
+ "owners": [ # The owner(s) of this file. Not populated for Team Drive files.
{ # Information about a Drive user.
"picture": { # The user's profile picture.
"url": "A String", # A URL that points to a profile picture of this user.
@@ -134,7 +160,7 @@
"emailAddress": "A String", # The email address of the user.
},
],
- "ownedByMe": True or False, # Whether the file is owned by the current user.
+ "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for Team Drive files.
"id": "A String", # The ID of the file.
"sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
"picture": { # The user's profile picture.
@@ -146,6 +172,16 @@
"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 Team Drive files.
+ "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.
+ },
"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.
"lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
"picture": { # The user's profile picture.
@@ -157,12 +193,30 @@
"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.
},
- "copyable": True or False, # Whether the file can be copied by the current user.
- "folderColorRgb": "A String", # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette.
+ "copyable": True or False, # Whether the file can be copied by the current user. Deprecated: use capabilities/canCopy.
+ "folderColorRgb": "A String", # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for Team Drive files.
"markedViewedByMeDate": "A String", # Deprecated.
- "ownerNames": [ # Name(s) of the owner(s) of this file.
+ "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for Team Drive files.
"A String",
],
+ "capabilities": { # Capabilities the current user has on the file. Each capability corresponds to a fine-grained action that a user may take.
+ "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. For a Team Drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
+ "canTrash": True or False, # Whether the file can be trashed by the current user.
+ "canCopy": True or False, # Whether the file can be copied by the current user. For a Team Drive item, whether non-folder descendants of this item, or this item itself if it is not a folder, can be copied.
+ "canShare": True or False, # Whether the file's sharing settings can be modified by the current user.
+ "canDelete": True or False, # Whether the file can be deleted by the current user.
+ "canMoveTeamDriveItem": True or False, # Whether the current user can move this Team Drive item by changing its parent. Note that a request to change the parent for this item may still fail depending on the new parent that is being added. Only populated for Team Drive files.
+ "canRename": True or False, # Whether the file can be renamed by the current user.
+ "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.
+ "canMoveItemIntoTeamDrive": True or False, # Whether the current user can move this item into a Team Drive. If the item is in a Team Drive, this field is equivalent to canMoveTeamDriveItem.
+ "canDownload": True or False, # Whether the file can be downloaded by the current user.
+ "canComment": True or False, # Whether the current user can comment on the file.
+ "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.
+ "canReadTeamDrive": True or False, # Whether the current user has read access to the Team Drive to which this file belongs. Only populated for Team Drive files.
+ "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.
+ "canEdit": True or False, # Whether the file can be edited by the current user.
+ "canUntrash": True or False, # Whether the file can be restored from the trash by the current user.
+ },
"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.
"etag": "A String", # ETag of the file.
@@ -179,20 +233,41 @@
"exportLinks": { # Links for exporting Google Docs to specific formats.
"a_key": "A String", # A mapping from export format to URL
},
- "shared": True or False, # Whether the file has been shared.
- "permissions": [ # The list of permissions for users with access to this file.
+ "shared": True or False, # Whether the file has been shared. Not populated for Team Drive files.
+ "permissions": [ # The list of permissions for users with access to this file. Not populated for Team Drive files.
{ # A permission for a file.
"withLink": True or False, # Whether the link is required for this permission.
"domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
"name": "A String", # The name for this permission.
+ "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
+ {
+ "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 Team Drive.
+ "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
+ # - organizer
+ # - reader
+ # - writer
+ "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
+ "A String",
+ ],
+ "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
+ # - file
+ # - member
+ "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
+ },
+ ],
"kind": "drive#permission", # This is always drive#permission.
"value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
"id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
"authKey": "A String", # The authkey parameter required for this permission.
"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).
- "role": "A String", # The primary role for this user. Allowed values are:
+ "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - 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
+ # - The date can only be set on drive.permissions.update requests
+ "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
+ # - organizer
# - owner
# - reader
# - writer
@@ -201,7 +276,7 @@
# - group
# - domain
# - anyone
- "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
+ "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
"A String",
],
"selfLink": "A String", # A link back to this permission.
@@ -212,7 +287,7 @@
"openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
"a_key": "A String",
},
- "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file.
+ "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. Deprecated: use capabilities/canReadRevisions.
"imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
"exposureBias": 3.14, # The exposure bias of the photo (APEX value).
"exposureTime": 3.14, # The length of the exposure, in seconds.
@@ -247,12 +322,13 @@
"durationMillis": "A String", # The duration of the video in milliseconds.
"height": 42, # The height of the video in pixels.
},
- "editable": True or False, # Whether the file can be edited by the current user.
+ "editable": True or False, # Whether the file can be edited by the current user. Deprecated: use capabilities/canEdit.
"kind": "drive#file", # The type of file. This is always drive#file.
- "canComment": True or False, # Whether the current user can comment on the file.
+ "canComment": True or False, # Whether the current user can comment on the file. Deprecated: use capabilities/canComment.
"quotaBytesUsed": "A String", # The number of quota bytes used by this file.
"fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in 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", # ID of the Team Drive the file resides in.
"properties": [ # The list of properties.
{ # A key-value pair attached to a file that is either public or private to an application.
# The following limits apply to file properties:
@@ -284,14 +360,35 @@
"withLink": True or False, # Whether the link is required for this permission.
"domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
"name": "A String", # The name for this permission.
+ "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
+ {
+ "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 Team Drive.
+ "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
+ # - organizer
+ # - reader
+ # - writer
+ "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
+ "A String",
+ ],
+ "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
+ # - file
+ # - member
+ "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
+ },
+ ],
"kind": "drive#permission", # This is always drive#permission.
"value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
"id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
"authKey": "A String", # The authkey parameter required for this permission.
"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).
- "role": "A String", # The primary role for this user. Allowed values are:
+ "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - 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
+ # - The date can only be set on drive.permissions.update requests
+ "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
+ # - organizer
# - owner
# - reader
# - writer
@@ -300,7 +397,7 @@
# - group
# - domain
# - anyone
- "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
+ "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
"A String",
],
"selfLink": "A String", # A link back to this permission.
@@ -309,14 +406,17 @@
"spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
"A String",
],
- "shareable": True or False, # Whether the file's sharing settings can be modified by the current user.
+ "shareable": True or False, # Whether the file's sharing settings can be modified by the current user. Deprecated: use capabilities/canShare.
"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 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 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 Team Drive files.
"headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
"selfLink": "A String", # A link back to this file.
"modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
},
"modificationDate": "A String", # The time of this modification.
+ "teamDriveId": "A String", # The ID of the Team Drive associated with this change.
+ "type": "A String", # The type of the change. Possible values are file and teamDrive.
"id": "A String", # The ID of the change.
"selfLink": "A String", # A link back to this change.
"fileId": "A String", # The ID of the file associated with this change.
@@ -324,30 +424,72 @@
</div>
<div class="method">
- <code class="details" id="list">list(includeSubscribed=None, includeDeleted=None, pageToken=None, maxResults=None, startChangeId=None, spaces=None)</code>
- <pre>Lists the changes for a user.
+ <code class="details" id="getStartPageToken">getStartPageToken(supportsTeamDrives=None, teamDriveId=None)</code>
+ <pre>Gets the starting pageToken for listing future changes.
+
+Args:
+ supportsTeamDrives: boolean, Whether the requesting application supports Team Drives.
+ teamDriveId: string, The ID of the Team Drive for which the starting pageToken for listing future changes from that Team Drive will be returned.
+
+Returns:
+ An object of the form:
+
+ {
+ "kind": "drive#startPageToken", # Identifies what kind of resource this is. Value: the fixed string "drive#startPageToken".
+ "startPageToken": "A String", # The starting page token for listing changes.
+ }</pre>
+</div>
+
+<div class="method">
+ <code class="details" id="list">list(includeSubscribed=None, includeDeleted=None, includeTeamDriveItems=None, pageToken=None, supportsTeamDrives=None, maxResults=None, startChangeId=None, spaces=None, teamDriveId=None, includeCorpusRemovals=None)</code>
+ <pre>Lists the changes for a user or Team Drive.
Args:
includeSubscribed: boolean, Whether to include public files the user has opened and shared files. When set to false, the list only includes owned files plus any shared or public files the user has explicitly added to a folder they own.
- includeDeleted: boolean, Whether to include deleted items.
- pageToken: string, Page token for changes.
+ includeDeleted: boolean, Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.
+ includeTeamDriveItems: boolean, Whether Team Drive files or changes should be included in results.
+ pageToken: string, The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method.
+ supportsTeamDrives: boolean, Whether the requesting application supports Team Drives.
maxResults: integer, Maximum number of changes to return.
startChangeId: string, Change ID to start listing changes from.
spaces: string, A comma-separated list of spaces to query. Supported values are 'drive', 'appDataFolder' and 'photos'.
+ teamDriveId: string, The Team Drive from which changes will be returned. If specified the change IDs will be reflective of the Team Drive; use the combined Team Drive ID and change ID as an identifier.
+ includeCorpusRemovals: boolean, Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.
Returns:
An object of the form:
{ # A list of changes for a user.
- "nextPageToken": "A String", # The page token for the next page of changes.
+ "nextPageToken": "A String", # The page token for the next page of changes. This will be absent if the end of the changes list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results.
"kind": "drive#changeList", # This is always drive#changeList.
- "items": [ # The actual list of changes.
- { # Representation of a change to a file.
+ "items": [ # The list of changes. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.
+ { # Representation of a change to a file or Team Drive.
+ "teamDrive": { # Representation of a Team Drive. # The updated state of the Team Drive. Present if the type is teamDrive, the user is still a member of the Team Drive, and the Team Drive has not been deleted.
+ "kind": "drive#teamDrive", # This is always drive#teamDrive
+ "id": "A String", # The ID of this Team Drive which is also the ID of the top level folder for this Team Drive.
+ "capabilities": { # Capabilities the current user has on this Team Drive.
+ "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of files in this Team Drive.
+ "canCopy": True or False, # Whether files in this Team Drive can be copied by the current user.
+ "canRename": True or False, # Whether files or folders in this Team Drive can be renamed by the current user.
+ "canListChildren": True or False, # Whether the current user can list the children of folders in this Team Drive.
+ "canShare": True or False, # Whether the current user can share files or folders in this Team Drive.
+ "canManageMembers": True or False, # Whether the current user can add members to this Team Drive or remove them or change their role.
+ "canDownload": True or False, # Whether files in this Team Drive can be downloaded by the current user.
+ "canComment": True or False, # Whether the current user can comment on files in this Team Drive.
+ "canDeleteTeamDrive": True or False, # Whether this Team Drive can be deleted by the current user.
+ "canRenameTeamDrive": True or False, # Whether this Team Drive can be renamed by the current user.
+ "canRemoveChildren": True or False, # Whether the current user can remove children from folders in this Team Drive.
+ "canAddChildren": True or False, # Whether the current user can add children to folders in this Team Drive.
+ "canEdit": True or False, # Whether files in this Team Drive can be edited by the current user.
+ },
+ "name": "A String", # The name of this Team Drive.
+ },
"kind": "drive#change", # This is always drive#change.
- "deleted": True or False, # Whether the file has been deleted.
- "file": { # The metadata for a file. # The updated state of the file. Present if the file has not been deleted.
+ "deleted": True or False, # Whether the file or Team Drive has been removed from this list of changes, for example by deletion or loss of access.
+ "file": { # The metadata for a file. # The updated state of the file. Present if the type is file and the file has not been removed from this list of changes.
"hasThumbnail": True or False, # Whether this file has a thumbnail.
"lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
+ "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for Team Drive files.
"version": "A String", # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
"appDataContents": True or False, # Whether this file is in the Application Data folder.
"thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
@@ -362,12 +504,12 @@
"indexableText": { # Indexable text attributes for the file (can only be written)
"text": "A String", # The text to be indexed for this file.
},
- "thumbnailVersion": "A String", # The thumbnail version for use in client-contructable thumbnail URLs or thumbnail cache invalidation.
+ "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
"explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
"isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
"lastModifyingUserName": "A String", # Name of the last user to modify this file.
- "writersCanShare": True or False, # Whether writers can share the document with other users.
- "owners": [ # The owner(s) of this file.
+ "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for Team Drive files.
+ "owners": [ # The owner(s) of this file. Not populated for Team Drive files.
{ # Information about a Drive user.
"picture": { # The user's profile picture.
"url": "A String", # A URL that points to a profile picture of this user.
@@ -379,7 +521,7 @@
"emailAddress": "A String", # The email address of the user.
},
],
- "ownedByMe": True or False, # Whether the file is owned by the current user.
+ "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for Team Drive files.
"id": "A String", # The ID of the file.
"sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
"picture": { # The user's profile picture.
@@ -391,6 +533,16 @@
"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 Team Drive files.
+ "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.
+ },
"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.
"lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
"picture": { # The user's profile picture.
@@ -402,12 +554,30 @@
"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.
},
- "copyable": True or False, # Whether the file can be copied by the current user.
- "folderColorRgb": "A String", # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette.
+ "copyable": True or False, # Whether the file can be copied by the current user. Deprecated: use capabilities/canCopy.
+ "folderColorRgb": "A String", # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for Team Drive files.
"markedViewedByMeDate": "A String", # Deprecated.
- "ownerNames": [ # Name(s) of the owner(s) of this file.
+ "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for Team Drive files.
"A String",
],
+ "capabilities": { # Capabilities the current user has on the file. Each capability corresponds to a fine-grained action that a user may take.
+ "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. For a Team Drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
+ "canTrash": True or False, # Whether the file can be trashed by the current user.
+ "canCopy": True or False, # Whether the file can be copied by the current user. For a Team Drive item, whether non-folder descendants of this item, or this item itself if it is not a folder, can be copied.
+ "canShare": True or False, # Whether the file's sharing settings can be modified by the current user.
+ "canDelete": True or False, # Whether the file can be deleted by the current user.
+ "canMoveTeamDriveItem": True or False, # Whether the current user can move this Team Drive item by changing its parent. Note that a request to change the parent for this item may still fail depending on the new parent that is being added. Only populated for Team Drive files.
+ "canRename": True or False, # Whether the file can be renamed by the current user.
+ "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.
+ "canMoveItemIntoTeamDrive": True or False, # Whether the current user can move this item into a Team Drive. If the item is in a Team Drive, this field is equivalent to canMoveTeamDriveItem.
+ "canDownload": True or False, # Whether the file can be downloaded by the current user.
+ "canComment": True or False, # Whether the current user can comment on the file.
+ "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.
+ "canReadTeamDrive": True or False, # Whether the current user has read access to the Team Drive to which this file belongs. Only populated for Team Drive files.
+ "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.
+ "canEdit": True or False, # Whether the file can be edited by the current user.
+ "canUntrash": True or False, # Whether the file can be restored from the trash by the current user.
+ },
"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.
"etag": "A String", # ETag of the file.
@@ -424,20 +594,41 @@
"exportLinks": { # Links for exporting Google Docs to specific formats.
"a_key": "A String", # A mapping from export format to URL
},
- "shared": True or False, # Whether the file has been shared.
- "permissions": [ # The list of permissions for users with access to this file.
+ "shared": True or False, # Whether the file has been shared. Not populated for Team Drive files.
+ "permissions": [ # The list of permissions for users with access to this file. Not populated for Team Drive files.
{ # A permission for a file.
"withLink": True or False, # Whether the link is required for this permission.
"domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
"name": "A String", # The name for this permission.
+ "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
+ {
+ "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 Team Drive.
+ "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
+ # - organizer
+ # - reader
+ # - writer
+ "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
+ "A String",
+ ],
+ "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
+ # - file
+ # - member
+ "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
+ },
+ ],
"kind": "drive#permission", # This is always drive#permission.
"value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
"id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
"authKey": "A String", # The authkey parameter required for this permission.
"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).
- "role": "A String", # The primary role for this user. Allowed values are:
+ "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - 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
+ # - The date can only be set on drive.permissions.update requests
+ "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
+ # - organizer
# - owner
# - reader
# - writer
@@ -446,7 +637,7 @@
# - group
# - domain
# - anyone
- "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
+ "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
"A String",
],
"selfLink": "A String", # A link back to this permission.
@@ -457,7 +648,7 @@
"openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used.
"a_key": "A String",
},
- "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file.
+ "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. Deprecated: use capabilities/canReadRevisions.
"imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
"exposureBias": 3.14, # The exposure bias of the photo (APEX value).
"exposureTime": 3.14, # The length of the exposure, in seconds.
@@ -492,12 +683,13 @@
"durationMillis": "A String", # The duration of the video in milliseconds.
"height": 42, # The height of the video in pixels.
},
- "editable": True or False, # Whether the file can be edited by the current user.
+ "editable": True or False, # Whether the file can be edited by the current user. Deprecated: use capabilities/canEdit.
"kind": "drive#file", # The type of file. This is always drive#file.
- "canComment": True or False, # Whether the current user can comment on the file.
+ "canComment": True or False, # Whether the current user can comment on the file. Deprecated: use capabilities/canComment.
"quotaBytesUsed": "A String", # The number of quota bytes used by this file.
"fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in 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", # ID of the Team Drive the file resides in.
"properties": [ # The list of properties.
{ # A key-value pair attached to a file that is either public or private to an application.
# The following limits apply to file properties:
@@ -529,14 +721,35 @@
"withLink": True or False, # Whether the link is required for this permission.
"domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
"name": "A String", # The name for this permission.
+ "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
+ {
+ "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 Team Drive.
+ "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
+ # - organizer
+ # - reader
+ # - writer
+ "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
+ "A String",
+ ],
+ "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
+ # - file
+ # - member
+ "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
+ },
+ ],
"kind": "drive#permission", # This is always drive#permission.
"value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
"id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
"authKey": "A String", # The authkey parameter required for this permission.
"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).
- "role": "A String", # The primary role for this user. Allowed values are:
+ "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
+ # - 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
+ # - The date can only be set on drive.permissions.update requests
+ "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
+ # - organizer
# - owner
# - reader
# - writer
@@ -545,7 +758,7 @@
# - group
# - domain
# - anyone
- "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
+ "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
"A String",
],
"selfLink": "A String", # A link back to this permission.
@@ -554,14 +767,17 @@
"spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
"A String",
],
- "shareable": True or False, # Whether the file's sharing settings can be modified by the current user.
+ "shareable": True or False, # Whether the file's sharing settings can be modified by the current user. Deprecated: use capabilities/canShare.
"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 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 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 Team Drive files.
"headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
"selfLink": "A String", # A link back to this file.
"modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
},
"modificationDate": "A String", # The time of this modification.
+ "teamDriveId": "A String", # The ID of the Team Drive associated with this change.
+ "type": "A String", # The type of the change. Possible values are file and teamDrive.
"id": "A String", # The ID of the change.
"selfLink": "A String", # A link back to this change.
"fileId": "A String", # The ID of the file associated with this change.
@@ -569,6 +785,7 @@
],
"nextLink": "A String", # A link to the next page of changes.
"etag": "A String", # The ETag of the list.
+ "newStartPageToken": "A String", # The starting page token for future changes. This will be present only if the end of the current changes list has been reached.
"largestChangeId": "A String", # The current largest change ID.
"selfLink": "A String", # A link back to this list.
}</pre>
@@ -589,7 +806,7 @@
</div>
<div class="method">
- <code class="details" id="watch">watch(body, includeSubscribed=None, includeDeleted=None, pageToken=None, maxResults=None, startChangeId=None, spaces=None)</code>
+ <code class="details" id="watch">watch(body, supportsTeamDrives=None, spaces=None, startChangeId=None, pageToken=None, includeSubscribed=None, includeDeleted=None, maxResults=None, teamDriveId=None, includeTeamDriveItems=None, includeCorpusRemovals=None)</code>
<pre>Subscribe to changes for a user.
Args:
@@ -611,12 +828,16 @@
"id": "A String", # A UUID or similar unique string that identifies this channel.
}
- includeSubscribed: boolean, Whether to include public files the user has opened and shared files. When set to false, the list only includes owned files plus any shared or public files the user has explicitly added to a folder they own.
- includeDeleted: boolean, Whether to include deleted items.
- pageToken: string, Page token for changes.
- maxResults: integer, Maximum number of changes to return.
- startChangeId: string, Change ID to start listing changes from.
+ supportsTeamDrives: boolean, Whether the requesting application supports Team Drives.
spaces: string, A comma-separated list of spaces to query. Supported values are 'drive', 'appDataFolder' and 'photos'.
+ startChangeId: string, Change ID to start listing changes from.
+ pageToken: string, The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method.
+ includeSubscribed: boolean, Whether to include public files the user has opened and shared files. When set to false, the list only includes owned files plus any shared or public files the user has explicitly added to a folder they own.
+ includeDeleted: boolean, Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.
+ maxResults: integer, Maximum number of changes to return.
+ teamDriveId: string, The Team Drive from which changes will be returned. If specified the change IDs will be reflective of the Team Drive; use the combined Team Drive ID and change ID as an identifier.
+ includeTeamDriveItems: boolean, Whether Team Drive files or changes should be included in results.
+ includeCorpusRemovals: boolean, Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.
Returns:
An object of the form: