purge_config.proto 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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.cloud.retail.v2;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. option csharp_namespace = "Google.Cloud.Retail.V2";
  19. option go_package = "google.golang.org/genproto/googleapis/cloud/retail/v2;retail";
  20. option java_multiple_files = true;
  21. option java_outer_classname = "PurgeConfigProto";
  22. option java_package = "com.google.cloud.retail.v2";
  23. option objc_class_prefix = "RETAIL";
  24. option php_namespace = "Google\\Cloud\\Retail\\V2";
  25. option ruby_package = "Google::Cloud::Retail::V2";
  26. // Metadata related to the progress of the Purge operation.
  27. // This will be returned by the google.longrunning.Operation.metadata field.
  28. message PurgeMetadata {}
  29. // Request message for PurgeUserEvents method.
  30. message PurgeUserEventsRequest {
  31. // Required. The resource name of the catalog under which the events are
  32. // created. The format is
  33. // `projects/${projectId}/locations/global/catalogs/${catalogId}`
  34. string parent = 1 [
  35. (google.api.field_behavior) = REQUIRED,
  36. (google.api.resource_reference) = { type: "retail.googleapis.com/Catalog" }
  37. ];
  38. // Required. The filter string to specify the events to be deleted with a
  39. // length limit of 5,000 characters. Empty string filter is not allowed. The
  40. // eligible fields for filtering are:
  41. //
  42. // * `eventType`: Double quoted
  43. // [UserEvent.event_type][google.cloud.retail.v2.UserEvent.event_type] string.
  44. // * `eventTime`: in ISO 8601 "zulu" format.
  45. // * `visitorId`: Double quoted string. Specifying this will delete all
  46. // events associated with a visitor.
  47. // * `userId`: Double quoted string. Specifying this will delete all events
  48. // associated with a user.
  49. //
  50. // Examples:
  51. //
  52. // * Deleting all events in a time range:
  53. // `eventTime > "2012-04-23T18:25:43.511Z"
  54. // eventTime < "2012-04-23T18:30:43.511Z"`
  55. // * Deleting specific eventType in time range:
  56. // `eventTime > "2012-04-23T18:25:43.511Z" eventType = "detail-page-view"`
  57. // * Deleting all events for a specific visitor:
  58. // `visitorId = "visitor1024"`
  59. //
  60. // The filtering fields are assumed to have an implicit AND.
  61. string filter = 2 [(google.api.field_behavior) = REQUIRED];
  62. // Actually perform the purge.
  63. // If `force` is set to false, the method will return the expected purge count
  64. // without deleting any user events.
  65. bool force = 3;
  66. }
  67. // Response of the PurgeUserEventsRequest. If the long running operation is
  68. // successfully done, then this message is returned by the
  69. // google.longrunning.Operations.response field.
  70. message PurgeUserEventsResponse {
  71. // The total count of events purged as a result of the operation.
  72. int64 purged_events_count = 1;
  73. }