Class StreamingTranslateSpeechRequest.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<StreamingTranslateSpeechRequest.Builder>
com.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechRequest.Builder
All Implemented Interfaces:
StreamingTranslateSpeechRequestOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
StreamingTranslateSpeechRequest

public static final class StreamingTranslateSpeechRequest.Builder extends com.google.protobuf.GeneratedMessage.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
  • 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<StreamingTranslateSpeechRequest.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<StreamingTranslateSpeechRequest.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<StreamingTranslateSpeechRequest.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

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

      public StreamingTranslateSpeechRequest.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<StreamingTranslateSpeechRequest.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<StreamingTranslateSpeechRequest.Builder>
    • mergeFrom

      public StreamingTranslateSpeechRequest.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<StreamingTranslateSpeechRequest.Builder>
      Throws:
      IOException
    • getStreamingRequestCase

      public StreamingTranslateSpeechRequest.StreamingRequestCase getStreamingRequestCase()
      Specified by:
      getStreamingRequestCase in interface StreamingTranslateSpeechRequestOrBuilder
    • clearStreamingRequest

      public StreamingTranslateSpeechRequest.Builder clearStreamingRequest()
    • 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;
      Specified by:
      hasStreamingConfig in interface StreamingTranslateSpeechRequestOrBuilder
      Returns:
      Whether the streamingConfig field is set.
    • 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;
      Specified by:
      getStreamingConfig in interface StreamingTranslateSpeechRequestOrBuilder
      Returns:
      The streamingConfig.
    • setStreamingConfig

       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;
    • setStreamingConfig

       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;
    • mergeStreamingConfig

       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;
    • 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;
    • 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;
    • 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;
      Specified by:
      getStreamingConfigOrBuilder in interface StreamingTranslateSpeechRequestOrBuilder
    • 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;
      Specified by:
      hasAudioContent in interface StreamingTranslateSpeechRequestOrBuilder
      Returns:
      Whether the audioContent field is set.
    • getAudioContent

      public com.google.protobuf.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;
      Specified by:
      getAudioContent in interface StreamingTranslateSpeechRequestOrBuilder
      Returns:
      The audioContent.
    • setAudioContent

      public StreamingTranslateSpeechRequest.Builder setAudioContent(com.google.protobuf.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;
      Parameters:
      value - The audioContent to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.