Class SafetySettings.Builder (0.66.0)

public static final class SafetySettings.Builder extends GeneratedMessageV3.Builder<SafetySettings.Builder> implements SafetySettingsOrBuilder

Settings for Generative Safety.

Protobuf type google.cloud.dialogflow.cx.v3beta1.SafetySettings

Static Methods

getDescriptor()

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

Methods

addAllBannedPhrases(Iterable<? extends SafetySettings.Phrase> values)

public SafetySettings.Builder addAllBannedPhrases(Iterable<? extends SafetySettings.Phrase> values)

Banned phrases for generated text.

repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1;

Parameter
Name Description
values Iterable<? extends com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase>
Returns
Type Description
SafetySettings.Builder

addBannedPhrases(SafetySettings.Phrase value)

public SafetySettings.Builder addBannedPhrases(SafetySettings.Phrase value)

Banned phrases for generated text.

repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1;

Parameter
Name Description
value SafetySettings.Phrase
Returns
Type Description
SafetySettings.Builder

addBannedPhrases(SafetySettings.Phrase.Builder builderForValue)

public SafetySettings.Builder addBannedPhrases(SafetySettings.Phrase.Builder builderForValue)

Banned phrases for generated text.

repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1;

Parameter
Name Description
builderForValue SafetySettings.Phrase.Builder
Returns
Type Description
SafetySettings.Builder

addBannedPhrases(int index, SafetySettings.Phrase value)

public SafetySettings.Builder addBannedPhrases(int index, SafetySettings.Phrase value)

Banned phrases for generated text.

repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1;

Parameters
Name Description
index int
value SafetySettings.Phrase
Returns
Type Description
SafetySettings.Builder

addBannedPhrases(int index, SafetySettings.Phrase.Builder builderForValue)

public SafetySettings.Builder addBannedPhrases(int index, SafetySettings.Phrase.Builder builderForValue)

Banned phrases for generated text.

repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1;

Parameters
Name Description
index int
builderForValue SafetySettings.Phrase.Builder
Returns
Type Description
SafetySettings.Builder

addBannedPhrasesBuilder()

public SafetySettings.Phrase.Builder addBannedPhrasesBuilder()

Banned phrases for generated text.

repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1;

Returns
Type Description
SafetySettings.Phrase.Builder

addBannedPhrasesBuilder(int index)

public SafetySettings.Phrase.Builder addBannedPhrasesBuilder(int index)

Banned phrases for generated text.

repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1;

Parameter
Name Description
index int
Returns
Type Description
SafetySettings.Phrase.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SafetySettings.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SafetySettings.Builder
Overrides

build()

public SafetySettings build()
Returns
Type Description
SafetySettings

buildPartial()

public SafetySettings buildPartial()
Returns
Type Description
SafetySettings

clear()

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

clearBannedPhrases()

public SafetySettings.Builder clearBannedPhrases()

Banned phrases for generated text.

repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1;

Returns
Type Description
SafetySettings.Builder

clearDefaultBannedPhraseMatchStrategy()

public SafetySettings.Builder clearDefaultBannedPhraseMatchStrategy()

Optional. Default phrase match strategy for banned phrases.

.google.cloud.dialogflow.cx.v3beta1.SafetySettings.PhraseMatchStrategy default_banned_phrase_match_strategy = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SafetySettings.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public SafetySettings.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
SafetySettings.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public SafetySettings.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
SafetySettings.Builder
Overrides

clone()

public SafetySettings.Builder clone()
Returns
Type Description
SafetySettings.Builder
Overrides

getBannedPhrases(int index)

public SafetySettings.Phrase getBannedPhrases(int index)

Banned phrases for generated text.

repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1;

Parameter
Name Description
index int
Returns
Type Description
SafetySettings.Phrase

getBannedPhrasesBuilder(int index)

public SafetySettings.Phrase.Builder getBannedPhrasesBuilder(int index)

Banned phrases for generated text.

repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1;

Parameter
Name Description
index int
Returns
Type Description
SafetySettings.Phrase.Builder

getBannedPhrasesBuilderList()

public List<SafetySettings.Phrase.Builder> getBannedPhrasesBuilderList()

Banned phrases for generated text.

repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1;

Returns
Type Description
List<Builder>

getBannedPhrasesCount()

public int getBannedPhrasesCount()

Banned phrases for generated text.

repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1;

Returns
Type Description
int

getBannedPhrasesList()

public List<SafetySettings.Phrase> getBannedPhrasesList()

Banned phrases for generated text.

repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1;

Returns
Type Description
List<Phrase>

getBannedPhrasesOrBuilder(int index)

public SafetySettings.PhraseOrBuilder getBannedPhrasesOrBuilder(int index)

Banned phrases for generated text.

repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1;

Parameter
Name Description
index int
Returns
Type Description
SafetySettings.PhraseOrBuilder

getBannedPhrasesOrBuilderList()

public List<? extends SafetySettings.PhraseOrBuilder> getBannedPhrasesOrBuilderList()

Banned phrases for generated text.

repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1;

Returns
Type Description
List<? extends com.google.cloud.dialogflow.cx.v3beta1.SafetySettings.PhraseOrBuilder>

getDefaultBannedPhraseMatchStrategy()

public SafetySettings.PhraseMatchStrategy getDefaultBannedPhraseMatchStrategy()

Optional. Default phrase match strategy for banned phrases.

.google.cloud.dialogflow.cx.v3beta1.SafetySettings.PhraseMatchStrategy default_banned_phrase_match_strategy = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SafetySettings.PhraseMatchStrategy

The defaultBannedPhraseMatchStrategy.

getDefaultBannedPhraseMatchStrategyValue()

public int getDefaultBannedPhraseMatchStrategyValue()

Optional. Default phrase match strategy for banned phrases.

.google.cloud.dialogflow.cx.v3beta1.SafetySettings.PhraseMatchStrategy default_banned_phrase_match_strategy = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for defaultBannedPhraseMatchStrategy.

getDefaultInstanceForType()

public SafetySettings getDefaultInstanceForType()
Returns
Type Description
SafetySettings

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SafetySettings other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SafetySettings.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SafetySettings.Builder
Overrides

removeBannedPhrases(int index)

public SafetySettings.Builder removeBannedPhrases(int index)

Banned phrases for generated text.

repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1;

Parameter
Name Description
index int
Returns
Type Description
SafetySettings.Builder

setBannedPhrases(int index, SafetySettings.Phrase value)

public SafetySettings.Builder setBannedPhrases(int index, SafetySettings.Phrase value)

Banned phrases for generated text.

repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1;

Parameters
Name Description
index int
value SafetySettings.Phrase
Returns
Type Description
SafetySettings.Builder

setBannedPhrases(int index, SafetySettings.Phrase.Builder builderForValue)

public SafetySettings.Builder setBannedPhrases(int index, SafetySettings.Phrase.Builder builderForValue)

Banned phrases for generated text.

repeated .google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase banned_phrases = 1;

Parameters
Name Description
index int
builderForValue SafetySettings.Phrase.Builder
Returns
Type Description
SafetySettings.Builder

setDefaultBannedPhraseMatchStrategy(SafetySettings.PhraseMatchStrategy value)

public SafetySettings.Builder setDefaultBannedPhraseMatchStrategy(SafetySettings.PhraseMatchStrategy value)

Optional. Default phrase match strategy for banned phrases.

.google.cloud.dialogflow.cx.v3beta1.SafetySettings.PhraseMatchStrategy default_banned_phrase_match_strategy = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value SafetySettings.PhraseMatchStrategy

The defaultBannedPhraseMatchStrategy to set.

Returns
Type Description
SafetySettings.Builder

This builder for chaining.

setDefaultBannedPhraseMatchStrategyValue(int value)

public SafetySettings.Builder setDefaultBannedPhraseMatchStrategyValue(int value)

Optional. Default phrase match strategy for banned phrases.

.google.cloud.dialogflow.cx.v3beta1.SafetySettings.PhraseMatchStrategy default_banned_phrase_match_strategy = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The enum numeric value on the wire for defaultBannedPhraseMatchStrategy to set.

Returns
Type Description
SafetySettings.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public SafetySettings.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SafetySettings.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public SafetySettings.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
SafetySettings.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final SafetySettings.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SafetySettings.Builder
Overrides