public static final class Assistant.CustomerPolicy.BannedPhrase.Builder extends GeneratedMessage.Builder<Assistant.CustomerPolicy.BannedPhrase.Builder> implements Assistant.CustomerPolicy.BannedPhraseOrBuilderDefinition of a customer-defined banned phrase. A banned phrase is not allowed to appear in the user query or the LLM response, or else the answer will be refused.
Protobuf type
google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > Assistant.CustomerPolicy.BannedPhrase.BuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public Assistant.CustomerPolicy.BannedPhrase build()| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.BannedPhrase |
|
buildPartial()
public Assistant.CustomerPolicy.BannedPhrase buildPartial()| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.BannedPhrase |
|
clear()
public Assistant.CustomerPolicy.BannedPhrase.Builder clear()| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.BannedPhrase.Builder |
|
clearIgnoreDiacritics()
public Assistant.CustomerPolicy.BannedPhrase.Builder clearIgnoreDiacritics()Optional. If true, diacritical marks (e.g., accents, umlauts) are ignored when matching banned phrases. For example, "cafe" would match "café".
bool ignore_diacritics = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.BannedPhrase.Builder |
This builder for chaining. |
clearMatchType()
public Assistant.CustomerPolicy.BannedPhrase.Builder clearMatchType()Optional. Match type for the banned phrase.
.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.BannedPhraseMatchType match_type = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.BannedPhrase.Builder |
This builder for chaining. |
clearPhrase()
public Assistant.CustomerPolicy.BannedPhrase.Builder clearPhrase()Required. The raw string content to be banned.
string phrase = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.BannedPhrase.Builder |
This builder for chaining. |
getDefaultInstanceForType()
public Assistant.CustomerPolicy.BannedPhrase getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.BannedPhrase |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getIgnoreDiacritics()
public boolean getIgnoreDiacritics()Optional. If true, diacritical marks (e.g., accents, umlauts) are ignored when matching banned phrases. For example, "cafe" would match "café".
bool ignore_diacritics = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
The ignoreDiacritics. |
getMatchType()
public Assistant.CustomerPolicy.BannedPhrase.BannedPhraseMatchType getMatchType()Optional. Match type for the banned phrase.
.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.BannedPhraseMatchType match_type = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.BannedPhrase.BannedPhraseMatchType |
The matchType. |
getMatchTypeValue()
public int getMatchTypeValue()Optional. Match type for the banned phrase.
.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.BannedPhraseMatchType match_type = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
The enum numeric value on the wire for matchType. |
getPhrase()
public String getPhrase()Required. The raw string content to be banned.
string phrase = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
String |
The phrase. |
getPhraseBytes()
public ByteString getPhraseBytes()Required. The raw string content to be banned.
string phrase = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for phrase. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(Assistant.CustomerPolicy.BannedPhrase other)
public Assistant.CustomerPolicy.BannedPhrase.Builder mergeFrom(Assistant.CustomerPolicy.BannedPhrase other)| Parameter | |
|---|---|
| Name | Description |
other |
Assistant.CustomerPolicy.BannedPhrase |
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.BannedPhrase.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Assistant.CustomerPolicy.BannedPhrase.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.BannedPhrase.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public Assistant.CustomerPolicy.BannedPhrase.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.BannedPhrase.Builder |
|
setIgnoreDiacritics(boolean value)
public Assistant.CustomerPolicy.BannedPhrase.Builder setIgnoreDiacritics(boolean value)Optional. If true, diacritical marks (e.g., accents, umlauts) are ignored when matching banned phrases. For example, "cafe" would match "café".
bool ignore_diacritics = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
booleanThe ignoreDiacritics to set. |
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.BannedPhrase.Builder |
This builder for chaining. |
setMatchType(Assistant.CustomerPolicy.BannedPhrase.BannedPhraseMatchType value)
public Assistant.CustomerPolicy.BannedPhrase.Builder setMatchType(Assistant.CustomerPolicy.BannedPhrase.BannedPhraseMatchType value)Optional. Match type for the banned phrase.
.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.BannedPhraseMatchType match_type = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
Assistant.CustomerPolicy.BannedPhrase.BannedPhraseMatchTypeThe matchType to set. |
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.BannedPhrase.Builder |
This builder for chaining. |
setMatchTypeValue(int value)
public Assistant.CustomerPolicy.BannedPhrase.Builder setMatchTypeValue(int value)Optional. Match type for the banned phrase.
.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.BannedPhraseMatchType match_type = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
intThe enum numeric value on the wire for matchType to set. |
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.BannedPhrase.Builder |
This builder for chaining. |
setPhrase(String value)
public Assistant.CustomerPolicy.BannedPhrase.Builder setPhrase(String value)Required. The raw string content to be banned.
string phrase = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe phrase to set. |
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.BannedPhrase.Builder |
This builder for chaining. |
setPhraseBytes(ByteString value)
public Assistant.CustomerPolicy.BannedPhrase.Builder setPhraseBytes(ByteString value)Required. The raw string content to be banned.
string phrase = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for phrase to set. |
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.BannedPhrase.Builder |
This builder for chaining. |