Class Dictionary (0.44.0)

public final class Dictionary extends GeneratedMessage implements DictionaryOrBuilder

Message defining a custom dictionary of words or phrases for syntactic match.

Dictionary words are case-insensitive and all characters other than letters and digits in the unicode Basic Multilingual Plane will be replaced with whitespace when scanning for matches. For example, the dictionary phrase Sam Johnson will match all three phrases sam johnson, Sam, Johnson, and Sam (Johnson). Additionally, the characters surrounding any match must be of a different type than the adjacent characters within the word, so letters must be next to non-letters and digits must be next to non-digits. For example, the dictionary word jen will match the first three letters of the text jen123 but will return no matches for jennifer.

Dictionary words containing a large number of characters that are not letters or digits may result in unexpected matches because such characters are treated as whitespace. For details about the size limits of dictionaries, see Quotas and limits.

Protobuf type google.cloud.modelarmor.v1.Dictionary

Implements

DictionaryOrBuilder

Static Fields

WORD_LIST_FIELD_NUMBER

public static final int WORD_LIST_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Dictionary getDefaultInstance()
Returns
Type Description
Dictionary

getDescriptor()

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

newBuilder()

public static Dictionary.Builder newBuilder()
Returns
Type Description
Dictionary.Builder

newBuilder(Dictionary prototype)

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

parseDelimitedFrom(InputStream input)

public static Dictionary parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Dictionary
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

public static Dictionary parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Dictionary
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

public static Dictionary parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Dictionary
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

public static Dictionary parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Dictionary
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

public static Dictionary parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Dictionary
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

public static Parser<Dictionary> parser()
Returns
Type Description
Parser<Dictionary>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public Dictionary getDefaultInstanceForType()
Returns
Type Description
Dictionary

getParserForType()

public Parser<Dictionary> getParserForType()
Returns
Type Description
Parser<Dictionary>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSourceCase()

public Dictionary.SourceCase getSourceCase()
Returns
Type Description
Dictionary.SourceCase

getWordList()

public WordList getWordList()

Message defining a list of words or phrases.

.google.cloud.modelarmor.v1.WordList word_list = 1;

Returns
Type Description
WordList

The wordList.

getWordListOrBuilder()

public WordListOrBuilder getWordListOrBuilder()

Message defining a list of words or phrases.

.google.cloud.modelarmor.v1.WordList word_list = 1;

Returns
Type Description
WordListOrBuilder

hasWordList()

public boolean hasWordList()

Message defining a list of words or phrases.

.google.cloud.modelarmor.v1.WordList word_list = 1;

Returns
Type Description
boolean

Whether the wordList field is set.

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 Dictionary.Builder newBuilderForType()
Returns
Type Description
Dictionary.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

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

toBuilder()

public Dictionary.Builder toBuilder()
Returns
Type Description
Dictionary.Builder

writeTo(CodedOutputStream output)

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