Class Assistant.CustomerPolicy.Builder (0.90.0)

public static final class Assistant.CustomerPolicy.Builder extends GeneratedMessage.Builder<Assistant.CustomerPolicy.Builder> implements Assistant.CustomerPolicyOrBuilder

Customer-defined policy for the assistant.

Protobuf type google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy

Static Methods

getDescriptor()

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

Methods

addAllBannedPhrases(Iterable<? extends Assistant.CustomerPolicy.BannedPhrase> values)

public Assistant.CustomerPolicy.Builder addAllBannedPhrases(Iterable<? extends Assistant.CustomerPolicy.BannedPhrase> values)

Optional. List of banned phrases.

repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase>
Returns
Type Description
Assistant.CustomerPolicy.Builder

addBannedPhrases(Assistant.CustomerPolicy.BannedPhrase value)

public Assistant.CustomerPolicy.Builder addBannedPhrases(Assistant.CustomerPolicy.BannedPhrase value)

Optional. List of banned phrases.

repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Assistant.CustomerPolicy.BannedPhrase
Returns
Type Description
Assistant.CustomerPolicy.Builder

addBannedPhrases(Assistant.CustomerPolicy.BannedPhrase.Builder builderForValue)

public Assistant.CustomerPolicy.Builder addBannedPhrases(Assistant.CustomerPolicy.BannedPhrase.Builder builderForValue)

Optional. List of banned phrases.

repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Assistant.CustomerPolicy.BannedPhrase.Builder
Returns
Type Description
Assistant.CustomerPolicy.Builder

addBannedPhrases(int index, Assistant.CustomerPolicy.BannedPhrase value)

public Assistant.CustomerPolicy.Builder addBannedPhrases(int index, Assistant.CustomerPolicy.BannedPhrase value)

Optional. List of banned phrases.

repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value Assistant.CustomerPolicy.BannedPhrase
Returns
Type Description
Assistant.CustomerPolicy.Builder

addBannedPhrases(int index, Assistant.CustomerPolicy.BannedPhrase.Builder builderForValue)

public Assistant.CustomerPolicy.Builder addBannedPhrases(int index, Assistant.CustomerPolicy.BannedPhrase.Builder builderForValue)

Optional. List of banned phrases.

repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue Assistant.CustomerPolicy.BannedPhrase.Builder
Returns
Type Description
Assistant.CustomerPolicy.Builder

addBannedPhrasesBuilder()

public Assistant.CustomerPolicy.BannedPhrase.Builder addBannedPhrasesBuilder()

Optional. List of banned phrases.

repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Assistant.CustomerPolicy.BannedPhrase.Builder

addBannedPhrasesBuilder(int index)

public Assistant.CustomerPolicy.BannedPhrase.Builder addBannedPhrasesBuilder(int index)

Optional. List of banned phrases.

repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Assistant.CustomerPolicy.BannedPhrase.Builder

build()

public Assistant.CustomerPolicy build()
Returns
Type Description
Assistant.CustomerPolicy

buildPartial()

public Assistant.CustomerPolicy buildPartial()
Returns
Type Description
Assistant.CustomerPolicy

clear()

public Assistant.CustomerPolicy.Builder clear()
Returns
Type Description
Assistant.CustomerPolicy.Builder
Overrides

clearBannedPhrases()

public Assistant.CustomerPolicy.Builder clearBannedPhrases()

Optional. List of banned phrases.

repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Assistant.CustomerPolicy.Builder

clearModelArmorConfig()

public Assistant.CustomerPolicy.Builder clearModelArmorConfig()

Optional. Model Armor configuration to be used for sanitizing user prompts and assistant responses.

.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig model_armor_config = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Assistant.CustomerPolicy.Builder

getBannedPhrases(int index)

public Assistant.CustomerPolicy.BannedPhrase getBannedPhrases(int index)

Optional. List of banned phrases.

repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Assistant.CustomerPolicy.BannedPhrase

getBannedPhrasesBuilder(int index)

public Assistant.CustomerPolicy.BannedPhrase.Builder getBannedPhrasesBuilder(int index)

Optional. List of banned phrases.

repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Assistant.CustomerPolicy.BannedPhrase.Builder

getBannedPhrasesBuilderList()

public List<Assistant.CustomerPolicy.BannedPhrase.Builder> getBannedPhrasesBuilderList()

Optional. List of banned phrases.

repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getBannedPhrasesCount()

public int getBannedPhrasesCount()

Optional. List of banned phrases.

repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getBannedPhrasesList()

public List<Assistant.CustomerPolicy.BannedPhrase> getBannedPhrasesList()

Optional. List of banned phrases.

repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<BannedPhrase>

getBannedPhrasesOrBuilder(int index)

public Assistant.CustomerPolicy.BannedPhraseOrBuilder getBannedPhrasesOrBuilder(int index)

Optional. List of banned phrases.

repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Assistant.CustomerPolicy.BannedPhraseOrBuilder

getBannedPhrasesOrBuilderList()

public List<? extends Assistant.CustomerPolicy.BannedPhraseOrBuilder> getBannedPhrasesOrBuilderList()

Optional. List of banned phrases.

repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhraseOrBuilder>

getDefaultInstanceForType()

public Assistant.CustomerPolicy getDefaultInstanceForType()
Returns
Type Description
Assistant.CustomerPolicy

getDescriptorForType()

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

getModelArmorConfig()

public Assistant.CustomerPolicy.ModelArmorConfig getModelArmorConfig()

Optional. Model Armor configuration to be used for sanitizing user prompts and assistant responses.

.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig model_armor_config = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Assistant.CustomerPolicy.ModelArmorConfig

The modelArmorConfig.

getModelArmorConfigBuilder()

public Assistant.CustomerPolicy.ModelArmorConfig.Builder getModelArmorConfigBuilder()

Optional. Model Armor configuration to be used for sanitizing user prompts and assistant responses.

.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig model_armor_config = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Assistant.CustomerPolicy.ModelArmorConfig.Builder

getModelArmorConfigOrBuilder()

public Assistant.CustomerPolicy.ModelArmorConfigOrBuilder getModelArmorConfigOrBuilder()

Optional. Model Armor configuration to be used for sanitizing user prompts and assistant responses.

.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig model_armor_config = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Assistant.CustomerPolicy.ModelArmorConfigOrBuilder

hasModelArmorConfig()

public boolean hasModelArmorConfig()

Optional. Model Armor configuration to be used for sanitizing user prompts and assistant responses.

.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig model_armor_config = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the modelArmorConfig field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Assistant.CustomerPolicy other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeModelArmorConfig(Assistant.CustomerPolicy.ModelArmorConfig value)

public Assistant.CustomerPolicy.Builder mergeModelArmorConfig(Assistant.CustomerPolicy.ModelArmorConfig value)

Optional. Model Armor configuration to be used for sanitizing user prompts and assistant responses.

.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig model_armor_config = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Assistant.CustomerPolicy.ModelArmorConfig
Returns
Type Description
Assistant.CustomerPolicy.Builder

removeBannedPhrases(int index)

public Assistant.CustomerPolicy.Builder removeBannedPhrases(int index)

Optional. List of banned phrases.

repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Assistant.CustomerPolicy.Builder

setBannedPhrases(int index, Assistant.CustomerPolicy.BannedPhrase value)

public Assistant.CustomerPolicy.Builder setBannedPhrases(int index, Assistant.CustomerPolicy.BannedPhrase value)

Optional. List of banned phrases.

repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value Assistant.CustomerPolicy.BannedPhrase
Returns
Type Description
Assistant.CustomerPolicy.Builder

setBannedPhrases(int index, Assistant.CustomerPolicy.BannedPhrase.Builder builderForValue)

public Assistant.CustomerPolicy.Builder setBannedPhrases(int index, Assistant.CustomerPolicy.BannedPhrase.Builder builderForValue)

Optional. List of banned phrases.

repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue Assistant.CustomerPolicy.BannedPhrase.Builder
Returns
Type Description
Assistant.CustomerPolicy.Builder

setModelArmorConfig(Assistant.CustomerPolicy.ModelArmorConfig value)

public Assistant.CustomerPolicy.Builder setModelArmorConfig(Assistant.CustomerPolicy.ModelArmorConfig value)

Optional. Model Armor configuration to be used for sanitizing user prompts and assistant responses.

.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig model_armor_config = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Assistant.CustomerPolicy.ModelArmorConfig
Returns
Type Description
Assistant.CustomerPolicy.Builder

setModelArmorConfig(Assistant.CustomerPolicy.ModelArmorConfig.Builder builderForValue)

public Assistant.CustomerPolicy.Builder setModelArmorConfig(Assistant.CustomerPolicy.ModelArmorConfig.Builder builderForValue)

Optional. Model Armor configuration to be used for sanitizing user prompts and assistant responses.

.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig model_armor_config = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Assistant.CustomerPolicy.ModelArmorConfig.Builder
Returns
Type Description
Assistant.CustomerPolicy.Builder