• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
19option csharp_namespace = "Google.Apps.Drive.Activity.V2";
20option go_package = "google.golang.org/genproto/googleapis/apps/drive/activity/v2;activity";
21option java_multiple_files = true;
22option java_outer_classname = "ActorProto";
23option java_package = "com.google.apps.drive.activity.v2";
24option objc_class_prefix = "GADA";
25option php_namespace = "Google\\Apps\\Drive\\Activity\\V2";
26
27// The actor of a Drive activity.
28message Actor {
29  // The type of actor.
30  oneof type {
31    // An end user.
32    User user = 1;
33
34    // An anonymous user.
35    AnonymousUser anonymous = 2;
36
37    // An account acting on behalf of another.
38    Impersonation impersonation = 3;
39
40    // A non-user actor (i.e. system triggered).
41    SystemEvent system = 4;
42
43    // An administrator.
44    Administrator administrator = 5;
45  }
46}
47
48// Information about an end user.
49message User {
50  // A known user.
51  message KnownUser {
52    // The identifier for this user that can be used with the People API to get
53    // more information. The format is `people/ACCOUNT_ID`. See
54    // https://developers.google.com/people/.
55    string person_name = 1;
56
57    // True if this is the user making the request.
58    bool is_current_user = 2;
59  }
60
61  // A user whose account has since been deleted.
62  message DeletedUser {}
63
64  // A user about whom nothing is currently known.
65  message UnknownUser {}
66
67  // The type of user, such as known, unknown, and deleted.
68  oneof type {
69    // A known user.
70    KnownUser known_user = 2;
71
72    // A user whose account has since been deleted.
73    DeletedUser deleted_user = 3;
74
75    // A user about whom nothing is currently known.
76    UnknownUser unknown_user = 4;
77  }
78}
79
80// Empty message representing an anonymous user or indicating the authenticated
81// user should be anonymized.
82message AnonymousUser {}
83
84// Information about an impersonation, where an admin acts on behalf of an end
85// user. Information about the acting admin is not currently available.
86message Impersonation {
87  // The impersonated user.
88  User impersonated_user = 1;
89}
90
91// Event triggered by system operations instead of end users.
92message SystemEvent {
93  // The types of system events that may trigger activity.
94  enum Type {
95    // The event type is unspecified.
96    TYPE_UNSPECIFIED = 0;
97
98    // The event is a consequence of a user account being deleted.
99    USER_DELETION = 1;
100
101    // The event is due to the system automatically purging trash.
102    TRASH_AUTO_PURGE = 2;
103  }
104
105  // The type of the system event that may triggered activity.
106  Type type = 1;
107}
108
109// Empty message representing an administrator.
110message Administrator {}
111