{
  "protocol": "rest",
  "discoveryVersion": "v1",
  "resources": {
    "activity": {
      "methods": {
        "query": {
          "id": "driveactivity.activity.query",
          "path": "v2/activity:query",
          "request": {
            "$ref": "QueryDriveActivityRequest"
          },
          "httpMethod": "POST",
          "scopes": [
            "https://www.googleapis.com/auth/drive.activity",
            "https://www.googleapis.com/auth/drive.activity.readonly"
          ],
          "parameters": {},
          "parameterOrder": [],
          "flatPath": "v2/activity:query",
          "response": {
            "$ref": "QueryDriveActivityResponse"
          },
          "description": "Query past activity in Google Drive."
        }
      }
    }
  },
  "mtlsRootUrl": "https://driveactivity.mtls.googleapis.com/",
  "documentationLink": "https://developers.google.com/workspace/drive/activity/",
  "rootUrl": "https://driveactivity.googleapis.com/",
  "version_module": true,
  "description": "Provides a historical view of activity in Google Drive.",
  "kind": "discovery#restDescription",
  "name": "driveactivity",
  "id": "driveactivity:v2",
  "revision": "20260714",
  "schemas": {
    "User": {
      "id": "User",
      "description": "Information about an end user.",
      "type": "object",
      "properties": {
        "unknownUser": {
          "description": "A user about whom nothing is currently known.",
          "$ref": "UnknownUser"
        },
        "knownUser": {
          "description": "A known user.",
          "$ref": "KnownUser"
        },
        "deletedUser": {
          "description": "A user whose account has since been deleted.",
          "$ref": "DeletedUser"
        }
      }
    },
    "Post": {
      "id": "Post",
      "description": "A regular posted comment.",
      "type": "object",
      "properties": {
        "subtype": {
          "type": "string",
          "enum": [
            "SUBTYPE_UNSPECIFIED",
            "ADDED",
            "DELETED",
            "REPLY_ADDED",
            "REPLY_DELETED",
            "RESOLVED",
            "REOPENED"
          ],
          "description": "The sub-type of this event.",
          "enumDescriptions": [
            "Subtype not available.",
            "A post was added.",
            "A post was deleted.",
            "A reply was added.",
            "A reply was deleted.",
            "A posted comment was resolved.",
            "A posted comment was reopened."
          ]
        }
      }
    },
    "Target": {
      "id": "Target",
      "description": "Information about the target of activity. For more information on how activity history is shared with users, see [Activity history visibility](https://developers.google.com/workspace/drive/activity/v2#activityhistory).",
      "type": "object",
      "properties": {
        "teamDrive": {
          "deprecated": true,
          "description": "This field is deprecated; please use the `drive` field instead.",
          "$ref": "TeamDrive"
        },
        "driveItem": {
          "description": "The target is a Drive item.",
          "$ref": "DriveItem"
        },
        "drive": {
          "description": "The target is a shared drive.",
          "$ref": "Drive"
        },
        "fileComment": {
          "description": "The target is a comment on a Drive file.",
          "$ref": "FileComment"
        }
      }
    },
    "Assignment": {
      "properties": {
        "subtype": {
          "type": "string",
          "enum": [
            "SUBTYPE_UNSPECIFIED",
            "ADDED",
            "DELETED",
            "REPLY_ADDED",
            "REPLY_DELETED",
            "RESOLVED",
            "REOPENED",
            "REASSIGNED"
          ],
          "description": "The sub-type of this event.",
          "enumDescriptions": [
            "Subtype not available.",
            "An assignment was added.",
            "An assignment was deleted.",
            "An assignment reply was added.",
            "An assignment reply was deleted.",
            "An assignment was resolved.",
            "A resolved assignment was reopened.",
            "An assignment was reassigned."
          ]
        },
        "assignedUser": {
          "description": "The user to whom the comment was assigned.",
          "$ref": "User"
        }
      },
      "id": "Assignment",
      "description": "A comment with an assignment.",
      "type": "object"
    },
    "Actor": {
      "id": "Actor",
      "description": "The actor of a Drive activity.",
      "type": "object",
      "properties": {
        "user": {
          "description": "An end user.",
          "$ref": "User"
        },
        "impersonation": {
          "description": "An account acting on behalf of another.",
          "$ref": "Impersonation"
        },
        "administrator": {
          "description": "An administrator.",
          "$ref": "Administrator"
        },
        "anonymous": {
          "description": "An anonymous user.",
          "$ref": "AnonymousUser"
        },
        "system": {
          "description": "A non-user actor (i.e. system triggered).",
          "$ref": "SystemEvent"
        }
      }
    },
    "Integer": {
      "id": "Integer",
      "description": "Wrapper for Integer Field value.",
      "type": "object",
      "properties": {
        "value": {
          "format": "int64",
          "type": "string",
          "description": "Integer value."
        }
      }
    },
    "Owner": {
      "id": "Owner",
      "description": "Information about the owner of a Drive item.",
      "type": "object",
      "properties": {
        "user": {
          "description": "The user that owns the Drive item.",
          "$ref": "User"
        },
        "domain": {
          "description": "The domain of the Drive item owner.",
          "$ref": "Domain"
        },
        "teamDrive": {
          "description": "This field is deprecated; please use the `drive` field instead.",
          "$ref": "TeamDriveReference",
          "deprecated": true
        },
        "drive": {
          "description": "The drive that owns the item.",
          "$ref": "DriveReference"
        }
      }
    },
    "TimeRange": {
      "properties": {
        "startTime": {
          "format": "google-datetime",
          "description": "The start of the time range.",
          "type": "string"
        },
        "endTime": {
          "type": "string",
          "description": "The end of the time range.",
          "format": "google-datetime"
        }
      },
      "id": "TimeRange",
      "description": "Information about time ranges.",
      "type": "object"
    },
    "ApplicationReference": {
      "id": "ApplicationReference",
      "description": "Activity in applications other than Drive.",
      "type": "object",
      "properties": {
        "type": {
          "description": "The reference type corresponding to this event.",
          "enumDescriptions": [
            "The type is not available.",
            "The links of one or more Drive items were posted.",
            "Comments were made regarding a Drive item."
          ],
          "type": "string",
          "enum": [
            "UNSPECIFIED_REFERENCE_TYPE",
            "LINK",
            "DISCUSS"
          ]
        }
      }
    },
    "File": {
      "description": "This item is deprecated; please see `DriveFile` instead.",
      "deprecated": true,
      "id": "File",
      "type": "object",
      "properties": {}
    },
    "DriveFile": {
      "properties": {},
      "type": "object",
      "id": "DriveFile",
      "description": "A Drive item which is a file."
    },
    "AppliedLabelChangeDetail": {
      "type": "object",
      "id": "AppliedLabelChangeDetail",
      "description": "A change made to a Label on the Target.",
      "properties": {
        "label": {
          "type": "string",
          "description": "The Label name representing the Label that changed. This name always contains the revision of the Label that was used when this Action occurred. The format is `labels/id@revision`."
        },
        "types": {
          "type": "array",
          "description": "The types of changes made to the Label on the Target.",
          "items": {
            "enumDescriptions": [
              "The type of change to this Label is not available.",
              "The identified Label was added to the Target.",
              "The identified Label was removed from the Target.",
              "Field values were changed on the Target.",
              "The Label was applied as a side-effect of Drive item creation."
            ],
            "type": "string",
            "enum": [
              "TYPE_UNSPECIFIED",
              "LABEL_ADDED",
              "LABEL_REMOVED",
              "LABEL_FIELD_VALUE_CHANGED",
              "LABEL_APPLIED_BY_ITEM_CREATE"
            ]
          }
        },
        "title": {
          "description": "The human-readable title of the label that changed.",
          "type": "string"
        },
        "fieldChanges": {
          "type": "array",
          "description": "Field Changes. Only present if `types` contains `LABEL_FIELD_VALUE_CHANGED`.",
          "items": {
            "$ref": "FieldValueChange"
          }
        }
      }
    },
    "SystemEvent": {
      "id": "SystemEvent",
      "description": "Event triggered by system operations instead of end users.",
      "type": "object",
      "properties": {
        "type": {
          "description": "The type of the system event that may triggered activity.",
          "enumDescriptions": [
            "The event type is unspecified.",
            "The event is a consequence of a user account being deleted.",
            "The event is due to the system automatically purging trash."
          ],
          "type": "string",
          "enum": [
            "TYPE_UNSPECIFIED",
            "USER_DELETION",
            "TRASH_AUTO_PURGE"
          ]
        }
      }
    },
    "Group": {
      "id": "Group",
      "description": "Information about a group.",
      "type": "object",
      "properties": {
        "email": {
          "description": "The email address of the group.",
          "type": "string"
        },
        "title": {
          "type": "string",
          "description": "The title of the group."
        }
      }
    },
    "Create": {
      "properties": {
        "upload": {
          "description": "If present, indicates the object originated externally and was uploaded to Drive.",
          "$ref": "Upload"
        },
        "new": {
          "description": "If present, indicates the object was newly created (e.g. as a blank document), not derived from a Drive object or external object.",
          "$ref": "New"
        },
        "copy": {
          "description": "If present, indicates the object was created by copying an existing Drive object.",
          "$ref": "Copy"
        }
      },
      "id": "Create",
      "description": "An object was created.",
      "type": "object"
    },
    "Copy": {
      "type": "object",
      "id": "Copy",
      "description": "An object was created by copying an existing object.",
      "properties": {
        "originalObject": {
          "description": "The original object.",
          "$ref": "TargetReference"
        }
      }
    },
    "RestrictionChange": {
      "type": "object",
      "id": "RestrictionChange",
      "description": "Information about restriction policy changes to a feature.",
      "properties": {
        "feature": {
          "type": "string",
          "description": "The feature which had a change in restriction policy.",
          "enumDescriptions": [
            "The feature which changed restriction settings was not available.",
            "When restricted, this prevents items from being shared outside the domain.",
            "When restricted, this prevents direct sharing of individual items.",
            "Deprecated: Use READERS_CAN_DOWNLOAD instead.",
            "When restricted, this prevents use of Drive File Stream.",
            "When restricted, this limits sharing of folders to managers only.",
            "When restricted, this prevents actions like copy, download, and print for readers. Replaces ITEM_DUPLICATION.",
            "When restricted, this prevents actions like copy, download, and print for writers."
          ],
          "enumDeprecated": [
            false,
            false,
            false,
            true,
            false,
            false,
            false,
            false
          ],
          "enum": [
            "FEATURE_UNSPECIFIED",
            "SHARING_OUTSIDE_DOMAIN",
            "DIRECT_SHARING",
            "ITEM_DUPLICATION",
            "DRIVE_FILE_STREAM",
            "FILE_ORGANIZER_CAN_SHARE_FOLDERS",
            "READERS_CAN_DOWNLOAD",
            "WRITERS_CAN_DOWNLOAD"
          ]
        },
        "newRestriction": {
          "type": "string",
          "enum": [
            "RESTRICTION_UNSPECIFIED",
            "UNRESTRICTED",
            "FULLY_RESTRICTED"
          ],
          "description": "The restriction in place after the change.",
          "enumDescriptions": [
            "The type of restriction is not available.",
            "The feature is available without restriction.",
            "The use of this feature is fully restricted."
          ]
        }
      }
    },
    "TeamDriveReference": {
      "deprecated": true,
      "description": "This item is deprecated; please see `DriveReference` instead.",
      "properties": {
        "name": {
          "type": "string",
          "description": "This field is deprecated; please see `DriveReference.name` instead."
        },
        "title": {
          "description": "This field is deprecated; please see `DriveReference.title` instead.",
          "type": "string"
        }
      },
      "type": "object",
      "id": "TeamDriveReference"
    },
    "Delete": {
      "properties": {
        "type": {
          "description": "The type of delete action taken.",
          "enumDescriptions": [
            "Deletion type is not available.",
            "An object was put into the trash.",
            "An object was deleted permanently."
          ],
          "type": "string",
          "enum": [
            "TYPE_UNSPECIFIED",
            "TRASH",
            "PERMANENT_DELETE"
          ]
        }
      },
      "type": "object",
      "id": "Delete",
      "description": "An object was deleted."
    },
    "AnonymousUser": {
      "type": "object",
      "id": "AnonymousUser",
      "description": "Empty message representing an anonymous user or indicating the authenticated user should be anonymized.",
      "properties": {}
    },
    "UserList": {
      "properties": {
        "values": {
          "type": "array",
          "description": "User values.",
          "items": {
            "$ref": "SingleUser"
          }
        }
      },
      "type": "object",
      "id": "UserList",
      "description": "Wrapper for UserList Field value."
    },
    "Administrator": {
      "id": "Administrator",
      "description": "Empty message representing an administrator.",
      "type": "object",
      "properties": {}
    },
    "QueryDriveActivityResponse": {
      "properties": {
        "activities": {
          "type": "array",
          "description": "List of activity requested.",
          "items": {
            "$ref": "DriveActivity"
          }
        },
        "nextPageToken": {
          "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.",
          "type": "string"
        }
      },
      "type": "object",
      "id": "QueryDriveActivityResponse",
      "description": "Response message for querying Drive activity."
    },
    "SelectionList": {
      "type": "object",
      "id": "SelectionList",
      "description": "Wrapper for SelectionList Field value.",
      "properties": {
        "values": {
          "type": "array",
          "description": "Selection values.",
          "items": {
            "$ref": "Selection"
          }
        }
      }
    },
    "TeamDrive": {
      "id": "TeamDrive",
      "type": "object",
      "properties": {
        "name": {
          "description": "This field is deprecated; please see `Drive.name` instead.",
          "type": "string"
        },
        "title": {
          "description": "This field is deprecated; please see `Drive.title` instead.",
          "type": "string"
        },
        "root": {
          "description": "This field is deprecated; please see `Drive.root` instead.",
          "$ref": "DriveItem"
        }
      },
      "description": "This item is deprecated; please see `Drive` instead.",
      "deprecated": true
    },
    "Text": {
      "properties": {
        "value": {
          "type": "string",
          "description": "Value of Text Field."
        }
      },
      "id": "Text",
      "description": "Wrapper for Text Field value.",
      "type": "object"
    },
    "Folder": {
      "id": "Folder",
      "type": "object",
      "properties": {
        "type": {
          "description": "This field is deprecated; please see `DriveFolder.type` instead.",
          "enumDescriptions": [
            "This item is deprecated; please see `DriveFolder.Type` instead.",
            "This item is deprecated; please see `DriveFolder.Type` instead.",
            "This item is deprecated; please see `DriveFolder.Type` instead.",
            "This item is deprecated; please see `DriveFolder.Type` instead."
          ],
          "type": "string",
          "enum": [
            "TYPE_UNSPECIFIED",
            "MY_DRIVE_ROOT",
            "TEAM_DRIVE_ROOT",
            "STANDARD_FOLDER"
          ]
        }
      },
      "description": "This item is deprecated; please see `DriveFolder` instead.",
      "deprecated": true
    },
    "ActionDetail": {
      "id": "ActionDetail",
      "description": "Data describing the type and additional information of an action.",
      "type": "object",
      "properties": {
        "dlpChange": {
          "description": "A change happened in data leak prevention status.",
          "$ref": "DataLeakPreventionChange"
        },
        "comment": {
          "description": "A change about comments was made.",
          "$ref": "Comment"
        },
        "reference": {
          "description": "An object was referenced in an application outside of Drive/Docs.",
          "$ref": "ApplicationReference"
        },
        "edit": {
          "description": "An object was edited.",
          "$ref": "Edit"
        },
        "permissionChange": {
          "description": "The permission on an object was changed.",
          "$ref": "PermissionChange"
        },
        "move": {
          "description": "An object was moved.",
          "$ref": "Move"
        },
        "delete": {
          "description": "An object was deleted.",
          "$ref": "Delete"
        },
        "settingsChange": {
          "description": "Settings were changed.",
          "$ref": "SettingsChange"
        },
        "restore": {
          "description": "A deleted object was restored.",
          "$ref": "Restore"
        },
        "create": {
          "description": "An object was created.",
          "$ref": "Create"
        },
        "appliedLabelChange": {
          "description": "Label was changed.",
          "$ref": "AppliedLabelChange"
        },
        "rename": {
          "description": "An object was renamed.",
          "$ref": "Rename"
        }
      }
    },
    "Date": {
      "type": "object",
      "id": "Date",
      "description": "Wrapper for Date Field value.",
      "properties": {
        "value": {
          "type": "string",
          "description": "Date value.",
          "format": "google-datetime"
        }
      }
    },
    "DriveReference": {
      "properties": {
        "name": {
          "description": "The resource name of the shared drive. The format is `COLLECTION_ID/DRIVE_ID`. Clients should not assume a specific collection ID for this resource name.",
          "type": "string"
        },
        "title": {
          "description": "The title of the shared drive.",
          "type": "string"
        }
      },
      "type": "object",
      "id": "DriveReference",
      "description": "A lightweight reference to a shared drive."
    },
    "DeletedUser": {
      "properties": {},
      "type": "object",
      "id": "DeletedUser",
      "description": "A user whose account has since been deleted."
    },
    "DataLeakPreventionChange": {
      "properties": {
        "type": {
          "description": "The type of Data Leak Prevention (DLP) change.",
          "enumDescriptions": [
            "An update to the DLP state that is neither FLAGGED or CLEARED.",
            "Document has been flagged as containing sensitive content.",
            "Document is no longer flagged as containing sensitive content."
          ],
          "type": "string",
          "enum": [
            "TYPE_UNSPECIFIED",
            "FLAGGED",
            "CLEARED"
          ]
        }
      },
      "type": "object",
      "id": "DataLeakPreventionChange",
      "description": "A change in the object's data leak prevention status."
    },
    "Comment": {
      "id": "Comment",
      "description": "A change about comments on an object.",
      "type": "object",
      "properties": {
        "mentionedUsers": {
          "description": "Users who are mentioned in this comment.",
          "items": {
            "$ref": "User"
          },
          "type": "array"
        },
        "post": {
          "description": "A change on a regular posted comment.",
          "$ref": "Post"
        },
        "assignment": {
          "description": "A change on an assignment.",
          "$ref": "Assignment"
        },
        "suggestion": {
          "description": "A change on a suggestion.",
          "$ref": "Suggestion"
        }
      }
    },
    "Permission": {
      "id": "Permission",
      "description": "The permission setting of an object.",
      "type": "object",
      "properties": {
        "group": {
          "description": "The group to whom this permission applies.",
          "$ref": "Group"
        },
        "allowDiscovery": {
          "description": "If true, the item can be discovered (e.g. in the user's \"Shared with me\" collection) without needing a link to the item.",
          "type": "boolean"
        },
        "user": {
          "description": "The user to whom this permission applies.",
          "$ref": "User"
        },
        "domain": {
          "description": "The domain to whom this permission applies.",
          "$ref": "Domain"
        },
        "anyone": {
          "description": "If set, this permission applies to anyone, even logged out users.",
          "$ref": "Anyone"
        },
        "role": {
          "type": "string",
          "enum": [
            "ROLE_UNSPECIFIED",
            "OWNER",
            "ORGANIZER",
            "FILE_ORGANIZER",
            "EDITOR",
            "COMMENTER",
            "VIEWER",
            "PUBLISHED_VIEWER"
          ],
          "description": "Indicates the [Google Drive permissions role](https://developers.google.com/workspace/drive/web/manage-sharing#roles). The role determines a user's ability to read, write, and comment on items.",
          "enumDescriptions": [
            "The role is not available.",
            "A role granting full access.",
            "A role granting the ability to manage people and settings.",
            "A role granting the ability to contribute and manage content.",
            "A role granting the ability to contribute content. This role is sometimes also known as \"writer\".",
            "A role granting the ability to view and comment on content.",
            "A role granting the ability to view content. This role is sometimes also known as \"reader\".",
            "A role granting the ability to view content only after it has been published to the web. This role is sometimes also known as \"published reader\". See https://support.google.com/sites/answer/6372880 for more information."
          ]
        }
      }
    },
    "Upload": {
      "properties": {},
      "type": "object",
      "id": "Upload",
      "description": "An object was uploaded into Drive."
    },
    "Legacy": {
      "id": "Legacy",
      "description": "A strategy that consolidates activities using the grouping rules from the legacy V1 Activity API. Similar actions occurring within a window of time can be grouped across multiple targets (such as moving a set of files at once) or multiple actors (such as several users editing the same item). Grouping rules for this strategy are specific to each type of action.",
      "type": "object",
      "properties": {}
    },
    "SettingsChange": {
      "id": "SettingsChange",
      "description": "Information about settings changes.",
      "type": "object",
      "properties": {
        "restrictionChanges": {
          "type": "array",
          "description": "The set of changes made to restrictions.",
          "items": {
            "$ref": "RestrictionChange"
          }
        }
      }
    },
    "Domain": {
      "properties": {
        "legacyId": {
          "description": "An opaque string used to identify this domain.",
          "type": "string"
        },
        "name": {
          "type": "string",
          "description": "The name of the domain, e.g. `google.com`."
        }
      },
      "id": "Domain",
      "description": "Information about a domain.",
      "type": "object"
    },
    "Impersonation": {
      "properties": {
        "impersonatedUser": {
          "description": "The impersonated user.",
          "$ref": "User"
        }
      },
      "id": "Impersonation",
      "description": "Information about an impersonation, where an admin acts on behalf of an end user. Information about the acting admin is not currently available.",
      "type": "object"
    },
    "UnknownUser": {
      "id": "UnknownUser",
      "description": "A user about whom nothing is currently known.",
      "type": "object",
      "properties": {}
    },
    "Action": {
      "properties": {
        "actor": {
          "description": "The actor responsible for this action (or empty if all actors are responsible).",
          "$ref": "Actor"
        },
        "timeRange": {
          "description": "The action occurred over this time range.",
          "$ref": "TimeRange"
        },
        "target": {
          "description": "The target this action affects (or empty if affecting all targets). This represents the state of the target immediately after this action occurred.",
          "$ref": "Target"
        },
        "timestamp": {
          "format": "google-datetime",
          "type": "string",
          "description": "The action occurred at this specific time."
        },
        "detail": {
          "description": "The type and detailed information about the action.",
          "$ref": "ActionDetail"
        }
      },
      "id": "Action",
      "description": "Information about the action.",
      "type": "object"
    },
    "ConsolidationStrategy": {
      "properties": {
        "none": {
          "description": "The individual activities are not consolidated.",
          "$ref": "NoConsolidation"
        },
        "legacy": {
          "description": "The individual activities are consolidated using the legacy strategy.",
          "$ref": "Legacy"
        }
      },
      "id": "ConsolidationStrategy",
      "description": "How the individual activities are consolidated. If a set of activities is related they can be consolidated into one combined activity, such as one actor performing the same action on multiple targets, or multiple actors performing the same action on a single target. The strategy defines the rules for which activities are related.",
      "type": "object"
    },
    "DriveItem": {
      "properties": {
        "title": {
          "type": "string",
          "description": "The title of the Drive item."
        },
        "folder": {
          "deprecated": true,
          "description": "This field is deprecated; please use the `driveFolder` field instead.",
          "$ref": "Folder"
        },
        "owner": {
          "description": "Information about the owner of this Drive item.",
          "$ref": "Owner"
        },
        "name": {
          "description": "The target Drive item. The format is `items/ITEM_ID`.",
          "type": "string"
        },
        "driveFile": {
          "description": "The Drive item is a file.",
          "$ref": "DriveFile"
        },
        "driveFolder": {
          "description": "The Drive item is a folder. Includes information about the type of folder.",
          "$ref": "DriveFolder"
        },
        "file": {
          "deprecated": true,
          "description": "This field is deprecated; please use the `driveFile` field instead.",
          "$ref": "File"
        },
        "mimeType": {
          "type": "string",
          "description": "The MIME type of the Drive item. See https://developers.google.com/workspace/drive/v3/web/mime-types."
        }
      },
      "type": "object",
      "id": "DriveItem",
      "description": "A Drive item, such as a file or folder."
    },
    "SingleUser": {
      "type": "object",
      "id": "SingleUser",
      "description": "Wrapper for User Field value.",
      "properties": {
        "value": {
          "description": "User value as email.",
          "type": "string"
        }
      }
    },
    "TargetReference": {
      "properties": {
        "teamDrive": {
          "deprecated": true,
          "description": "This field is deprecated; please use the `drive` field instead.",
          "$ref": "TeamDriveReference"
        },
        "driveItem": {
          "description": "The target is a Drive item.",
          "$ref": "DriveItemReference"
        },
        "drive": {
          "description": "The target is a shared drive.",
          "$ref": "DriveReference"
        }
      },
      "type": "object",
      "id": "TargetReference",
      "description": "A lightweight reference to the target of activity."
    },
    "NoConsolidation": {
      "properties": {},
      "type": "object",
      "id": "NoConsolidation",
      "description": "A strategy that does no consolidation of individual activities."
    },
    "Rename": {
      "id": "Rename",
      "description": "An object was renamed.",
      "type": "object",
      "properties": {
        "oldTitle": {
          "description": "The previous title of the drive object.",
          "type": "string"
        },
        "newTitle": {
          "type": "string",
          "description": "The new title of the drive object."
        }
      }
    },
    "Edit": {
      "type": "object",
      "id": "Edit",
      "description": "An empty message indicating an object was edited.",
      "properties": {}
    },
    "PermissionChange": {
      "type": "object",
      "id": "PermissionChange",
      "description": "A change of the permission setting on an item.",
      "properties": {
        "addedPermissions": {
          "type": "array",
          "description": "The set of permissions added by this change.",
          "items": {
            "$ref": "Permission"
          }
        },
        "removedPermissions": {
          "description": "The set of permissions removed by this change.",
          "items": {
            "$ref": "Permission"
          },
          "type": "array"
        }
      }
    },
    "AppliedLabelChange": {
      "properties": {
        "changes": {
          "description": "Changes that were made to the Label on the Target.",
          "items": {
            "$ref": "AppliedLabelChangeDetail"
          },
          "type": "array"
        }
      },
      "id": "AppliedLabelChange",
      "description": "Label changes that were made on the Target.",
      "type": "object"
    },
    "QueryDriveActivityRequest": {
      "type": "object",
      "id": "QueryDriveActivityRequest",
      "description": "The request message for querying Drive activity.",
      "properties": {
        "itemName": {
          "type": "string",
          "description": "Return activities for this Drive item. The format is `items/ITEM_ID`."
        },
        "filter": {
          "description": "The filtering for items returned from this query request. The format of the filter string is a sequence of expressions, joined by an optional \"AND\", where each expression is of the form \"field operator value\". Supported fields: - `time`: Uses numerical operators on date values either in terms of milliseconds since Jan 1, 1970 or in RFC 3339 format. Examples: - `time \u003e 1452409200000 AND time \u003c= 1492812924310` - `time \u003e= \"2016-01-10T01:02:03-05:00\"` - `detail.action_detail_case`: Uses the \"has\" operator (:) and either a singular value or a list of allowed action types enclosed in parentheses, separated by a space. To exclude a result from the response, prepend a hyphen (`-`) to the beginning of the filter string. Examples: - `detail.action_detail_case:RENAME` - `detail.action_detail_case:(CREATE RESTORE)` - `-detail.action_detail_case:MOVE` ",
          "type": "string"
        },
        "consolidationStrategy": {
          "description": "Details on how to consolidate related actions that make up the activity. If not set, then related actions aren't consolidated.",
          "$ref": "ConsolidationStrategy"
        },
        "pageToken": {
          "type": "string",
          "description": "The token identifies which page of results to return. Set this to the next_page_token value returned from a previous query to obtain the following page of results. If not set, the first page of results is returned."
        },
        "ancestorName": {
          "description": "Return activities for this Drive folder, plus all children and descendants. The format is `items/ITEM_ID`.",
          "type": "string"
        },
        "pageSize": {
          "description": "The minimum number of activities desired in the response; the server attempts to return at least this quantity. The server may also return fewer activities if it has a partial response ready before the request times out. If not set, a default value is used.",
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "Drive": {
      "id": "Drive",
      "description": "Information about a shared drive.",
      "type": "object",
      "properties": {
        "name": {
          "description": "The resource name of the shared drive. The format is `COLLECTION_ID/DRIVE_ID`. Clients should not assume a specific collection ID for this resource name.",
          "type": "string"
        },
        "title": {
          "type": "string",
          "description": "The title of the shared drive."
        },
        "root": {
          "description": "The root of this shared drive.",
          "$ref": "DriveItem"
        }
      }
    },
    "Move": {
      "properties": {
        "addedParents": {
          "description": "The added parent object(s).",
          "items": {
            "$ref": "TargetReference"
          },
          "type": "array"
        },
        "removedParents": {
          "description": "The removed parent object(s).",
          "items": {
            "$ref": "TargetReference"
          },
          "type": "array"
        }
      },
      "id": "Move",
      "description": "An object was moved.",
      "type": "object"
    },
    "Restore": {
      "id": "Restore",
      "description": "A deleted object was restored.",
      "type": "object",
      "properties": {
        "type": {
          "description": "The type of restore action taken.",
          "enumDescriptions": [
            "The type is not available.",
            "An object was restored from the trash."
          ],
          "type": "string",
          "enum": [
            "TYPE_UNSPECIFIED",
            "UNTRASH"
          ]
        }
      }
    },
    "DriveItemReference": {
      "type": "object",
      "id": "DriveItemReference",
      "description": "A lightweight reference to a Drive item, such as a file or folder.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The target Drive item. The format is `items/ITEM_ID`."
        },
        "title": {
          "type": "string",
          "description": "The title of the Drive item."
        },
        "folder": {
          "description": "This field is deprecated; please use the `driveFolder` field instead.",
          "$ref": "Folder",
          "deprecated": true
        },
        "file": {
          "deprecated": true,
          "description": "This field is deprecated; please use the `driveFile` field instead.",
          "$ref": "File"
        },
        "driveFile": {
          "description": "The Drive item is a file.",
          "$ref": "DriveFile"
        },
        "driveFolder": {
          "description": "The Drive item is a folder. Includes information about the type of folder.",
          "$ref": "DriveFolder"
        }
      }
    },
    "KnownUser": {
      "id": "KnownUser",
      "description": "A known user.",
      "type": "object",
      "properties": {
        "personName": {
          "type": "string",
          "description": "The identifier for this user that can be used with the People API to get more information. The format is `people/ACCOUNT_ID`. See https://developers.google.com/people/."
        },
        "isCurrentUser": {
          "type": "boolean",
          "description": "True if this is the user making the request."
        }
      }
    },
    "New": {
      "type": "object",
      "id": "New",
      "description": "An object was created from scratch.",
      "properties": {}
    },
    "DriveFolder": {
      "id": "DriveFolder",
      "description": "A Drive item which is a folder.",
      "type": "object",
      "properties": {
        "type": {
          "description": "The type of Drive folder.",
          "enumDescriptions": [
            "The folder type is unknown.",
            "The folder is the root of a user's MyDrive.",
            "The folder is the root of a shared drive.",
            "The folder is a standard, non-root, folder."
          ],
          "type": "string",
          "enum": [
            "TYPE_UNSPECIFIED",
            "MY_DRIVE_ROOT",
            "SHARED_DRIVE_ROOT",
            "STANDARD_FOLDER"
          ]
        }
      }
    },
    "Suggestion": {
      "properties": {
        "subtype": {
          "description": "The sub-type of this event.",
          "enumDescriptions": [
            "Subtype not available.",
            "A suggestion was added.",
            "A suggestion was deleted.",
            "A suggestion reply was added.",
            "A suggestion reply was deleted.",
            "A suggestion was accepted.",
            "A suggestion was rejected.",
            "An accepted suggestion was deleted.",
            "A rejected suggestion was deleted."
          ],
          "type": "string",
          "enum": [
            "SUBTYPE_UNSPECIFIED",
            "ADDED",
            "DELETED",
            "REPLY_ADDED",
            "REPLY_DELETED",
            "ACCEPTED",
            "REJECTED",
            "ACCEPT_DELETED",
            "REJECT_DELETED"
          ]
        }
      },
      "id": "Suggestion",
      "description": "A suggestion.",
      "type": "object"
    },
    "Anyone": {
      "id": "Anyone",
      "description": "Represents any user (including a logged out user).",
      "type": "object",
      "properties": {}
    },
    "DriveActivity": {
      "id": "DriveActivity",
      "description": "A single Drive activity comprising one or more Actions by one or more Actors on one or more Targets. Some Action groupings occur spontaneously, such as moving an item into a shared folder triggering a permission change. Other groupings of related Actions, such as multiple Actors editing one item or moving multiple files into a new folder, are controlled by the selection of a ConsolidationStrategy in the QueryDriveActivityRequest.",
      "type": "object",
      "properties": {
        "targets": {
          "description": "All Google Drive objects this activity is about (e.g. file, folder, drive). This represents the state of the target immediately after the actions occurred.",
          "items": {
            "$ref": "Target"
          },
          "type": "array"
        },
        "timestamp": {
          "format": "google-datetime",
          "description": "The activity occurred at this specific time.",
          "type": "string"
        },
        "primaryActionDetail": {
          "description": "Key information about the primary action for this activity. This is either representative, or the most important, of all actions in the activity, according to the ConsolidationStrategy in the request.",
          "$ref": "ActionDetail"
        },
        "actors": {
          "type": "array",
          "description": "All actor(s) responsible for the activity.",
          "items": {
            "$ref": "Actor"
          }
        },
        "timeRange": {
          "description": "The activity occurred over this time range.",
          "$ref": "TimeRange"
        },
        "actions": {
          "type": "array",
          "description": "Details on all actions in this activity.",
          "items": {
            "$ref": "Action"
          }
        }
      }
    },
    "TextList": {
      "type": "object",
      "id": "TextList",
      "description": "Wrapper for Text List Field value.",
      "properties": {
        "values": {
          "type": "array",
          "description": "Text values.",
          "items": {
            "$ref": "Text"
          }
        }
      }
    },
    "Selection": {
      "type": "object",
      "id": "Selection",
      "description": "Wrapper for Selection Field value as combined value/display_name pair for selected choice.",
      "properties": {
        "value": {
          "type": "string",
          "description": "Selection value as Field Choice ID."
        },
        "displayName": {
          "description": "Selection value as human-readable display string.",
          "type": "string"
        }
      }
    },
    "FieldValueChange": {
      "properties": {
        "displayName": {
          "type": "string",
          "description": "The human-readable display name for this field."
        },
        "newValue": {
          "description": "The value that is now set on the field. If not present, the field was cleared. At least one of {old_value|new_value} is always set.",
          "$ref": "FieldValue"
        },
        "fieldId": {
          "description": "The ID of this field. Field IDs are unique within a Label.",
          "type": "string"
        },
        "oldValue": {
          "description": "The value that was previously set on the field. If not present, the field was newly set. At least one of {old_value|new_value} is always set.",
          "$ref": "FieldValue"
        }
      },
      "type": "object",
      "id": "FieldValueChange",
      "description": "Change to a Field value."
    },
    "FileComment": {
      "id": "FileComment",
      "description": "A comment on a file.",
      "type": "object",
      "properties": {
        "parent": {
          "description": "The Drive item containing this comment.",
          "$ref": "DriveItem"
        },
        "legacyCommentId": {
          "description": "The comment in the discussion thread. This identifier is an opaque string compatible with the Drive API; see https://developers.google.com/workspace/drive/v3/reference/comments/get",
          "type": "string"
        },
        "legacyDiscussionId": {
          "description": "The discussion thread to which the comment was added. This identifier is an opaque string compatible with the Drive API and references the first comment in a discussion; see https://developers.google.com/workspace/drive/v3/reference/comments/get",
          "type": "string"
        },
        "linkToDiscussion": {
          "description": "The link to the discussion thread containing this comment, for example, `https://docs.google.com/DOCUMENT_ID/edit?disco=THREAD_ID`.",
          "type": "string"
        }
      }
    },
    "FieldValue": {
      "type": "object",
      "id": "FieldValue",
      "description": "Contains a value of a Field.",
      "properties": {
        "integer": {
          "description": "Integer Field value.",
          "$ref": "Integer"
        },
        "text": {
          "description": "Text Field value.",
          "$ref": "Text"
        },
        "userList": {
          "description": "User List Field value.",
          "$ref": "UserList"
        },
        "selection": {
          "description": "Selection Field value.",
          "$ref": "Selection"
        },
        "user": {
          "description": "User Field value.",
          "$ref": "SingleUser"
        },
        "date": {
          "description": "Date Field value.",
          "$ref": "Date"
        },
        "textList": {
          "description": "Text List Field value.",
          "$ref": "TextList"
        },
        "selectionList": {
          "description": "Selection List Field value.",
          "$ref": "SelectionList"
        }
      }
    }
  },
  "fullyEncodeReservedExpansion": true,
  "canonicalName": "Drive Activity",
  "ownerDomain": "google.com",
  "basePath": "",
  "batchPath": "batch",
  "version": "v2",
  "servicePath": "",
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/drive.activity": {
          "description": "View and add to the activity record of files in your Google Drive"
        },
        "https://www.googleapis.com/auth/drive.activity.readonly": {
          "description": "View the activity record of files in your Google Drive"
        }
      }
    }
  },
  "ownerName": "Google",
  "parameters": {
    "access_token": {
      "location": "query",
      "type": "string",
      "description": "OAuth access token."
    },
    "callback": {
      "description": "JSONP",
      "type": "string",
      "location": "query"
    },
    "oauth_token": {
      "description": "OAuth 2.0 token for the current user.",
      "type": "string",
      "location": "query"
    },
    "fields": {
      "type": "string",
      "description": "Selector specifying which fields to include in a partial response.",
      "location": "query"
    },
    "uploadType": {
      "location": "query",
      "type": "string",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")."
    },
    "quotaUser": {
      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
      "type": "string",
      "location": "query"
    },
    "$.xgafv": {
      "description": "V1 error format.",
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "enum": [
        "1",
        "2"
      ],
      "location": "query",
      "type": "string"
    },
    "alt": {
      "type": "string",
      "default": "json",
      "location": "query",
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "description": "Data format for response.",
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ]
    },
    "prettyPrint": {
      "type": "boolean",
      "description": "Returns response with indentations and line breaks.",
      "default": "true",
      "location": "query"
    },
    "upload_protocol": {
      "location": "query",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "type": "string"
    },
    "key": {
      "type": "string",
      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
      "location": "query"
    }
  },
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "baseUrl": "https://driveactivity.googleapis.com/",
  "title": "Drive Activity API"
}
