query_drive_activity_request.proto 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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 = "QueryDriveActivityRequestProto";
  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 request message for querying Drive activity.
  24. message QueryDriveActivityRequest {
  25. // The primary criteria in the query. The default is
  26. // ancestor_name = `items/root` if no key is specified.
  27. oneof key {
  28. // Return activities for this Drive item. The format is
  29. // `items/ITEM_ID`.
  30. string item_name = 1;
  31. // Return activities for this Drive folder and all children and descendants.
  32. // The format is `items/ITEM_ID`.
  33. string ancestor_name = 2;
  34. }
  35. // Details on how to consolidate related actions that make up the activity. If
  36. // not set, then related actions are not consolidated.
  37. ConsolidationStrategy consolidation_strategy = 5;
  38. // The miminum number of activities desired in the response; the server will
  39. // attempt to return at least this quanitity. The server may also return fewer
  40. // activities if it has a partial response ready before the request times out.
  41. // If not set, a default value is used.
  42. int32 page_size = 6;
  43. // The token identifying which page of results to return. Set this to the
  44. // next_page_token value returned from a previous query to obtain the
  45. // following page of results. If not set, the first page of results will be
  46. // returned.
  47. string page_token = 7;
  48. // The filtering for items returned from this query request. The format of the
  49. // filter string is a sequence of expressions, joined by an optional "AND",
  50. // where each expression is of the form "field operator value".
  51. //
  52. // Supported fields:
  53. //
  54. // - `time`: Uses numerical operators on date values either in
  55. // terms of milliseconds since Jan 1, 1970 or in RFC 3339 format.
  56. // Examples:
  57. // - `time > 1452409200000 AND time <= 1492812924310`
  58. // - `time >= "2016-01-10T01:02:03-05:00"`
  59. //
  60. // - `detail.action_detail_case`: Uses the "has" operator (:) and
  61. // either a singular value or a list of allowed action types enclosed in
  62. // parentheses.
  63. // Examples:
  64. // - `detail.action_detail_case: RENAME`
  65. // - `detail.action_detail_case:(CREATE EDIT)`
  66. // - `-detail.action_detail_case:MOVE`
  67. //
  68. string filter = 8;
  69. }
  70. // How the individual activities are consolidated. A set of activities may be
  71. // consolidated into one combined activity if they are related in some way, such
  72. // as one actor performing the same action on multiple targets, or multiple
  73. // actors performing the same action on a single target. The strategy defines
  74. // the rules for which activities are related.
  75. message ConsolidationStrategy {
  76. // A strategy which does no consolidation of individual activities.
  77. message NoConsolidation {
  78. }
  79. // A strategy which consolidates activities using the grouping rules from the
  80. // legacy V1 Activity API. Similar actions occurring within a window of time
  81. // can be grouped across multiple targets (such as moving a set of files at
  82. // once) or multiple actors (such as several users editing the same item).
  83. // Grouping rules for this strategy are specific to each type of action.
  84. message Legacy {
  85. }
  86. // How the individual activities are consolidated.
  87. oneof strategy {
  88. // The individual activities are not consolidated.
  89. NoConsolidation none = 1;
  90. // The individual activities are consolidated using the legacy strategy.
  91. Legacy legacy = 2;
  92. }
  93. }