Class 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.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
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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

        public StreamingTranslateSpeechRequest 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
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<StreamingTranslateSpeechRequest.Builder>
      • 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

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

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

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