public static final class DocumentTranslation.Builder extends GeneratedMessageV3.Builder<DocumentTranslation.Builder> implements DocumentTranslationOrBuilder
A translated document message.
Protobuf type google.cloud.translation.v3.DocumentTranslation
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > DocumentTranslation.BuilderImplements
DocumentTranslationOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
Methods
addAllByteStreamOutputs(Iterable<? extends ByteString> values)
public DocumentTranslation.Builder addAllByteStreamOutputs(Iterable<? extends ByteString> values)
The array of translated documents. It is expected to be size 1 for now. We may produce multiple translated documents in the future for other type of file formats.
repeated bytes byte_stream_outputs = 1;
Parameter | |
---|---|
Name | Description |
values | Iterable<? extends com.google.protobuf.ByteString> The byteStreamOutputs to add. |
Returns | |
---|---|
Type | Description |
DocumentTranslation.Builder | This builder for chaining. |
addByteStreamOutputs(ByteString value)
public DocumentTranslation.Builder addByteStreamOutputs(ByteString value)
The array of translated documents. It is expected to be size 1 for now. We may produce multiple translated documents in the future for other type of file formats.
repeated bytes byte_stream_outputs = 1;
Parameter | |
---|---|
Name | Description |
value | ByteString The byteStreamOutputs to add. |
Returns | |
---|---|
Type | Description |
DocumentTranslation.Builder | This builder for chaining. |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public DocumentTranslation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
Type | Description |
DocumentTranslation.Builder |
build()
public DocumentTranslation build()
Returns | |
---|---|
Type | Description |
DocumentTranslation |
buildPartial()
public DocumentTranslation buildPartial()
Returns | |
---|---|
Type | Description |
DocumentTranslation |
clear()
public DocumentTranslation.Builder clear()
Returns | |
---|---|
Type | Description |
DocumentTranslation.Builder |
clearByteStreamOutputs()
public DocumentTranslation.Builder clearByteStreamOutputs()
The array of translated documents. It is expected to be size 1 for now. We may produce multiple translated documents in the future for other type of file formats.
repeated bytes byte_stream_outputs = 1;
Returns | |
---|---|
Type | Description |
DocumentTranslation.Builder | This builder for chaining. |
clearDetectedLanguageCode()
public DocumentTranslation.Builder clearDetectedLanguageCode()
The detected language for the input document. If the user did not provide the source language for the input document, this field will have the language code automatically detected. If the source language was passed, auto-detection of the language does not occur and this field is empty.
string detected_language_code = 3;
Returns | |
---|---|
Type | Description |
DocumentTranslation.Builder | This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public DocumentTranslation.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field | FieldDescriptor |
Returns | |
---|---|
Type | Description |
DocumentTranslation.Builder |
clearMimeType()
public DocumentTranslation.Builder clearMimeType()
The translated document's mime type.
string mime_type = 2;
Returns | |
---|---|
Type | Description |
DocumentTranslation.Builder | This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public DocumentTranslation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof | OneofDescriptor |
Returns | |
---|---|
Type | Description |
DocumentTranslation.Builder |
clone()
public DocumentTranslation.Builder clone()
Returns | |
---|---|
Type | Description |
DocumentTranslation.Builder |
getByteStreamOutputs(int index)
public ByteString getByteStreamOutputs(int index)
The array of translated documents. It is expected to be size 1 for now. We may produce multiple translated documents in the future for other type of file formats.
repeated bytes byte_stream_outputs = 1;
Parameter | |
---|---|
Name | Description |
index | int The index of the element to return. |
Returns | |
---|---|
Type | Description |
ByteString | The byteStreamOutputs at the given index. |
getByteStreamOutputsCount()