public static final class Translation.Builder extends GeneratedMessageV3.Builder<Translation.Builder> implements TranslationOrBuilder
A single translation response.
Protobuf type google.cloud.translation.v3beta1.Translation
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Translation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public Translation build()
buildPartial()
public Translation buildPartial()
clear()
public Translation.Builder clear()
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;
clearField(Descriptors.FieldDescriptor field)
public Translation.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearGlossaryConfig()
public Translation.Builder clearGlossaryConfig()
The glossary_config
used for this translation.
.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 3;
clearModel()
public Translation.Builder clearModel()
Only present when model
is present in the request.
model
here is normalized to have project number.
For example:
If the model
requested in TranslationTextRequest is
projects/{project-id}/locations/{location-id}/models/general/nmt
then
model
here would be normalized to
projects/{project-number}/locations/{location-id}/models/general/nmt
.
string model = 2;
clearOneof(Descriptors.OneofDescriptor oneof)
public Translation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clearTranslatedText()
public Translation.Builder clearTranslatedText()
Text translated into the target language.
If an error occurs during translation, this field might be excluded from
the response.
string translated_text = 1;
clone()
public Translation.Builder clone()
Overrides
getDefaultInstanceForType()
public Translation getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getDetectedLanguageCode()
public String getDetectedLanguageCode()
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