Class Assistant.CustomerPolicy.Builder (0.99.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.v1.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.v1.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.cloud.discoveryengine.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Assistant.CustomerPolicy.Builder

clearDataProtectionPolicy()

public Assistant.CustomerPolicy.Builder clearDataProtectionPolicy()

Optional. Data protection policy to be used for sanitizing file uploads.

.google.cloud.discoveryengine.v1.DataProtectionPolicy data_protection_policy = 3 [(.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL];

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

getDataProtectionPolicy()

public DataProtectionPolicy getDataProtectionPolicy()

Optional. Data protection policy to be used for sanitizing file uploads.

.google.cloud.discoveryengine.v1.DataProtectionPolicy data_protection_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DataProtectionPolicy

The dataProtectionPolicy.

getDataProtectionPolicyBuilder()

public DataProtectionPolicy.Builder getDataProtectionPolicyBuilder()

Optional. Data protection policy to be used for sanitizing file uploads.

.google.cloud.discoveryengine.v1.DataProtectionPolicy data_protection_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DataProtectionPolicy.Builder

getDataProtectionPolicyOrBuilder()

public DataProtectionPolicyOrBuilder getDataProtectionPolicyOrBuilder()

Optional. Data protection policy to be used for sanitizing file uploads.

.google.cloud.discoveryengine.v1.DataProtectionPolicy data_protection_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DataProtectionPolicyOrBuilder

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.v1.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.v1.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.v1.Assistant.CustomerPolicy.ModelArmorConfig model_armor_config = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Assistant.CustomerPolicy.ModelArmorConfigOrBuilder

hasDataProtectionPolicy()

public boolean hasDataProtectionPolicy()

Optional. Data protection policy to be used for sanitizing file uploads.

.google.cloud.discoveryengine.v1.DataProtectionPolicy data_protection_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the dataProtectionPolicy field is set.

hasModelArmorConfig()

public boolean hasModelArmorConfig()

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

.google.cloud.discoveryengine.v1.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

mergeDataProtectionPolicy(DataProtectionPolicy value)

public Assistant.CustomerPolicy.Builder mergeDataProtectionPolicy(DataProtectionPolicy value)

Optional. Data protection policy to be used for sanitizing file uploads.

.google.cloud.discoveryengine.v1.DataProtectionPolicy data_protection_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

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

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.v1.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.v1.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.v1.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.v1.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

setDataProtectionPolicy(DataProtectionPolicy value)

public Assistant.CustomerPolicy.Builder setDataProtectionPolicy(DataProtectionPolicy value)

Optional. Data protection policy to be used for sanitizing file uploads.

.google.cloud.discoveryengine.v1.DataProtectionPolicy data_protection_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

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

setDataProtectionPolicy(DataProtectionPolicy.Builder builderForValue)

public Assistant.CustomerPolicy.Builder setDataProtectionPolicy(DataProtectionPolicy.Builder builderForValue)

Optional. Data protection policy to be used for sanitizing file uploads.

.google.cloud.discoveryengine.v1.DataProtectionPolicy data_protection_policy = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue DataProtectionPolicy.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.v1.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.v1.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