Class StreamingAnalyzeContentRequest

  • All Implemented Interfaces:
    StreamingAnalyzeContentRequestOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class StreamingAnalyzeContentRequest
    extends com.google.protobuf.GeneratedMessageV3
    implements StreamingAnalyzeContentRequestOrBuilder
     The top-level message sent by the client to the
     [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent]
     method.
    
     Multiple request messages should be sent in order:
    
     1.  The first message must contain
         [participant][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.participant],
         [config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.config]
         and optionally
         [query_params][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.query_params].
         If you want to receive an audio response, it should also contain
         [reply_audio_config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.reply_audio_config].
         The message must not contain
         [input][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.input].
    
     2.  If
     [config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.config] in
     the first message
         was set to
         [audio_config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.audio_config],
         all subsequent messages must contain
         [input_audio][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.input_audio]
         to continue with Speech recognition. However, note that:
    
         * Dialogflow will bill you for the audio so far.
         * Dialogflow discards all Speech recognition results in favor of the
           text input.
    
      3. If
      [StreamingAnalyzeContentRequest.config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.config]
      in the first message was set
        to
        [StreamingAnalyzeContentRequest.text_config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.text_config],
        then the second message must contain only
        [input_text][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.input_text].
        Moreover, you must not send more than two messages.
    
      After you sent all input, you must half-close or abort the request stream.
     
    Protobuf type google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest
    See Also:
    Serialized Form
    • Field Detail

      • PARTICIPANT_FIELD_NUMBER

        public static final int PARTICIPANT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • AUDIO_CONFIG_FIELD_NUMBER

        public static final int AUDIO_CONFIG_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TEXT_CONFIG_FIELD_NUMBER

        public static final int TEXT_CONFIG_FIELD_NUMBER
        See Also:
        Constant Field Values
      • REPLY_AUDIO_CONFIG_FIELD_NUMBER

        public static final int REPLY_AUDIO_CONFIG_FIELD_NUMBER
        See Also:
        Constant Field Values
      • INPUT_AUDIO_FIELD_NUMBER

        public static final int INPUT_AUDIO_FIELD_NUMBER
        See Also:
        Constant Field Values
      • INPUT_TEXT_FIELD_NUMBER

        public static final int INPUT_TEXT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • INPUT_DTMF_FIELD_NUMBER

        public static final int INPUT_DTMF_FIELD_NUMBER
        See Also:
        Constant Field Values
      • QUERY_PARAMS_FIELD_NUMBER

        public static final int QUERY_PARAMS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ASSIST_QUERY_PARAMS_FIELD_NUMBER

        public static final int ASSIST_QUERY_PARAMS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • CX_PARAMETERS_FIELD_NUMBER

        public static final int CX_PARAMETERS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ENABLE_PARTIAL_AUTOMATED_AGENT_REPLY_FIELD_NUMBER

        public static final int ENABLE_PARTIAL_AUTOMATED_AGENT_REPLY_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ENABLE_DEBUGGING_INFO_FIELD_NUMBER

        public static final int ENABLE_DEBUGGING_INFO_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • 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
      • getParticipant

        public String getParticipant()
         Required. The name of the participant this text comes from.
         Format: `projects/<Project ID>/locations/<Location
         ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
         
        string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
        Specified by:
        getParticipant in interface StreamingAnalyzeContentRequestOrBuilder
        Returns:
        The participant.
      • getParticipantBytes

        public com.google.protobuf.ByteString getParticipantBytes()
         Required. The name of the participant this text comes from.
         Format: `projects/<Project ID>/locations/<Location
         ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
         
        string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
        Specified by:
        getParticipantBytes in interface StreamingAnalyzeContentRequestOrBuilder
        Returns:
        The bytes for participant.
      • hasAudioConfig

        public boolean hasAudioConfig()
         Instructs the speech recognizer how to process the speech audio.
         
        .google.cloud.dialogflow.v2.InputAudioConfig audio_config = 2;
        Specified by:
        hasAudioConfig in interface StreamingAnalyzeContentRequestOrBuilder
        Returns:
        Whether the audioConfig field is set.
      • hasTextConfig

        public boolean hasTextConfig()
         The natural language text to be processed.
         
        .google.cloud.dialogflow.v2.InputTextConfig text_config = 3;
        Specified by:
        hasTextConfig in interface StreamingAnalyzeContentRequestOrBuilder
        Returns:
        Whether the textConfig field is set.
      • hasReplyAudioConfig

        public boolean hasReplyAudioConfig()
         Speech synthesis configuration.
         The speech synthesis settings for a virtual agent that may be configured
         for the associated conversation profile are not used when calling
         StreamingAnalyzeContent. If this configuration is not supplied, speech
         synthesis is disabled.
         
        .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 4;
        Specified by:
        hasReplyAudioConfig in interface StreamingAnalyzeContentRequestOrBuilder
        Returns:
        Whether the replyAudioConfig field is set.
      • getReplyAudioConfig

        public OutputAudioConfig getReplyAudioConfig()
         Speech synthesis configuration.
         The speech synthesis settings for a virtual agent that may be configured
         for the associated conversation profile are not used when calling
         StreamingAnalyzeContent. If this configuration is not supplied, speech
         synthesis is disabled.
         
        .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 4;
        Specified by:
        getReplyAudioConfig in interface StreamingAnalyzeContentRequestOrBuilder
        Returns:
        The replyAudioConfig.
      • getReplyAudioConfigOrBuilder

        public OutputAudioConfigOrBuilder getReplyAudioConfigOrBuilder()
         Speech synthesis configuration.
         The speech synthesis settings for a virtual agent that may be configured
         for the associated conversation profile are not used when calling
         StreamingAnalyzeContent. If this configuration is not supplied, speech
         synthesis is disabled.
         
        .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 4;
        Specified by:
        getReplyAudioConfigOrBuilder in interface StreamingAnalyzeContentRequestOrBuilder
      • hasInputAudio

        public boolean hasInputAudio()
         The input audio content to be recognized. Must be sent if `audio_config`
         is set in the first message. The complete audio over all streaming
         messages must not exceed 1 minute.
         
        bytes input_audio = 5;
        Specified by:
        hasInputAudio in interface StreamingAnalyzeContentRequestOrBuilder
        Returns:
        Whether the inputAudio field is set.
      • getInputAudio

        public com.google.protobuf.ByteString getInputAudio()
         The input audio content to be recognized. Must be sent if `audio_config`
         is set in the first message. The complete audio over all streaming
         messages must not exceed 1 minute.
         
        bytes input_audio = 5;
        Specified by:
        getInputAudio in interface StreamingAnalyzeContentRequestOrBuilder
        Returns:
        The inputAudio.
      • hasInputText

        public boolean hasInputText()
         The UTF-8 encoded natural language text to be processed. Must be sent if
         `text_config` is set in the first message. Text length must not exceed
         256 bytes for virtual agent interactions. The `input_text` field can be
         only sent once, and would cancel the speech recognition if any ongoing.
         
        string input_text = 6;
        Specified by:
        hasInputText in interface StreamingAnalyzeContentRequestOrBuilder
        Returns:
        Whether the inputText field is set.
      • getInputText

        public String getInputText()
         The UTF-8 encoded natural language text to be processed. Must be sent if
         `text_config` is set in the first message. Text length must not exceed
         256 bytes for virtual agent interactions. The `input_text` field can be
         only sent once, and would cancel the speech recognition if any ongoing.
         
        string input_text = 6;
        Specified by:
        getInputText in interface StreamingAnalyzeContentRequestOrBuilder
        Returns:
        The inputText.
      • getInputTextBytes

        public com.google.protobuf.ByteString getInputTextBytes()
         The UTF-8 encoded natural language text to be processed. Must be sent if
         `text_config` is set in the first message. Text length must not exceed
         256 bytes for virtual agent interactions. The `input_text` field can be
         only sent once, and would cancel the speech recognition if any ongoing.
         
        string input_text = 6;
        Specified by:
        getInputTextBytes in interface StreamingAnalyzeContentRequestOrBuilder
        Returns:
        The bytes for inputText.
      • hasInputDtmf

        public boolean hasInputDtmf()
         The DTMF digits used to invoke intent and fill in parameter value.
        
         This input is ignored if the previous response indicated that DTMF input
         is not accepted.
         
        .google.cloud.dialogflow.v2.TelephonyDtmfEvents input_dtmf = 9;
        Specified by:
        hasInputDtmf in interface StreamingAnalyzeContentRequestOrBuilder
        Returns:
        Whether the inputDtmf field is set.
      • getInputDtmf

        public TelephonyDtmfEvents getInputDtmf()
         The DTMF digits used to invoke intent and fill in parameter value.
        
         This input is ignored if the previous response indicated that DTMF input
         is not accepted.
         
        .google.cloud.dialogflow.v2.TelephonyDtmfEvents input_dtmf = 9;
        Specified by:
        getInputDtmf in interface StreamingAnalyzeContentRequestOrBuilder
        Returns:
        The inputDtmf.
      • hasQueryParams

        public boolean hasQueryParams()
         Parameters for a Dialogflow virtual-agent query.
         
        .google.cloud.dialogflow.v2.QueryParameters query_params = 7;
        Specified by:
        hasQueryParams in interface StreamingAnalyzeContentRequestOrBuilder
        Returns:
        Whether the queryParams field is set.
      • hasAssistQueryParams

        public boolean hasAssistQueryParams()
         Parameters for a human assist query.
         
        .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 8;
        Specified by:
        hasAssistQueryParams in interface StreamingAnalyzeContentRequestOrBuilder
        Returns:
        Whether the assistQueryParams field is set.
      • hasCxParameters

        public boolean hasCxParameters()
         Additional parameters to be put into Dialogflow CX session parameters. To
         remove a parameter from the session, clients should explicitly set the
         parameter value to null.
        
         Note: this field should only be used if you are connecting to a Dialogflow
         CX agent.
         
        .google.protobuf.Struct cx_parameters = 13;
        Specified by:
        hasCxParameters in interface StreamingAnalyzeContentRequestOrBuilder
        Returns:
        Whether the cxParameters field is set.
      • getCxParameters

        public com.google.protobuf.Struct getCxParameters()
         Additional parameters to be put into Dialogflow CX session parameters. To
         remove a parameter from the session, clients should explicitly set the
         parameter value to null.
        
         Note: this field should only be used if you are connecting to a Dialogflow
         CX agent.
         
        .google.protobuf.Struct cx_parameters = 13;
        Specified by:
        getCxParameters in interface StreamingAnalyzeContentRequestOrBuilder
        Returns:
        The cxParameters.
      • getCxParametersOrBuilder

        public com.google.protobuf.StructOrBuilder getCxParametersOrBuilder()
         Additional parameters to be put into Dialogflow CX session parameters. To
         remove a parameter from the session, clients should explicitly set the
         parameter value to null.
        
         Note: this field should only be used if you are connecting to a Dialogflow
         CX agent.
         
        .google.protobuf.Struct cx_parameters = 13;
        Specified by:
        getCxParametersOrBuilder in interface StreamingAnalyzeContentRequestOrBuilder
      • getEnablePartialAutomatedAgentReply

        public boolean getEnablePartialAutomatedAgentReply()
         Enable partial virtual agent responses. If this flag is not enabled,
         response stream still contains only one final response even if some
         `Fulfillment`s in Dialogflow virtual agent have been configured to return
         partial responses.
         
        bool enable_partial_automated_agent_reply = 12;
        Specified by:
        getEnablePartialAutomatedAgentReply in interface StreamingAnalyzeContentRequestOrBuilder
        Returns:
        The enablePartialAutomatedAgentReply.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static StreamingAnalyzeContentRequest parseFrom​(ByteBuffer data)
                                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static StreamingAnalyzeContentRequest parseFrom​(ByteBuffer data,
                                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static StreamingAnalyzeContentRequest parseFrom​(com.google.protobuf.ByteString data)
                                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static StreamingAnalyzeContentRequest parseFrom​(com.google.protobuf.ByteString data,
                                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static StreamingAnalyzeContentRequest parseFrom​(byte[] data)
                                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static StreamingAnalyzeContentRequest parseFrom​(byte[] data,
                                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • newBuilderForType

        public StreamingAnalyzeContentRequest.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public StreamingAnalyzeContentRequest.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected StreamingAnalyzeContentRequest.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<StreamingAnalyzeContentRequest> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public StreamingAnalyzeContentRequest getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder