Class StreamingTranslateSpeechRequest.Builder (0.9.3)

public static final class StreamingTranslateSpeechRequest.Builder extends GeneratedMessageV3.Builder<StreamingTranslateSpeechRequest.Builder> implements StreamingTranslateSpeechRequestOrBuilder

The top-level message sent by the client for the StreamingTranslateSpeech method. Multiple StreamingTranslateSpeechRequest messages are sent. The first message must contain a streaming_config message and must not contain audio_content data. All subsequent messages must contain audio_content data and must not contain a streaming_config message.

Protobuf type google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechRequest

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public StreamingTranslateSpeechRequest build()
Returns
TypeDescription
StreamingTranslateSpeechRequest

buildPartial()

public StreamingTranslateSpeechRequest buildPartial()
Returns
TypeDescription
StreamingTranslateSpeechRequest

clear()

public StreamingTranslateSpeechRequest.Builder clear()
Returns
TypeDescription
StreamingTranslateSpeechRequest.Builder
Overrides

clearAudioContent()

public StreamingTranslateSpeechRequest.Builder clearAudioContent()

The audio data to be translated. Sequential chunks of audio data are sent in sequential StreamingTranslateSpeechRequest messages. The first StreamingTranslateSpeechRequest message must not contain audio_content data and all subsequent StreamingTranslateSpeechRequest messages must contain audio_content data. The audio bytes must be encoded as specified in StreamingTranslateSpeechConfig. Note: as with all bytes fields, protobuffers use a pure binary representation (not base64).

bytes audio_content = 2;

Returns
TypeDescription
StreamingTranslateSpeechRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

public StreamingTranslateSpeechRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
StreamingTranslateSpeechRequest.Builder
Overrides

clearStreamingConfig()

public StreamingTranslateSpeechRequest.Builder clearStreamingConfig()

Provides information to the recognizer that specifies how to process the request. The first StreamingTranslateSpeechRequest message must contain a streaming_config message.

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig streaming_config = 1;

Returns
TypeDescription
StreamingTranslateSpeechRequest.Builder

clearStreamingRequest()

public StreamingTranslateSpeechRequest.Builder clearStreamingRequest()
Returns
TypeDescription
StreamingTranslateSpeechRequest.Builder

clone()

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

getAudioContent()

public ByteString getAudioContent()

The audio data to be translated. Sequential chunks of audio data are sent in sequential StreamingTranslateSpeechRequest messages. The first StreamingTranslateSpeechRequest message must not contain audio_content data and all subsequent StreamingTranslateSpeechRequest messages must contain audio_content data. The audio bytes must be encoded as specified in StreamingTranslateSpeechConfig. Note: as with all bytes fields, protobuffers use a pure binary representation (not base64).

bytes audio_content = 2;

Returns
TypeDescription
ByteString

The audioContent.

getDefaultInstanceForType()

public StreamingTranslateSpeechRequest getDefaultInstanceForType()
Returns
TypeDescription
StreamingTranslateSpeechRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getStreamingConfig()

public StreamingTranslateSpeechConfig getStreamingConfig()

Provides information to the recognizer that specifies how to process the request. The first StreamingTranslateSpeechRequest message must contain a streaming_config message.

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig streaming_config = 1;

Returns
TypeDescription
StreamingTranslateSpeechConfig

The streamingConfig.

getStreamingConfigBuilder()

public StreamingTranslateSpeechConfig.Builder getStreamingConfigBuilder()

Provides information to the recognizer that specifies how to process the request. The first StreamingTranslateSpeechRequest message must contain a streaming_config message.

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig streaming_config = 1;

Returns
TypeDescription
StreamingTranslateSpeechConfig.Builder

getStreamingConfigOrBuilder()

public StreamingTranslateSpeechConfigOrBuilder getStreamingConfigOrBuilder()

Provides information to the recognizer that specifies how to process the request. The first StreamingTranslateSpeechRequest message must contain a streaming_config message.

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig streaming_config = 1;

Returns
TypeDescription
StreamingTranslateSpeechConfigOrBuilder

getStreamingRequestCase()

public StreamingTranslateSpeechRequest.StreamingRequestCase getStreamingRequestCase()
Returns
TypeDescription
StreamingTranslateSpeechRequest.StreamingRequestCase

hasAudioContent()

public boolean hasAudioContent()

The audio data to be translated. Sequential chunks of audio data are sent in sequential StreamingTranslateSpeechRequest messages. The first StreamingTranslateSpeechRequest message must not contain audio_content data and all subsequent StreamingTranslateSpeechRequest messages must contain audio_content data. The audio bytes must be encoded as specified in StreamingTranslateSpeechConfig. Note: as with all bytes fields, protobuffers use a pure binary representation (not base64).

bytes audio_content = 2;

Returns
TypeDescription
boolean

Whether the audioContent field is set.

hasStreamingConfig()

public boolean hasStreamingConfig()

Provides information to the recognizer that specifies how to process the request. The first StreamingTranslateSpeechRequest message must contain a streaming_config message.

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig streaming_config = 1;

Returns
TypeDescription
boolean

Whether the streamingConfig field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(StreamingTranslateSpeechRequest other)

public StreamingTranslateSpeechRequest.Builder mergeFrom(StreamingTranslateSpeechRequest other)
Parameter
NameDescription
otherStreamingTranslateSpeechRequest
Returns
TypeDescription
StreamingTranslateSpeechRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeStreamingConfig(StreamingTranslateSpeechConfig value)

public StreamingTranslateSpeechRequest.Builder mergeStreamingConfig(StreamingTranslateSpeechConfig value)

Provides information to the recognizer that specifies how to process the request. The first StreamingTranslateSpeechRequest message must contain a streaming_config message.

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig streaming_config = 1;

Parameter
NameDescription
valueStreamingTranslateSpeechConfig
Returns
TypeDescription
StreamingTranslateSpeechRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAudioContent(ByteString value)

public StreamingTranslateSpeechRequest.Builder setAudioContent(ByteString value)

The audio data to be translated. Sequential chunks of audio data are sent in sequential StreamingTranslateSpeechRequest messages. The first StreamingTranslateSpeechRequest message must not contain audio_content data and all subsequent StreamingTranslateSpeechRequest messages must contain audio_content data. The audio bytes must be encoded as specified in StreamingTranslateSpeechConfig. Note: as with all bytes fields, protobuffers use a pure binary representation (not base64).

bytes audio_content = 2;

Parameter
NameDescription
valueByteString

The audioContent to set.

Returns
TypeDescription
StreamingTranslateSpeechRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

public StreamingTranslateSpeechRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
StreamingTranslateSpeechRequest.Builder
Overrides

setStreamingConfig(StreamingTranslateSpeechConfig value)

public StreamingTranslateSpeechRequest.Builder setStreamingConfig(StreamingTranslateSpeechConfig value)

Provides information to the recognizer that specifies how to process the request. The first StreamingTranslateSpeechRequest message must contain a streaming_config message.

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig streaming_config = 1;

Parameter
NameDescription
valueStreamingTranslateSpeechConfig
Returns
TypeDescription
StreamingTranslateSpeechRequest.Builder

setStreamingConfig(StreamingTranslateSpeechConfig.Builder builderForValue)

public StreamingTranslateSpeechRequest.Builder setStreamingConfig(StreamingTranslateSpeechConfig.Builder builderForValue)

Provides information to the recognizer that specifies how to process the request. The first StreamingTranslateSpeechRequest message must contain a streaming_config message.

.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig streaming_config = 1;

Parameter
NameDescription
builderForValueStreamingTranslateSpeechConfig.Builder
Returns
TypeDescription
StreamingTranslateSpeechRequest.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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