1// Copyright 2022 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.apps.drive.activity.v2; 18 19import "google/apps/drive/activity/v2/action.proto"; 20import "google/apps/drive/activity/v2/actor.proto"; 21import "google/apps/drive/activity/v2/common.proto"; 22import "google/apps/drive/activity/v2/target.proto"; 23import "google/protobuf/timestamp.proto"; 24 25option csharp_namespace = "Google.Apps.Drive.Activity.V2"; 26option go_package = "google.golang.org/genproto/googleapis/apps/drive/activity/v2;activity"; 27option java_multiple_files = true; 28option java_outer_classname = "QueryDriveActivityResponseProto"; 29option java_package = "com.google.apps.drive.activity.v2"; 30option objc_class_prefix = "GADA"; 31option php_namespace = "Google\\Apps\\Drive\\Activity\\V2"; 32 33// Response message for querying Drive activity. 34message QueryDriveActivityResponse { 35 // List of activity requested. 36 repeated DriveActivity activities = 1; 37 38 // Token to retrieve the next page of results, or 39 // empty if there are no more results in the list. 40 string next_page_token = 2; 41} 42 43// A single Drive activity comprising one or more Actions by one or more 44// Actors on one or more Targets. Some Action groupings occur spontaneously, 45// such as moving an item into a shared folder triggering a permission change. 46// Other groupings of related Actions, such as multiple Actors editing one item 47// or moving multiple files into a new folder, are controlled by the selection 48// of a ConsolidationStrategy in the QueryDriveActivityRequest. 49message DriveActivity { 50 // Key information about the primary action for this activity. This is either 51 // representative, or the most important, of all actions in the activity, 52 // according to the ConsolidationStrategy in the request. 53 ActionDetail primary_action_detail = 2; 54 55 // All actor(s) responsible for the activity. 56 repeated Actor actors = 3; 57 58 // Details on all actions in this activity. 59 repeated Action actions = 4; 60 61 // All Google Drive objects this activity is about (e.g. file, folder, drive). 62 // This represents the state of the target immediately after the actions 63 // occurred. 64 repeated Target targets = 5; 65 66 // The period of time when this activity occurred. 67 oneof time { 68 // The activity occurred at this specific time. 69 google.protobuf.Timestamp timestamp = 6; 70 71 // The activity occurred over this time range. 72 TimeRange time_range = 7; 73 } 74} 75