Skip to main content
Glama

Google Drive MCP Server

by qingyun-wu
models.py75.7 kB
# generated by fastapi-codegen: # filename: openapi.yaml # timestamp: 2025-07-07T16:57:42+00:00 from __future__ import annotations from datetime import date, datetime from enum import Enum from typing import Dict, List, Optional from pydantic import BaseModel, Field class DriveTheme(BaseModel): backgroundImageLink: Optional[str] = Field( None, description="A link to this theme's background image." ) colorRgb: Optional[str] = Field( None, description='The color of this theme as an RGB hex string.' ) id: Optional[str] = Field(None, description='The ID of the theme.') class StorageQuota(BaseModel): limit: Optional[str] = Field( None, description='The usage limit, if applicable. This will not be present if the user has unlimited storage.', ) usage: Optional[str] = Field( None, description='The total usage across all services.' ) usageInDrive: Optional[str] = Field( None, description='The usage by all files in Google Drive.' ) usageInDriveTrash: Optional[str] = Field( None, description='The usage by trashed files in Google Drive.' ) class TeamDriveTheme(BaseModel): backgroundImageLink: Optional[str] = Field( None, description='Deprecated - use driveThemes/backgroundImageLink instead.' ) colorRgb: Optional[str] = Field( None, description='Deprecated - use driveThemes/colorRgb instead.' ) id: Optional[str] = Field( None, description='Deprecated - use driveThemes/id instead.' ) class Channel(BaseModel): address: Optional[str] = Field( None, description='The address where notifications are delivered for this channel.', ) expiration: Optional[str] = Field( None, description='Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.', ) id: Optional[str] = Field( None, description='A UUID or similar unique string that identifies this channel.', ) kind: Optional[str] = Field( 'api#channel', description='Identifies this as a notification channel used to watch for changes to a resource, which is "api#channel".', ) params: Optional[Dict[str, str]] = Field( None, description='Additional parameters controlling delivery channel behavior. Optional.', ) payload: Optional[bool] = Field( None, description='A Boolean value to indicate whether payload is wanted. Optional.', ) resourceId: Optional[str] = Field( None, description='An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.', ) resourceUri: Optional[str] = Field( None, description='A version-specific identifier for the watched resource.' ) token: Optional[str] = Field( None, description='An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.', ) type: Optional[str] = Field( None, description='The type of delivery mechanism used for this channel. Valid values are "web_hook" (or "webhook"). Both values refer to a channel where Http requests are used to deliver messages.', ) class QuotedFileContent(BaseModel): mimeType: Optional[str] = Field( None, description='The MIME type of the quoted content.' ) value: Optional[str] = Field( None, description='The quoted content itself. This is interpreted as plain text if set through the API.', ) class BackgroundImageFile(BaseModel): id: Optional[str] = Field( None, description='The ID of an image file in Google Drive to use for the background image.', ) width: Optional[float] = Field( None, description='The width of the cropped image in the closed range of 0 to 1. This value represents the width of the cropped image divided by the width of the entire image. The height is computed by applying a width to height aspect ratio of 80 to 9. The resulting image must be at least 1280 pixels wide and 144 pixels high.', ) xCoordinate: Optional[float] = Field( None, description='The X coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the horizontal distance from the left side of the entire image to the left side of the cropping area divided by the width of the entire image.', ) yCoordinate: Optional[float] = Field( None, description='The Y coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the vertical distance from the top side of the entire image to the top side of the cropping area divided by the height of the entire image.', ) class Capabilities(BaseModel): canAddChildren: Optional[bool] = Field( None, description='Whether the current user can add children to folders in this shared drive.', ) canChangeCopyRequiresWriterPermissionRestriction: Optional[bool] = Field( None, description='Whether the current user can change the copyRequiresWriterPermission restriction of this shared drive.', ) canChangeDomainUsersOnlyRestriction: Optional[bool] = Field( None, description='Whether the current user can change the domainUsersOnly restriction of this shared drive.', ) canChangeDriveBackground: Optional[bool] = Field( None, description='Whether the current user can change the background of this shared drive.', ) canChangeDriveMembersOnlyRestriction: Optional[bool] = Field( None, description='Whether the current user can change the driveMembersOnly restriction of this shared drive.', ) canChangeSharingFoldersRequiresOrganizerPermissionRestriction: Optional[bool] = ( Field( None, description='Whether the current user can change the sharingFoldersRequiresOrganizerPermission restriction of this shared drive.', ) ) canComment: Optional[bool] = Field( None, description='Whether the current user can comment on files in this shared drive.', ) canCopy: Optional[bool] = Field( None, description='Whether the current user can copy files in this shared drive.', ) canDeleteChildren: Optional[bool] = Field( None, description='Whether the current user can delete children from folders in this shared drive.', ) canDeleteDrive: Optional[bool] = Field( None, description='Whether the current user can delete this shared drive. Attempting to delete the shared drive may still fail if there are untrashed items inside the shared drive.', ) canDownload: Optional[bool] = Field( None, description='Whether the current user can download files in this shared drive.', ) canEdit: Optional[bool] = Field( None, description='Whether the current user can edit files in this shared drive' ) canListChildren: Optional[bool] = Field( None, description='Whether the current user can list the children of folders in this shared drive.', ) canManageMembers: Optional[bool] = Field( None, description='Whether the current user can add members to this shared drive or remove them or change their role.', ) canReadRevisions: Optional[bool] = Field( None, description='Whether the current user can read the revisions resource of files in this shared drive.', ) canRename: Optional[bool] = Field( None, description='Whether the current user can rename files or folders in this shared drive.', ) canRenameDrive: Optional[bool] = Field( None, description='Whether the current user can rename this shared drive.' ) canResetDriveRestrictions: Optional[bool] = Field( None, description='Whether the current user can reset the shared drive restrictions to defaults.', ) canShare: Optional[bool] = Field( None, description='Whether the current user can share files or folders in this shared drive.', ) canTrashChildren: Optional[bool] = Field( None, description='Whether the current user can trash children from folders in this shared drive.', ) class Restrictions(BaseModel): adminManagedRestrictions: Optional[bool] = Field( None, description='Whether administrative privileges on this shared drive are required to modify restrictions.', ) copyRequiresWriterPermission: Optional[bool] = Field( None, description='Whether the options to copy, print, or download files inside this shared drive, should be disabled for readers and commenters. When this restriction is set to true, it will override the similarly named field to true for any file inside this shared drive.', ) domainUsersOnly: Optional[bool] = Field( None, description='Whether access to this shared drive and items inside this shared drive is restricted to users of the domain to which this shared drive belongs. This restriction may be overridden by other sharing policies controlled outside of this shared drive.', ) driveMembersOnly: Optional[bool] = Field( None, description='Whether access to items inside this shared drive is restricted to its members.', ) sharingFoldersRequiresOrganizerPermission: Optional[bool] = Field( None, description='If true, only users with the organizer role can share folders. If false, users with either the organizer role or the file organizer role can share folders.', ) class Drive(BaseModel): backgroundImageFile: Optional[BackgroundImageFile] = Field( None, description="An image file and cropping parameters from which a background image for this shared drive is set. This is a write-only field; it can only be set on drive.drives.update requests that don't set themeId. When specified, all fields of the backgroundImageFile must be set.", ) backgroundImageLink: Optional[str] = Field( None, description="A short-lived link to this shared drive's background image." ) capabilities: Optional[Capabilities] = Field( None, description='Capabilities the current user has on this shared drive.' ) colorRgb: Optional[str] = Field( None, description="The color of this shared drive as an RGB hex string. It can only be set on drive.drives.update requests that don't set themeId.", ) createdTime: Optional[datetime] = Field( None, description='The time at which the shared drive was created (RFC 3339 date-time).', ) hidden: Optional[bool] = Field( None, description='Whether the shared drive is hidden from default view.' ) id: Optional[str] = Field( None, description='The ID of this shared drive which is also the ID of the top level folder of this shared drive.', ) kind: Optional[str] = Field( 'drive#drive', description='Identifies what kind of resource this is. Value: the fixed string "drive#drive".', ) name: Optional[str] = Field(None, description='The name of this shared drive.') orgUnitId: Optional[str] = Field( None, description='The organizational unit of this shared drive. This field is only populated on drives.list responses when the useDomainAdminAccess parameter is set to true.', ) restrictions: Optional[Restrictions] = Field( None, description='A set of restrictions that apply to this shared drive or items inside this shared drive.', ) themeId: Optional[str] = Field( None, description="The ID of the theme from which the background image and color are set. The set of possible driveThemes can be retrieved from a drive.about.get response. When not specified on a drive.drives.create request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile.", ) class DriveList(BaseModel): drives: Optional[List[Drive]] = Field( None, description='The list of shared drives. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.', ) kind: Optional[str] = Field( 'drive#driveList', description='Identifies what kind of resource this is. Value: the fixed string "drive#driveList".', ) nextPageToken: Optional[str] = Field( None, description='The page token for the next page of shared drives. This will be absent if the end of the 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.', ) class Capabilities1(BaseModel): canAcceptOwnership: Optional[bool] = Field( None, description='Whether the current user is the pending owner of the file. Not populated for shared drive files.', ) canAddChildren: Optional[bool] = Field( None, description="Whether the current user can add children to this folder. This is always false when the item isn't a folder.", ) canAddFolderFromAnotherDrive: Optional[bool] = Field( None, description="Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is false when the item isn't a folder. Only populated for items in shared drives.", ) canAddMyDriveParent: Optional[bool] = Field( None, description='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.', ) canChangeCopyRequiresWriterPermission: Optional[bool] = Field( None, description='Whether the current user can change the copyRequiresWriterPermission restriction of this file.', ) canChangeSecurityUpdateEnabled: Optional[bool] = Field( None, description='Whether the current user can change the securityUpdateEnabled field on link share metadata.', ) canChangeViewersCanCopyContent: Optional[bool] = Field( None, description='Deprecated' ) canComment: Optional[bool] = Field( None, description='Whether the current user can comment on this file.' ) canCopy: Optional[bool] = Field( None, description="Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it's not a folder.", ) canDelete: Optional[bool] = Field( None, description='Whether the current user can delete this file.' ) canDeleteChildren: Optional[bool] = Field( None, description="Whether the current user can delete children of this folder. This is false when the item isn't a folder. Only populated for items in shared drives.", ) canDownload: Optional[bool] = Field( None, description='Whether the current user can download this file.' ) canEdit: Optional[bool] = Field( None, description='Whether the current user can edit this file. Other factors might limit the type of changes a user can make to a file. For example, see canChangeCopyRequiresWriterPermission or canModifyContent.', ) canListChildren: Optional[bool] = Field( None, description="Whether the current user can list the children of this folder. This is always false when the item isn't a folder.", ) canModifyContent: Optional[bool] = Field( None, description='Whether the current user can modify the content of this file.', ) canModifyContentRestriction: Optional[bool] = Field( None, description='Whether the current user can modify restrictions on content of this file.', ) canModifyLabels: Optional[bool] = Field( None, description='Whether the current user can modify the labels on this file.' ) canMoveChildrenOutOfDrive: Optional[bool] = Field( None, description="Whether the current user can move children of this folder outside of the shared drive. This is false when the item isn't a folder. Only populated for items in shared drives.", ) canMoveChildrenOutOfTeamDrive: Optional[bool] = Field( None, description='Deprecated - use canMoveChildrenOutOfDrive instead.' ) canMoveChildrenWithinDrive: Optional[bool] = Field( None, description="Whether the current user can move children of this folder within this shared drive or My Drive. This is false when the item isn't a folder. Note that a request to move the child might still fail depending on the current user's access to the child and to the destination folder.", ) canMoveChildrenWithinTeamDrive: Optional[bool] = Field( None, description='Deprecated - use canMoveChildrenWithinDrive instead.' ) canMoveItemIntoTeamDrive: Optional[bool] = Field( None, description='Deprecated - use canMoveItemOutOfDrive instead.' ) canMoveItemOutOfDrive: Optional[bool] = Field( None, description="Whether the current user can move this item outside of this shared drive or My Drive by changing its parent. Note that a request to change the parent of the item might still fail depending on the new parent that's being added.", ) canMoveItemOutOfTeamDrive: Optional[bool] = Field( None, description='Deprecated - use canMoveItemOutOfDrive instead.' ) canMoveItemWithinDrive: Optional[bool] = Field( None, description="Whether the current user can move this item within this shared drive or My Drive. Note that a request to change the parent of the item might still fail depending on the new parent that's being added and the parent that's being removed.", ) canMoveItemWithinTeamDrive: Optional[bool] = Field( None, description='Deprecated - use canMoveItemWithinDrive instead.' ) canMoveTeamDriveItem: Optional[bool] = Field( None, description='Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.', ) canReadDrive: Optional[bool] = Field( None, description='Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.', ) canReadLabels: Optional[bool] = Field( None, description='Whether the current user can read the labels on this file.' ) canReadRevisions: Optional[bool] = Field( None, description="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's not a folder, can be read.", ) canReadTeamDrive: Optional[bool] = Field( None, description='Deprecated - use canReadDrive instead.' ) canRemoveChildren: Optional[bool] = Field( None, description="Whether the current user can remove children from this folder. This is always false when the item isn't a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead.", ) canRemoveMyDriveParent: Optional[bool] = Field( None, description='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.', ) canRename: Optional[bool] = Field( None, description='Whether the current user can rename this file.' ) canShare: Optional[bool] = Field( None, description='Whether the current user can modify the sharing settings for this file.', ) canTrash: Optional[bool] = Field( None, description='Whether the current user can move this file to trash.' ) canTrashChildren: Optional[bool] = Field( None, description="Whether the current user can trash children of this folder. This is false when the item isn't a folder. Only populated for items in shared drives.", ) canUntrash: Optional[bool] = Field( None, description='Whether the current user can restore this file from trash.' ) class Thumbnail(BaseModel): image: Optional[str] = Field( None, description='The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).', ) mimeType: Optional[str] = Field(None, description='The MIME type of the thumbnail.') class ContentHints(BaseModel): indexableText: Optional[str] = Field( None, description='Text to be indexed for the file to improve fullText queries. This is limited to 128 KB in length and might contain HTML elements. For more information, see Manage file metadata.', ) thumbnail: Optional[Thumbnail] = Field( None, description='A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.', ) class Location(BaseModel): altitude: Optional[float] = Field( None, description='The altitude stored in the image.' ) latitude: Optional[float] = Field( None, description='The latitude stored in the image.' ) longitude: Optional[float] = Field( None, description='The longitude stored in the image.' ) class ImageMediaMetadata(BaseModel): aperture: Optional[float] = Field( None, description='The aperture used to create the photo (f-number).' ) cameraMake: Optional[str] = Field( None, description='The make of the camera used to create the photo.' ) cameraModel: Optional[str] = Field( None, description='The model of the camera used to create the photo.' ) colorSpace: Optional[str] = Field(None, description='The color space of the photo.') exposureBias: Optional[float] = Field( None, description='The exposure bias of the photo (APEX value).' ) exposureMode: Optional[str] = Field( None, description='The exposure mode used to create the photo.' ) exposureTime: Optional[float] = Field( None, description='The length of the exposure, in seconds.' ) flashUsed: Optional[bool] = Field( None, description='Whether a flash was used to create the photo.' ) focalLength: Optional[float] = Field( None, description='The focal length used to create the photo, in millimeters.' ) height: Optional[int] = Field( None, description='The height of the image in pixels.' ) isoSpeed: Optional[int] = Field( None, description='The ISO speed used to create the photo.' ) lens: Optional[str] = Field(None, description='The lens used to create the photo.') location: Optional[Location] = Field( None, description='Geographic location information stored in the image.' ) maxApertureValue: Optional[float] = Field( None, description='The smallest f-number of the lens at the focal length used to create the photo (APEX value).', ) meteringMode: Optional[str] = Field( None, description='The metering mode used to create the photo.' ) rotation: Optional[int] = Field( None, description="The number of clockwise 90-degree rotations applied from the image's original orientation.", ) sensor: Optional[str] = Field( None, description='The type of sensor used to create the photo.' ) subjectDistance: Optional[int] = Field( None, description='The distance to the subject of the photo, in meters.' ) time: Optional[str] = Field( None, description='The date and time the photo was taken (EXIF DateTime).' ) whiteBalance: Optional[str] = Field( None, description='The white balance mode used to create the photo.' ) width: Optional[int] = Field(None, description='The width of the image in pixels.') class LinkShareMetadata(BaseModel): securityUpdateEligible: Optional[bool] = Field( None, description='Whether the file is eligible for security update.' ) securityUpdateEnabled: Optional[bool] = Field( None, description='Whether the security update is enabled for this file.' ) class ShortcutDetails(BaseModel): targetId: Optional[str] = Field( None, description='The ID of the file that this shortcut points to.' ) targetMimeType: Optional[str] = Field( None, description="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.", ) targetResourceKey: Optional[str] = Field( None, description='The ResourceKey for the target file.' ) class VideoMediaMetadata(BaseModel): durationMillis: Optional[str] = Field( None, description='The duration of the video in milliseconds.' ) height: Optional[int] = Field( None, description='The height of the video in pixels.' ) width: Optional[int] = Field(None, description='The width of the video in pixels.') class GeneratedIds(BaseModel): ids: Optional[List[str]] = Field( None, description='The IDs generated for the requesting user in the specified space.', ) kind: Optional[str] = Field( 'drive#generatedIds', description='Identifies what kind of resource this is. Value: the fixed string "drive#generatedIds".', ) space: Optional[str] = Field( None, description='The type of file that can be created with these IDs.' ) class LabelFieldModification(BaseModel): fieldId: Optional[str] = Field( None, description='The ID of the Field to be modified.' ) kind: Optional[str] = Field( 'drive#labelFieldModification', description='This is always drive#labelFieldModification.', ) setDateValues: Optional[List[date]] = Field( None, description='Replaces a dateString field with these new values. The values must be strings in the RFC 3339 full-date format: YYYY-MM-DD.', ) setIntegerValues: Optional[List[str]] = Field( None, description='Replaces an integer field with these new values.' ) setSelectionValues: Optional[List[str]] = Field( None, description='Replaces a selection field with these new values.' ) setTextValues: Optional[List[str]] = Field( None, description='Replaces a text field with these new values.' ) setUserValues: Optional[List[str]] = Field( None, description='Replaces a user field with these new values. The values must be valid email addresses.', ) unsetValues: Optional[bool] = Field( None, description='Unsets the values for this field.' ) class LabelModification(BaseModel): fieldModifications: Optional[List[LabelFieldModification]] = Field( None, description="The list of modifications to this label's fields." ) kind: Optional[str] = Field( 'drive#labelModification', description='This is always drive#labelModification.' ) labelId: Optional[str] = Field(None, description='The ID of the label to modify.') removeLabel: Optional[bool] = Field( None, description='If true, the label will be removed from the file.' ) class ModifyLabelsRequest(BaseModel): kind: Optional[str] = Field( 'drive#modifyLabelsRequest', description='This is always drive#modifyLabelsRequest', ) labelModifications: Optional[List[LabelModification]] = Field( None, description='The list of modifications to apply to the labels on the file.', ) class PermissionDetail(BaseModel): inherited: Optional[bool] = Field( None, description='Whether this permission is inherited. This field is always populated. This is an output-only field.', ) inheritedFrom: Optional[str] = Field( None, description='The ID of the item from which this permission is inherited. This is an output-only field.', ) permissionType: Optional[str] = Field( None, description='The permission type for this user. While new values may be added in future, the following are currently allowed: \n- file \n- member', ) role: Optional[str] = Field( None, description='The primary role for this user. While new values may be added in the future, the following are currently allowed: \n- organizer \n- fileOrganizer \n- writer \n- commenter \n- reader', ) class TeamDrivePermissionDetail(BaseModel): inherited: Optional[bool] = Field( None, description='Deprecated - use permissionDetails/inherited instead.' ) inheritedFrom: Optional[str] = Field( None, description='Deprecated - use permissionDetails/inheritedFrom instead.' ) role: Optional[str] = Field( None, description='Deprecated - use permissionDetails/role instead.' ) teamDrivePermissionType: Optional[str] = Field( None, description='Deprecated - use permissionDetails/permissionType instead.' ) class Permission(BaseModel): allowFileDiscovery: Optional[bool] = Field( None, description='Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.', ) deleted: Optional[bool] = Field( None, description='Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.', ) displayName: Optional[str] = Field( None, description='The "pretty" name of the value of the permission. The following is a list of examples for each type of permission: \n- user - User\'s full name, as defined for their Google Account, such as "Joe Smith." \n- group - Name of the Google Group, such as "The Company Administrators." \n- domain - String domain name, such as "your-company.com." \n- anyone - No displayName is present.', ) domain: Optional[str] = Field( None, description='The domain to which this permission refers. The following options are currently allowed: \n- The entire domain, such as "your-company.com." \n- A target audience, such as "ID.audience.googledomains.com."', ) emailAddress: Optional[str] = Field( None, description='The email address of the user or group to which this permission refers.', ) expirationTime: Optional[datetime] = Field( None, description='The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: \n- They cannot be set on shared drive items. \n- They can only be set on user and group permissions. \n- The time must be in the future. \n- The time cannot be more than one year in the future.', ) id: Optional[str] = Field( None, description='The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.', ) kind: Optional[str] = Field( 'drive#permission', description='Identifies what kind of resource this is. Value: the fixed string "drive#permission".', ) pendingOwner: Optional[bool] = Field( None, description="Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that aren't in a shared drive.", ) permissionDetails: Optional[List[PermissionDetail]] = Field( None, description="Details of whether the permissions on this shared drive item are inherited or are directly on this item. This is an output-only field that's present only for shared drive items.", ) photoLink: Optional[str] = Field( None, description="A link to the user's profile photo, if available." ) role: Optional[str] = Field( None, description='The role granted by this permission. While new values may be supported in the future, the following are currently allowed: \n- owner \n- organizer \n- fileOrganizer \n- writer \n- commenter \n- reader', ) teamDrivePermissionDetails: Optional[List[TeamDrivePermissionDetail]] = Field( None, description='Deprecated - use permissionDetails instead.' ) type: Optional[str] = Field( None, description="The type of the grantee. Valid values are: \n- user \n- group \n- domain \n- anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for the anyone type.", ) view: Optional[str] = Field( None, description='Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.', ) class PermissionList(BaseModel): kind: Optional[str] = Field( 'drive#permissionList', description='Identifies what kind of resource this is. Value: the fixed string "drive#permissionList".', ) nextPageToken: Optional[str] = Field( None, description='The page token for the next page of permissions. This field will be absent if the end of the permissions 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.', ) permissions: Optional[List[Permission]] = Field( None, description='The list of permissions. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.', ) class StartPageToken(BaseModel): kind: Optional[str] = Field( 'drive#startPageToken', description='Identifies what kind of resource this is. Value: the fixed string "drive#startPageToken".', ) startPageToken: Optional[str] = Field( None, description='The starting page token for listing changes.' ) class BackgroundImageFile1(BaseModel): id: Optional[str] = Field( None, description='The ID of an image file in Drive to use for the background image.', ) width: Optional[float] = Field( None, description='The width of the cropped image in the closed range of 0 to 1. This value represents the width of the cropped image divided by the width of the entire image. The height is computed by applying a width to height aspect ratio of 80 to 9. The resulting image must be at least 1280 pixels wide and 144 pixels high.', ) xCoordinate: Optional[float] = Field( None, description='The X coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the horizontal distance from the left side of the entire image to the left side of the cropping area divided by the width of the entire image.', ) yCoordinate: Optional[float] = Field( None, description='The Y coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the vertical distance from the top side of the entire image to the top side of the cropping area divided by the height of the entire image.', ) class Capabilities2(BaseModel): canAddChildren: Optional[bool] = Field( None, description='Whether the current user can add children to folders in this Team Drive.', ) canChangeCopyRequiresWriterPermissionRestriction: Optional[bool] = Field( None, description='Whether the current user can change the copyRequiresWriterPermission restriction of this Team Drive.', ) canChangeDomainUsersOnlyRestriction: Optional[bool] = Field( None, description='Whether the current user can change the domainUsersOnly restriction of this Team Drive.', ) canChangeSharingFoldersRequiresOrganizerPermissionRestriction: Optional[bool] = ( Field( None, description='Whether the current user can change the sharingFoldersRequiresOrganizerPermission restriction of this Team Drive.', ) ) canChangeTeamDriveBackground: Optional[bool] = Field( None, description='Whether the current user can change the background of this Team Drive.', ) canChangeTeamMembersOnlyRestriction: Optional[bool] = Field( None, description='Whether the current user can change the teamMembersOnly restriction of this Team Drive.', ) canComment: Optional[bool] = Field( None, description='Whether the current user can comment on files in this Team Drive.', ) canCopy: Optional[bool] = Field( None, description='Whether the current user can copy files in this Team Drive.' ) canDeleteChildren: Optional[bool] = Field( None, description='Whether the current user can delete children from folders in this Team Drive.', ) canDeleteTeamDrive: Optional[bool] = Field( None, description='Whether the current user can delete this Team Drive. Attempting to delete the Team Drive may still fail if there are untrashed items inside the Team Drive.', ) canDownload: Optional[bool] = Field( None, description='Whether the current user can download files in this Team Drive.', ) canEdit: Optional[bool] = Field( None, description='Whether the current user can edit files in this Team Drive' ) canListChildren: Optional[bool] = Field( None, description='Whether the current user can list the children of folders in this Team Drive.', ) canManageMembers: Optional[bool] = Field( None, description='Whether the current user can add members to this Team Drive or remove them or change their role.', ) canReadRevisions: Optional[bool] = Field( None, description='Whether the current user can read the revisions resource of files in this Team Drive.', ) canRemoveChildren: Optional[bool] = Field( None, description='Deprecated - use canDeleteChildren or canTrashChildren instead.', ) canRename: Optional[bool] = Field( None, description='Whether the current user can rename files or folders in this Team Drive.', ) canRenameTeamDrive: Optional[bool] = Field( None, description='Whether the current user can rename this Team Drive.' ) canResetTeamDriveRestrictions: Optional[bool] = Field( None, description='Whether the current user can reset the Team Drive restrictions to defaults.', ) canShare: Optional[bool] = Field( None, description='Whether the current user can share files or folders in this Team Drive.', ) canTrashChildren: Optional[bool] = Field( None, description='Whether the current user can trash children from folders in this Team Drive.', ) class Restrictions1(BaseModel): adminManagedRestrictions: Optional[bool] = Field( None, description='Whether administrative privileges on this Team Drive are required to modify restrictions.', ) copyRequiresWriterPermission: Optional[bool] = Field( None, description='Whether the options to copy, print, or download files inside this Team Drive, should be disabled for readers and commenters. When this restriction is set to true, it will override the similarly named field to true for any file inside this Team Drive.', ) domainUsersOnly: Optional[bool] = Field( None, description='Whether access to this Team Drive and items inside this Team Drive is restricted to users of the domain to which this Team Drive belongs. This restriction may be overridden by other sharing policies controlled outside of this Team Drive.', ) sharingFoldersRequiresOrganizerPermission: Optional[bool] = Field( None, description='If true, only users with the organizer role can share folders. If false, users with either the organizer role or the file organizer role can share folders.', ) teamMembersOnly: Optional[bool] = Field( None, description='Whether access to items inside this Team Drive is restricted to members of this Team Drive.', ) class TeamDrive(BaseModel): backgroundImageFile: Optional[BackgroundImageFile1] = Field( None, description="An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on drive.teamdrives.update requests that don't set themeId. When specified, all fields of the backgroundImageFile must be set.", ) backgroundImageLink: Optional[str] = Field( None, description="A short-lived link to this Team Drive's background image." ) capabilities: Optional[Capabilities2] = Field( None, description='Capabilities the current user has on this Team Drive.' ) colorRgb: Optional[str] = Field( None, description='The color of this Team Drive as an RGB hex string. It can only be set on a drive.teamdrives.update request that does not set themeId.', ) createdTime: Optional[datetime] = Field( None, description='The time at which the Team Drive was created (RFC 3339 date-time).', ) id: Optional[str] = Field( None, description='The ID of this Team Drive which is also the ID of the top level folder of this Team Drive.', ) kind: Optional[str] = Field( 'drive#teamDrive', description='Identifies what kind of resource this is. Value: the fixed string "drive#teamDrive".', ) name: Optional[str] = Field(None, description='The name of this Team Drive.') orgUnitId: Optional[str] = Field( None, description='The organizational unit of this shared drive. This field is only populated on drives.list responses when the useDomainAdminAccess parameter is set to true.', ) restrictions: Optional[Restrictions1] = Field( None, description='A set of restrictions that apply to this Team Drive or items inside this Team Drive.', ) themeId: Optional[str] = Field( None, description="The ID of the theme from which the background image and color will be set. The set of possible teamDriveThemes can be retrieved from a drive.about.get response. When not specified on a drive.teamdrives.create request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile.", ) class TeamDriveList(BaseModel): kind: Optional[str] = Field( 'drive#teamDriveList', description='Identifies what kind of resource this is. Value: the fixed string "drive#teamDriveList".', ) nextPageToken: Optional[str] = Field( None, description='The page token for the next page of Team Drives. This will be absent if the end of the Team Drives 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.', ) teamDrives: Optional[List[TeamDrive]] = Field( None, description='The list of Team Drives. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.', ) class User(BaseModel): displayName: Optional[str] = Field( None, description='A plain text displayable name for this user.' ) emailAddress: Optional[str] = Field( None, description='The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.', ) kind: Optional[str] = Field( 'drive#user', description='Identifies what kind of resource this is. Value: the fixed string "drive#user".', ) me: Optional[bool] = Field( None, description='Whether this user is the requesting user.' ) permissionId: Optional[str] = Field( None, description="The user's ID as visible in Permission resources." ) photoLink: Optional[str] = Field( None, description="A link to the user's profile photo, if available." ) class Alt(Enum): json = 'json' class Corpus(Enum): domain = 'domain' user = 'user' class About(BaseModel): appInstalled: Optional[bool] = Field( None, description='Whether the user has installed the requesting app.' ) canCreateDrives: Optional[bool] = Field( None, description='Whether the user can create shared drives.' ) canCreateTeamDrives: Optional[bool] = Field( None, description='Deprecated - use canCreateDrives instead.' ) driveThemes: Optional[List[DriveTheme]] = Field( None, description='A list of themes that are supported for shared drives.' ) exportFormats: Optional[Dict[str, List[str]]] = Field( None, description='A map of source MIME type to possible targets for all supported exports.', ) folderColorPalette: Optional[List[str]] = Field( None, description='The currently supported folder colors as RGB hex strings.' ) importFormats: Optional[Dict[str, List[str]]] = Field( None, description='A map of source MIME type to possible targets for all supported imports.', ) kind: Optional[str] = Field( 'drive#about', description='Identifies what kind of resource this is. Value: the fixed string "drive#about".', ) maxImportSizes: Optional[Dict[str, str]] = Field( None, description='A map of maximum import sizes by MIME type, in bytes.' ) maxUploadSize: Optional[str] = Field( None, description='The maximum upload size in bytes.' ) storageQuota: Optional[StorageQuota] = Field( None, description="The user's storage quota limits and usage. All fields are measured in bytes.", ) teamDriveThemes: Optional[List[TeamDriveTheme]] = Field( None, description='Deprecated - use driveThemes instead.' ) user: Optional[User] = Field(None, description='The authenticated user.') class ContentRestriction(BaseModel): readOnly: Optional[bool] = Field( None, description='Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified.', ) reason: Optional[str] = Field( None, description='Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.', ) restrictingUser: Optional[User] = Field( None, description='The user who set the content restriction. Only populated if readOnly is true.', ) restrictionTime: Optional[datetime] = Field( None, description='The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.', ) type: Optional[str] = Field( None, description='The type of the content restriction. Currently the only possible value is globalContentRestriction.', ) class LabelField(BaseModel): dateString: Optional[List[date]] = Field( None, description='Only present if valueType is dateString. RFC 3339 formatted date: YYYY-MM-DD.', ) id: Optional[str] = Field(None, description='The identifier of this field.') integer: Optional[List[str]] = Field( None, description='Only present if valueType is integer.' ) kind: Optional[str] = Field( 'drive#labelField', description='This is always drive#labelField.' ) selection: Optional[List[str]] = Field( None, description='Only present if valueType is selection.' ) text: Optional[List[str]] = Field( None, description='Only present if valueType is text.' ) user: Optional[List[User]] = Field( None, description='Only present if valueType is user.' ) valueType: Optional[str] = Field( None, description='The field type. While new values may be supported in the future, the following are currently allowed: \n- dateString \n- integer \n- selection \n- text \n- user', ) class Reply(BaseModel): action: Optional[str] = Field( None, description='The action the reply performed to the parent comment. Valid values are: \n- resolve \n- reopen', ) author: Optional[User] = Field( None, description="The author of the reply. The author's email address and permission ID will not be populated.", ) content: Optional[str] = Field( None, description='The plain text content of the reply. This field is used for setting the content, while htmlContent should be displayed. This is required on creates if no action is specified.', ) createdTime: Optional[datetime] = Field( None, description='The time at which the reply was created (RFC 3339 date-time).', ) deleted: Optional[bool] = Field( None, description='Whether the reply has been deleted. A deleted reply has no content.', ) htmlContent: Optional[str] = Field( None, description='The content of the reply with HTML formatting.' ) id: Optional[str] = Field(None, description='The ID of the reply.') kind: Optional[str] = Field( 'drive#reply', description='Identifies what kind of resource this is. Value: the fixed string "drive#reply".', ) modifiedTime: Optional[datetime] = Field( None, description='The last time the reply was modified (RFC 3339 date-time).' ) class ReplyList(BaseModel): kind: Optional[str] = Field( 'drive#replyList', description='Identifies what kind of resource this is. Value: the fixed string "drive#replyList".', ) nextPageToken: Optional[str] = Field( None, description='The page token for the next page of replies. This will be absent if the end of the replies 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.', ) replies: Optional[List[Reply]] = Field( None, description='The list of replies. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.', ) class Revision(BaseModel): exportLinks: Optional[Dict[str, str]] = Field( None, description='Links for exporting Docs Editors files to specific formats.' ) id: Optional[str] = Field(None, description='The ID of the revision.') keepForever: Optional[bool] = Field( None, description='Whether to keep this revision forever, even if it is no longer the head revision. If not set, the revision will be automatically purged 30 days after newer content is uploaded. This can be set on a maximum of 200 revisions for a file.\nThis field is only applicable to files with binary content in Drive.', ) kind: Optional[str] = Field( 'drive#revision', description='Identifies what kind of resource this is. Value: the fixed string "drive#revision".', ) lastModifyingUser: Optional[User] = Field( None, description='The last user to modify this revision.' ) md5Checksum: Optional[str] = Field( None, description="The MD5 checksum of the revision's content. This is only applicable to files with binary content in Drive.", ) mimeType: Optional[str] = Field(None, description='The MIME type of the revision.') modifiedTime: Optional[datetime] = Field( None, description='The last time the revision was modified (RFC 3339 date-time).', ) originalFilename: Optional[str] = Field( None, description='The original filename used to create this revision. This is only applicable to files with binary content in Drive.', ) publishAuto: Optional[bool] = Field( None, description='Whether subsequent revisions will be automatically republished. This is only applicable to Docs Editors files.', ) published: Optional[bool] = Field( None, description='Whether this revision is published. This is only applicable to Docs Editors files.', ) publishedLink: Optional[str] = Field( None, description='A link to the published revision. This is only populated for Google Sites files.', ) publishedOutsideDomain: Optional[bool] = Field( None, description='Whether this revision is published outside the domain. This is only applicable to Docs Editors files.', ) size: Optional[str] = Field( None, description="The size of the revision's content in bytes. This is only applicable to files with binary content in Drive.", ) class RevisionList(BaseModel): kind: Optional[str] = Field( 'drive#revisionList', description='Identifies what kind of resource this is. Value: the fixed string "drive#revisionList".', ) nextPageToken: Optional[str] = Field( None, description='The page token for the next page of revisions. This will be absent if the end of the revisions 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.', ) revisions: Optional[List[Revision]] = Field( None, description='The list of revisions. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.', ) class Comment(BaseModel): anchor: Optional[str] = Field( None, description='A region of the document represented as a JSON string. For details on defining anchor properties, refer to Add comments and replies.', ) author: Optional[User] = Field( None, description="The author of the comment. The author's email address and permission ID will not be populated.", ) content: Optional[str] = Field( None, description='The plain text content of the comment. This field is used for setting the content, while htmlContent should be displayed.', ) createdTime: Optional[datetime] = Field( None, description='The time at which the comment was created (RFC 3339 date-time).', ) deleted: Optional[bool] = Field( None, description='Whether the comment has been deleted. A deleted comment has no content.', ) htmlContent: Optional[str] = Field( None, description='The content of the comment with HTML formatting.' ) id: Optional[str] = Field(None, description='The ID of the comment.') kind: Optional[str] = Field( 'drive#comment', description='Identifies what kind of resource this is. Value: the fixed string "drive#comment".', ) modifiedTime: Optional[datetime] = Field( None, description='The last time the comment or any of its replies was modified (RFC 3339 date-time).', ) quotedFileContent: Optional[QuotedFileContent] = Field( None, description='The file content to which the comment refers, typically within the anchor region. For a text file, for example, this would be the text at the location of the comment.', ) replies: Optional[List[Reply]] = Field( None, description='The full list of replies to the comment in chronological order.', ) resolved: Optional[bool] = Field( None, description='Whether the comment has been resolved by one of its replies.' ) class CommentList(BaseModel): comments: Optional[List[Comment]] = Field( None, description='The list of comments. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.', ) kind: Optional[str] = Field( 'drive#commentList', description='Identifies what kind of resource this is. Value: the fixed string "drive#commentList".', ) nextPageToken: Optional[str] = Field( None, description='The page token for the next page of comments. This will be absent if the end of the comments 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.', ) class Label(BaseModel): fields: Optional[Dict[str, LabelField]] = Field( None, description="A map of the label's fields keyed by the field ID." ) id: Optional[str] = Field(None, description='The ID of the label.') kind: Optional[str] = Field('drive#label', description='This is always drive#label') revisionId: Optional[str] = Field(None, description='The revision ID of the label.') class LabelList(BaseModel): kind: Optional[str] = Field( 'drive#labelList', description='This is always drive#labelList' ) labels: Optional[List[Label]] = Field(None, description='The list of labels.') nextPageToken: Optional[str] = Field( None, description='The page token for the next page of labels. This field will be absent if the end of the 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.', ) class ModifyLabelsResponse(BaseModel): kind: Optional[str] = Field( 'drive#modifyLabelsResponse', description='This is always drive#modifyLabelsResponse', ) modifiedLabels: Optional[List[Label]] = Field( None, description='The list of labels which were added or updated by the request.', ) class LabelInfo(BaseModel): labels: Optional[List[Label]] = Field( None, description='The set of labels on the file as requested by the label IDs in the includeLabels parameter. By default, no labels are returned.', ) class File(BaseModel): appProperties: Optional[Dict[str, str]] = Field( None, description='A collection of arbitrary key-value pairs that are private to the requesting app.\nEntries with null values are cleared in update and copy requests. These properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with an OAuth 2 client ID. You cannot use an API key to retrieve private properties.', ) capabilities: Optional[Capabilities1] = Field( None, description='Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user can take.', ) contentHints: Optional[ContentHints] = Field( None, description='Additional information about the content of the file. These fields are never populated in responses.', ) contentRestrictions: Optional[List[ContentRestriction]] = Field( None, description='Restrictions for accessing the content of the file. Only populated if such a restriction exists.', ) copyRequiresWriterPermission: Optional[bool] = Field( None, description='Whether the options to copy, print, or download this file, should be disabled for readers and commenters.', ) createdTime: Optional[datetime] = Field( None, description='The time at which the file was created (RFC 3339 date-time).' ) description: Optional[str] = Field( None, description='A short description of the file.' ) driveId: Optional[str] = Field( None, description='ID of the shared drive the file resides in. Only populated for items in shared drives.', ) explicitlyTrashed: Optional[bool] = Field( None, description='Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.', ) exportLinks: Optional[Dict[str, str]] = Field( None, description='Links for exporting Docs Editors files to specific formats.' ) fileExtension: Optional[str] = Field( None, description='The final component of fullFileExtension. This is only available for files with binary content in Google Drive.', ) folderColorRgb: Optional[str] = Field( None, description='The color for a folder or shortcut to a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.\nIf an unsupported color is specified, the closest color in the palette will be used instead.', ) fullFileExtension: Optional[str] = Field( None, description='The full file extension extracted from the name field. Can contain multiple concatenated extensions, such as "tar.gz". This is only available for files with binary content in Google Drive.\nThis is automatically updated when the name field changes, however it\'s not cleared if the new name does not contain a valid extension.', ) hasAugmentedPermissions: Optional[bool] = Field( None, description='Whether there are permissions directly on this file. This field is only populated for items in shared drives.', ) hasThumbnail: Optional[bool] = Field( None, description='Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.', ) headRevisionId: Optional[str] = Field( None, description="The ID of the file's head revision. This is only available for files with binary content in Google Drive.", ) iconLink: Optional[str] = Field( None, description="A static, unauthenticated link to the file's icon." ) id: Optional[str] = Field(None, description='The ID of the file.') imageMediaMetadata: Optional[ImageMediaMetadata] = Field( None, description='Additional metadata about image media, if available.' ) isAppAuthorized: Optional[bool] = Field( None, description='Whether the requesting app created or opened the file.' ) kind: Optional[str] = Field( 'drive#file', description='Identifies what kind of resource this is. Value: the fixed string "drive#file".', ) labelInfo: Optional[LabelInfo] = Field( None, description='An overview of the labels on the file.' ) lastModifyingUser: Optional[User] = Field( None, description='The last user to modify the file.' ) linkShareMetadata: Optional[LinkShareMetadata] = Field( None, description='Contains details about the link URLs that clients are using to refer to this item.', ) md5Checksum: Optional[str] = Field( None, description='The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.', ) mimeType: Optional[str] = Field( None, description='The MIME type of the file.\nGoogle Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded.\nIf a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.', ) modifiedByMe: Optional[bool] = Field( None, description='Whether this user has modified the file.' ) modifiedByMeTime: Optional[datetime] = Field( None, description='The last time the user modified the file (RFC 3339 date-time).', ) modifiedTime: Optional[datetime] = Field( None, description='The last time anyone modified the file (RFC 3339 date-time).\nNote that setting modifiedTime will also update modifiedByMeTime for the user.', ) name: Optional[str] = Field( None, description="The name of the file. This isn't necessarily unique within a folder. Note that for immutable items such as the top-level folders of shared drives, My Drive root folder, and Application Data folder the name is constant.", ) originalFilename: Optional[str] = Field( None, description='The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive.', ) ownedByMe: Optional[bool] = Field( None, description='Whether the user owns the file. Not populated for items in shared drives.', ) owners: Optional[List[User]] = Field( None, description="The owner of this file. Only certain legacy files might have more than one owner. This field isn't populated for items in shared drives.", ) parents: Optional[List[str]] = Field( None, description="The IDs of the parent folders that contain the file.\nIf not specified as part of a create request, the file will be placed directly in the user's My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list.", ) permissionIds: Optional[List[str]] = Field( None, description='List of permission IDs for users with access to this file.' ) permissions: Optional[List[Permission]] = Field( None, description='The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives.', ) properties: Optional[Dict[str, str]] = Field( None, description='A collection of arbitrary key-value pairs that are visible to all apps.\nEntries with null values are cleared in update and copy requests.', ) quotaBytesUsed: Optional[str] = Field( None, description='The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.', ) resourceKey: Optional[str] = Field( None, description='A key needed to access the item via a shared link.' ) sha1Checksum: Optional[str] = Field( None, description="The SHA1 checksum associated with this file, if available. This field is only populated for files with content stored in Google Drive; it's not populated for Docs Editors or shortcut files.", ) sha256Checksum: Optional[str] = Field( None, description="The SHA256 checksum associated with this file, if available. This field is only populated for files with content stored in Google Drive; it's not populated for Docs Editors or shortcut files.", ) shared: Optional[bool] = Field( None, description='Whether the file has been shared. Not populated for items in shared drives.', ) sharedWithMeTime: Optional[datetime] = Field( None, description='The time at which the file was shared with the user, if applicable (RFC 3339 date-time).', ) sharingUser: Optional[User] = Field( None, description='The user who shared the file with the requesting user, if applicable.', ) shortcutDetails: Optional[ShortcutDetails] = Field( None, description='Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut.', ) size: Optional[str] = Field( None, description="The size of the file's content in bytes. This field is populated for files with binary content stored in Google Drive and for Docs Editors files; it's not populated for shortcuts or folders.", ) spaces: Optional[List[str]] = Field( None, description="The list of spaces that contain the file. The currently supported values are 'drive', 'appDataFolder' and 'photos'.", ) starred: Optional[bool] = Field( None, description='Whether the user has starred the file.' ) teamDriveId: Optional[str] = Field( None, description='Deprecated - use driveId instead.' ) thumbnailLink: Optional[str] = Field( None, description="A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content. If the file isn't shared publicly, the URL returned in Files.thumbnailLink must be fetched using a credentialed request.", ) thumbnailVersion: Optional[str] = Field( None, description='The thumbnail version for use in thumbnail cache invalidation.', ) trashed: Optional[bool] = Field( None, description='Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner can trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.', ) trashedTime: Optional[datetime] = Field( None, description='The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives.', ) trashingUser: Optional[User] = Field( None, description='If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.', ) version: Optional[str] = Field( None, description='A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.', ) videoMediaMetadata: Optional[VideoMediaMetadata] = Field( None, description='Additional metadata about video media. This might not be available immediately upon upload.', ) viewedByMe: Optional[bool] = Field( None, description='Whether this user has viewed the file.' ) viewedByMeTime: Optional[datetime] = Field( None, description='The last time the user viewed the file (RFC 3339 date-time).' ) viewersCanCopyContent: Optional[bool] = Field( None, description='Deprecated - use copyRequiresWriterPermission instead.' ) webContentLink: Optional[str] = Field( None, description='A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.', ) webViewLink: Optional[str] = Field( None, description='A link for opening the file in a relevant Google editor or viewer in a browser.', ) writersCanShare: Optional[bool] = Field( None, description="Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives.", ) class FileList(BaseModel): files: Optional[List[File]] = Field( None, description='The list of files. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.', ) incompleteSearch: Optional[bool] = Field( None, description='Whether the search process was incomplete. If true, then some search results may be missing, since all documents were not searched. This may occur when searching multiple drives with the "allDrives" corpora, but all corpora could not be searched. When this happens, it is suggested that clients narrow their query by choosing a different corpus such as "user" or "drive".', ) kind: Optional[str] = Field( 'drive#fileList', description='Identifies what kind of resource this is. Value: the fixed string "drive#fileList".', ) nextPageToken: Optional[str] = Field( None, description='The page token for the next page of files. This will be absent if the end of the files list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results.', ) class Change(BaseModel): changeType: Optional[str] = Field( None, description='The type of the change. Possible values are file and drive.' ) drive: Optional[Drive] = Field( None, description='The updated state of the shared drive. Present if the changeType is drive, the user is still a member of the shared drive, and the shared drive has not been deleted.', ) driveId: Optional[str] = Field( None, description='The ID of the shared drive associated with this change.' ) file: Optional[File] = Field( None, description='The updated state of the file. Present if the type is file and the file has not been removed from this list of changes.', ) fileId: Optional[str] = Field( None, description='The ID of the file which has changed.' ) kind: Optional[str] = Field( 'drive#change', description='Identifies what kind of resource this is. Value: the fixed string "drive#change".', ) removed: Optional[bool] = Field( None, description='Whether the file or shared drive has been removed from this list of changes, for example by deletion or loss of access.', ) teamDrive: Optional[TeamDrive] = Field( None, description='Deprecated - use drive instead.' ) teamDriveId: Optional[str] = Field( None, description='Deprecated - use driveId instead.' ) time: Optional[datetime] = Field( None, description='The time of this change (RFC 3339 date-time).' ) type: Optional[str] = Field( None, description='Deprecated - use changeType instead.' ) class ChangeList(BaseModel): changes: Optional[List[Change]] = Field( None, description='The list of changes. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.', ) kind: Optional[str] = Field( 'drive#changeList', description='Identifies what kind of resource this is. Value: the fixed string "drive#changeList".', ) newStartPageToken: Optional[str] = Field( None, description='The starting page token for future changes. This will be present only if the end of the current changes list has been reached.', ) nextPageToken: Optional[str] = Field( None, description='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.', )

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/qingyun-wu/drive-api'

If you have feedback or need assistance with the MCP directory API, please join our Discord server