Class SanitizeModelResponseRequest.Builder (0.11.0)

publicstaticfinalclass SanitizeModelResponseRequest.BuilderextendsGeneratedMessageV3.Builder<SanitizeModelResponseRequest.Builder>implementsSanitizeModelResponseRequestOrBuilder

Sanitize Model Response request.

Protobuf type google.cloud.modelarmor.v1.SanitizeModelResponseRequest

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicSanitizeModelResponseRequest.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SanitizeModelResponseRequest.Builder
Overrides

build()

publicSanitizeModelResponseRequestbuild()
Returns
Type Description
SanitizeModelResponseRequest

buildPartial()

publicSanitizeModelResponseRequestbuildPartial()
Returns
Type Description
SanitizeModelResponseRequest

clear()

publicSanitizeModelResponseRequest.Builderclear()
Returns
Type Description
SanitizeModelResponseRequest.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

publicSanitizeModelResponseRequest.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
SanitizeModelResponseRequest.Builder
Overrides

clearModelResponseData()

publicSanitizeModelResponseRequest.BuilderclearModelResponseData()

Required. Model response data to sanitize.

.google.cloud.modelarmor.v1.DataItem model_response_data = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
SanitizeModelResponseRequest.Builder

clearMultiLanguageDetectionMetadata()

publicSanitizeModelResponseRequest.BuilderclearMultiLanguageDetectionMetadata()

Optional. Metadata related for multi language detection.

.google.cloud.modelarmor.v1.MultiLanguageDetectionMetadata multi_language_detection_metadata = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SanitizeModelResponseRequest.Builder

clearName()

publicSanitizeModelResponseRequest.BuilderclearName()

Required. Represents resource name of template e.g. name=projects/sample-project/locations/us-central1/templates/templ01

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
SanitizeModelResponseRequest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

publicSanitizeModelResponseRequest.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
SanitizeModelResponseRequest.Builder
Overrides

clearUserPrompt()

publicSanitizeModelResponseRequest.BuilderclearUserPrompt()

Optional. User Prompt associated with Model response.

string user_prompt = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SanitizeModelResponseRequest.Builder

This builder for chaining.

clone()

publicSanitizeModelResponseRequest.Builderclone()
Returns
Type Description
SanitizeModelResponseRequest.Builder
Overrides

getDefaultInstanceForType()

publicSanitizeModelResponseRequestgetDefaultInstanceForType()
Returns
Type Description
SanitizeModelResponseRequest

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getModelResponseData()

publicDataItemgetModelResponseData()

Required. Model response data to sanitize.

.google.cloud.modelarmor.v1.DataItem model_response_data = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
DataItem

The modelResponseData.

getModelResponseDataBuilder()

publicDataItem.BuildergetModelResponseDataBuilder()

Required. Model response data to sanitize.

.google.cloud.modelarmor.v1.DataItem model_response_data = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
DataItem.Builder

getModelResponseDataOrBuilder()

publicDataItemOrBuildergetModelResponseDataOrBuilder()

Required. Model response data to sanitize.

.google.cloud.modelarmor.v1.DataItem model_response_data = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
DataItemOrBuilder

getMultiLanguageDetectionMetadata()

publicMultiLanguageDetectionMetadatagetMultiLanguageDetectionMetadata()

Optional. Metadata related for multi language detection.

.google.cloud.modelarmor.v1.MultiLanguageDetectionMetadata multi_language_detection_metadata = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
MultiLanguageDetectionMetadata

The multiLanguageDetectionMetadata.

getMultiLanguageDetectionMetadataBuilder()

publicMultiLanguageDetectionMetadata.BuildergetMultiLanguageDetectionMetadataBuilder()

Optional. Metadata related for multi language detection.

.google.cloud.modelarmor.v1.MultiLanguageDetectionMetadata multi_language_detection_metadata = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
MultiLanguageDetectionMetadata.Builder

getMultiLanguageDetectionMetadataOrBuilder()

publicMultiLanguageDetectionMetadataOrBuildergetMultiLanguageDetectionMetadataOrBuilder()

Optional. Metadata related for multi language detection.

.google.cloud.modelarmor.v1.MultiLanguageDetectionMetadata multi_language_detection_metadata = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
MultiLanguageDetectionMetadataOrBuilder

getName()

publicStringgetName()

Required. Represents resource name of template e.g. name=projects/sample-project/locations/us-central1/templates/templ01

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The name.

getNameBytes()

publicByteStringgetNameBytes()

Required. Represents resource name of template e.g. name=projects/sample-project/locations/us-central1/templates/templ01

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for name.

getUserPrompt()

publicStringgetUserPrompt()

Optional. User Prompt associated with Model response.

string user_prompt = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The userPrompt.

getUserPromptBytes()

publicByteStringgetUserPromptBytes()

Optional. User Prompt associated with Model response.

string user_prompt = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for userPrompt.

hasModelResponseData()

publicbooleanhasModelResponseData()

Required. Model response data to sanitize.

.google.cloud.modelarmor.v1.DataItem model_response_data = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the modelResponseData field is set.

hasMultiLanguageDetectionMetadata()

publicbooleanhasMultiLanguageDetectionMetadata()

Optional. Metadata related for multi language detection.

.google.cloud.modelarmor.v1.MultiLanguageDetectionMetadata multi_language_detection_metadata = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the multiLanguageDetectionMetadata field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SanitizeModelResponseRequest other)

publicSanitizeModelResponseRequest.BuildermergeFrom(SanitizeModelResponseRequestother)
Parameter
Name Description
other SanitizeModelResponseRequest
Returns
Type Description
SanitizeModelResponseRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicSanitizeModelResponseRequest.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SanitizeModelResponseRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicSanitizeModelResponseRequest.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
SanitizeModelResponseRequest.Builder
Overrides

mergeModelResponseData(DataItem value)

publicSanitizeModelResponseRequest.BuildermergeModelResponseData(DataItemvalue)

Required. Model response data to sanitize.

.google.cloud.modelarmor.v1.DataItem model_response_data = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value DataItem
Returns
Type Description
SanitizeModelResponseRequest.Builder

mergeMultiLanguageDetectionMetadata(MultiLanguageDetectionMetadata value)

publicSanitizeModelResponseRequest.BuildermergeMultiLanguageDetectionMetadata(MultiLanguageDetectionMetadatavalue)

Optional. Metadata related for multi language detection.

.google.cloud.modelarmor.v1.MultiLanguageDetectionMetadata multi_language_detection_metadata = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value MultiLanguageDetectionMetadata
Returns
Type Description
SanitizeModelResponseRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalSanitizeModelResponseRequest.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SanitizeModelResponseRequest.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

publicSanitizeModelResponseRequest.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SanitizeModelResponseRequest.Builder
Overrides

setModelResponseData(DataItem value)

publicSanitizeModelResponseRequest.BuildersetModelResponseData(DataItemvalue)

Required. Model response data to sanitize.

.google.cloud.modelarmor.v1.DataItem model_response_data = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value DataItem
Returns
Type Description
SanitizeModelResponseRequest.Builder

setModelResponseData(DataItem.Builder builderForValue)

publicSanitizeModelResponseRequest.BuildersetModelResponseData(DataItem.BuilderbuilderForValue)

Required. Model response data to sanitize.

.google.cloud.modelarmor.v1.DataItem model_response_data = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue DataItem.Builder
Returns
Type Description
SanitizeModelResponseRequest.Builder

setMultiLanguageDetectionMetadata(MultiLanguageDetectionMetadata value)

publicSanitizeModelResponseRequest.BuildersetMultiLanguageDetectionMetadata(MultiLanguageDetectionMetadatavalue)

Optional. Metadata related for multi language detection.

.google.cloud.modelarmor.v1.MultiLanguageDetectionMetadata multi_language_detection_metadata = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value MultiLanguageDetectionMetadata
Returns
Type Description
SanitizeModelResponseRequest.Builder

setMultiLanguageDetectionMetadata(MultiLanguageDetectionMetadata.Builder builderForValue)

publicSanitizeModelResponseRequest.BuildersetMultiLanguageDetectionMetadata(MultiLanguageDetectionMetadata.BuilderbuilderForValue)

Optional. Metadata related for multi language detection.

.google.cloud.modelarmor.v1.MultiLanguageDetectionMetadata multi_language_detection_metadata = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue MultiLanguageDetectionMetadata.Builder
Returns
Type Description
SanitizeModelResponseRequest.Builder

setName(String value)

publicSanitizeModelResponseRequest.BuildersetName(Stringvalue)

Required. Represents resource name of template e.g. name=projects/sample-project/locations/us-central1/templates/templ01

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The name to set.

Returns
Type Description
SanitizeModelResponseRequest.Builder

This builder for chaining.

setNameBytes(ByteString value)

publicSanitizeModelResponseRequest.BuildersetNameBytes(ByteStringvalue)

Required. Represents resource name of template e.g. name=projects/sample-project/locations/us-central1/templates/templ01

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
SanitizeModelResponseRequest.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

publicSanitizeModelResponseRequest.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
SanitizeModelResponseRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalSanitizeModelResponseRequest.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SanitizeModelResponseRequest.Builder
Overrides

setUserPrompt(String value)

publicSanitizeModelResponseRequest.BuildersetUserPrompt(Stringvalue)

Optional. User Prompt associated with Model response.

string user_prompt = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The userPrompt to set.

Returns
Type Description
SanitizeModelResponseRequest.Builder

This builder for chaining.

setUserPromptBytes(ByteString value)

publicSanitizeModelResponseRequest.BuildersetUserPromptBytes(ByteStringvalue)

Optional. User Prompt associated with Model response.

string user_prompt = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for userPrompt to set.

Returns
Type Description
SanitizeModelResponseRequest.Builder

This builder for chaining.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.