Class StreamingTranslateSpeechResult.TextTranslationResult.Builder (0.61.0)

public static final class StreamingTranslateSpeechResult.TextTranslationResult.Builder extends GeneratedMessageV3.Builder<StreamingTranslateSpeechResult.TextTranslationResult.Builder> implements StreamingTranslateSpeechResult.TextTranslationResultOrBuilder

Text translation result.

Protobuf type google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult.TextTranslationResult

Inheritance

Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > StreamingTranslateSpeechResult.TextTranslationResult.Builder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public StreamingTranslateSpeechResult.TextTranslationResult.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
StreamingTranslateSpeechResult.TextTranslationResult.Builder
Overrides

build()

public StreamingTranslateSpeechResult.TextTranslationResult build()
Returns
Type Description
StreamingTranslateSpeechResult.TextTranslationResult

buildPartial()

public StreamingTranslateSpeechResult.TextTranslationResult buildPartial()
Returns
Type Description
StreamingTranslateSpeechResult.TextTranslationResult

clear()

public StreamingTranslateSpeechResult.TextTranslationResult.Builder clear()
Returns
Type Description
StreamingTranslateSpeechResult.TextTranslationResult.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

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

clearIsFinal()

public StreamingTranslateSpeechResult.TextTranslationResult.Builder clearIsFinal()

Output only. If false, this StreamingTranslateSpeechResult represents an interim result that may change. If true, this is the final time the translation service will return this particular StreamingTranslateSpeechResult, the streaming translator will not return any further hypotheses for this portion of the transcript and corresponding audio.

bool is_final = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
StreamingTranslateSpeechResult.TextTranslationResult.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearTranslation()

public StreamingTranslateSpeechResult.TextTranslationResult.Builder clearTranslation()

Output only. The translated sentence.

string translation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
StreamingTranslateSpeechResult.TextTranslationResult.Builder

This builder for chaining.

clone()

public StreamingTranslateSpeechResult.TextTranslationResult.Builder clone()
Returns
Type Description
StreamingTranslateSpeechResult.TextTranslationResult.Builder
Overrides

getDefaultInstanceForType()

public StreamingTranslateSpeechResult.TextTranslationResult getDefaultInstanceForType()
Returns
Type Description
StreamingTranslateSpeechResult.TextTranslationResult

getDescriptorForType()

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

getIsFinal()

public boolean getIsFinal()

Output only. If false, this StreamingTranslateSpeechResult represents an interim result that may change. If true, this is the final time the translation service will return this particular StreamingTranslateSpeechResult, the streaming translator will not return any further hypotheses for this portion of the transcript and corresponding audio.

bool is_final = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The isFinal.

getTranslation()

public String getTranslation()

Output only. The translated sentence.

string translation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The translation.

getTranslationBytes()

public ByteString getTranslationBytes()

Output only. The translated sentence.

string translation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for translation.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(StreamingTranslateSpeechResult.TextTranslationResult other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setIsFinal(boolean value)

public StreamingTranslateSpeechResult.TextTranslationResult.Builder setIsFinal(boolean value)

Output only. If false, this StreamingTranslateSpeechResult represents an interim result that may change. If true, this is the final time the translation service will return this particular StreamingTranslateSpeechResult, the streaming translator will not return any further hypotheses for this portion of the transcript and corresponding audio.

bool is_final = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value boolean

The isFinal to set.

Returns
Type Description
StreamingTranslateSpeechResult.TextTranslationResult.Builder

This builder for chaining.

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

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

setTranslation(String value)

public StreamingTranslateSpeechResult.TextTranslationResult.Builder setTranslation(String value)

Output only. The translated sentence.

string translation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The translation to set.

Returns
Type Description
StreamingTranslateSpeechResult.TextTranslationResult.Builder

This builder for chaining.

setTranslationBytes(ByteString value)

public StreamingTranslateSpeechResult.TextTranslationResult.Builder setTranslationBytes(ByteString value)

Output only. The translated sentence.

string translation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for translation to set.

Returns
Type Description
StreamingTranslateSpeechResult.TextTranslationResult.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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