Class Translation.Builder (2.13.0)

Stay organized with collections Save and categorize content based on your preferences.
public static final class Translation.Builder extends GeneratedMessageV3.Builder<Translation.Builder> implements TranslationOrBuilder

A single translation response.

Protobuf type google.cloud.translation.v3beta1.Translation

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Translation build()
Returns
TypeDescription
Translation

buildPartial()

public Translation buildPartial()
Returns
TypeDescription
Translation

clear()

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

clearDetectedLanguageCode()

public Translation.Builder clearDetectedLanguageCode()

The BCP-47 language code of source text in the initial request, detected automatically, if no source language was passed within the initial request. If the source language was passed, auto-detection of the language does not occur and this field is empty.

string detected_language_code = 4;

Returns
TypeDescription
Translation.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)