Class StreamingTranslateSpeechResult.TextTranslationResult.Builder (0.20.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public StreamingTranslateSpeechResult.TextTranslationResult.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult.Builder
Overrides

build()

public StreamingTranslateSpeechResult.TextTranslationResult build()
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult

buildPartial()

public StreamingTranslateSpeechResult.TextTranslationResult buildPartial()
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult

clear()

public StreamingTranslateSpeechResult.TextTranslationResult.Builder clear()
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

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

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

This builder for chaining.

clone()

public StreamingTranslateSpeechResult.TextTranslationResult.Builder clone()
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult.Builder
Overrides

getDefaultInstanceForType()

public StreamingTranslateSpeechResult.TextTranslationResult getDefaultInstanceForType()
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
boolean

The isFinal.

getTranslation()

public String getTranslation()

Output only. The translated sentence.

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

Returns
TypeDescription
String

The translation.

getTranslationBytes()

public ByteString getTranslationBytes()

Output only. The translated sentence.

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

Returns
TypeDescription
ByteString

The bytes for translation.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(StreamingTranslateSpeechResult.TextTranslationResult other)

public StreamingTranslateSpeechResult.TextTranslationResult.Builder mergeFrom(StreamingTranslateSpeechResult.TextTranslationResult other)
Parameter
NameDescription
otherStreamingTranslateSpeechResult.TextTranslationResult
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final StreamingTranslateSpeechResult.TextTranslationResult.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public StreamingTranslateSpeechResult.TextTranslationResult.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueboolean

The isFinal to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The translation to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for translation to set.

Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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