Class Assistant.CustomerPolicy.ModelArmorConfig (0.90.0)

public static final class Assistant.CustomerPolicy.ModelArmorConfig extends GeneratedMessage implements Assistant.CustomerPolicy.ModelArmorConfigOrBuilder

Configuration 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

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessage > Assistant.CustomerPolicy.ModelArmorConfig

Static Fields

FAILURE_MODE_FIELD_NUMBER

public static final int FAILURE_MODE_FIELD_NUMBER
Field Value
Type Description
int

RESPONSE_TEMPLATE_FIELD_NUMBER

public static final int RESPONSE_TEMPLATE_FIELD_NUMBER
Field Value
Type Description
int

USER_PROMPT_TEMPLATE_FIELD_NUMBER

public static final int USER_PROMPT_TEMPLATE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Assistant.CustomerPolicy.ModelArmorConfig getDefaultInstance()
Returns
Type Description
Assistant.CustomerPolicy.ModelArmorConfig

getDescriptor()

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

newBuilder()

public static Assistant.CustomerPolicy.ModelArmorConfig.Builder newBuilder()
Returns
Type Description
Assistant.CustomerPolicy.ModelArmorConfig.Builder

newBuilder(Assistant.CustomerPolicy.ModelArmorConfig prototype)

public static Assistant.CustomerPolicy.ModelArmorConfig.Builder newBuilder(Assistant.CustomerPolicy.ModelArmorConfig prototype)
Parameter
Name Description
prototype Assistant.CustomerPolicy.ModelArmorConfig
Returns
Type Description
Assistant.CustomerPolicy.ModelArmorConfig.Builder

parseDelimitedFrom(InputStream input)

public static Assistant.CustomerPolicy.ModelArmorConfig parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Assistant.CustomerPolicy.ModelArmorConfig
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Assistant.CustomerPolicy.ModelArmorConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Assistant.CustomerPolicy.ModelArmorConfig
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Assistant.CustomerPolicy.ModelArmorConfig parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Assistant.CustomerPolicy.ModelArmorConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Assistant.CustomerPolicy.ModelArmorConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Assistant.CustomerPolicy.ModelArmorConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Assistant.CustomerPolicy.ModelArmorConfig parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Assistant.CustomerPolicy.ModelArmorConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Assistant.CustomerPolicy.ModelArmorConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Assistant.CustomerPolicy.ModelArmorConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Assistant.CustomerPolicy.ModelArmorConfig parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Assistant.CustomerPolicy.ModelArmorConfig
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Assistant.CustomerPolicy.ModelArmorConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Assistant.CustomerPolicy.ModelArmorConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Assistant.CustomerPolicy.ModelArmorConfig parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Assistant.CustomerPolicy.ModelArmorConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Assistant.CustomerPolicy.ModelArmorConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Assistant.CustomerPolicy.ModelArmorConfig
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Assistant.CustomerPolicy.ModelArmorConfig parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Assistant.CustomerPolicy.ModelArmorConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Assistant.CustomerPolicy.ModelArmorConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Assistant.CustomerPolicy.ModelArmorConfig
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Assistant.CustomerPolicy.ModelArmorConfig> parser()
Returns
Type Description
Parser<ModelArmorConfig>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

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

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.

getParserForType()

public Parser<Assistant.CustomerPolicy.ModelArmorConfig> getParserForType()
Returns
Type Description
Parser<ModelArmorConfig>
Overrides

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.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Assistant.CustomerPolicy.ModelArmorConfig.Builder newBuilderForType()
Returns
Type Description
Assistant.CustomerPolicy.ModelArmorConfig.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected Assistant.CustomerPolicy.ModelArmorConfig.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Assistant.CustomerPolicy.ModelArmorConfig.Builder
Overrides

toBuilder()

public Assistant.CustomerPolicy.ModelArmorConfig.Builder toBuilder()
Returns
Type Description
Assistant.CustomerPolicy.ModelArmorConfig.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException