From cfcf828228ac5b8355a7e24b70994298e2666958 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 9 Oct 2023 15:58:17 -0400 Subject: [PATCH] feat: [dialogflow] Add the enable_partial_automated_agent_reply flag (#9924) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add the enable_partial_automated_agent_reply flag chore: remove extraneous backend config PiperOrigin-RevId: 569315665 Source-Link: https://github.com/googleapis/googleapis/commit/a24bc5647ff31502afee5439e0dee9b3bc632cc4 Source-Link: https://github.com/googleapis/googleapis-gen/commit/afd064365f9a266b32950068054b3c2c5da374bd Copy-Tag: eyJwIjoiamF2YS1kaWFsb2dmbG93Ly5Pd2xCb3QueWFtbCIsImgiOiJhZmQwNjQzNjVmOWEyNjZiMzI5NTAwNjgwNTRiM2MyYzVkYTM3NGJkIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- java-dialogflow/README.md | 2 +- .../dialogflow/v2/ParticipantsClient.java | 1 + .../dialogflow/v2/ParticipantsClientTest.java | 2 + .../cloud/dialogflow/v2/ParticipantProto.java | 360 +++++++++--------- .../v2/StreamingAnalyzeContentRequest.java | 179 ++++++++- ...reamingAnalyzeContentRequestOrBuilder.java | 31 ++ .../cloud/dialogflow/v2/participant.proto | 21 + .../AsyncStreamingAnalyzeContent.java | 1 + 8 files changed, 410 insertions(+), 187 deletions(-) diff --git a/java-dialogflow/README.md b/java-dialogflow/README.md index 2d038f973a1a..292e2e773a66 100644 --- a/java-dialogflow/README.md +++ b/java-dialogflow/README.md @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-dialogflow.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dialogflow/4.30.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dialogflow/4.33.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/ParticipantsClient.java b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/ParticipantsClient.java index 1369d98dd26f..383c476f1b80 100644 --- a/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/ParticipantsClient.java +++ b/java-dialogflow/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/ParticipantsClient.java @@ -978,6 +978,7 @@ public final AnalyzeContentResponse analyzeContent(AnalyzeContentRequest request * .setQueryParams(QueryParameters.newBuilder().build()) * .setAssistQueryParams(AssistQueryParameters.newBuilder().build()) * .setCxParameters(Struct.newBuilder().build()) + * .setEnableExtendedStreaming(true) * .setEnablePartialAutomatedAgentReply(true) * .setEnableDebuggingInfo(true) * .build(); diff --git a/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/ParticipantsClientTest.java b/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/ParticipantsClientTest.java index 12fd9f2ded75..d6044e10c353 100644 --- a/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/ParticipantsClientTest.java +++ b/java-dialogflow/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/ParticipantsClientTest.java @@ -642,6 +642,7 @@ public void streamingAnalyzeContentTest() throws Exception { .setQueryParams(QueryParameters.newBuilder().build()) .setAssistQueryParams(AssistQueryParameters.newBuilder().build()) .setCxParameters(Struct.newBuilder().build()) + .setEnableExtendedStreaming(true) .setEnablePartialAutomatedAgentReply(true) .setEnableDebuggingInfo(true) .build(); @@ -676,6 +677,7 @@ public void streamingAnalyzeContentExceptionTest() throws Exception { .setQueryParams(QueryParameters.newBuilder().build()) .setAssistQueryParams(AssistQueryParameters.newBuilder().build()) .setCxParameters(Struct.newBuilder().build()) + .setEnableExtendedStreaming(true) .setEnablePartialAutomatedAgentReply(true) .setEnableDebuggingInfo(true) .build(); diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ParticipantProto.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ParticipantProto.java index 87ae1ed628f6..1569483b1f56 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ParticipantProto.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ParticipantProto.java @@ -263,7 +263,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "d_user_suggestion_results\030\007 \003(\0132,.google" + ".cloud.dialogflow.v2.SuggestionResult\022C\n" + "\017dtmf_parameters\030\t \001(\0132*.google.cloud.di" - + "alogflow.v2.DtmfParameters\"\321\005\n\036Streaming" + + "alogflow.v2.DtmfParameters\"\372\005\n\036Streaming" + "AnalyzeContentRequest\022C\n\013participant\030\001 \001" + "(\tB.\342A\001\002\372A\'\n%dialogflow.googleapis.com/P" + "articipant\022D\n\014audio_config\030\002 \001(\0132,.googl" @@ -279,187 +279,188 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "meters\022N\n\023assist_query_params\030\010 \001(\01321.go" + "ogle.cloud.dialogflow.v2.AssistQueryPara" + "meters\022.\n\rcx_parameters\030\r \001(\0132\027.google.p" - + "rotobuf.Struct\022,\n$enable_partial_automat" - + "ed_agent_reply\030\014 \001(\010\022\035\n\025enable_debugging" - + "_info\030\023 \001(\010B\010\n\006configB\007\n\005input\"\217\005\n\037Strea" - + "mingAnalyzeContentResponse\022R\n\022recognitio" - + "n_result\030\001 \001(\01326.google.cloud.dialogflow" - + ".v2.StreamingRecognitionResult\022\022\n\nreply_" - + "text\030\002 \001(\t\022<\n\013reply_audio\030\003 \001(\0132\'.google" - + ".cloud.dialogflow.v2.OutputAudio\022N\n\025auto" - + "mated_agent_reply\030\004 \001(\0132/.google.cloud.d" - + "ialogflow.v2.AutomatedAgentReply\0224\n\007mess" - + "age\030\006 \001(\0132#.google.cloud.dialogflow.v2.M" - + "essage\022T\n\036human_agent_suggestion_results" - + "\030\007 \003(\0132,.google.cloud.dialogflow.v2.Sugg" - + "estionResult\022Q\n\033end_user_suggestion_resu" - + "lts\030\010 \003(\0132,.google.cloud.dialogflow.v2.S" - + "uggestionResult\022C\n\017dtmf_parameters\030\n \001(\013" - + "2*.google.cloud.dialogflow.v2.DtmfParame" - + "ters\022R\n\016debugging_info\030\013 \001(\0132:.google.cl" - + "oud.dialogflow.v2.CloudConversationDebug" - + "gingInfo\"\210\002\n\026SuggestArticlesRequest\022>\n\006p" - + "arent\030\001 \001(\tB.\342A\001\002\372A\'\n%dialogflow.googlea" - + "pis.com/Participant\022B\n\016latest_message\030\002 " - + "\001(\tB*\342A\001\001\372A#\n!dialogflow.googleapis.com/" - + "Message\022\032\n\014context_size\030\003 \001(\005B\004\342A\001\001\022N\n\023a" - + "ssist_query_params\030\004 \001(\01321.google.cloud." - + "dialogflow.v2.AssistQueryParameters\"\213\001\n\027" - + "SuggestArticlesResponse\022B\n\017article_answe" - + "rs\030\001 \003(\0132).google.cloud.dialogflow.v2.Ar" - + "ticleAnswer\022\026\n\016latest_message\030\002 \001(\t\022\024\n\014c" - + "ontext_size\030\003 \001(\005\"\212\002\n\030SuggestFaqAnswersR" - + "equest\022>\n\006parent\030\001 \001(\tB.\342A\001\002\372A\'\n%dialogf" - + "low.googleapis.com/Participant\022B\n\016latest" - + "_message\030\002 \001(\tB*\342A\001\001\372A#\n!dialogflow.goog" - + "leapis.com/Message\022\032\n\014context_size\030\003 \001(\005" - + "B\004\342A\001\001\022N\n\023assist_query_params\030\004 \001(\01321.go" - + "ogle.cloud.dialogflow.v2.AssistQueryPara" - + "meters\"\205\001\n\031SuggestFaqAnswersResponse\022:\n\013" - + "faq_answers\030\001 \003(\0132%.google.cloud.dialogf" - + "low.v2.FaqAnswer\022\026\n\016latest_message\030\002 \001(\t" - + "\022\024\n\014context_size\030\003 \001(\005\"\365\001\n\032SuggestSmartR" - + "epliesRequest\022>\n\006parent\030\001 \001(\tB.\342A\001\002\372A\'\n%" - + "dialogflow.googleapis.com/Participant\022A\n" - + "\022current_text_input\030\004 \001(\0132%.google.cloud" - + ".dialogflow.v2.TextInput\022>\n\016latest_messa" + + "rotobuf.Struct\022\'\n\031enable_extended_stream" + + "ing\030\013 \001(\010B\004\342A\001\001\022,\n$enable_partial_automa" + + "ted_agent_reply\030\014 \001(\010\022\035\n\025enable_debuggin" + + "g_info\030\023 \001(\010B\010\n\006configB\007\n\005input\"\217\005\n\037Stre" + + "amingAnalyzeContentResponse\022R\n\022recogniti" + + "on_result\030\001 \001(\01326.google.cloud.dialogflo" + + "w.v2.StreamingRecognitionResult\022\022\n\nreply" + + "_text\030\002 \001(\t\022<\n\013reply_audio\030\003 \001(\0132\'.googl" + + "e.cloud.dialogflow.v2.OutputAudio\022N\n\025aut" + + "omated_agent_reply\030\004 \001(\0132/.google.cloud." + + "dialogflow.v2.AutomatedAgentReply\0224\n\007mes" + + "sage\030\006 \001(\0132#.google.cloud.dialogflow.v2." + + "Message\022T\n\036human_agent_suggestion_result" + + "s\030\007 \003(\0132,.google.cloud.dialogflow.v2.Sug" + + "gestionResult\022Q\n\033end_user_suggestion_res" + + "ults\030\010 \003(\0132,.google.cloud.dialogflow.v2." + + "SuggestionResult\022C\n\017dtmf_parameters\030\n \001(" + + "\0132*.google.cloud.dialogflow.v2.DtmfParam" + + "eters\022R\n\016debugging_info\030\013 \001(\0132:.google.c" + + "loud.dialogflow.v2.CloudConversationDebu" + + "ggingInfo\"\210\002\n\026SuggestArticlesRequest\022>\n\006" + + "parent\030\001 \001(\tB.\342A\001\002\372A\'\n%dialogflow.google" + + "apis.com/Participant\022B\n\016latest_message\030\002" + + " \001(\tB*\342A\001\001\372A#\n!dialogflow.googleapis.com" + + "/Message\022\032\n\014context_size\030\003 \001(\005B\004\342A\001\001\022N\n\023" + + "assist_query_params\030\004 \001(\01321.google.cloud" + + ".dialogflow.v2.AssistQueryParameters\"\213\001\n" + + "\027SuggestArticlesResponse\022B\n\017article_answ" + + "ers\030\001 \003(\0132).google.cloud.dialogflow.v2.A" + + "rticleAnswer\022\026\n\016latest_message\030\002 \001(\t\022\024\n\014" + + "context_size\030\003 \001(\005\"\212\002\n\030SuggestFaqAnswers" + + "Request\022>\n\006parent\030\001 \001(\tB.\342A\001\002\372A\'\n%dialog" + + "flow.googleapis.com/Participant\022B\n\016lates" + + "t_message\030\002 \001(\tB*\342A\001\001\372A#\n!dialogflow.goo" + + "gleapis.com/Message\022\032\n\014context_size\030\003 \001(" + + "\005B\004\342A\001\001\022N\n\023assist_query_params\030\004 \001(\01321.g" + + "oogle.cloud.dialogflow.v2.AssistQueryPar" + + "ameters\"\205\001\n\031SuggestFaqAnswersResponse\022:\n" + + "\013faq_answers\030\001 \003(\0132%.google.cloud.dialog" + + "flow.v2.FaqAnswer\022\026\n\016latest_message\030\002 \001(" + + "\t\022\024\n\014context_size\030\003 \001(\005\"\365\001\n\032SuggestSmart" + + "RepliesRequest\022>\n\006parent\030\001 \001(\tB.\342A\001\002\372A\'\n" + + "%dialogflow.googleapis.com/Participant\022A" + + "\n\022current_text_input\030\004 \001(\0132%.google.clou" + + "d.dialogflow.v2.TextInput\022>\n\016latest_mess" + + "age\030\002 \001(\tB&\372A#\n!dialogflow.googleapis.co" + + "m/Message\022\024\n\014context_size\030\003 \001(\005\"\304\001\n\033Sugg" + + "estSmartRepliesResponse\022O\n\023smart_reply_a" + + "nswers\030\001 \003(\0132,.google.cloud.dialogflow.v" + + "2.SmartReplyAnswerB\004\342A\001\003\022>\n\016latest_messa" + "ge\030\002 \001(\tB&\372A#\n!dialogflow.googleapis.com" - + "/Message\022\024\n\014context_size\030\003 \001(\005\"\304\001\n\033Sugge" - + "stSmartRepliesResponse\022O\n\023smart_reply_an" - + "swers\030\001 \003(\0132,.google.cloud.dialogflow.v2" - + ".SmartReplyAnswerB\004\342A\001\003\022>\n\016latest_messag" - + "e\030\002 \001(\tB&\372A#\n!dialogflow.googleapis.com/" - + "Message\022\024\n\014context_size\030\003 \001(\005\"[\n\013OutputA" - + "udio\022=\n\006config\030\001 \001(\0132-.google.cloud.dial" - + "ogflow.v2.OutputAudioConfig\022\r\n\005audio\030\002 \001" - + "(\014\"\350\002\n\023AutomatedAgentReply\022P\n\026detect_int" - + "ent_response\030\001 \001(\01320.google.cloud.dialog" - + "flow.v2.DetectIntentResponse\022k\n\032automate" - + "d_agent_reply_type\030\007 \001(\0162G.google.cloud." - + "dialogflow.v2.AutomatedAgentReply.Automa" - + "tedAgentReplyType\022\032\n\022allow_cancellation\030" - + "\010 \001(\010\022\027\n\017cx_current_page\030\013 \001(\t\"]\n\027Automa" - + "tedAgentReplyType\022*\n&AUTOMATED_AGENT_REP" - + "LY_TYPE_UNSPECIFIED\020\000\022\013\n\007PARTIAL\020\001\022\t\n\005FI" - + "NAL\020\002\"\344\001\n\rArticleAnswer\022\r\n\005title\030\001 \001(\t\022\013" - + "\n\003uri\030\002 \001(\t\022\020\n\010snippets\030\003 \003(\t\022\022\n\nconfide" - + "nce\030\004 \001(\002\022I\n\010metadata\030\005 \003(\01327.google.clo" - + "ud.dialogflow.v2.ArticleAnswer.MetadataE" - + "ntry\022\025\n\ranswer_record\030\006 \001(\t\032/\n\rMetadataE" - + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\340\001\n" - + "\tFaqAnswer\022\016\n\006answer\030\001 \001(\t\022\022\n\nconfidence" - + "\030\002 \001(\002\022\020\n\010question\030\003 \001(\t\022\016\n\006source\030\004 \001(\t" - + "\022E\n\010metadata\030\005 \003(\01323.google.cloud.dialog" - + "flow.v2.FaqAnswer.MetadataEntry\022\025\n\ranswe" - + "r_record\030\006 \001(\t\032/\n\rMetadataEntry\022\013\n\003key\030\001" - + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"y\n\020SmartReplyAns" - + "wer\022\r\n\005reply\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\022B" - + "\n\ranswer_record\030\003 \001(\tB+\372A(\n&dialogflow.g" - + "oogleapis.com/AnswerRecord\"\\\n\020IntentSugg" - + "estion\022\024\n\014display_name\030\001 \001(\t\022\023\n\tintent_v" - + "2\030\002 \001(\tH\000\022\023\n\013description\030\005 \001(\tB\010\n\006intent" - + "\"\305\001\n\026DialogflowAssistAnswer\022?\n\014query_res" - + "ult\030\001 \001(\0132\'.google.cloud.dialogflow.v2.Q" - + "ueryResultH\000\022I\n\021intent_suggestion\030\005 \001(\0132" - + ",.google.cloud.dialogflow.v2.IntentSugge" - + "stionH\000\022\025\n\ranswer_record\030\002 \001(\tB\010\n\006result" - + "\"\352\002\n\020SuggestionResult\022#\n\005error\030\001 \001(\0132\022.g" - + "oogle.rpc.StatusH\000\022X\n\031suggest_articles_r" - + "esponse\030\002 \001(\01323.google.cloud.dialogflow." - + "v2.SuggestArticlesResponseH\000\022]\n\034suggest_" - + "faq_answers_response\030\003 \001(\01325.google.clou" - + "d.dialogflow.v2.SuggestFaqAnswersRespons" - + "eH\000\022a\n\036suggest_smart_replies_response\030\004 " - + "\001(\01327.google.cloud.dialogflow.v2.Suggest" - + "SmartRepliesResponseH\000B\025\n\023suggestion_res" - + "ponse\".\n\017InputTextConfig\022\033\n\rlanguage_cod" - + "e\030\001 \001(\tB\004\342A\001\002\"j\n\024AnnotatedMessagePart\022\014\n" - + "\004text\030\001 \001(\t\022\023\n\013entity_type\030\002 \001(\t\022/\n\017form" - + "atted_value\030\003 \001(\0132\026.google.protobuf.Valu" - + "e\"n\n\021MessageAnnotation\022?\n\005parts\030\001 \003(\01320." - + "google.cloud.dialogflow.v2.AnnotatedMess" - + "agePart\022\030\n\020contain_entities\030\002 \001(\010\".\n\017Sug" - + "gestionInput\022\033\n\ranswer_record\030\001 \001(\tB\004\342A\001" - + "\002\"\315\001\n\025AssistQueryParameters\022s\n\032documents" - + "_metadata_filters\030\001 \003(\0132O.google.cloud.d" - + "ialogflow.v2.AssistQueryParameters.Docum" - + "entsMetadataFiltersEntry\032?\n\035DocumentsMet" - + "adataFiltersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" - + "\002 \001(\t:\0028\0012\372\025\n\014Participants\022\245\002\n\021CreatePar" - + "ticipant\0224.google.cloud.dialogflow.v2.Cr" - + "eateParticipantRequest\032\'.google.cloud.di" - + "alogflow.v2.Participant\"\260\001\332A\022parent,part" - + "icipant\202\323\344\223\002\224\001\"4/v2/{parent=projects/*/c" - + "onversations/*}/participants:\013participan" - + "tZO\"@/v2/{parent=projects/*/locations/*/" + + "/Message\022\024\n\014context_size\030\003 \001(\005\"[\n\013Output" + + "Audio\022=\n\006config\030\001 \001(\0132-.google.cloud.dia" + + "logflow.v2.OutputAudioConfig\022\r\n\005audio\030\002 " + + "\001(\014\"\350\002\n\023AutomatedAgentReply\022P\n\026detect_in" + + "tent_response\030\001 \001(\01320.google.cloud.dialo" + + "gflow.v2.DetectIntentResponse\022k\n\032automat" + + "ed_agent_reply_type\030\007 \001(\0162G.google.cloud" + + ".dialogflow.v2.AutomatedAgentReply.Autom" + + "atedAgentReplyType\022\032\n\022allow_cancellation" + + "\030\010 \001(\010\022\027\n\017cx_current_page\030\013 \001(\t\"]\n\027Autom" + + "atedAgentReplyType\022*\n&AUTOMATED_AGENT_RE" + + "PLY_TYPE_UNSPECIFIED\020\000\022\013\n\007PARTIAL\020\001\022\t\n\005F" + + "INAL\020\002\"\344\001\n\rArticleAnswer\022\r\n\005title\030\001 \001(\t\022" + + "\013\n\003uri\030\002 \001(\t\022\020\n\010snippets\030\003 \003(\t\022\022\n\nconfid" + + "ence\030\004 \001(\002\022I\n\010metadata\030\005 \003(\01327.google.cl" + + "oud.dialogflow.v2.ArticleAnswer.Metadata" + + "Entry\022\025\n\ranswer_record\030\006 \001(\t\032/\n\rMetadata" + + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\340\001" + + "\n\tFaqAnswer\022\016\n\006answer\030\001 \001(\t\022\022\n\nconfidenc" + + "e\030\002 \001(\002\022\020\n\010question\030\003 \001(\t\022\016\n\006source\030\004 \001(" + + "\t\022E\n\010metadata\030\005 \003(\01323.google.cloud.dialo" + + "gflow.v2.FaqAnswer.MetadataEntry\022\025\n\ransw" + + "er_record\030\006 \001(\t\032/\n\rMetadataEntry\022\013\n\003key\030" + + "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"y\n\020SmartReplyAn" + + "swer\022\r\n\005reply\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\022" + + "B\n\ranswer_record\030\003 \001(\tB+\372A(\n&dialogflow." + + "googleapis.com/AnswerRecord\"\\\n\020IntentSug" + + "gestion\022\024\n\014display_name\030\001 \001(\t\022\023\n\tintent_" + + "v2\030\002 \001(\tH\000\022\023\n\013description\030\005 \001(\tB\010\n\006inten" + + "t\"\305\001\n\026DialogflowAssistAnswer\022?\n\014query_re" + + "sult\030\001 \001(\0132\'.google.cloud.dialogflow.v2." + + "QueryResultH\000\022I\n\021intent_suggestion\030\005 \001(\013" + + "2,.google.cloud.dialogflow.v2.IntentSugg" + + "estionH\000\022\025\n\ranswer_record\030\002 \001(\tB\010\n\006resul" + + "t\"\352\002\n\020SuggestionResult\022#\n\005error\030\001 \001(\0132\022." + + "google.rpc.StatusH\000\022X\n\031suggest_articles_" + + "response\030\002 \001(\01323.google.cloud.dialogflow" + + ".v2.SuggestArticlesResponseH\000\022]\n\034suggest" + + "_faq_answers_response\030\003 \001(\01325.google.clo" + + "ud.dialogflow.v2.SuggestFaqAnswersRespon" + + "seH\000\022a\n\036suggest_smart_replies_response\030\004" + + " \001(\01327.google.cloud.dialogflow.v2.Sugges" + + "tSmartRepliesResponseH\000B\025\n\023suggestion_re" + + "sponse\".\n\017InputTextConfig\022\033\n\rlanguage_co" + + "de\030\001 \001(\tB\004\342A\001\002\"j\n\024AnnotatedMessagePart\022\014" + + "\n\004text\030\001 \001(\t\022\023\n\013entity_type\030\002 \001(\t\022/\n\017for" + + "matted_value\030\003 \001(\0132\026.google.protobuf.Val" + + "ue\"n\n\021MessageAnnotation\022?\n\005parts\030\001 \003(\01320" + + ".google.cloud.dialogflow.v2.AnnotatedMes" + + "sagePart\022\030\n\020contain_entities\030\002 \001(\010\".\n\017Su" + + "ggestionInput\022\033\n\ranswer_record\030\001 \001(\tB\004\342A" + + "\001\002\"\315\001\n\025AssistQueryParameters\022s\n\032document" + + "s_metadata_filters\030\001 \003(\0132O.google.cloud." + + "dialogflow.v2.AssistQueryParameters.Docu" + + "mentsMetadataFiltersEntry\032?\n\035DocumentsMe" + + "tadataFiltersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" + + "\030\002 \001(\t:\0028\0012\372\025\n\014Participants\022\245\002\n\021CreatePa" + + "rticipant\0224.google.cloud.dialogflow.v2.C" + + "reateParticipantRequest\032\'.google.cloud.d" + + "ialogflow.v2.Participant\"\260\001\332A\022parent,par" + + "ticipant\202\323\344\223\002\224\001\"4/v2/{parent=projects/*/" + "conversations/*}/participants:\013participa" - + "nt\022\366\001\n\016GetParticipant\0221.google.cloud.dia" - + "logflow.v2.GetParticipantRequest\032\'.googl" - + "e.cloud.dialogflow.v2.Participant\"\207\001\332A\004n" - + "ame\202\323\344\223\002z\0224/v2/{name=projects/*/conversa" - + "tions/*/participants/*}ZB\022@/v2/{name=pro" - + "jects/*/locations/*/conversations/*/part" - + "icipants/*}\022\211\002\n\020ListParticipants\0223.googl" - + "e.cloud.dialogflow.v2.ListParticipantsRe" - + "quest\0324.google.cloud.dialogflow.v2.ListP" - + "articipantsResponse\"\211\001\332A\006parent\202\323\344\223\002z\0224/" - + "v2/{parent=projects/*/conversations/*}/p" - + "articipantsZB\022@/v2/{parent=projects/*/lo" - + "cations/*/conversations/*}/participants\022" - + "\302\002\n\021UpdateParticipant\0224.google.cloud.dia" - + "logflow.v2.UpdateParticipantRequest\032\'.go" - + "ogle.cloud.dialogflow.v2.Participant\"\315\001\332" - + "A\027participant,update_mask\202\323\344\223\002\254\0012@/v2/{p" - + "articipant.name=projects/*/conversations" - + "/*/participants/*}:\013participantZ[2L/v2/{" - + "participant.name=projects/*/locations/*/" - + "conversations/*/participants/*}:\013partici" - + "pant\022\340\002\n\016AnalyzeContent\0221.google.cloud.d" - + "ialogflow.v2.AnalyzeContentRequest\0322.goo" - + "gle.cloud.dialogflow.v2.AnalyzeContentRe" - + "sponse\"\346\001\332A\026participant,text_input\332A\027par" - + "ticipant,event_input\202\323\344\223\002\254\001\"J/v2/{partic" - + "ipant=projects/*/conversations/*/partici" - + "pants/*}:analyzeContent:\001*Z[\"V/v2/{parti" - + "cipant=projects/*/locations/*/conversati" - + "ons/*/participants/*}:analyzeContent:\001*\022" - + "\230\001\n\027StreamingAnalyzeContent\022:.google.clo" - + "ud.dialogflow.v2.StreamingAnalyzeContent" - + "Request\032;.google.cloud.dialogflow.v2.Str" - + "eamingAnalyzeContentResponse\"\000(\0010\001\022\311\002\n\017S" - + "uggestArticles\0222.google.cloud.dialogflow" - + ".v2.SuggestArticlesRequest\0323.google.clou" - + "d.dialogflow.v2.SuggestArticlesResponse\"" - + "\314\001\332A\006parent\202\323\344\223\002\274\001\"R/v2/{parent=projects" - + "/*/conversations/*/participants/*}/sugge" - + "stions:suggestArticles:\001*Zc\"^/v2/{parent" - + "=projects/*/locations/*/conversations/*/" - + "participants/*}/suggestions:suggestArtic" - + "les:\001*\022\323\002\n\021SuggestFaqAnswers\0224.google.cl" - + "oud.dialogflow.v2.SuggestFaqAnswersReque" - + "st\0325.google.cloud.dialogflow.v2.SuggestF" - + "aqAnswersResponse\"\320\001\332A\006parent\202\323\344\223\002\300\001\"T/v" - + "2/{parent=projects/*/conversations/*/par" - + "ticipants/*}/suggestions:suggestFaqAnswe" - + "rs:\001*Ze\"`/v2/{parent=projects/*/location" + + "ntZO\"@/v2/{parent=projects/*/locations/*" + + "/conversations/*}/participants:\013particip" + + "ant\022\366\001\n\016GetParticipant\0221.google.cloud.di" + + "alogflow.v2.GetParticipantRequest\032\'.goog" + + "le.cloud.dialogflow.v2.Participant\"\207\001\332A\004" + + "name\202\323\344\223\002z\0224/v2/{name=projects/*/convers" + + "ations/*/participants/*}ZB\022@/v2/{name=pr" + + "ojects/*/locations/*/conversations/*/par" + + "ticipants/*}\022\211\002\n\020ListParticipants\0223.goog" + + "le.cloud.dialogflow.v2.ListParticipantsR" + + "equest\0324.google.cloud.dialogflow.v2.List" + + "ParticipantsResponse\"\211\001\332A\006parent\202\323\344\223\002z\0224" + + "/v2/{parent=projects/*/conversations/*}/" + + "participantsZB\022@/v2/{parent=projects/*/l" + + "ocations/*/conversations/*}/participants" + + "\022\302\002\n\021UpdateParticipant\0224.google.cloud.di" + + "alogflow.v2.UpdateParticipantRequest\032\'.g" + + "oogle.cloud.dialogflow.v2.Participant\"\315\001" + + "\332A\027participant,update_mask\202\323\344\223\002\254\0012@/v2/{" + + "participant.name=projects/*/conversation" + + "s/*/participants/*}:\013participantZ[2L/v2/" + + "{participant.name=projects/*/locations/*" + + "/conversations/*/participants/*}:\013partic" + + "ipant\022\340\002\n\016AnalyzeContent\0221.google.cloud." + + "dialogflow.v2.AnalyzeContentRequest\0322.go" + + "ogle.cloud.dialogflow.v2.AnalyzeContentR" + + "esponse\"\346\001\332A\026participant,text_input\332A\027pa" + + "rticipant,event_input\202\323\344\223\002\254\001\"J/v2/{parti" + + "cipant=projects/*/conversations/*/partic" + + "ipants/*}:analyzeContent:\001*Z[\"V/v2/{part" + + "icipant=projects/*/locations/*/conversat" + + "ions/*/participants/*}:analyzeContent:\001*" + + "\022\230\001\n\027StreamingAnalyzeContent\022:.google.cl" + + "oud.dialogflow.v2.StreamingAnalyzeConten" + + "tRequest\032;.google.cloud.dialogflow.v2.St" + + "reamingAnalyzeContentResponse\"\000(\0010\001\022\311\002\n\017" + + "SuggestArticles\0222.google.cloud.dialogflo" + + "w.v2.SuggestArticlesRequest\0323.google.clo" + + "ud.dialogflow.v2.SuggestArticlesResponse" + + "\"\314\001\332A\006parent\202\323\344\223\002\274\001\"R/v2/{parent=project" + "s/*/conversations/*/participants/*}/sugg" - + "estions:suggestFaqAnswers:\001*\022\335\002\n\023Suggest" - + "SmartReplies\0226.google.cloud.dialogflow.v" - + "2.SuggestSmartRepliesRequest\0327.google.cl" - + "oud.dialogflow.v2.SuggestSmartRepliesRes" - + "ponse\"\324\001\332A\006parent\202\323\344\223\002\304\001\"V/v2/{parent=pr" - + "ojects/*/conversations/*/participants/*}" - + "/suggestions:suggestSmartReplies:\001*Zg\"b/" - + "v2/{parent=projects/*/locations/*/conver" - + "sations/*/participants/*}/suggestions:su" - + "ggestSmartReplies:\001*\032x\312A\031dialogflow.goog" - + "leapis.com\322AYhttps://www.googleapis.com/" - + "auth/cloud-platform,https://www.googleap" - + "is.com/auth/dialogflowB\231\001\n\036com.google.cl" - + "oud.dialogflow.v2B\020ParticipantProtoP\001Z>c" - + "loud.google.com/go/dialogflow/apiv2/dial" - + "ogflowpb;dialogflowpb\370\001\001\242\002\002DF\252\002\032Google.C" - + "loud.Dialogflow.V2b\006proto3" + + "estions:suggestArticles:\001*Zc\"^/v2/{paren" + + "t=projects/*/locations/*/conversations/*" + + "/participants/*}/suggestions:suggestArti" + + "cles:\001*\022\323\002\n\021SuggestFaqAnswers\0224.google.c" + + "loud.dialogflow.v2.SuggestFaqAnswersRequ" + + "est\0325.google.cloud.dialogflow.v2.Suggest" + + "FaqAnswersResponse\"\320\001\332A\006parent\202\323\344\223\002\300\001\"T/" + + "v2/{parent=projects/*/conversations/*/pa" + + "rticipants/*}/suggestions:suggestFaqAnsw" + + "ers:\001*Ze\"`/v2/{parent=projects/*/locatio" + + "ns/*/conversations/*/participants/*}/sug" + + "gestions:suggestFaqAnswers:\001*\022\335\002\n\023Sugges" + + "tSmartReplies\0226.google.cloud.dialogflow." + + "v2.SuggestSmartRepliesRequest\0327.google.c" + + "loud.dialogflow.v2.SuggestSmartRepliesRe" + + "sponse\"\324\001\332A\006parent\202\323\344\223\002\304\001\"V/v2/{parent=p" + + "rojects/*/conversations/*/participants/*" + + "}/suggestions:suggestSmartReplies:\001*Zg\"b" + + "/v2/{parent=projects/*/locations/*/conve" + + "rsations/*/participants/*}/suggestions:s" + + "uggestSmartReplies:\001*\032x\312A\031dialogflow.goo" + + "gleapis.com\322AYhttps://www.googleapis.com" + + "/auth/cloud-platform,https://www.googlea" + + "pis.com/auth/dialogflowB\231\001\n\036com.google.c" + + "loud.dialogflow.v2B\020ParticipantProtoP\001Z>" + + "cloud.google.com/go/dialogflow/apiv2/dia" + + "logflowpb;dialogflowpb\370\001\001\242\002\002DF\252\002\032Google." + + "Cloud.Dialogflow.V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -607,6 +608,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "QueryParams", "AssistQueryParams", "CxParameters", + "EnableExtendedStreaming", "EnablePartialAutomatedAgentReply", "EnableDebuggingInfo", "Config", diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/StreamingAnalyzeContentRequest.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/StreamingAnalyzeContentRequest.java index 84d4cdc5a01d..487027f53613 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/StreamingAnalyzeContentRequest.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/StreamingAnalyzeContentRequest.java @@ -765,6 +765,42 @@ public com.google.protobuf.StructOrBuilder getCxParametersOrBuilder() { return cxParameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : cxParameters_; } + public static final int ENABLE_EXTENDED_STREAMING_FIELD_NUMBER = 11; + private boolean enableExtendedStreaming_ = false; + /** + * + * + *
+   * Optional. Enable full bidirectional streaming. You can keep streaming the
+   * audio until timeout, and there's no need to half close the stream to get
+   * the response.
+   *
+   * Restrictions:
+   *
+   * - Timeout: 3 mins.
+   * - Audio Encoding: only supports
+   * [AudioEncoding.AUDIO_ENCODING_LINEAR_16][google.cloud.dialogflow.v2.AudioEncoding.AUDIO_ENCODING_LINEAR_16]
+   * and
+   * [AudioEncoding.AUDIO_ENCODING_MULAW][google.cloud.dialogflow.v2.AudioEncoding.AUDIO_ENCODING_MULAW]
+   * - Lifecycle: conversation should be in `Assist Stage`, go to
+   *   [Conversation.CreateConversation][] for more information.
+   *
+   * InvalidArgument Error will be returned if the one of restriction checks
+   * failed.
+   *
+   * You can find more details in
+   * https://cloud.google.com/agent-assist/docs/extended-streaming
+   * 
+ * + * bool enable_extended_streaming = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableExtendedStreaming. + */ + @java.lang.Override + public boolean getEnableExtendedStreaming() { + return enableExtendedStreaming_; + } + public static final int ENABLE_PARTIAL_AUTOMATED_AGENT_REPLY_FIELD_NUMBER = 12; private boolean enablePartialAutomatedAgentReply_ = false; /** @@ -846,6 +882,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (inputCase_ == 9) { output.writeMessage(9, (com.google.cloud.dialogflow.v2.TelephonyDtmfEvents) input_); } + if (enableExtendedStreaming_ != false) { + output.writeBool(11, enableExtendedStreaming_); + } if (enablePartialAutomatedAgentReply_ != false) { output.writeBool(12, enablePartialAutomatedAgentReply_); } @@ -899,6 +938,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 9, (com.google.cloud.dialogflow.v2.TelephonyDtmfEvents) input_); } + if (enableExtendedStreaming_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, enableExtendedStreaming_); + } if (enablePartialAutomatedAgentReply_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize( @@ -943,6 +985,7 @@ public boolean equals(final java.lang.Object obj) { if (hasCxParameters()) { if (!getCxParameters().equals(other.getCxParameters())) return false; } + if (getEnableExtendedStreaming() != other.getEnableExtendedStreaming()) return false; if (getEnablePartialAutomatedAgentReply() != other.getEnablePartialAutomatedAgentReply()) return false; if (getEnableDebuggingInfo() != other.getEnableDebuggingInfo()) return false; @@ -1000,6 +1043,8 @@ public int hashCode() { hash = (37 * hash) + CX_PARAMETERS_FIELD_NUMBER; hash = (53 * hash) + getCxParameters().hashCode(); } + hash = (37 * hash) + ENABLE_EXTENDED_STREAMING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableExtendedStreaming()); hash = (37 * hash) + ENABLE_PARTIAL_AUTOMATED_AGENT_REPLY_FIELD_NUMBER; hash = (53 * hash) @@ -1242,6 +1287,7 @@ public Builder clear() { cxParametersBuilder_.dispose(); cxParametersBuilder_ = null; } + enableExtendedStreaming_ = false; enablePartialAutomatedAgentReply_ = false; enableDebuggingInfo_ = false; configCase_ = 0; @@ -1309,9 +1355,12 @@ private void buildPartial0( cxParametersBuilder_ == null ? cxParameters_ : cxParametersBuilder_.build(); } if (((from_bitField0_ & 0x00000400) != 0)) { - result.enablePartialAutomatedAgentReply_ = enablePartialAutomatedAgentReply_; + result.enableExtendedStreaming_ = enableExtendedStreaming_; } if (((from_bitField0_ & 0x00000800) != 0)) { + result.enablePartialAutomatedAgentReply_ = enablePartialAutomatedAgentReply_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { result.enableDebuggingInfo_ = enableDebuggingInfo_; } } @@ -1397,6 +1446,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.v2.StreamingAnalyzeContentR if (other.hasCxParameters()) { mergeCxParameters(other.getCxParameters()); } + if (other.getEnableExtendedStreaming() != false) { + setEnableExtendedStreaming(other.getEnableExtendedStreaming()); + } if (other.getEnablePartialAutomatedAgentReply() != false) { setEnablePartialAutomatedAgentReply(other.getEnablePartialAutomatedAgentReply()); } @@ -1525,10 +1577,16 @@ public Builder mergeFrom( inputCase_ = 9; break; } // case 74 + case 88: + { + enableExtendedStreaming_ = input.readBool(); + bitField0_ |= 0x00000400; + break; + } // case 88 case 96: { enablePartialAutomatedAgentReply_ = input.readBool(); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; break; } // case 96 case 106: @@ -1540,7 +1598,7 @@ public Builder mergeFrom( case 152: { enableDebuggingInfo_ = input.readBool(); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; break; } // case 152 default: @@ -3426,6 +3484,113 @@ public com.google.protobuf.StructOrBuilder getCxParametersOrBuilder() { return cxParametersBuilder_; } + private boolean enableExtendedStreaming_; + /** + * + * + *
+     * Optional. Enable full bidirectional streaming. You can keep streaming the
+     * audio until timeout, and there's no need to half close the stream to get
+     * the response.
+     *
+     * Restrictions:
+     *
+     * - Timeout: 3 mins.
+     * - Audio Encoding: only supports
+     * [AudioEncoding.AUDIO_ENCODING_LINEAR_16][google.cloud.dialogflow.v2.AudioEncoding.AUDIO_ENCODING_LINEAR_16]
+     * and
+     * [AudioEncoding.AUDIO_ENCODING_MULAW][google.cloud.dialogflow.v2.AudioEncoding.AUDIO_ENCODING_MULAW]
+     * - Lifecycle: conversation should be in `Assist Stage`, go to
+     *   [Conversation.CreateConversation][] for more information.
+     *
+     * InvalidArgument Error will be returned if the one of restriction checks
+     * failed.
+     *
+     * You can find more details in
+     * https://cloud.google.com/agent-assist/docs/extended-streaming
+     * 
+ * + * bool enable_extended_streaming = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableExtendedStreaming. + */ + @java.lang.Override + public boolean getEnableExtendedStreaming() { + return enableExtendedStreaming_; + } + /** + * + * + *
+     * Optional. Enable full bidirectional streaming. You can keep streaming the
+     * audio until timeout, and there's no need to half close the stream to get
+     * the response.
+     *
+     * Restrictions:
+     *
+     * - Timeout: 3 mins.
+     * - Audio Encoding: only supports
+     * [AudioEncoding.AUDIO_ENCODING_LINEAR_16][google.cloud.dialogflow.v2.AudioEncoding.AUDIO_ENCODING_LINEAR_16]
+     * and
+     * [AudioEncoding.AUDIO_ENCODING_MULAW][google.cloud.dialogflow.v2.AudioEncoding.AUDIO_ENCODING_MULAW]
+     * - Lifecycle: conversation should be in `Assist Stage`, go to
+     *   [Conversation.CreateConversation][] for more information.
+     *
+     * InvalidArgument Error will be returned if the one of restriction checks
+     * failed.
+     *
+     * You can find more details in
+     * https://cloud.google.com/agent-assist/docs/extended-streaming
+     * 
+ * + * bool enable_extended_streaming = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enableExtendedStreaming to set. + * @return This builder for chaining. + */ + public Builder setEnableExtendedStreaming(boolean value) { + + enableExtendedStreaming_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Enable full bidirectional streaming. You can keep streaming the
+     * audio until timeout, and there's no need to half close the stream to get
+     * the response.
+     *
+     * Restrictions:
+     *
+     * - Timeout: 3 mins.
+     * - Audio Encoding: only supports
+     * [AudioEncoding.AUDIO_ENCODING_LINEAR_16][google.cloud.dialogflow.v2.AudioEncoding.AUDIO_ENCODING_LINEAR_16]
+     * and
+     * [AudioEncoding.AUDIO_ENCODING_MULAW][google.cloud.dialogflow.v2.AudioEncoding.AUDIO_ENCODING_MULAW]
+     * - Lifecycle: conversation should be in `Assist Stage`, go to
+     *   [Conversation.CreateConversation][] for more information.
+     *
+     * InvalidArgument Error will be returned if the one of restriction checks
+     * failed.
+     *
+     * You can find more details in
+     * https://cloud.google.com/agent-assist/docs/extended-streaming
+     * 
+ * + * bool enable_extended_streaming = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnableExtendedStreaming() { + bitField0_ = (bitField0_ & ~0x00000400); + enableExtendedStreaming_ = false; + onChanged(); + return this; + } + private boolean enablePartialAutomatedAgentReply_; /** * @@ -3463,7 +3628,7 @@ public boolean getEnablePartialAutomatedAgentReply() { public Builder setEnablePartialAutomatedAgentReply(boolean value) { enablePartialAutomatedAgentReply_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -3482,7 +3647,7 @@ public Builder setEnablePartialAutomatedAgentReply(boolean value) { * @return This builder for chaining. */ public Builder clearEnablePartialAutomatedAgentReply() { - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); enablePartialAutomatedAgentReply_ = false; onChanged(); return this; @@ -3521,7 +3686,7 @@ public boolean getEnableDebuggingInfo() { public Builder setEnableDebuggingInfo(boolean value) { enableDebuggingInfo_ = value; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -3538,7 +3703,7 @@ public Builder setEnableDebuggingInfo(boolean value) { * @return This builder for chaining. */ public Builder clearEnableDebuggingInfo() { - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00001000); enableDebuggingInfo_ = false; onChanged(); return this; diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/StreamingAnalyzeContentRequestOrBuilder.java b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/StreamingAnalyzeContentRequestOrBuilder.java index e93c754f82c8..1aae2de18f11 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/StreamingAnalyzeContentRequestOrBuilder.java +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/StreamingAnalyzeContentRequestOrBuilder.java @@ -412,6 +412,37 @@ public interface StreamingAnalyzeContentRequestOrBuilder */ com.google.protobuf.StructOrBuilder getCxParametersOrBuilder(); + /** + * + * + *
+   * Optional. Enable full bidirectional streaming. You can keep streaming the
+   * audio until timeout, and there's no need to half close the stream to get
+   * the response.
+   *
+   * Restrictions:
+   *
+   * - Timeout: 3 mins.
+   * - Audio Encoding: only supports
+   * [AudioEncoding.AUDIO_ENCODING_LINEAR_16][google.cloud.dialogflow.v2.AudioEncoding.AUDIO_ENCODING_LINEAR_16]
+   * and
+   * [AudioEncoding.AUDIO_ENCODING_MULAW][google.cloud.dialogflow.v2.AudioEncoding.AUDIO_ENCODING_MULAW]
+   * - Lifecycle: conversation should be in `Assist Stage`, go to
+   *   [Conversation.CreateConversation][] for more information.
+   *
+   * InvalidArgument Error will be returned if the one of restriction checks
+   * failed.
+   *
+   * You can find more details in
+   * https://cloud.google.com/agent-assist/docs/extended-streaming
+   * 
+ * + * bool enable_extended_streaming = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableExtendedStreaming. + */ + boolean getEnableExtendedStreaming(); + /** * * diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/participant.proto b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/participant.proto index 97c2e1d4687a..b601dc5f4ee1 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/participant.proto +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/participant.proto @@ -605,6 +605,27 @@ message StreamingAnalyzeContentRequest { // CX agent. google.protobuf.Struct cx_parameters = 13; + // Optional. Enable full bidirectional streaming. You can keep streaming the + // audio until timeout, and there's no need to half close the stream to get + // the response. + // + // Restrictions: + // + // - Timeout: 3 mins. + // - Audio Encoding: only supports + // [AudioEncoding.AUDIO_ENCODING_LINEAR_16][google.cloud.dialogflow.v2.AudioEncoding.AUDIO_ENCODING_LINEAR_16] + // and + // [AudioEncoding.AUDIO_ENCODING_MULAW][google.cloud.dialogflow.v2.AudioEncoding.AUDIO_ENCODING_MULAW] + // - Lifecycle: conversation should be in `Assist Stage`, go to + // [Conversation.CreateConversation][] for more information. + // + // InvalidArgument Error will be returned if the one of restriction checks + // failed. + // + // You can find more details in + // https://cloud.google.com/agent-assist/docs/extended-streaming + bool enable_extended_streaming = 11 [(google.api.field_behavior) = OPTIONAL]; + // 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 diff --git a/java-dialogflow/samples/snippets/generated/com/google/cloud/dialogflow/v2/participants/streaminganalyzecontent/AsyncStreamingAnalyzeContent.java b/java-dialogflow/samples/snippets/generated/com/google/cloud/dialogflow/v2/participants/streaminganalyzecontent/AsyncStreamingAnalyzeContent.java index 9e48c17ea252..acd6183d59f6 100644 --- a/java-dialogflow/samples/snippets/generated/com/google/cloud/dialogflow/v2/participants/streaminganalyzecontent/AsyncStreamingAnalyzeContent.java +++ b/java-dialogflow/samples/snippets/generated/com/google/cloud/dialogflow/v2/participants/streaminganalyzecontent/AsyncStreamingAnalyzeContent.java @@ -52,6 +52,7 @@ public static void asyncStreamingAnalyzeContent() throws Exception { .setQueryParams(QueryParameters.newBuilder().build()) .setAssistQueryParams(AssistQueryParameters.newBuilder().build()) .setCxParameters(Struct.newBuilder().build()) + .setEnableExtendedStreaming(true) .setEnablePartialAutomatedAgentReply(true) .setEnableDebuggingInfo(true) .build();