Class StreamingTranslateSpeechResponse.Builder (0.24.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public StreamingTranslateSpeechResponse build()
Returns
TypeDescription
StreamingTranslateSpeechResponse

buildPartial()

public StreamingTranslateSpeechResponse buildPartial()
Returns
TypeDescription
StreamingTranslateSpeechResponse

clear()

public StreamingTranslateSpeechResponse.Builder clear()
Returns
TypeDescription
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
TypeDescription
StreamingTranslateSpeechResponse.Builder

clearField(Descriptors.FieldDescriptor field)

public StreamingTranslateSpeechResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
StreamingTranslateSpeechResponse.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

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

This builder for chaining.

clone()

public StreamingTranslateSpeechResponse.Builder clone()
Returns
TypeDescription
StreamingTranslateSpeechResponse.Builder
Overrides

getDefaultInstanceForType()

public StreamingTranslateSpeechResponse getDefaultInstanceForType()
Returns
TypeDescription
StreamingTranslateSpeechResponse

getDescriptorForType()

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

Whether the result field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valuecom.google.rpc.Status
Returns
TypeDescription
StreamingTranslateSpeechResponse.Builder

mergeFrom(StreamingTranslateSpeechResponse other)

public StreamingTranslateSpeechResponse.Builder mergeFrom(StreamingTranslateSpeechResponse other)
Parameter
NameDescription
otherStreamingTranslateSpeechResponse
Returns
TypeDescription
StreamingTranslateSpeechResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public StreamingTranslateSpeechResponse.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueStreamingTranslateSpeechResult
Returns
TypeDescription
StreamingTranslateSpeechResponse.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final StreamingTranslateSpeechResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valuecom.google.rpc.Status
Returns
TypeDescription
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
NameDescription
builderForValuecom.google.rpc.Status.Builder
Returns
TypeDescription
StreamingTranslateSpeechResponse.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public StreamingTranslateSpeechResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
StreamingTranslateSpeechResponse.Builder
Overrides

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

public StreamingTranslateSpeechResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueStreamingTranslateSpeechResult
Returns
TypeDescription
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
NameDescription
builderForValueStreamingTranslateSpeechResult.Builder
Returns
TypeDescription
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
NameDescription
valueStreamingTranslateSpeechResponse.SpeechEventType

The speechEventType to set.

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

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

Returns
TypeDescription
StreamingTranslateSpeechResponse.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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