public static final class Guardrail.ContentFilter extends GeneratedMessage implements Guardrail.ContentFilterOrBuilder
Guardrail that bans certain content from being used in the conversation.
Protobuf type google.cloud.ces.v1beta.Guardrail.ContentFilter
Inherited Members
com.google.protobuf.GeneratedMessage.<ContainingT,T>newFileScopedGeneratedExtension(java.lang.Class<?>,com.google.protobuf.Message)
com.google.protobuf.GeneratedMessage.<ContainingT,T>newMessageScopedGeneratedExtension(com.google.protobuf.Message,int,java.lang.Class<?>,com.google.protobuf.Message)
com.google.protobuf.GeneratedMessage.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessage.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessage.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessage.<V>serializeBooleanMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Boolean,V>,com.google.protobuf.MapEntry<java.lang.Boolean,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeIntegerMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Integer,V>,com.google.protobuf.MapEntry<java.lang.Integer,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeLongMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Long,V>,com.google.protobuf.MapEntry<java.lang.Long,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeStringMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.String,V>,com.google.protobuf.MapEntry<java.lang.String,V>,int)
com.google.protobuf.GeneratedMessage.canUseUnsafe()
com.google.protobuf.GeneratedMessage.emptyBooleanList()
com.google.protobuf.GeneratedMessage.emptyDoubleList()
com.google.protobuf.GeneratedMessage.emptyFloatList()
com.google.protobuf.GeneratedMessage.emptyIntList()
com.google.protobuf.GeneratedMessage.emptyLongList()
com.google.protobuf.GeneratedMessage.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessage.isStringEmpty(java.lang.Object)
com.google.protobuf.GeneratedMessage.mergeFromAndMakeImmutableInternal(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite)
com.google.protobuf.GeneratedMessage.newInstance(com.google.protobuf.GeneratedMessage.UnusedPrivateParameter)
com.google.protobuf.GeneratedMessage.parseUnknownFieldProto3(com.google.protobuf.CodedInputStream,com.google.protobuf.UnknownFieldSet.Builder,com.google.protobuf.ExtensionRegistryLite,int)
Static Fields
BANNED_CONTENTS_FIELD_NUMBER
public static final int BANNED_CONTENTS_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
BANNED_CONTENTS_IN_AGENT_RESPONSE_FIELD_NUMBER
public static final int BANNED_CONTENTS_IN_AGENT_RESPONSE_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
BANNED_CONTENTS_IN_USER_INPUT_FIELD_NUMBER
public static final int BANNED_CONTENTS_IN_USER_INPUT_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
DISREGARD_DIACRITICS_FIELD_NUMBER
public static final int DISREGARD_DIACRITICS_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
MATCH_TYPE_FIELD_NUMBER
public static final int MATCH_TYPE_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
SENSITIVE_WORDS_EXEMPTIONS_FIELD_NUMBER
public static final int SENSITIVE_WORDS_EXEMPTIONS_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static Guardrail.ContentFilter getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static Guardrail.ContentFilter.Builder newBuilder()
newBuilder(Guardrail.ContentFilter prototype)
public static Guardrail.ContentFilter.Builder newBuilder(Guardrail.ContentFilter prototype)
parseDelimitedFrom(InputStream input)
public static Guardrail.ContentFilter parseDelimitedFrom(InputStream input)
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static Guardrail.ContentFilter parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static Guardrail.ContentFilter parseFrom(byte[] data)
| Parameter |
| Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Guardrail.ContentFilter parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static Guardrail.ContentFilter parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Guardrail.ContentFilter parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
parseFrom(CodedInputStream input)
public static Guardrail.ContentFilter parseFrom(CodedInputStream input)
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static Guardrail.ContentFilter parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(InputStream input)
public static Guardrail.ContentFilter parseFrom(InputStream input)
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static Guardrail.ContentFilter parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static Guardrail.ContentFilter parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Guardrail.ContentFilter parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<Guardrail.ContentFilter> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
| Parameter |
| Name |
Description |
obj |
Object
|
Overrides
getBannedContents(int index)
public String getBannedContents(int index)
Optional. List of banned phrases. Applies to both user inputs and agent
responses.
repeated string banned_contents = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter |
| Name |
Description |
index |
int
The index of the element to return.
|
| Returns |
| Type |
Description |
String |
The bannedContents at the given index.
|
getBannedContentsBytes(int index)
public ByteString getBannedContentsBytes(int index)
Optional. List of banned phrases. Applies to both user inputs and agent
responses.
repeated string banned_contents = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter |
| Name |
Description |
index |
int
The index of the value to return.
|
| Returns |
| Type |
Description |
ByteString |
The bytes of the bannedContents at the given index.
|
getBannedContentsCount()
public int getBannedContentsCount()
Optional. List of banned phrases. Applies to both user inputs and agent
responses.
repeated string banned_contents = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
int |
The count of bannedContents.
|
getBannedContentsInAgentResponse(int index)
public String getBannedContentsInAgentResponse(int index)
Optional. List of banned phrases. Applies only to agent responses.
repeated string banned_contents_in_agent_response = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter |
| Name |
Description |
index |
int
The index of the element to return.
|
| Returns |
| Type |
Description |
String |
The bannedContentsInAgentResponse at the given index.
|
getBannedContentsInAgentResponseBytes(int index)
public ByteString getBannedContentsInAgentResponseBytes(int index)
Optional. List of banned phrases. Applies only to agent responses.
repeated string banned_contents_in_agent_response = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter |
| Name |
Description |
index |
int
The index of the value to return.
|
| Returns |
| Type |
Description |
ByteString |
The bytes of the bannedContentsInAgentResponse at the given index.
|
getBannedContentsInAgentResponseCount()
public int getBannedContentsInAgentResponseCount()
Optional. List of banned phrases. Applies only to agent responses.
repeated string banned_contents_in_agent_response = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
int |
The count of bannedContentsInAgentResponse.
|
getBannedContentsInAgentResponseList()
public ProtocolStringList getBannedContentsInAgentResponseList()
Optional. List of banned phrases. Applies only to agent responses.
repeated string banned_contents_in_agent_response = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
ProtocolStringList |
A list containing the bannedContentsInAgentResponse.
|
getBannedContentsInUserInput(int index)
public String getBannedContentsInUserInput(int index)
Optional. List of banned phrases. Applies only to user inputs.
repeated string banned_contents_in_user_input = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter |
| Name |
Description |
index |
int
The index of the element to return.
|
| Returns |
| Type |
Description |
String |
The bannedContentsInUserInput at the given index.
|
getBannedContentsInUserInputBytes(int index)
public ByteString getBannedContentsInUserInputBytes(int index)
Optional. List of banned phrases. Applies only to user inputs.
repeated string banned_contents_in_user_input = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter |
| Name |
Description |
index |
int
The index of the value to return.
|
| Returns |
| Type |
Description |
ByteString |
The bytes of the bannedContentsInUserInput at the given index.
|
getBannedContentsInUserInputCount()
public int getBannedContentsInUserInputCount()
Optional. List of banned phrases. Applies only to user inputs.
repeated string banned_contents_in_user_input = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
int |
The count of bannedContentsInUserInput.
|
getBannedContentsInUserInputList()
public ProtocolStringList getBannedContentsInUserInputList()
Optional. List of banned phrases. Applies only to user inputs.
repeated string banned_contents_in_user_input = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
ProtocolStringList |
A list containing the bannedContentsInUserInput.
|
getBannedContentsList()
public ProtocolStringList getBannedContentsList()
Optional. List of banned phrases. Applies to both user inputs and agent
responses.
repeated string banned_contents = 1 [(.google.api.field_behavior) = OPTIONAL];
getDefaultInstanceForType()
public Guardrail.ContentFilter getDefaultInstanceForType()
getDisregardDiacritics()
public boolean getDisregardDiacritics()
Optional. If true, diacritics are ignored during matching.
bool disregard_diacritics = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
boolean |
The disregardDiacritics.
|
getMatchType()
public Guardrail.ContentFilter.MatchType getMatchType()
Required. Match type for the content filter.
.google.cloud.ces.v1beta.Guardrail.ContentFilter.MatchType match_type = 4 [(.google.api.field_behavior) = REQUIRED];
getMatchTypeValue()
public int getMatchTypeValue()
Required. Match type for the content filter.
.google.cloud.ces.v1beta.Guardrail.ContentFilter.MatchType match_type = 4 [(.google.api.field_behavior) = REQUIRED];
| Returns |
| Type |
Description |
int |
The enum numeric value on the wire for matchType.
|
getParserForType()
public Parser<Guardrail.ContentFilter> getParserForType()
Overrides
getSensitiveWordsExemptions(int index)
public String getSensitiveWordsExemptions(int index)
Optional. Entries of the sensitive words list that this guardrail allows.
Only valid when match_type is SENSITIVE_WORDS. Each value must equal a
list entry (case-insensitive, surrounding whitespace ignored); other
values have no effect. Applies to this guardrail only. At most 1000
entries of up to 256 characters each.
repeated string sensitive_words_exemptions = 7 [(.google.api.field_behavior) = OPTIONAL];
| Parameter |
| Name |
Description |
index |
int
The index of the element to return.
|
| Returns |
| Type |
Description |
String |
The sensitiveWordsExemptions at the given index.
|
getSensitiveWordsExemptionsBytes(int index)
public ByteString getSensitiveWordsExemptionsBytes(int index)
Optional. Entries of the sensitive words list that this guardrail allows.
Only valid when match_type is SENSITIVE_WORDS. Each value must equal a
list entry (case-insensitive, surrounding whitespace ignored); other
values have no effect. Applies to this guardrail only. At most 1000
entries of up to 256 characters each.
repeated string sensitive_words_exemptions = 7 [(.google.api.field_behavior) = OPTIONAL];
| Parameter |
| Name |
Description |
index |
int
The index of the value to return.
|
| Returns |
| Type |
Description |
ByteString |
The bytes of the sensitiveWordsExemptions at the given index.
|
getSensitiveWordsExemptionsCount()
public int getSensitiveWordsExemptionsCount()
Optional. Entries of the sensitive words list that this guardrail allows.
Only valid when match_type is SENSITIVE_WORDS. Each value must equal a
list entry (case-insensitive, surrounding whitespace ignored); other
values have no effect. Applies to this guardrail only. At most 1000
entries of up to 256 characters each.
repeated string sensitive_words_exemptions = 7 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
int |
The count of sensitiveWordsExemptions.
|
getSensitiveWordsExemptionsList()
public ProtocolStringList getSensitiveWordsExemptionsList()
Optional. Entries of the sensitive words list that this guardrail allows.
Only valid when match_type is SENSITIVE_WORDS. Each value must equal a
list entry (case-insensitive, surrounding whitespace ignored); other
values have no effect. Applies to this guardrail only. At most 1000
entries of up to 256 characters each.
repeated string sensitive_words_exemptions = 7 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
ProtocolStringList |
A list containing the sensitiveWordsExemptions.
|
getSerializedSize()
public int getSerializedSize()
| Returns |
| Type |
Description |
int |
|
Overrides
hashCode()
| Returns |
| Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public Guardrail.ContentFilter.Builder newBuilderForType()
newBuilderForType(AbstractMessage.BuilderParent parent)
protected Guardrail.ContentFilter.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Overrides
toBuilder()
public Guardrail.ContentFilter.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides