Class Dictionary.Builder (0.44.0)

public static final class Dictionary.Builder extends GeneratedMessage.Builder<Dictionary.Builder> 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 Methods

getDescriptor()

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

Methods

build()

public Dictionary build()
Returns
Type Description
Dictionary

buildPartial()

public Dictionary buildPartial()
Returns
Type Description
Dictionary

clear()

public Dictionary.Builder clear()
Returns
Type Description
Dictionary.Builder
Overrides

clearSource()

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

clearWordList()

public Dictionary.Builder clearWordList()

Message defining a list of words or phrases.

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

Returns
Type Description
Dictionary.Builder

getDefaultInstanceForType()

public Dictionary getDefaultInstanceForType()
Returns
Type Description
Dictionary

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
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.

getWordListBuilder()

public WordList.Builder getWordListBuilder()

Message defining a list of words or phrases.

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

Returns
Type Description
WordList.Builder

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.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Dictionary other)

public Dictionary.Builder mergeFrom(Dictionary other)
Parameter
Name Description
other Dictionary
Returns
Type Description
Dictionary.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Dictionary.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Dictionary.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Dictionary.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Dictionary.Builder
Overrides

mergeWordList(WordList value)

public Dictionary.Builder mergeWordList(WordList value)

Message defining a list of words or phrases.

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

Parameter
Name Description
value WordList
Returns
Type Description
Dictionary.Builder

setWordList(WordList value)

public Dictionary.Builder setWordList(WordList value)

Message defining a list of words or phrases.

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

Parameter
Name Description
value WordList
Returns
Type Description
Dictionary.Builder

setWordList(WordList.Builder builderForValue)

public Dictionary.Builder setWordList(WordList.Builder builderForValue)

Message defining a list of words or phrases.

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

Parameter
Name Description
builderForValue WordList.Builder
Returns
Type Description
Dictionary.Builder