Class TranslateTextResponse.Builder (2.45.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
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.v3beta1.Translation glossary_translations = 3;

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

Parameters
Name Description
index int
builderForValue Translation.Builder
Returns
Type Description
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.v3beta1.Translation glossary_translations = 3;

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

Parameter
Name Description
index int
Returns
Type Description
Translation.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public TranslateTextResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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.v3beta1.Translation translations = 1;

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

Parameter
Name Description
builderForValue Translation.Builder
Returns
Type Description
TranslateTextResponse.Builder

addTranslations(int index, Translation value)

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

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

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

Parameters
Name Description
index int
value Translation
Returns
Type Description
TranslateTextResponse.Builder

addTranslations(int index, Translation.Builder builderForValue)

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

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

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

Parameters
Name Description
index int
builderForValue Translation.Builder
Returns
Type Description
TranslateTextResponse.Builder

addTranslationsBuilder()

public Translation.Builder addTranslationsBuilder()

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

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

Returns
Type Description
Translation.Builder

addTranslationsBuilder(int index)

public Translation.Builder addTranslationsBuilder(int index)

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
index int
Returns
Type Description
Translation.Builder

build()

public TranslateTextResponse build()
Returns
Type Description
TranslateTextResponse

buildPartial()

public TranslateTextResponse buildPartial()
Returns
Type Description
TranslateTextResponse

clear()

public TranslateTextResponse.Builder clear()
Returns
Type Description
TranslateTextResponse.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

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

clearGlossaryTranslations()

public TranslateTextResponse.Builder clearGlossaryTranslations()

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;

Returns
Type Description
TranslateTextResponse.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public TranslateTextResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
TranslateTextResponse.Builder
Overrides

clearTranslations()

public TranslateTextResponse.Builder clearTranslations()

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

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

Returns
Type Description
TranslateTextResponse.Builder

clone()

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

getDefaultInstanceForType()

public TranslateTextResponse getDefaultInstanceForType()
Returns
Type Description
TranslateTextResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getGlossaryTranslations(int index)

public Translation getGlossaryTranslations(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.v3beta1.Translation glossary_translations = 3;

Parameter
Name Description
index int
Returns
Type Description
Translation

getGlossaryTranslationsBuilder(int index)

public Translation.Builder getGlossaryTranslationsBuilder(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.v3beta1.Translation glossary_translations = 3;

Parameter
Name Description
index int
Returns
Type Description
Translation.Builder

getGlossaryTranslationsBuilderList()

public List<Translation.Builder> getGlossaryTranslationsBuilderList()

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;

Returns
Type Description
List<Builder>

getGlossaryTranslationsCount()

public int getGlossaryTranslationsCount()

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;

Returns
Type Description
int

getGlossaryTranslationsList()

public List<Translation> getGlossaryTranslationsList()

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;

Returns
Type Description
List<Translation>

getGlossaryTranslationsOrBuilder(int index)

public TranslationOrBuilder getGlossaryTranslationsOrBuilder(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.v3beta1.Translation glossary_translations = 3;

Parameter
Name Description
index int
Returns
Type Description
TranslationOrBuilder

getGlossaryTranslationsOrBuilderList()

public List<? extends TranslationOrBuilder> getGlossaryTranslationsOrBuilderList()

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;

Returns
Type Description
List<? extends com.google.cloud.translate.v3beta1.TranslationOrBuilder>

getTranslations(int index)

public Translation getTranslations(int index)

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
index int
Returns
Type Description
Translation

getTranslationsBuilder(int index)

public Translation.Builder getTranslationsBuilder(int index)

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
index int
Returns
Type Description
Translation.Builder

getTranslationsBuilderList()

public List<Translation.Builder> getTranslationsBuilderList()

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

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

Returns
Type Description
List<Builder>

getTranslationsCount()

public int getTranslationsCount()

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

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

Returns
Type Description
int

getTranslationsList()

public List<Translation> getTranslationsList()

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

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

Returns
Type Description
List<Translation>

getTranslationsOrBuilder(int index)

public TranslationOrBuilder getTranslationsOrBuilder(int index)

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
index int
Returns
Type Description
TranslationOrBuilder

getTranslationsOrBuilderList()

public List<? extends TranslationOrBuilder> getTranslationsOrBuilderList()

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

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

Returns
Type Description
List<? extends com.google.cloud.translate.v3beta1.TranslationOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(TranslateTextResponse other)

public TranslateTextResponse.Builder mergeFrom(TranslateTextResponse other)
Parameter
Name Description
other TranslateTextResponse
Returns
Type Description
TranslateTextResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public TranslateTextResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TranslateTextResponse.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public TranslateTextResponse.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
TranslateTextResponse.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeGlossaryTranslations(int index)

public TranslateTextResponse.Builder removeGlossaryTranslations(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.v3beta1.Translation glossary_translations = 3;

Parameter
Name Description
index int
Returns
Type Description
TranslateTextResponse.Builder

removeTranslations(int index)

public TranslateTextResponse.Builder removeTranslations(int index)

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
index int
Returns
Type Description
TranslateTextResponse.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setGlossaryTranslations(int index, Translation value)

public TranslateTextResponse.Builder setGlossaryTranslations(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.v3beta1.Translation glossary_translations = 3;

Parameters
Name Description
index int
value Translation
Returns
Type Description
TranslateTextResponse.Builder

setGlossaryTranslations(int index, Translation.Builder builderForValue)

public TranslateTextResponse.Builder setGlossaryTranslations(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.v3beta1.Translation glossary_translations = 3;

Parameters
Name Description
index int
builderForValue Translation.Builder
Returns
Type Description
TranslateTextResponse.Builder

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

public TranslateTextResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
TranslateTextResponse.Builder
Overrides

setTranslations(int index, Translation value)

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

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

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

Parameters
Name Description
index int
value Translation
Returns
Type Description
TranslateTextResponse.Builder

setTranslations(int index, Translation.Builder builderForValue)

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

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

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

Parameters
Name Description
index int
builderForValue Translation.Builder
Returns
Type Description
TranslateTextResponse.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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