Class TranslateTextResponse.Builder (2.9.0)

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

Protobuf type google.cloud.translation.v3.TranslateTextResponse

Static Methods

getDescriptor()

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

Methods

addAllGlossaryTranslations(Iterable<? extends Translation> values)

public TranslateTextResponse.Builder addAllGlossaryTranslations(Iterable<? extends Translation> values)

Text translation responses if a glossary is provided in the request. This can be the same as translations if no terms apply. This field has the same length as contents.

repeated .google.cloud.translation.v3.Translation glossary_translations = 3;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.translate.v3.Translation>
Returns
TypeDescription
TranslateTextResponse.Builder

addAllTranslations(Iterable<? extends Translation> values)

public TranslateTextResponse.Builder addAllTranslations(Iterable<? extends Translation> values)

Text translation responses with no glossary applied. This field has the same length as contents.

repeated .google.cloud.translation.v3.Translation translations = 1;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.translate.v3.Translation>
Returns
TypeDescription
TranslateTextResponse.Builder

addGlossaryTranslations(Translation value)

public TranslateTextResponse.Builder addGlossaryTranslations(Translation value)

Text translation responses if a glossary is provided in the request. This can be the same as translations if no terms apply. This field has the same length as contents.

repeated .google.cloud.translation.v3.Translation glossary_translations = 3;

Parameter
NameDescription
valueTranslation
Returns
TypeDescription
TranslateTextResponse.Builder

addGlossaryTranslations(Translation.Builder builderForValue)

public TranslateTextResponse.Builder addGlossaryTranslations(Translation.Builder builderForValue)

Text translation responses if a glossary is provided in the request. This can be the same as translations if no terms apply. This field has the same length as contents.

repeated .google.cloud.translation.v3.Translation glossary_translations = 3;

Parameter
NameDescription
builderForValueTranslation.Builder
Returns
TypeDescription
TranslateTextResponse.Builder

addGlossaryTranslations(int index, Translation value)

public TranslateTextResponse.Builder addGlossaryTranslations(int index, Translation value)

Text translation responses if a glossary is provided in the request. This can be the same as translations if no terms apply. This field has the same length as contents.

repeated .google.cloud.translation.v3.Translation glossary_translations = 3;

Parameters
NameDescription
indexint
valueTranslation
Returns
TypeDescription
TranslateTextResponse.Builder

addGlossaryTranslations(int index, Translation.Builder builderForValue)

public TranslateTextResponse.Builder addGlossaryTranslations(int index, Translation.Builder builderForValue)

Text translation responses if a glossary is provided in the request. This can be the same as translations if no terms apply. This field has the same length as contents.

repeated .google.cloud.translation.v3.Translation glossary_translations = 3;

Parameters
NameDescription
indexint
builderForValueTranslation.Builder
Returns
TypeDescription
TranslateTextResponse.Builder

addGlossaryTranslationsBuilder()

public Translation.Builder addGlossaryTranslationsBuilder()

Text translation responses if a glossary is provided in the request. This can be the same as translations if no terms apply. This field has the same length as contents.

repeated .google.cloud.translation.v3.Translation glossary_translations = 3;

Returns
TypeDescription
Translation.Builder

addGlossaryTranslationsBuilder(int index)

public Translation.Builder addGlossaryTranslationsBuilder(int index)

Text translation responses if a glossary is provided in the request. This can be the same as translations if no terms apply. This field has the same length as contents.

repeated .google.cloud.translation.v3.Translation glossary_translations = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
Translation.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addTranslations(Translation value)

public TranslateTextResponse.Builder addTranslations(Translation value)

Text translation responses with no glossary applied. This field has the same length as contents.

repeated .google.cloud.translation.v3.Translation translations = 1;

Parameter
NameDescription
valueTranslation
Returns
TypeDescription
TranslateTextResponse.Builder

addTranslations(Translation.Builder builderForValue)

public TranslateTextResponse.Builder addTranslations(Translation.Builder builderForValue)

Text translation responses with no glossary applied. This field has the same length as contents.

repeated .google.cloud.translation.v3.Translation translations = 1;

Parameter