Class TranslationConfig.Builder (4.37.0)

public static final class TranslationConfig.Builder extends GeneratedMessageV3.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

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public TranslationConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
TranslationConfig.Builder
Overrides

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

clearField(Descriptors.FieldDescriptor field)

public TranslationConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
TranslationConfig.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public TranslationConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
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.

clone()

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

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 GeneratedMessageV3.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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final TranslationConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
TranslationConfig.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public TranslationConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
TranslationConfig.Builder
Overrides

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

public TranslationConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
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.

setUnknownFields(UnknownFieldSet unknownFields)

public final TranslationConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
TranslationConfig.Builder
Overrides