Class MultiLanguageDetectionMetadata.Builder (0.24.0)

public static final class MultiLanguageDetectionMetadata.Builder extends GeneratedMessage.Builder<MultiLanguageDetectionMetadata.Builder> implements MultiLanguageDetectionMetadataOrBuilder

Message for Enabling Multi Language Detection.

Protobuf type google.cloud.modelarmor.v1.MultiLanguageDetectionMetadata

Static Methods

getDescriptor()

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

Methods

build()

public MultiLanguageDetectionMetadata build()
Returns
Type Description
MultiLanguageDetectionMetadata

buildPartial()

public MultiLanguageDetectionMetadata buildPartial()
Returns
Type Description
MultiLanguageDetectionMetadata

clear()

public MultiLanguageDetectionMetadata.Builder clear()
Returns
Type Description
MultiLanguageDetectionMetadata.Builder
Overrides

clearEnableMultiLanguageDetection()

public MultiLanguageDetectionMetadata.Builder clearEnableMultiLanguageDetection()

Optional. Enable detection of multi-language prompts and responses.

bool enable_multi_language_detection = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
MultiLanguageDetectionMetadata.Builder

This builder for chaining.

clearSourceLanguage()

public MultiLanguageDetectionMetadata.Builder clearSourceLanguage()

Optional. Optional Source language of the user prompt.

If multi-language detection is enabled but language is not set in that case we would automatically detect the source language.

string source_language = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
MultiLanguageDetectionMetadata.Builder

This builder for chaining.

getDefaultInstanceForType()

public MultiLanguageDetectionMetadata getDefaultInstanceForType()
Returns
Type Description
MultiLanguageDetectionMetadata

getDescriptorForType()

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

getEnableMultiLanguageDetection()

public boolean getEnableMultiLanguageDetection()

Optional. Enable detection of multi-language prompts and responses.

bool enable_multi_language_detection = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The enableMultiLanguageDetection.

getSourceLanguage()

public String getSourceLanguage()

Optional. Optional Source language of the user prompt.

If multi-language detection is enabled but language is not set in that case we would automatically detect the source language.

string source_language = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The sourceLanguage.

getSourceLanguageBytes()

public ByteString getSourceLanguageBytes()

Optional. Optional Source language of the user prompt.

If multi-language detection is enabled but language is not set in that case we would automatically detect the source language.

string source_language = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for sourceLanguage.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(MultiLanguageDetectionMetadata other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setEnableMultiLanguageDetection(boolean value)

public MultiLanguageDetectionMetadata.Builder setEnableMultiLanguageDetection(boolean value)

Optional. Enable detection of multi-language prompts and responses.

bool enable_multi_language_detection = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The enableMultiLanguageDetection to set.

Returns
Type Description
MultiLanguageDetectionMetadata.Builder

This builder for chaining.

setSourceLanguage(String value)

public MultiLanguageDetectionMetadata.Builder setSourceLanguage(String value)

Optional. Optional Source language of the user prompt.

If multi-language detection is enabled but language is not set in that case we would automatically detect the source language.

string source_language = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The sourceLanguage to set.

Returns
Type Description
MultiLanguageDetectionMetadata.Builder

This builder for chaining.

setSourceLanguageBytes(ByteString value)

public MultiLanguageDetectionMetadata.Builder setSourceLanguageBytes(ByteString value)

Optional. Optional Source language of the user prompt.

If multi-language detection is enabled but language is not set in that case we would automatically detect the source language.

string source_language = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for sourceLanguage to set.

Returns
Type Description
MultiLanguageDetectionMetadata.Builder

This builder for chaining.