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
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
public StreamingTranslateSpeechResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
public StreamingTranslateSpeechResponse build()
Returns
public StreamingTranslateSpeechResponse buildPartial()
Returns
public StreamingTranslateSpeechResponse.Builder clear()
Returns
Overrides
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
public StreamingTranslateSpeechResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
public StreamingTranslateSpeechResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
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
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
public StreamingTranslateSpeechResponse.Builder clone()
Returns
Overrides
public StreamingTranslateSpeechResponse getDefaultInstanceForType()
Returns
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
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.
|
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 | |
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 | |
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
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
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
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
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.
|
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.
|
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.
|
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
public final boolean isInitialized()
Returns
Overrides
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
public StreamingTranslateSpeechResponse.Builder mergeFrom(StreamingTranslateSpeechResponse other)
Parameter
Returns
public StreamingTranslateSpeechResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
public StreamingTranslateSpeechResponse.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
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
Returns
public final StreamingTranslateSpeechResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
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
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
public StreamingTranslateSpeechResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
public StreamingTranslateSpeechResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
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
Returns
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
Returns
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
Returns
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
public final StreamingTranslateSpeechResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides