actor.proto 3.2 KB

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