Class StreamingRecognizeRequest.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<StreamingRecognizeRequest.Builder>
com.google.cloud.speech.v1.StreamingRecognizeRequest.Builder
All Implemented Interfaces:
StreamingRecognizeRequestOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
StreamingRecognizeRequest

public static final class StreamingRecognizeRequest.Builder extends com.google.protobuf.GeneratedMessage.Builder<StreamingRecognizeRequest.Builder> implements StreamingRecognizeRequestOrBuilder
 The top-level message sent by the client for the `StreamingRecognize` method.
 Multiple `StreamingRecognizeRequest` messages are sent. The first message
 must contain a `streaming_config` message and must not contain
 `audio_content`. All subsequent messages must contain `audio_content` and
 must not contain a `streaming_config` message.
 
Protobuf type google.cloud.speech.v1.StreamingRecognizeRequest
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<StreamingRecognizeRequest.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<StreamingRecognizeRequest.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<StreamingRecognizeRequest.Builder>
    • getDefaultInstanceForType

      public StreamingRecognizeRequest getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public StreamingRecognizeRequest build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public StreamingRecognizeRequest buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public StreamingRecognizeRequest.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<StreamingRecognizeRequest.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<StreamingRecognizeRequest.Builder>
    • mergeFrom

      public StreamingRecognizeRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<StreamingRecognizeRequest.Builder>
      Throws:
      IOException
    • getStreamingRequestCase

      public StreamingRecognizeRequest.StreamingRequestCase getStreamingRequestCase()
      Specified by:
      getStreamingRequestCase in interface StreamingRecognizeRequestOrBuilder
    • clearStreamingRequest

      public StreamingRecognizeRequest.Builder clearStreamingRequest()
    • hasStreamingConfig

      public boolean hasStreamingConfig()
       Provides information to the recognizer that specifies how to process the
       request. The first `StreamingRecognizeRequest` message must contain a
       `streaming_config`  message.
       
      .google.cloud.speech.v1.StreamingRecognitionConfig streaming_config = 1;
      Specified by:
      hasStreamingConfig in interface StreamingRecognizeRequestOrBuilder
      Returns:
      Whether the streamingConfig field is set.
    • getStreamingConfig

      public StreamingRecognitionConfig getStreamingConfig()
       Provides information to the recognizer that specifies how to process the
       request. The first `StreamingRecognizeRequest` message must contain a
       `streaming_config`  message.
       
      .google.cloud.speech.v1.StreamingRecognitionConfig streaming_config = 1;
      Specified by:
      getStreamingConfig in interface StreamingRecognizeRequestOrBuilder
      Returns:
      The streamingConfig.
    • setStreamingConfig

       Provides information to the recognizer that specifies how to process the
       request. The first `StreamingRecognizeRequest` message must contain a
       `streaming_config`  message.
       
      .google.cloud.speech.v1.StreamingRecognitionConfig streaming_config = 1;
    • setStreamingConfig

      public StreamingRecognizeRequest.Builder setStreamingConfig(StreamingRecognitionConfig.Builder builderForValue)
       Provides information to the recognizer that specifies how to process the
       request. The first `StreamingRecognizeRequest` message must contain a
       `streaming_config`  message.
       
      .google.cloud.speech.v1.StreamingRecognitionConfig streaming_config = 1;
    • mergeStreamingConfig

       Provides information to the recognizer that specifies how to process the
       request. The first `StreamingRecognizeRequest` message must contain a
       `streaming_config`  message.
       
      .google.cloud.speech.v1.StreamingRecognitionConfig streaming_config = 1;
    • clearStreamingConfig

      public StreamingRecognizeRequest.Builder clearStreamingConfig()
       Provides information to the recognizer that specifies how to process the
       request. The first `StreamingRecognizeRequest` message must contain a
       `streaming_config`  message.
       
      .google.cloud.speech.v1.StreamingRecognitionConfig streaming_config = 1;
    • getStreamingConfigBuilder

      public StreamingRecognitionConfig.Builder getStreamingConfigBuilder()
       Provides information to the recognizer that specifies how to process the
       request. The first `StreamingRecognizeRequest` message must contain a
       `streaming_config`  message.
       
      .google.cloud.speech.v1.StreamingRecognitionConfig streaming_config = 1;
    • getStreamingConfigOrBuilder

      public StreamingRecognitionConfigOrBuilder getStreamingConfigOrBuilder()
       Provides information to the recognizer that specifies how to process the
       request. The first `StreamingRecognizeRequest` message must contain a
       `streaming_config`  message.
       
      .google.cloud.speech.v1.StreamingRecognitionConfig streaming_config = 1;
      Specified by:
      getStreamingConfigOrBuilder in interface StreamingRecognizeRequestOrBuilder
    • hasAudioContent

      public boolean hasAudioContent()
       The audio data to be recognized. Sequential chunks of audio data are sent
       in sequential `StreamingRecognizeRequest` messages. The first
       `StreamingRecognizeRequest` message must not contain `audio_content` data
       and all subsequent `StreamingRecognizeRequest` messages must contain
       `audio_content` data. The audio bytes must be encoded as specified in
       `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a
       pure binary representation (not base64). See
       [content limits](https://cloud.google.com/speech-to-text/quotas#content).
       
      bytes audio_content = 2;
      Specified by:
      hasAudioContent in interface StreamingRecognizeRequestOrBuilder
      Returns:
      Whether the audioContent field is set.
    • getAudioContent

      public com.google.protobuf.ByteString getAudioContent()
       The audio data to be recognized. Sequential chunks of audio data are sent
       in sequential `StreamingRecognizeRequest` messages. The first
       `StreamingRecognizeRequest` message must not contain `audio_content` data
       and all subsequent `StreamingRecognizeRequest` messages must contain
       `audio_content` data. The audio bytes must be encoded as specified in
       `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a
       pure binary representation (not base64). See
       [content limits](https://cloud.google.com/speech-to-text/quotas#content).
       
      bytes audio_content = 2;
      Specified by:
      getAudioContent in interface StreamingRecognizeRequestOrBuilder
      Returns:
      The audioContent.
    • setAudioContent

      public StreamingRecognizeRequest.Builder setAudioContent(com.google.protobuf.ByteString value)
       The audio data to be recognized. Sequential chunks of audio data are sent
       in sequential `StreamingRecognizeRequest` messages. The first
       `StreamingRecognizeRequest` message must not contain `audio_content` data
       and all subsequent `StreamingRecognizeRequest` messages must contain
       `audio_content` data. The audio bytes must be encoded as specified in
       `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a
       pure binary representation (not base64). See
       [content limits](https://cloud.google.com/speech-to-text/quotas#content).
       
      bytes audio_content = 2;
      Parameters:
      value - The audioContent to set.
      Returns:
      This builder for chaining.
    • clearAudioContent

      public StreamingRecognizeRequest.Builder clearAudioContent()
       The audio data to be recognized. Sequential chunks of audio data are sent
       in sequential `StreamingRecognizeRequest` messages. The first
       `StreamingRecognizeRequest` message must not contain `audio_content` data
       and all subsequent `StreamingRecognizeRequest` messages must contain
       `audio_content` data. The audio bytes must be encoded as specified in
       `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a
       pure binary representation (not base64). See
       [content limits](https://cloud.google.com/speech-to-text/quotas#content).
       
      bytes audio_content = 2;
      Returns:
      This builder for chaining.