actor.proto 3.2 KB

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