Class StreamingTranslateSpeechResponse.Builder (0.50.0)

public static final class StreamingTranslateSpeechResponse.Builder extends GeneratedMessageV3.Builder<StreamingTranslateSpeechResponse.Builder> implements StreamingTranslateSpeechResponseOrBuilder

A streaming speech translation response corresponding to a portion of the audio currently processed.

Protobuf type google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public StreamingTranslateSpeechResponse build()
Returns
Type Description
StreamingTranslateSpeechResponse

buildPartial()

public StreamingTranslateSpeechResponse buildPartial()
Returns
Type Description
StreamingTranslateSpeechResponse

clear()

public StreamingTranslateSpeechResponse.Builder clear()
Returns
Type Description
StreamingTranslateSpeechResponse.Builder
Overrides

clearError()

public StreamingTranslateSpeechResponse.Builder clearError()

Output only. If set, returns a google.rpc.Status message that specifies the error for the operation.

.google.rpc.Status error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
StreamingTranslateSpeechResponse.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearResult()

public StreamingTranslateSpeechResponse.Builder clearResult()

Output only. The translation result that is currently being processed (is_final could be true or false).

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult result = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
StreamingTranslateSpeechResponse.Builder

clearSpeechEventType()

public StreamingTranslateSpeechResponse.Builder clearSpeechEventType()

Output only. Indicates the type of speech event.

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse.SpeechEventType speech_event_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
StreamingTranslateSpeechResponse.Builder

This builder for chaining.

clone()

public StreamingTranslateSpeechResponse.Builder clone()
Returns
Type Description
StreamingTranslateSpeechResponse.Builder
Overrides

getDefaultInstanceForType()

public StreamingTranslateSpeechResponse getDefaultInstanceForType()
Returns
Type Description
StreamingTranslateSpeechResponse

getDescriptorForType()

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

getError()

public Status getError()

Output only. If set, returns a google.rpc.Status message that specifies the error for the operation.

.google.rpc.Status error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
com.google.rpc.Status

The error.

getErrorBuilder()

public Status.Builder getErrorBuilder()

Output only. If set, returns a google.rpc.Status message that specifies the error for the operation.

.google.rpc.Status error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
com.google.rpc.Status.Builder

getErrorOrBuilder()

public StatusOrBuilder getErrorOrBuilder()

Output only. If set, returns a google.rpc.Status message that specifies the error for the operation.

.google.rpc.Status error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
com.google.rpc.StatusOrBuilder

getResult()

public StreamingTranslateSpeechResult getResult()

Output only. The translation result that is currently being processed (is_final could be true or false).

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult result = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
StreamingTranslateSpeechResult

The result.

getResultBuilder()

public StreamingTranslateSpeechResult.Builder getResultBuilder()

Output only. The translation result that is currently being processed (is_final could be true or false).

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult result = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
StreamingTranslateSpeechResult.Builder

getResultOrBuilder()

public StreamingTranslateSpeechResultOrBuilder getResultOrBuilder()

Output only. The translation result that is currently being processed (is_final could be true or false).

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult result = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
StreamingTranslateSpeechResultOrBuilder

getSpeechEventType()

public StreamingTranslateSpeechResponse.SpeechEventType getSpeechEventType()

Output only. Indicates the type of speech event.

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse.SpeechEventType speech_event_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
StreamingTranslateSpeechResponse.SpeechEventType

The speechEventType.

getSpeechEventTypeValue()

public int getSpeechEventTypeValue()

Output only. Indicates the type of speech event.

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse.SpeechEventType speech_event_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for speechEventType.

hasError()

public boolean hasError()

Output only. If set, returns a google.rpc.Status message that specifies the error for the operation.

.google.rpc.Status error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the error field is set.

hasResult()

public boolean hasResult()

Output only. The translation result that is currently being processed (is_final could be true or false).

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult result = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the result field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeError(Status value)

public StreamingTranslateSpeechResponse.Builder mergeError(Status value)

Output only. If set, returns a google.rpc.Status message that specifies the error for the operation.

.google.rpc.Status error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value com.google.rpc.Status
Returns
Type Description
StreamingTranslateSpeechResponse.Builder

mergeFrom(StreamingTranslateSpeechResponse other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeResult(StreamingTranslateSpeechResult value)

public StreamingTranslateSpeechResponse.Builder mergeResult(StreamingTranslateSpeechResult value)

Output only. The translation result that is currently being processed (is_final could be true or false).

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult result = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value StreamingTranslateSpeechResult
Returns
Type Description
StreamingTranslateSpeechResponse.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setError(Status value)

public StreamingTranslateSpeechResponse.Builder setError(Status value)

Output only. If set, returns a google.rpc.Status message that specifies the error for the operation.

.google.rpc.Status error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value com.google.rpc.Status
Returns
Type Description
StreamingTranslateSpeechResponse.Builder

setError(Status.Builder builderForValue)

public StreamingTranslateSpeechResponse.Builder setError(Status.Builder builderForValue)

Output only. If set, returns a google.rpc.Status message that specifies the error for the operation.

.google.rpc.Status error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue com.google.rpc.Status.Builder
Returns
Type Description
StreamingTranslateSpeechResponse.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setResult(StreamingTranslateSpeechResult value)

public StreamingTranslateSpeechResponse.Builder setResult(StreamingTranslateSpeechResult value)

Output only. The translation result that is currently being processed (is_final could be true or false).

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult result = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value StreamingTranslateSpeechResult
Returns
Type Description
StreamingTranslateSpeechResponse.Builder

setResult(StreamingTranslateSpeechResult.Builder builderForValue)

public StreamingTranslateSpeechResponse.Builder setResult(StreamingTranslateSpeechResult.Builder builderForValue)

Output only. The translation result that is currently being processed (is_final could be true or false).

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult result = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue StreamingTranslateSpeechResult.Builder
Returns
Type Description
StreamingTranslateSpeechResponse.Builder

setSpeechEventType(StreamingTranslateSpeechResponse.SpeechEventType value)

public StreamingTranslateSpeechResponse.Builder setSpeechEventType(StreamingTranslateSpeechResponse.SpeechEventType value)

Output only. Indicates the type of speech event.

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse.SpeechEventType speech_event_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value StreamingTranslateSpeechResponse.SpeechEventType

The speechEventType to set.

Returns
Type Description
StreamingTranslateSpeechResponse.Builder

This builder for chaining.

setSpeechEventTypeValue(int value)

public StreamingTranslateSpeechResponse.Builder setSpeechEventTypeValue(int value)

Output only. Indicates the type of speech event.

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse.SpeechEventType speech_event_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The enum numeric value on the wire for speechEventType to set.

Returns
Type Description
StreamingTranslateSpeechResponse.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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