Class TranslationConfig.Builder (4.78.0)

public static final class TranslationConfig.Builder extends GeneratedMessage.Builder<TranslationConfig.Builder> implements TranslationConfigOrBuilder

Translation configuration. Use to translate the given audio into text for the desired language.

Protobuf type google.cloud.speech.v2.TranslationConfig

Static Methods

getDescriptor()

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

Methods

build()

public TranslationConfig build()
Returns
Type Description
TranslationConfig

buildPartial()

public TranslationConfig buildPartial()
Returns
Type Description
TranslationConfig

clear()

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

clearTargetLanguage()

public TranslationConfig.Builder clearTargetLanguage()

Required. The language code to translate to.

string target_language = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
TranslationConfig.Builder

This builder for chaining.

getDefaultInstanceForType()

public TranslationConfig getDefaultInstanceForType()
Returns
Type Description
TranslationConfig

getDescriptorForType()

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

getTargetLanguage()

public String getTargetLanguage()

Required. The language code to translate to.

string target_language = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The targetLanguage.

getTargetLanguageBytes()

public ByteString getTargetLanguageBytes()

Required. The language code to translate to.

string target_language = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for targetLanguage.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(TranslationConfig other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setTargetLanguage(String value)

public TranslationConfig.Builder setTargetLanguage(String value)

Required. The language code to translate to.

string target_language = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The targetLanguage to set.

Returns
Type Description
TranslationConfig.Builder

This builder for chaining.

setTargetLanguageBytes(ByteString value)

public TranslationConfig.Builder setTargetLanguageBytes(ByteString value)

Required. The language code to translate to.

string target_language = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for targetLanguage to set.

Returns
Type Description
TranslationConfig.Builder

This builder for chaining.