Class TranslationConfig.Builder (4.36.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public TranslationConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
TranslationConfig.Builder
Overrides

build()

public TranslationConfig build()
Returns
TypeDescription
TranslationConfig

buildPartial()

public TranslationConfig buildPartial()
Returns
TypeDescription
TranslationConfig

clear()

public TranslationConfig.Builder clear()
Returns
TypeDescription
TranslationConfig.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public TranslationConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
TranslationConfig.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public TranslationConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
TranslationConfig.Builder

This builder for chaining.

clone()

public TranslationConfig.Builder clone()
Returns
TypeDescription
TranslationConfig.Builder
Overrides

getDefaultInstanceForType()

public TranslationConfig getDefaultInstanceForType()
Returns
TypeDescription
TranslationConfig

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getTargetLanguage()

public String getTargetLanguage()

Required. The language code to translate to.

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

Returns
TypeDescription
String

The targetLanguage.

getTargetLanguageBytes()

public ByteString getTargetLanguageBytes()

Required. The language code to translate to.

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

Returns
TypeDescription
ByteString

The bytes for targetLanguage.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(TranslationConfig other)

public TranslationConfig.Builder mergeFrom(TranslationConfig other)
Parameter
NameDescription
otherTranslationConfig
Returns
TypeDescription
TranslationConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public TranslationConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TranslationConfig.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public TranslationConfig.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
TranslationConfig.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final TranslationConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
TranslationConfig.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public TranslationConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
TranslationConfig.Builder
Overrides

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

public TranslationConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The targetLanguage to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for targetLanguage to set.

Returns
TypeDescription
TranslationConfig.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final TranslationConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
TranslationConfig.Builder
Overrides