Class SafetySettings.Builder (0.47.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

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>

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

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