xref: /aosp_15_r20/external/googleapis/google/cloud/discoveryengine/v1beta/purge_config.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
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
15syntax = "proto3";
16
17package google.cloud.discoveryengine.v1beta;
18
19import "google/api/field_behavior.proto";
20import "google/api/resource.proto";
21import "google/protobuf/timestamp.proto";
22import "google/rpc/status.proto";
23
24option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
25option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb";
26option java_multiple_files = true;
27option java_outer_classname = "PurgeConfigProto";
28option java_package = "com.google.cloud.discoveryengine.v1beta";
29option objc_class_prefix = "DISCOVERYENGINE";
30option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
31option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
32
33// Request message for
34// [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1beta.DocumentService.PurgeDocuments]
35// method.
36message PurgeDocumentsRequest {
37  // Required. The parent resource name, such as
38  // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
39  string parent = 1 [
40    (google.api.field_behavior) = REQUIRED,
41    (google.api.resource_reference) = {
42      type: "discoveryengine.googleapis.com/Branch"
43    }
44  ];
45
46  // Required. Filter matching documents to purge. Only currently supported
47  // value is
48  // `*` (all items).
49  string filter = 2 [(google.api.field_behavior) = REQUIRED];
50
51  // Actually performs the purge. If `force` is set to false, return the
52  // expected purge count without deleting any documents.
53  bool force = 3;
54}
55
56// Response message for
57// [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1beta.DocumentService.PurgeDocuments]
58// method. If the long running operation is successfully done, then this message
59// is returned by the google.longrunning.Operations.response field.
60message PurgeDocumentsResponse {
61  // The total count of documents purged as a result of the operation.
62  int64 purge_count = 1;
63
64  // A sample of document names that will be deleted. Only populated if `force`
65  // is set to false. A max of 100 names will be returned and the names are
66  // chosen at random.
67  repeated string purge_sample = 2 [(google.api.resource_reference) = {
68    type: "discoveryengine.googleapis.com/Document"
69  }];
70}
71
72// Metadata related to the progress of the PurgeDocuments operation.
73// This will be returned by the google.longrunning.Operation.metadata field.
74message PurgeDocumentsMetadata {
75  // Operation create time.
76  google.protobuf.Timestamp create_time = 1;
77
78  // Operation last update time. If the operation is done, this is also the
79  // finish time.
80  google.protobuf.Timestamp update_time = 2;
81
82  // Count of entries that were deleted successfully.
83  int64 success_count = 3;
84
85  // Count of entries that encountered errors while processing.
86  int64 failure_count = 4;
87
88  // Count of entries that were ignored as entries were not found.
89  int64 ignored_count = 5;
90}
91
92// Request message for
93// [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1beta.CompletionService.PurgeSuggestionDenyListEntries]
94// method.
95message PurgeSuggestionDenyListEntriesRequest {
96  // Required. The parent data store resource name for which to import denylist
97  // entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*.
98  string parent = 1 [
99    (google.api.field_behavior) = REQUIRED,
100    (google.api.resource_reference) = {
101      type: "discoveryengine.googleapis.com/DataStore"
102    }
103  ];
104}
105
106// Response message for
107// [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1beta.CompletionService.PurgeSuggestionDenyListEntries]
108// method.
109message PurgeSuggestionDenyListEntriesResponse {
110  // Number of suggestion deny list entries purged.
111  int64 purge_count = 1;
112
113  // A sample of errors encountered while processing the request.
114  repeated google.rpc.Status error_samples = 2;
115}
116
117// Metadata related to the progress of the PurgeSuggestionDenyListEntries
118// operation. This is returned by the google.longrunning.Operation.metadata
119// field.
120message PurgeSuggestionDenyListEntriesMetadata {
121  // Operation create time.
122  google.protobuf.Timestamp create_time = 1;
123
124  // Operation last update time. If the operation is done, this is also the
125  // finish time.
126  google.protobuf.Timestamp update_time = 2;
127}
128