Class TranslateTextResponse.Builder (2.53.0)

public static final class TranslateTextResponse.Builder extends GeneratedMessageV3.Builder<TranslateTextResponse.Builder> implements TranslateTextResponseOrBuilder

Protobuf type google.cloud.translation.v3beta1.TranslateTextResponse

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
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.v3beta1.Translation glossary_translations = 3;

Parameter
Name Description
values Iterable<? extends com.google.cloud.translate.v3beta1.Translation>
Returns
Type Description
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.v3beta1.Translation translations = 1;

Parameter
Name Description
values Iterable<? extends com.google.cloud.translate.v3beta1.Translation>
Returns
Type Description
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.v3beta1.Translation glossary_translations = 3;

Parameter
Name Description
value Translation
Returns
Type Description
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.v3beta1.Translation glossary_translations = 3;

Parameter
Name Description
builderForValue Translation.Builder
Returns
Type Description