{
  "mtlsRootUrl": "https://driveactivity.mtls.googleapis.com/",
  "kind": "discovery#restDescription",
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "version_module": true,
  "ownerDomain": "google.com",
  "protocol": "rest",
  "title": "Drive Activity API",
  "discoveryVersion": "v1",
  "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"
        }
      }
    }
  },
  "batchPath": "batch",
  "revision": "20260414",
  "baseUrl": "https://driveactivity.googleapis.com/",
  "fullyEncodeReservedExpansion": true,
  "name": "driveactivity",
  "servicePath": "",
  "version": "v2",
  "schemas": {
    "Edit": {
      "properties": {},
      "description": "An empty message indicating an object was edited.",
      "type": "object",
      "id": "Edit"
    },
    "Selection": {
      "properties": {
        "value": {
          "description": "Selection value as Field Choice ID.",
          "type": "string"
        },
        "displayName": {
          "description": "Selection value as human-readable display string.",
          "type": "string"
        }
      },
      "description": "Wrapper for Selection Field value as combined value/display_name pair for selected choice.",
      "type": "object",
      "id": "Selection"
    },
    "TimeRange": {
      "properties": {
        "startTime": {
          "description": "The start of the time range.",
          "type": "string",
          "format": "google-datetime"
        },
        "endTime": {
          "description": "The end of the time range.",
          "type": "string",
          "format": "google-datetime"
        }
      },
      "description": "Information about time ranges.",
      "type": "object",
      "id": "TimeRange"
    },
    "Create": {
      "description": "An object was created.",
      "type": "object",
      "properties": {
        "new": {
          "$ref": "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."
        },
        "upload": {
          "description": "If present, indicates the object originated externally and was uploaded to Drive.",
          "$ref": "Upload"
        },
        "copy": {
          "$ref": "Copy",
          "description": "If present, indicates the object was created by copying an existing Drive object."
        }
      },
      "id": "Create"
    },
    "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",
      "properties": {
        "legacy": {
          "$ref": "Legacy",
          "description": "The individual activities are consolidated using the legacy strategy."
        },
        "none": {
          "description": "The individual activities are not consolidated.",
          "$ref": "NoConsolidation"
        }
      },
      "id": "ConsolidationStrategy"
    },
    "TextList": {
      "id": "TextList",
      "properties": {
        "values": {
          "description": "Text values.",
          "type": "array",
          "items": {
            "$ref": "Text"
          }
        }
      },
      "description": "Wrapper for Text List Field value.",
      "type": "object"
    },
    "DeletedUser": {
      "description": "A user whose account has since been deleted.",
      "type": "object",
      "properties": {},
      "id": "DeletedUser"
    },
    "FieldValue": {
      "description": "Contains a value of a Field.",
      "type": "object",
      "properties": {
        "selection": {
          "$ref": "Selection",
          "description": "Selection Field value."
        },
        "userList": {
          "description": "User List Field value.",
          "$ref": "UserList"
        },
        "date": {
          "$ref": "Date",
          "description": "Date Field value."
        },
        "integer": {
          "description": "Integer Field value.",
          "$ref": "Integer"
        },
        "text": {
          "description": "Text Field value.",
          "$ref": "Text"
        },
        "selectionList": {
          "description": "Selection List Field value.",
          "$ref": "SelectionList"
        },
        "user": {
          "$ref": "SingleUser",
          "description": "User Field value."
        },
        "textList": {
          "description": "Text List Field value.",
          "$ref": "TextList"
        }
      },
      "id": "FieldValue"
    },
    "Move": {
      "properties": {
        "removedParents": {
          "description": "The removed parent object(s).",
          "type": "array",
          "items": {
            "$ref": "TargetReference"
          }
        },
        "addedParents": {
          "description": "The added parent object(s).",
          "type": "array",
          "items": {
            "$ref": "TargetReference"
          }
        }
      },
      "description": "An object was moved.",
      "type": "object",
      "id": "Move"
    },
    "PermissionChange": {
      "description": "A change of the permission setting on an item.",
      "type": "object",
      "properties": {
        "addedPermissions": {
          "description": "The set of permissions added by this change.",
          "type": "array",
          "items": {
            "$ref": "Permission"
          }
        },
        "removedPermissions": {
          "description": "The set of permissions removed by this change.",
          "type": "array",
          "items": {
            "$ref": "Permission"
          }
        }
      },
      "id": "PermissionChange"
    },
    "SystemEvent": {
      "id": "SystemEvent",
      "description": "Event triggered by system operations instead of end users.",
      "type": "object",
      "properties": {
        "type": {
          "enum": [
            "TYPE_UNSPECIFIED",
            "USER_DELETION",
            "TRASH_AUTO_PURGE"
          ],
          "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."
          ],
          "description": "The type of the system event that may triggered activity.",
          "type": "string"
        }
      }
    },
    "Delete": {
      "properties": {
        "type": {
          "enumDescriptions": [
            "Deletion type is not available.",
            "An object was put into the trash.",
            "An object was deleted permanently."
          ],
          "enum": [
            "TYPE_UNSPECIFIED",
            "TRASH",
            "PERMANENT_DELETE"
          ],
          "description": "The type of delete action taken.",
          "type": "string"
        }
      },
      "description": "An object was deleted.",
      "type": "object",
      "id": "Delete"
    },
    "DriveReference": {
      "description": "A lightweight reference to 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": {
          "description": "The title of the shared drive.",
          "type": "string"
        }
      },
      "id": "DriveReference"
    },
    "Drive": {
      "description": "Information about a shared drive.",
      "type": "object",
      "properties": {
        "title": {
          "description": "The title of the shared drive.",
          "type": "string"
        },
        "root": {
          "$ref": "DriveItem",
          "description": "The root of this shared drive."
        },
        "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"
        }
      },
      "id": "Drive"
    },
    "Date": {
      "id": "Date",
      "properties": {
        "value": {
          "format": "google-datetime",
          "description": "Date value.",
          "type": "string"
        }
      },
      "description": "Wrapper for Date Field value.",
      "type": "object"
    },
    "Administrator": {
      "id": "Administrator",
      "description": "Empty message representing an administrator.",
      "type": "object",
      "properties": {}
    },
    "DriveActivity": {
      "id": "DriveActivity",
      "properties": {
        "actors": {
          "description": "All actor(s) responsible for the activity.",
          "type": "array",
          "items": {
            "$ref": "Actor"
          }
        },
        "targets": {
          "items": {
            "$ref": "Target"
          },
          "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.",
          "type": "array"
        },
        "actions": {
          "description": "Details on all actions in this activity.",
          "type": "array",
          "items": {
            "$ref": "Action"
          }
        },
        "timeRange": {
          "description": "The activity occurred over this time range.",
          "$ref": "TimeRange"
        },
        "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"
        },
        "timestamp": {
          "description": "The activity occurred at this specific time.",
          "type": "string",
          "format": "google-datetime"
        }
      },
      "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"
    },
    "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": {
        "fileComment": {
          "$ref": "FileComment",
          "description": "The target is a comment on a Drive file."
        },
        "driveItem": {
          "description": "The target is a Drive item.",
          "$ref": "DriveItem"
        },
        "drive": {
          "description": "The target is a shared drive.",
          "$ref": "Drive"
        },
        "teamDrive": {
          "description": "This field is deprecated; please use the `drive` field instead.",
          "deprecated": true,
          "$ref": "TeamDrive"
        }
      },
      "id": "Target"
    },
    "DriveItemReference": {
      "description": "A lightweight reference to a Drive item, such as a file or folder.",
      "type": "object",
      "properties": {
        "driveFile": {
          "$ref": "DriveFile",
          "description": "The Drive item is a file."
        },
        "name": {
          "description": "The target Drive item. The format is `items/ITEM_ID`.",
          "type": "string"
        },
        "folder": {
          "description": "This field is deprecated; please use the `driveFolder` field instead.",
          "deprecated": true,
          "$ref": "Folder"
        },
        "file": {
          "$ref": "File",
          "description": "This field is deprecated; please use the `driveFile` field instead.",
          "deprecated": true
        },
        "title": {
          "description": "The title of the Drive item.",
          "type": "string"
        },
        "driveFolder": {
          "$ref": "DriveFolder",
          "description": "The Drive item is a folder. Includes information about the type of folder."
        }
      },
      "id": "DriveItemReference"
    },
    "DriveItem": {
      "properties": {
        "name": {
          "description": "The target Drive item. The format is `items/ITEM_ID`.",
          "type": "string"
        },
        "folder": {
          "$ref": "Folder",
          "description": "This field is deprecated; please use the `driveFolder` field instead.",
          "deprecated": true
        },
        "file": {
          "$ref": "File",
          "description": "This field is deprecated; please use the `driveFile` field instead.",
          "deprecated": true
        },
        "driveFile": {
          "$ref": "DriveFile",
          "description": "The Drive item is a file."
        },
        "driveFolder": {
          "description": "The Drive item is a folder. Includes information about the type of folder.",
          "$ref": "DriveFolder"
        },
        "owner": {
          "description": "Information about the owner of this Drive item.",
          "$ref": "Owner"
        },
        "title": {
          "description": "The title of the Drive item.",
          "type": "string"
        },
        "mimeType": {
          "description": "The MIME type of the Drive item. See https://developers.google.com/workspace/drive/v3/web/mime-types.",
          "type": "string"
        }
      },
      "description": "A Drive item, such as a file or folder.",
      "type": "object",
      "id": "DriveItem"
    },
    "ApplicationReference": {
      "description": "Activity in applications other than Drive.",
      "type": "object",
      "properties": {
        "type": {
          "description": "The reference type corresponding to this event.",
          "type": "string",
          "enumDescriptions": [
            "The type is not available.",
            "The links of one or more Drive items were posted.",
            "Comments were made regarding a Drive item."
          ],
          "enum": [
            "UNSPECIFIED_REFERENCE_TYPE",
            "LINK",
            "DISCUSS"
          ]
        }
      },
      "id": "ApplicationReference"
    },
    "DriveFile": {
      "id": "DriveFile",
      "description": "A Drive item which is a file.",
      "type": "object",
      "properties": {}
    },
    "Action": {
      "properties": {
        "detail": {
          "$ref": "ActionDetail",
          "description": "The type and detailed information about the action."
        },
        "actor": {
          "description": "The actor responsible for this action (or empty if all actors are responsible).",
          "$ref": "Actor"
        },
        "timestamp": {
          "description": "The action occurred at this specific time.",
          "type": "string",
          "format": "google-datetime"
        },
        "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"
        },
        "timeRange": {
          "$ref": "TimeRange",
          "description": "The action occurred over this time range."
        }
      },
      "description": "Information about the action.",
      "type": "object",
      "id": "Action"
    },
    "Owner": {
      "properties": {
        "domain": {
          "description": "The domain of the Drive item owner.",
          "$ref": "Domain"
        },
        "drive": {
          "$ref": "DriveReference",
          "description": "The drive that owns the item."
        },
        "user": {
          "$ref": "User",
          "description": "The user that owns the Drive item."
        },
        "teamDrive": {
          "description": "This field is deprecated; please use the `drive` field instead.",
          "deprecated": true,
          "$ref": "TeamDriveReference"
        }
      },
      "description": "Information about the owner of a Drive item.",
      "type": "object",
      "id": "Owner"
    },
    "Permission": {
      "properties": {
        "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"
        },
        "role": {
          "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.",
          "type": "string",
          "enum": [
            "ROLE_UNSPECIFIED",
            "OWNER",
            "ORGANIZER",
            "FILE_ORGANIZER",
            "EDITOR",
            "COMMENTER",
            "VIEWER",
            "PUBLISHED_VIEWER"
          ],
          "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."
          ]
        },
        "group": {
          "description": "The group to whom this permission applies.",
          "$ref": "Group"
        },
        "user": {
          "$ref": "User",
          "description": "The user to whom this permission applies."
        },
        "domain": {
          "$ref": "Domain",
          "description": "The domain to whom this permission applies."
        },
        "anyone": {
          "description": "If set, this permission applies to anyone, even logged out users.",
          "$ref": "Anyone"
        }
      },
      "description": "The permission setting of an object.",
      "type": "object",
      "id": "Permission"
    },
    "Actor": {
      "description": "The actor of a Drive activity.",
      "type": "object",
      "properties": {
        "administrator": {
          "description": "An administrator.",
          "$ref": "Administrator"
        },
        "impersonation": {
          "description": "An account acting on behalf of another.",
          "$ref": "Impersonation"
        },
        "system": {
          "$ref": "SystemEvent",
          "description": "A non-user actor (i.e. system triggered)."
        },
        "user": {
          "$ref": "User",
          "description": "An end user."
        },
        "anonymous": {
          "$ref": "AnonymousUser",
          "description": "An anonymous user."
        }
      },
      "id": "Actor"
    },
    "AnonymousUser": {
      "description": "Empty message representing an anonymous user or indicating the authenticated user should be anonymized.",
      "type": "object",
      "properties": {},
      "id": "AnonymousUser"
    },
    "File": {
      "deprecated": true,
      "description": "This item is deprecated; please see `DriveFile` instead.",
      "type": "object",
      "properties": {},
      "id": "File"
    },
    "Restore": {
      "id": "Restore",
      "description": "A deleted object was restored.",
      "type": "object",
      "properties": {
        "type": {
          "enumDescriptions": [
            "The type is not available.",
            "An object was restored from the trash."
          ],
          "enum": [
            "TYPE_UNSPECIFIED",
            "UNTRASH"
          ],
          "description": "The type of restore action taken.",
          "type": "string"
        }
      }
    },
    "TeamDriveReference": {
      "deprecated": true,
      "description": "This item is deprecated; please see `DriveReference` instead.",
      "type": "object",
      "properties": {
        "title": {
          "description": "This field is deprecated; please see `DriveReference.title` instead.",
          "type": "string"
        },
        "name": {
          "description": "This field is deprecated; please see `DriveReference.name` instead.",
          "type": "string"
        }
      },
      "id": "TeamDriveReference"
    },
    "TargetReference": {
      "properties": {
        "teamDrive": {
          "description": "This field is deprecated; please use the `drive` field instead.",
          "deprecated": true,
          "$ref": "TeamDriveReference"
        },
        "driveItem": {
          "description": "The target is a Drive item.",
          "$ref": "DriveItemReference"
        },
        "drive": {
          "$ref": "DriveReference",
          "description": "The target is a shared drive."
        }
      },
      "description": "A lightweight reference to the target of activity.",
      "type": "object",
      "id": "TargetReference"
    },
    "SingleUser": {
      "id": "SingleUser",
      "description": "Wrapper for User Field value.",
      "type": "object",
      "properties": {
        "value": {
          "description": "User value as email.",
          "type": "string"
        }
      }
    },
    "Integer": {
      "description": "Wrapper for Integer Field value.",
      "type": "object",
      "properties": {
        "value": {
          "description": "Integer value.",
          "type": "string",
          "format": "int64"
        }
      },
      "id": "Integer"
    },
    "TeamDrive": {
      "properties": {
        "root": {
          "description": "This field is deprecated; please see `Drive.root` instead.",
          "$ref": "DriveItem"
        },
        "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"
        }
      },
      "deprecated": true,
      "description": "This item is deprecated; please see `Drive` instead.",
      "type": "object",
      "id": "TeamDrive"
    },
    "ActionDetail": {
      "id": "ActionDetail",
      "description": "Data describing the type and additional information of an action.",
      "type": "object",
      "properties": {
        "create": {
          "$ref": "Create",
          "description": "An object was created."
        },
        "edit": {
          "description": "An object was edited.",
          "$ref": "Edit"
        },
        "rename": {
          "$ref": "Rename",
          "description": "An object was renamed."
        },
        "comment": {
          "$ref": "Comment",
          "description": "A change about comments was made."
        },
        "delete": {
          "description": "An object was deleted.",
          "$ref": "Delete"
        },
        "move": {
          "description": "An object was moved.",
          "$ref": "Move"
        },
        "permissionChange": {
          "description": "The permission on an object was changed.",
          "$ref": "PermissionChange"
        },
        "dlpChange": {
          "description": "A change happened in data leak prevention status.",
          "$ref": "DataLeakPreventionChange"
        },
        "appliedLabelChange": {
          "description": "Label was changed.",
          "$ref": "AppliedLabelChange"
        },
        "settingsChange": {
          "description": "Settings were changed.",
          "$ref": "SettingsChange"
        },
        "reference": {
          "description": "An object was referenced in an application outside of Drive/Docs.",
          "$ref": "ApplicationReference"
        },
        "restore": {
          "$ref": "Restore",
          "description": "A deleted object was restored."
        }
      }
    },
    "AppliedLabelChange": {
      "id": "AppliedLabelChange",
      "properties": {
        "changes": {
          "items": {
            "$ref": "AppliedLabelChangeDetail"
          },
          "description": "Changes that were made to the Label on the Target.",
          "type": "array"
        }
      },
      "description": "Label changes that were made on the Target.",
      "type": "object"
    },
    "Copy": {
      "description": "An object was created by copying an existing object.",
      "type": "object",
      "properties": {
        "originalObject": {
          "description": "The original object.",
          "$ref": "TargetReference"
        }
      },
      "id": "Copy"
    },
    "SelectionList": {
      "properties": {
        "values": {
          "items": {
            "$ref": "Selection"
          },
          "description": "Selection values.",
          "type": "array"
        }
      },
      "description": "Wrapper for SelectionList Field value.",
      "type": "object",
      "id": "SelectionList"
    },
    "Domain": {
      "description": "Information about a domain.",
      "type": "object",
      "properties": {
        "legacyId": {
          "description": "An opaque string used to identify this domain.",
          "type": "string"
        },
        "name": {
          "description": "The name of the domain, e.g. `google.com`.",
          "type": "string"
        }
      },
      "id": "Domain"
    },
    "Upload": {
      "id": "Upload",
      "description": "An object was uploaded into Drive.",
      "type": "object",
      "properties": {}
    },
    "Suggestion": {
      "id": "Suggestion",
      "properties": {
        "subtype": {
          "description": "The sub-type of this event.",
          "type": "string",
          "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."
          ],
          "enum": [
            "SUBTYPE_UNSPECIFIED",
            "ADDED",
            "DELETED",
            "REPLY_ADDED",
            "REPLY_DELETED",
            "ACCEPTED",
            "REJECTED",
            "ACCEPT_DELETED",
            "REJECT_DELETED"
          ]
        }
      },
      "description": "A suggestion.",
      "type": "object"
    },
    "FieldValueChange": {
      "description": "Change to a Field value.",
      "type": "object",
      "properties": {
        "newValue": {
          "$ref": "FieldValue",
          "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."
        },
        "fieldId": {
          "description": "The ID of this field. Field IDs are unique within a Label.",
          "type": "string"
        },
        "displayName": {
          "description": "The human-readable display name for this field.",
          "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"
        }
      },
      "id": "FieldValueChange"
    },
    "Folder": {
      "id": "Folder",
      "properties": {
        "type": {
          "enum": [
            "TYPE_UNSPECIFIED",
            "MY_DRIVE_ROOT",
            "TEAM_DRIVE_ROOT",
            "STANDARD_FOLDER"
          ],
          "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."
          ],
          "description": "This field is deprecated; please see `DriveFolder.type` instead.",
          "type": "string"
        }
      },
      "deprecated": true,
      "description": "This item is deprecated; please see `DriveFolder` instead.",
      "type": "object"
    },
    "DriveFolder": {
      "id": "DriveFolder",
      "description": "A Drive item which is a folder.",
      "type": "object",
      "properties": {
        "type": {
          "description": "The type of Drive folder.",
          "type": "string",
          "enum": [
            "TYPE_UNSPECIFIED",
            "MY_DRIVE_ROOT",
            "SHARED_DRIVE_ROOT",
            "STANDARD_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."
          ]
        }
      }
    },
    "Group": {
      "properties": {
        "email": {
          "description": "The email address of the group.",
          "type": "string"
        },
        "title": {
          "description": "The title of the group.",
          "type": "string"
        }
      },
      "description": "Information about a group.",
      "type": "object",
      "id": "Group"
    },
    "DataLeakPreventionChange": {
      "id": "DataLeakPreventionChange",
      "description": "A change in the object's data leak prevention status.",
      "type": "object",
      "properties": {
        "type": {
          "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."
          ],
          "enum": [
            "TYPE_UNSPECIFIED",
            "FLAGGED",
            "CLEARED"
          ],
          "description": "The type of Data Leak Prevention (DLP) change.",
          "type": "string"
        }
      }
    },
    "NoConsolidation": {
      "description": "A strategy that does no consolidation of individual activities.",
      "type": "object",
      "properties": {},
      "id": "NoConsolidation"
    },
    "Post": {
      "id": "Post",
      "description": "A regular posted comment.",
      "type": "object",
      "properties": {
        "subtype": {
          "description": "The sub-type of this event.",
          "type": "string",
          "enum": [
            "SUBTYPE_UNSPECIFIED",
            "ADDED",
            "DELETED",
            "REPLY_ADDED",
            "REPLY_DELETED",
            "RESOLVED",
            "REOPENED"
          ],
          "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."
          ]
        }
      }
    },
    "AppliedLabelChangeDetail": {
      "properties": {
        "fieldChanges": {
          "items": {
            "$ref": "FieldValueChange"
          },
          "description": "Field Changes. Only present if `types` contains `LABEL_FIELD_VALUE_CHANGED`.",
          "type": "array"
        },
        "types": {
          "description": "The types of changes made to the Label on the Target.",
          "type": "array",
          "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."
            ],
            "enum": [
              "TYPE_UNSPECIFIED",
              "LABEL_ADDED",
              "LABEL_REMOVED",
              "LABEL_FIELD_VALUE_CHANGED",
              "LABEL_APPLIED_BY_ITEM_CREATE"
            ],
            "type": "string"
          }
        },
        "title": {
          "description": "The human-readable title of the label that changed.",
          "type": "string"
        },
        "label": {
          "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`.",
          "type": "string"
        }
      },
      "description": "A change made to a Label on the Target.",
      "type": "object",
      "id": "AppliedLabelChangeDetail"
    },
    "FileComment": {
      "properties": {
        "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"
        },
        "parent": {
          "$ref": "DriveItem",
          "description": "The Drive item containing this comment."
        },
        "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"
        }
      },
      "description": "A comment on a file.",
      "type": "object",
      "id": "FileComment"
    },
    "QueryDriveActivityRequest": {
      "id": "QueryDriveActivityRequest",
      "properties": {
        "itemName": {
          "description": "Return activities for this Drive item. The format is `items/ITEM_ID`.",
          "type": "string"
        },
        "ancestorName": {
          "description": "Return activities for this Drive folder, plus all children and descendants. The format is `items/ITEM_ID`.",
          "type": "string"
        },
        "consolidationStrategy": {
          "$ref": "ConsolidationStrategy",
          "description": "Details on how to consolidate related actions that make up the activity. If not set, then related actions aren't consolidated."
        },
        "pageToken": {
          "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.",
          "type": "string"
        },
        "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"
        },
        "pageSize": {
          "format": "int32",
          "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"
        }
      },
      "description": "The request message for querying Drive activity.",
      "type": "object"
    },
    "New": {
      "description": "An object was created from scratch.",
      "type": "object",
      "properties": {},
      "id": "New"
    },
    "Rename": {
      "id": "Rename",
      "properties": {
        "newTitle": {
          "description": "The new title of the drive object.",
          "type": "string"
        },
        "oldTitle": {
          "description": "The previous title of the drive object.",
          "type": "string"
        }
      },
      "description": "An object was renamed.",
      "type": "object"
    },
    "KnownUser": {
      "id": "KnownUser",
      "description": "A known user.",
      "type": "object",
      "properties": {
        "isCurrentUser": {
          "description": "True if this is the user making the request.",
          "type": "boolean"
        },
        "personName": {
          "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/.",
          "type": "string"
        }
      }
    },
    "RestrictionChange": {
      "id": "RestrictionChange",
      "description": "Information about restriction policy changes to a feature.",
      "type": "object",
      "properties": {
        "feature": {
          "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"
          ],
          "description": "The feature which had a change in restriction policy.",
          "type": "string"
        },
        "newRestriction": {
          "enumDescriptions": [
            "The type of restriction is not available.",
            "The feature is available without restriction.",
            "The use of this feature is fully restricted."
          ],
          "enum": [
            "RESTRICTION_UNSPECIFIED",
            "UNRESTRICTED",
            "FULLY_RESTRICTED"
          ],
          "description": "The restriction in place after the change.",
          "type": "string"
        }
      }
    },
    "UserList": {
      "id": "UserList",
      "description": "Wrapper for UserList Field value.",
      "type": "object",
      "properties": {
        "values": {
          "description": "User values.",
          "type": "array",
          "items": {
            "$ref": "SingleUser"
          }
        }
      }
    },
    "Anyone": {
      "id": "Anyone",
      "description": "Represents any user (including a logged out user).",
      "type": "object",
      "properties": {}
    },
    "Assignment": {
      "description": "A comment with an assignment.",
      "type": "object",
      "properties": {
        "subtype": {
          "enum": [
            "SUBTYPE_UNSPECIFIED",
            "ADDED",
            "DELETED",
            "REPLY_ADDED",
            "REPLY_DELETED",
            "RESOLVED",
            "REOPENED",
            "REASSIGNED"
          ],
          "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."
          ],
          "description": "The sub-type of this event.",
          "type": "string"
        },
        "assignedUser": {
          "$ref": "User",
          "description": "The user to whom the comment was assigned."
        }
      },
      "id": "Assignment"
    },
    "Text": {
      "id": "Text",
      "description": "Wrapper for Text Field value.",
      "type": "object",
      "properties": {
        "value": {
          "description": "Value of Text Field.",
          "type": "string"
        }
      }
    },
    "Comment": {
      "id": "Comment",
      "description": "A change about comments on an object.",
      "type": "object",
      "properties": {
        "post": {
          "description": "A change on a regular posted comment.",
          "$ref": "Post"
        },
        "suggestion": {
          "$ref": "Suggestion",
          "description": "A change on a suggestion."
        },
        "mentionedUsers": {
          "description": "Users who are mentioned in this comment.",
          "type": "array",
          "items": {
            "$ref": "User"
          }
        },
        "assignment": {
          "$ref": "Assignment",
          "description": "A change on an assignment."
        }
      }
    },
    "User": {
      "id": "User",
      "properties": {
        "unknownUser": {
          "$ref": "UnknownUser",
          "description": "A user about whom nothing is currently known."
        },
        "knownUser": {
          "description": "A known user.",
          "$ref": "KnownUser"
        },
        "deletedUser": {
          "$ref": "DeletedUser",
          "description": "A user whose account has since been deleted."
        }
      },
      "description": "Information about an end user.",
      "type": "object"
    },
    "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",
      "properties": {
        "impersonatedUser": {
          "$ref": "User",
          "description": "The impersonated user."
        }
      },
      "id": "Impersonation"
    },
    "SettingsChange": {
      "properties": {
        "restrictionChanges": {
          "items": {
            "$ref": "RestrictionChange"
          },
          "description": "The set of changes made to restrictions.",
          "type": "array"
        }
      },
      "description": "Information about settings changes.",
      "type": "object",
      "id": "SettingsChange"
    },
    "Legacy": {
      "id": "Legacy",
      "properties": {},
      "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"
    },
    "QueryDriveActivityResponse": {
      "id": "QueryDriveActivityResponse",
      "properties": {
        "activities": {
          "description": "List of activity requested.",
          "type": "array",
          "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"
        }
      },
      "description": "Response message for querying Drive activity.",
      "type": "object"
    },
    "UnknownUser": {
      "properties": {},
      "description": "A user about whom nothing is currently known.",
      "type": "object",
      "id": "UnknownUser"
    }
  },
  "basePath": "",
  "id": "driveactivity:v2",
  "description": "Provides a historical view of activity in Google Drive.",
  "ownerName": "Google",
  "rootUrl": "https://driveactivity.googleapis.com/",
  "documentationLink": "https://developers.google.com/workspace/drive/activity/",
  "canonicalName": "Drive Activity",
  "resources": {
    "activity": {
      "methods": {
        "query": {
          "id": "driveactivity.activity.query",
          "flatPath": "v2/activity:query",
          "parameterOrder": [],
          "response": {
            "$ref": "QueryDriveActivityResponse"
          },
          "description": "Query past activity in Google Drive.",
          "request": {
            "$ref": "QueryDriveActivityRequest"
          },
          "parameters": {},
          "scopes": [
            "https://www.googleapis.com/auth/drive.activity",
            "https://www.googleapis.com/auth/drive.activity.readonly"
          ],
          "path": "v2/activity:query",
          "httpMethod": "POST"
        }
      }
    }
  },
  "parameters": {
    "alt": {
      "location": "query",
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "type": "string",
      "description": "Data format for response.",
      "default": "json",
      "enum": [
        "json",
        "media",
        "proto"
      ]
    },
    "quotaUser": {
      "type": "string",
      "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.",
      "location": "query"
    },
    "upload_protocol": {
      "type": "string",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "location": "query"
    },
    "prettyPrint": {
      "type": "boolean",
      "description": "Returns response with indentations and line breaks.",
      "location": "query",
      "default": "true"
    },
    "callback": {
      "type": "string",
      "description": "JSONP",
      "location": "query"
    },
    "fields": {
      "type": "string",
      "description": "Selector specifying which fields to include in a partial response.",
      "location": "query"
    },
    "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"
    },
    "$.xgafv": {
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "location": "query",
      "enum": [
        "1",
        "2"
      ],
      "type": "string",
      "description": "V1 error format."
    },
    "access_token": {
      "type": "string",
      "description": "OAuth access token.",
      "location": "query"
    },
    "uploadType": {
      "type": "string",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "location": "query"
    },
    "oauth_token": {
      "type": "string",
      "description": "OAuth 2.0 token for the current user.",
      "location": "query"
    }
  }
}
