xref: /aosp_15_r20/external/googleapis/google/cloud/discoveryengine/v1beta/completion.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";
20
21option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
22option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb";
23option java_multiple_files = true;
24option java_outer_classname = "CompletionProto";
25option java_package = "com.google.cloud.discoveryengine.v1beta";
26option objc_class_prefix = "DISCOVERYENGINE";
27option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
28option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
29
30// Suggestion deny list entry identifying the phrase to block from suggestions
31// and the applied operation for the phrase.
32message SuggestionDenyListEntry {
33  // Operator for matching with the generated suggestions.
34  enum MatchOperator {
35    // Default value. Should not be used
36    MATCH_OPERATOR_UNSPECIFIED = 0;
37
38    // If the suggestion is an exact match to the block_phrase, then block it.
39    EXACT_MATCH = 1;
40
41    // If the suggestion contains the block_phrase, then block it.
42    CONTAINS = 2;
43  }
44
45  // Required. Phrase to block from suggestions served. Can be maximum 125
46  // characters.
47  string block_phrase = 1 [(google.api.field_behavior) = REQUIRED];
48
49  // Required. The match operator to apply for this phrase. Whether to block the
50  // exact phrase, or block any suggestions containing this phrase.
51  MatchOperator match_operator = 2 [(google.api.field_behavior) = REQUIRED];
52}
53