Class Guardrail.ContentFilter (0.1.0)

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.v1.Guardrail.ContentFilter

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

Static Methods

getDefaultInstance()

public static Guardrail.ContentFilter getDefaultInstance()
Returns
Type Description
Guardrail.ContentFilter

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static Guardrail.ContentFilter.Builder newBuilder()
Returns
Type Description
Guardrail.ContentFilter.Builder

newBuilder(Guardrail.ContentFilter prototype)

public static Guardrail.ContentFilter.Builder newBuilder(Guardrail.ContentFilter prototype)
Parameter
Name Description
prototype Guardrail.ContentFilter
Returns
Type Description
Guardrail.ContentFilter.Builder

parseDelimitedFrom(InputStream input)

public static Guardrail.ContentFilter parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Guardrail.ContentFilter
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Guardrail.ContentFilter parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Guardrail.ContentFilter
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Guardrail.ContentFilter parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Guardrail.ContentFilter
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Guardrail.ContentFilter parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Guardrail.ContentFilter
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Guardrail.ContentFilter parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Guardrail.ContentFilter
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Guardrail.ContentFilter parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Guardrail.ContentFilter
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Guardrail.ContentFilter parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Guardrail.ContentFilter
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Guardrail.ContentFilter parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Guardrail.ContentFilter
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Guardrail.ContentFilter parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Guardrail.ContentFilter
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Guardrail.ContentFilter parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Guardrail.ContentFilter
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Guardrail.ContentFilter parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Guardrail.ContentFilter
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Guardrail.ContentFilter parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Guardrail.ContentFilter
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Guardrail.ContentFilter> parser()
Returns
Type Description
Parser<ContentFilter>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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];

Returns
Type Description
ProtocolStringList

A list containing the bannedContents.

getDefaultInstanceForType()

public Guardrail.ContentFilter getDefaultInstanceForType()
Returns
Type Description
Guardrail.ContentFilter

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.v1.Guardrail.ContentFilter.MatchType match_type = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Guardrail.ContentFilter.MatchType

The matchType.

getMatchTypeValue()

public int getMatchTypeValue()

Required. Match type for the content filter.

.google.cloud.ces.v1.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()
Returns
Type Description
Parser<ContentFilter>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Guardrail.ContentFilter.Builder newBuilderForType()
Returns
Type Description
Guardrail.ContentFilter.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected Guardrail.ContentFilter.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Guardrail.ContentFilter.Builder
Overrides

toBuilder()

public Guardrail.ContentFilter.Builder toBuilder()
Returns
Type Description
Guardrail.ContentFilter.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException