purge_config.proto 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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.v2beta;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. option csharp_namespace = "Google.Cloud.Retail.V2Beta";
  19. option go_package = "google.golang.org/genproto/googleapis/cloud/retail/v2beta;retail";
  20. option java_multiple_files = true;
  21. option java_outer_classname = "PurgeConfigProto";
  22. option java_package = "com.google.cloud.retail.v2beta";
  23. option objc_class_prefix = "RETAIL";
  24. option php_namespace = "Google\\Cloud\\Retail\\V2beta";
  25. option ruby_package = "Google::Cloud::Retail::V2beta";
  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.v2beta.UserEvent.event_type]
  44. // string.
  45. // * `eventTime`: in ISO 8601 "zulu" format.
  46. // * `visitorId`: Double quoted string. Specifying this will delete all
  47. // events associated with a visitor.
  48. // * `userId`: Double quoted string. Specifying this will delete all events
  49. // associated with a user.
  50. //
  51. // Examples:
  52. //
  53. // * Deleting all events in a time range:
  54. // `eventTime > "2012-04-23T18:25:43.511Z"
  55. // eventTime < "2012-04-23T18:30:43.511Z"`
  56. // * Deleting specific eventType in time range:
  57. // `eventTime > "2012-04-23T18:25:43.511Z" eventType = "detail-page-view"`
  58. // * Deleting all events for a specific visitor:
  59. // `visitorId = "visitor1024"`
  60. //
  61. // The filtering fields are assumed to have an implicit AND.
  62. string filter = 2 [(google.api.field_behavior) = REQUIRED];
  63. // Actually perform the purge.
  64. // If `force` is set to false, the method will return the expected purge count
  65. // without deleting any user events.
  66. bool force = 3;
  67. }
  68. // Response of the PurgeUserEventsRequest. If the long running operation is
  69. // successfully done, then this message is returned by the
  70. // google.longrunning.Operations.response field.
  71. message PurgeUserEventsResponse {
  72. // The total count of events purged as a result of the operation.
  73. int64 purged_events_count = 1;
  74. }