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

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.translate.v3beta1.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.v3beta1.Translation translations = 1;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.translate.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.Translation translations = 1;

Parameter
NameDescription
builderForValueTranslation.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueTranslation
Returns
TypeDescription
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
NameDescription
indexint
builderForValueTranslation.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
Translation.Builder

build()

public TranslateTextResponse build()
Returns
TypeDescription
TranslateTextResponse

buildPartial()

public TranslateTextResponse buildPartial()
Returns
TypeDescription
TranslateTextResponse

clear()

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

clearField(Descriptors.FieldDescriptor field)

public TranslateTextResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
TranslateTextResponse.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getDefaultInstanceForType()

public TranslateTextResponse getDefaultInstanceForType()
Returns
TypeDescription
TranslateTextResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<? extends com.google.cloud.translate.v3beta1.TranslationOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(TranslateTextResponse other)

public TranslateTextResponse.Builder mergeFrom(TranslateTextResponse other)
Parameter
NameDescription
otherTranslateTextResponse
Returns
TypeDescription
TranslateTextResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final TranslateTextResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
TranslateTextResponse.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public TranslateTextResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
indexint
valueTranslation
Returns
TypeDescription
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
NameDescription
indexint
builderForValueTranslation.Builder
Returns
TypeDescription
TranslateTextResponse.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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