public static final class Assistant.CustomerPolicy.ModelArmorConfig.Builder extends GeneratedMessage.Builder<Assistant.CustomerPolicy.ModelArmorConfig.Builder> implements Assistant.CustomerPolicy.ModelArmorConfigOrBuilderConfiguration for customer defined Model Armor templates to be used for sanitizing user prompts and assistant responses.
Protobuf type
google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > Assistant.CustomerPolicy.ModelArmorConfig.BuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public Assistant.CustomerPolicy.ModelArmorConfig build()| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.ModelArmorConfig |
|
buildPartial()
public Assistant.CustomerPolicy.ModelArmorConfig buildPartial()| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.ModelArmorConfig |
|
clear()
public Assistant.CustomerPolicy.ModelArmorConfig.Builder clear()| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.ModelArmorConfig.Builder |
|
clearFailureMode()
public Assistant.CustomerPolicy.ModelArmorConfig.Builder clearFailureMode()Optional. Defines the failure mode for Model Armor sanitization.
.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig.FailureMode failure_mode = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.ModelArmorConfig.Builder |
This builder for chaining. |
clearResponseTemplate()
public Assistant.CustomerPolicy.ModelArmorConfig.Builder clearResponseTemplate() Optional. The resource name of the Model Armor template for sanitizing
assistant responses. Format:
projects/{project}/locations/{location}/templates/{template_id}
If not specified, no sanitization will be applied to the assistant response.
string response_template = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.ModelArmorConfig.Builder |
This builder for chaining. |
clearUserPromptTemplate()
public Assistant.CustomerPolicy.ModelArmorConfig.Builder clearUserPromptTemplate() Optional. The resource name of the Model Armor template for sanitizing
user prompts. Format:
projects/{project}/locations/{location}/templates/{template_id}
If not specified, no sanitization will be applied to the user prompt.
string user_prompt_template = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.ModelArmorConfig.Builder |
This builder for chaining. |
getDefaultInstanceForType()
public Assistant.CustomerPolicy.ModelArmorConfig getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.ModelArmorConfig |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getFailureMode()
public Assistant.CustomerPolicy.ModelArmorConfig.FailureMode getFailureMode()Optional. Defines the failure mode for Model Armor sanitization.
.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig.FailureMode failure_mode = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.ModelArmorConfig.FailureMode |
The failureMode. |
getFailureModeValue()
public int getFailureModeValue()Optional. Defines the failure mode for Model Armor sanitization.
.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig.FailureMode failure_mode = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
The enum numeric value on the wire for failureMode. |
getResponseTemplate()
public String getResponseTemplate() Optional. The resource name of the Model Armor template for sanitizing
assistant responses. Format:
projects/{project}/locations/{location}/templates/{template_id}
If not specified, no sanitization will be applied to the assistant response.
string response_template = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
String |
The responseTemplate. |
getResponseTemplateBytes()
public ByteString getResponseTemplateBytes() Optional. The resource name of the Model Armor template for sanitizing
assistant responses. Format:
projects/{project}/locations/{location}/templates/{template_id}
If not specified, no sanitization will be applied to the assistant response.
string response_template = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for responseTemplate. |
getUserPromptTemplate()
public String getUserPromptTemplate() Optional. The resource name of the Model Armor template for sanitizing
user prompts. Format:
projects/{project}/locations/{location}/templates/{template_id}
If not specified, no sanitization will be applied to the user prompt.
string user_prompt_template = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
String |
The userPromptTemplate. |
getUserPromptTemplateBytes()
public ByteString getUserPromptTemplateBytes() Optional. The resource name of the Model Armor template for sanitizing
user prompts. Format:
projects/{project}/locations/{location}/templates/{template_id}
If not specified, no sanitization will be applied to the user prompt.
string user_prompt_template = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for userPromptTemplate. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(Assistant.CustomerPolicy.ModelArmorConfig other)
public Assistant.CustomerPolicy.ModelArmorConfig.Builder mergeFrom(Assistant.CustomerPolicy.ModelArmorConfig other)| Parameter | |
|---|---|
| Name | Description |
other |
Assistant.CustomerPolicy.ModelArmorConfig |
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.ModelArmorConfig.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Assistant.CustomerPolicy.ModelArmorConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.ModelArmorConfig.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public Assistant.CustomerPolicy.ModelArmorConfig.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.ModelArmorConfig.Builder |
|
setFailureMode(Assistant.CustomerPolicy.ModelArmorConfig.FailureMode value)
public Assistant.CustomerPolicy.ModelArmorConfig.Builder setFailureMode(Assistant.CustomerPolicy.ModelArmorConfig.FailureMode value)Optional. Defines the failure mode for Model Armor sanitization.
.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig.FailureMode failure_mode = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
Assistant.CustomerPolicy.ModelArmorConfig.FailureModeThe failureMode to set. |
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.ModelArmorConfig.Builder |
This builder for chaining. |
setFailureModeValue(int value)
public Assistant.CustomerPolicy.ModelArmorConfig.Builder setFailureModeValue(int value)Optional. Defines the failure mode for Model Armor sanitization.
.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig.FailureMode failure_mode = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
intThe enum numeric value on the wire for failureMode to set. |
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.ModelArmorConfig.Builder |
This builder for chaining. |
setResponseTemplate(String value)
public Assistant.CustomerPolicy.ModelArmorConfig.Builder setResponseTemplate(String value) Optional. The resource name of the Model Armor template for sanitizing
assistant responses. Format:
projects/{project}/locations/{location}/templates/{template_id}
If not specified, no sanitization will be applied to the assistant response.
string response_template = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe responseTemplate to set. |
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.ModelArmorConfig.Builder |
This builder for chaining. |
setResponseTemplateBytes(ByteString value)
public Assistant.CustomerPolicy.ModelArmorConfig.Builder setResponseTemplateBytes(ByteString value) Optional. The resource name of the Model Armor template for sanitizing
assistant responses. Format:
projects/{project}/locations/{location}/templates/{template_id}
If not specified, no sanitization will be applied to the assistant response.
string response_template = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for responseTemplate to set. |
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.ModelArmorConfig.Builder |
This builder for chaining. |
setUserPromptTemplate(String value)
public Assistant.CustomerPolicy.ModelArmorConfig.Builder setUserPromptTemplate(String value) Optional. The resource name of the Model Armor template for sanitizing
user prompts. Format:
projects/{project}/locations/{location}/templates/{template_id}
If not specified, no sanitization will be applied to the user prompt.
string user_prompt_template = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe userPromptTemplate to set. |
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.ModelArmorConfig.Builder |
This builder for chaining. |
setUserPromptTemplateBytes(ByteString value)
public Assistant.CustomerPolicy.ModelArmorConfig.Builder setUserPromptTemplateBytes(ByteString value) Optional. The resource name of the Model Armor template for sanitizing
user prompts. Format:
projects/{project}/locations/{location}/templates/{template_id}
If not specified, no sanitization will be applied to the user prompt.
string user_prompt_template = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for userPromptTemplate to set. |
| Returns | |
|---|---|
| Type | Description |
Assistant.CustomerPolicy.ModelArmorConfig.Builder |
This builder for chaining. |