Class StreamingTranslateSpeechResult.TextTranslationResult (0.25.0)

public static final class StreamingTranslateSpeechResult.TextTranslationResult extends GeneratedMessageV3 implements StreamingTranslateSpeechResult.TextTranslationResultOrBuilder

Text translation result.

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

Inheritance

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

Static Fields

IS_FINAL_FIELD_NUMBER

public static final int IS_FINAL_FIELD_NUMBER
Field Value
TypeDescription
int

TRANSLATION_FIELD_NUMBER

public static final int TRANSLATION_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static StreamingTranslateSpeechResult.TextTranslationResult getDefaultInstance()
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static StreamingTranslateSpeechResult.TextTranslationResult.Builder newBuilder()
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult.Builder

newBuilder(StreamingTranslateSpeechResult.TextTranslationResult prototype)

public static StreamingTranslateSpeechResult.TextTranslationResult.Builder newBuilder(StreamingTranslateSpeechResult.TextTranslationResult prototype)
Parameter
NameDescription
prototypeStreamingTranslateSpeechResult.TextTranslationResult
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult.Builder

parseDelimitedFrom(InputStream input)

public static StreamingTranslateSpeechResult.TextTranslationResult parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StreamingTranslateSpeechResult.TextTranslationResult parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static StreamingTranslateSpeechResult.TextTranslationResult parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static StreamingTranslateSpeechResult.TextTranslationResult parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static StreamingTranslateSpeechResult.TextTranslationResult parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static StreamingTranslateSpeechResult.TextTranslationResult parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static StreamingTranslateSpeechResult.TextTranslationResult parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static StreamingTranslateSpeechResult.TextTranslationResult parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static StreamingTranslateSpeechResult.TextTranslationResult parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StreamingTranslateSpeechResult.TextTranslationResult parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static StreamingTranslateSpeechResult.TextTranslationResult parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static StreamingTranslateSpeechResult.TextTranslationResult parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<StreamingTranslateSpeechResult.TextTranslationResult> parser()
Returns
TypeDescription
Parser<TextTranslationResult>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

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

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.

getParserForType()

public Parser<StreamingTranslateSpeechResult.TextTranslationResult> getParserForType()
Returns
TypeDescription
Parser<TextTranslationResult>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public StreamingTranslateSpeechResult.TextTranslationResult.Builder newBuilderForType()
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected StreamingTranslateSpeechResult.TextTranslationResult.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public StreamingTranslateSpeechResult.TextTranslationResult.Builder toBuilder()
Returns
TypeDescription
StreamingTranslateSpeechResult.TextTranslationResult.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException