From 15612864f186cc2a82ff3669735237f439e5314e Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 2 Mar 2021 16:10:00 -0800 Subject: [PATCH] feat: allow to disable webhook invocation per request PiperOrigin-RevId: 360468675 Source-Author: Google APIs Source-Date: Tue Mar 2 11:03:03 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: a031936991b3baac2d62f91acf891d3dbac18753 Source-Link: https://github.com/googleapis/googleapis/commit/a031936991b3baac2d62f91acf891d3dbac18753 --- .../dialogflow/cx/v3/QueryParameters.java | 90 +++++++ .../cx/v3/QueryParametersOrBuilder.java | 13 + .../dialogflow/cx/v3/ResponseMessage.java | 36 +-- .../cx/v3/ResponseMessageOrBuilder.java | 9 +- .../cloud/dialogflow/cx/v3/SessionProto.java | 230 +++++++++--------- .../cloud/dialogflow/cx/v3/audio_config.proto | 50 ++-- .../dialogflow/cx/v3/response_message.proto | 4 +- .../cloud/dialogflow/cx/v3/session.proto | 3 + synth.metadata | 10 +- 9 files changed, 269 insertions(+), 176 deletions(-) diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParameters.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParameters.java index 8beba634a..165395924 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParameters.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParameters.java @@ -133,6 +133,11 @@ private QueryParameters( parameters_ = subBuilder.buildPartial(); } + break; + } + case 56: + { + disableWebhook_ = input.readBool(); break; } case 64: @@ -535,6 +540,24 @@ public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { return getParameters(); } + public static final int DISABLE_WEBHOOK_FIELD_NUMBER = 7; + private boolean disableWebhook_; + /** + * + * + *
+   * Whether to disable webhook calls for this request.
+   * 
+ * + * bool disable_webhook = 7; + * + * @return The disableWebhook. + */ + @java.lang.Override + public boolean getDisableWebhook() { + return disableWebhook_; + } + public static final int ANALYZE_QUERY_TEXT_SENTIMENT_FIELD_NUMBER = 8; private boolean analyzeQueryTextSentiment_; /** @@ -712,6 +735,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (parameters_ != null) { output.writeMessage(5, getParameters()); } + if (disableWebhook_ != false) { + output.writeBool(7, disableWebhook_); + } if (analyzeQueryTextSentiment_ != false) { output.writeBool(8, analyzeQueryTextSentiment_); } @@ -742,6 +768,9 @@ public int getSerializedSize() { if (parameters_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getParameters()); } + if (disableWebhook_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, disableWebhook_); + } if (analyzeQueryTextSentiment_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, analyzeQueryTextSentiment_); } @@ -785,6 +814,7 @@ public boolean equals(final java.lang.Object obj) { if (hasParameters()) { if (!getParameters().equals(other.getParameters())) return false; } + if (getDisableWebhook() != other.getDisableWebhook()) return false; if (getAnalyzeQueryTextSentiment() != other.getAnalyzeQueryTextSentiment()) return false; if (!internalGetWebhookHeaders().equals(other.internalGetWebhookHeaders())) return false; if (!unknownFields.equals(other.unknownFields)) return false; @@ -816,6 +846,8 @@ public int hashCode() { hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; hash = (53 * hash) + getParameters().hashCode(); } + hash = (37 * hash) + DISABLE_WEBHOOK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableWebhook()); hash = (37 * hash) + ANALYZE_QUERY_TEXT_SENTIMENT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAnalyzeQueryTextSentiment()); if (!internalGetWebhookHeaders().getMap().isEmpty()) { @@ -1015,6 +1047,8 @@ public Builder clear() { parameters_ = null; parametersBuilder_ = null; } + disableWebhook_ = false; + analyzeQueryTextSentiment_ = false; internalGetMutableWebhookHeaders().clear(); @@ -1071,6 +1105,7 @@ public com.google.cloud.dialogflow.cx.v3.QueryParameters buildPartial() { } else { result.parameters_ = parametersBuilder_.build(); } + result.disableWebhook_ = disableWebhook_; result.analyzeQueryTextSentiment_ = analyzeQueryTextSentiment_; result.webhookHeaders_ = internalGetWebhookHeaders(); result.webhookHeaders_.makeImmutable(); @@ -1164,6 +1199,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.QueryParameters other if (other.hasParameters()) { mergeParameters(other.getParameters()); } + if (other.getDisableWebhook() != false) { + setDisableWebhook(other.getDisableWebhook()); + } if (other.getAnalyzeQueryTextSentiment() != false) { setAnalyzeQueryTextSentiment(other.getAnalyzeQueryTextSentiment()); } @@ -2425,6 +2463,58 @@ public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { return parametersBuilder_; } + private boolean disableWebhook_; + /** + * + * + *
+     * Whether to disable webhook calls for this request.
+     * 
+ * + * bool disable_webhook = 7; + * + * @return The disableWebhook. + */ + @java.lang.Override + public boolean getDisableWebhook() { + return disableWebhook_; + } + /** + * + * + *
+     * Whether to disable webhook calls for this request.
+     * 
+ * + * bool disable_webhook = 7; + * + * @param value The disableWebhook to set. + * @return This builder for chaining. + */ + public Builder setDisableWebhook(boolean value) { + + disableWebhook_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether to disable webhook calls for this request.
+     * 
+ * + * bool disable_webhook = 7; + * + * @return This builder for chaining. + */ + public Builder clearDisableWebhook() { + + disableWebhook_ = false; + onChanged(); + return this; + } + private boolean analyzeQueryTextSentiment_; /** * diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParametersOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParametersOrBuilder.java index 37ce2709c..bb027f3da 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParametersOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParametersOrBuilder.java @@ -278,6 +278,19 @@ com.google.cloud.dialogflow.cx.v3.SessionEntityTypeOrBuilder getSessionEntityTyp */ com.google.protobuf.StructOrBuilder getParametersOrBuilder(); + /** + * + * + *
+   * Whether to disable webhook calls for this request.
+   * 
+ * + * bool disable_webhook = 7; + * + * @return The disableWebhook. + */ + boolean getDisableWebhook(); + /** * * diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java index 92e3a2635..eca584e0a 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java @@ -7796,8 +7796,7 @@ public com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff getLiv * Output only. A signal that indicates the interaction with the Dialogflow agent has * ended. * This message is generated by Dialogflow only when the conversation - * reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be - * defined by the user. + * reaches `END_SESSION` page. It is not supposed to be defined by the user. * It's guaranteed that there is at most one such message in each response. * * @@ -7818,8 +7817,7 @@ public boolean hasEndInteraction() { * Output only. A signal that indicates the interaction with the Dialogflow agent has * ended. * This message is generated by Dialogflow only when the conversation - * reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be - * defined by the user. + * reaches `END_SESSION` page. It is not supposed to be defined by the user. * It's guaranteed that there is at most one such message in each response. * * @@ -7843,8 +7841,7 @@ public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction getEndIn * Output only. A signal that indicates the interaction with the Dialogflow agent has * ended. * This message is generated by Dialogflow only when the conversation - * reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be - * defined by the user. + * reaches `END_SESSION` page. It is not supposed to be defined by the user. * It's guaranteed that there is at most one such message in each response. * * @@ -9706,8 +9703,7 @@ public Builder clearLiveAgentHandoff() { * Output only. A signal that indicates the interaction with the Dialogflow agent has * ended. * This message is generated by Dialogflow only when the conversation - * reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be - * defined by the user. + * reaches `END_SESSION` page. It is not supposed to be defined by the user. * It's guaranteed that there is at most one such message in each response. * * @@ -9728,8 +9724,7 @@ public boolean hasEndInteraction() { * Output only. A signal that indicates the interaction with the Dialogflow agent has * ended. * This message is generated by Dialogflow only when the conversation - * reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be - * defined by the user. + * reaches `END_SESSION` page. It is not supposed to be defined by the user. * It's guaranteed that there is at most one such message in each response. * * @@ -9762,8 +9757,7 @@ public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction getEndIn * Output only. A signal that indicates the interaction with the Dialogflow agent has * ended. * This message is generated by Dialogflow only when the conversation - * reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be - * defined by the user. + * reaches `END_SESSION` page. It is not supposed to be defined by the user. * It's guaranteed that there is at most one such message in each response. * * @@ -9792,8 +9786,7 @@ public Builder setEndInteraction( * Output only. A signal that indicates the interaction with the Dialogflow agent has * ended. * This message is generated by Dialogflow only when the conversation - * reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be - * defined by the user. + * reaches `END_SESSION` page. It is not supposed to be defined by the user. * It's guaranteed that there is at most one such message in each response. * * @@ -9819,8 +9812,7 @@ public Builder setEndInteraction( * Output only. A signal that indicates the interaction with the Dialogflow agent has * ended. * This message is generated by Dialogflow only when the conversation - * reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be - * defined by the user. + * reaches `END_SESSION` page. It is not supposed to be defined by the user. * It's guaranteed that there is at most one such message in each response. * * @@ -9860,8 +9852,7 @@ public Builder mergeEndInteraction( * Output only. A signal that indicates the interaction with the Dialogflow agent has * ended. * This message is generated by Dialogflow only when the conversation - * reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be - * defined by the user. + * reaches `END_SESSION` page. It is not supposed to be defined by the user. * It's guaranteed that there is at most one such message in each response. * * @@ -9892,8 +9883,7 @@ public Builder clearEndInteraction() { * Output only. A signal that indicates the interaction with the Dialogflow agent has * ended. * This message is generated by Dialogflow only when the conversation - * reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be - * defined by the user. + * reaches `END_SESSION` page. It is not supposed to be defined by the user. * It's guaranteed that there is at most one such message in each response. * * @@ -9912,8 +9902,7 @@ public Builder clearEndInteraction() { * Output only. A signal that indicates the interaction with the Dialogflow agent has * ended. * This message is generated by Dialogflow only when the conversation - * reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be - * defined by the user. + * reaches `END_SESSION` page. It is not supposed to be defined by the user. * It's guaranteed that there is at most one such message in each response. * * @@ -9941,8 +9930,7 @@ public Builder clearEndInteraction() { * Output only. A signal that indicates the interaction with the Dialogflow agent has * ended. * This message is generated by Dialogflow only when the conversation - * reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be - * defined by the user. + * reaches `END_SESSION` page. It is not supposed to be defined by the user. * It's guaranteed that there is at most one such message in each response. * * diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageOrBuilder.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageOrBuilder.java index 1ede17ede..b87297f3e 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageOrBuilder.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageOrBuilder.java @@ -223,8 +223,7 @@ public interface ResponseMessageOrBuilder * Output only. A signal that indicates the interaction with the Dialogflow agent has * ended. * This message is generated by Dialogflow only when the conversation - * reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be - * defined by the user. + * reaches `END_SESSION` page. It is not supposed to be defined by the user. * It's guaranteed that there is at most one such message in each response. * * @@ -242,8 +241,7 @@ public interface ResponseMessageOrBuilder * Output only. A signal that indicates the interaction with the Dialogflow agent has * ended. * This message is generated by Dialogflow only when the conversation - * reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be - * defined by the user. + * reaches `END_SESSION` page. It is not supposed to be defined by the user. * It's guaranteed that there is at most one such message in each response. * * @@ -261,8 +259,7 @@ public interface ResponseMessageOrBuilder * Output only. A signal that indicates the interaction with the Dialogflow agent has * ended. * This message is generated by Dialogflow only when the conversation - * reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be - * defined by the user. + * reaches `END_SESSION` page. It is not supposed to be defined by the user. * It's guaranteed that there is at most one such message in each response. * * diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionProto.java b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionProto.java index 377ecdd10..65bb30057 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionProto.java +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionProto.java @@ -167,125 +167,126 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ch_end_offset\030\010 \001(\0132\031.google.protobuf.Du" + "ration\"X\n\013MessageType\022\034\n\030MESSAGE_TYPE_UN" + "SPECIFIED\020\000\022\016\n\nTRANSCRIPT\020\001\022\033\n\027END_OF_SI" - + "NGLE_UTTERANCE\020\002\"\260\003\n\017QueryParameters\022\021\n\t" + + "NGLE_UTTERANCE\020\002\"\311\003\n\017QueryParameters\022\021\n\t" + "time_zone\030\001 \001(\t\022)\n\014geo_location\030\002 \001(\0132\023." + "google.type.LatLng\022N\n\024session_entity_typ" + "es\030\003 \003(\01320.google.cloud.dialogflow.cx.v3" + ".SessionEntityType\022(\n\007payload\030\004 \001(\0132\027.go" + "ogle.protobuf.Struct\022+\n\nparameters\030\005 \001(\013" - + "2\027.google.protobuf.Struct\022$\n\034analyze_que" - + "ry_text_sentiment\030\010 \001(\010\022[\n\017webhook_heade" - + "rs\030\n \003(\0132B.google.cloud.dialogflow.cx.v3" - + ".QueryParameters.WebhookHeadersEntry\0325\n\023" - + "WebhookHeadersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" - + "e\030\002 \001(\t:\0028\001\"\333\002\n\nQueryInput\0228\n\004text\030\002 \001(\013" - + "2(.google.cloud.dialogflow.cx.v3.TextInp" - + "utH\000\022<\n\006intent\030\003 \001(\0132*.google.cloud.dial" - + "ogflow.cx.v3.IntentInputH\000\022:\n\005audio\030\005 \001(" - + "\0132).google.cloud.dialogflow.cx.v3.AudioI" - + "nputH\000\022:\n\005event\030\006 \001(\0132).google.cloud.dia" - + "logflow.cx.v3.EventInputH\000\0228\n\004dtmf\030\007 \001(\013" - + "2(.google.cloud.dialogflow.cx.v3.DtmfInp" - + "utH\000\022\032\n\rlanguage_code\030\004 \001(\tB\003\340A\002B\007\n\005inpu" - + "t\"\300\005\n\013QueryResult\022\016\n\004text\030\001 \001(\tH\000\022\030\n\016tri" - + "gger_intent\030\013 \001(\tH\000\022\024\n\ntranscript\030\014 \001(\tH" - + "\000\022\027\n\rtrigger_event\030\016 \001(\tH\000\022\025\n\rlanguage_c" - + "ode\030\002 \001(\t\022+\n\nparameters\030\003 \001(\0132\027.google.p" - + "rotobuf.Struct\022I\n\021response_messages\030\004 \003(" - + "\0132..google.cloud.dialogflow.cx.v3.Respon" - + "seMessage\022,\n\020webhook_statuses\030\r \003(\0132\022.go" - + "ogle.rpc.Status\0221\n\020webhook_payloads\030\006 \003(" - + "\0132\027.google.protobuf.Struct\0229\n\014current_pa" - + "ge\030\007 \001(\0132#.google.cloud.dialogflow.cx.v3" - + ".Page\0229\n\006intent\030\010 \001(\0132%.google.cloud.dia" - + "logflow.cx.v3.IntentB\002\030\001\022\'\n\033intent_detec" - + "tion_confidence\030\t \001(\002B\002\030\001\0223\n\005match\030\017 \001(\013" - + "2$.google.cloud.dialogflow.cx.v3.Match\0220" - + "\n\017diagnostic_info\030\n \001(\0132\027.google.protobu" - + "f.Struct\022Y\n\031sentiment_analysis_result\030\021 " - + "\001(\01326.google.cloud.dialogflow.cx.v3.Sent" - + "imentAnalysisResultB\007\n\005query\"\036\n\tTextInpu" - + "t\022\021\n\004text\030\001 \001(\tB\003\340A\002\"G\n\013IntentInput\0228\n\006i" - + "ntent\030\001 \001(\tB(\340A\002\372A\"\n dialogflow.googleap" - + "is.com/Intent\"a\n\nAudioInput\022D\n\006config\030\001 " - + "\001(\0132/.google.cloud.dialogflow.cx.v3.Inpu" - + "tAudioConfigB\003\340A\002\022\r\n\005audio\030\002 \001(\014\"\033\n\nEven" - + "tInput\022\r\n\005event\030\001 \001(\t\"1\n\tDtmfInput\022\016\n\006di" - + "gits\030\001 \001(\t\022\024\n\014finish_digit\030\002 \001(\t\"\361\002\n\005Mat" - + "ch\0225\n\006intent\030\001 \001(\0132%.google.cloud.dialog" - + "flow.cx.v3.Intent\022\r\n\005event\030\006 \001(\t\022+\n\npara" - + "meters\030\002 \001(\0132\027.google.protobuf.Struct\022\026\n" - + "\016resolved_input\030\003 \001(\t\022B\n\nmatch_type\030\004 \001(" - + "\0162..google.cloud.dialogflow.cx.v3.Match." - + "MatchType\022\022\n\nconfidence\030\005 \001(\002\"\204\001\n\tMatchT" - + "ype\022\032\n\026MATCH_TYPE_UNSPECIFIED\020\000\022\n\n\006INTEN" - + "T\020\001\022\021\n\rDIRECT_INTENT\020\002\022\025\n\021PARAMETER_FILL" - + "ING\020\003\022\014\n\010NO_MATCH\020\004\022\014\n\010NO_INPUT\020\005\022\t\n\005EVE" - + "NT\020\006\"\333\001\n\022MatchIntentRequest\022:\n\007session\030\001" - + " \001(\tB)\340A\002\372A#\n!dialogflow.googleapis.com/" - + "Session\022D\n\014query_params\030\002 \001(\0132..google.c" - + "loud.dialogflow.cx.v3.QueryParameters\022C\n" - + "\013query_input\030\003 \001(\0132).google.cloud.dialog" - + "flow.cx.v3.QueryInputB\003\340A\002\"\351\001\n\023MatchInte" - + "ntResponse\022\016\n\004text\030\001 \001(\tH\000\022\030\n\016trigger_in" - + "tent\030\002 \001(\tH\000\022\024\n\ntranscript\030\003 \001(\tH\000\022\027\n\rtr" - + "igger_event\030\006 \001(\tH\000\0225\n\007matches\030\004 \003(\0132$.g" - + "oogle.cloud.dialogflow.cx.v3.Match\0229\n\014cu" - + "rrent_page\030\005 \001(\0132#.google.cloud.dialogfl" - + "ow.cx.v3.PageB\007\n\005query\"\353\001\n\024FulfillIntent" - + "Request\022O\n\024match_intent_request\030\001 \001(\01321." - + "google.cloud.dialogflow.cx.v3.MatchInten" - + "tRequest\0223\n\005match\030\002 \001(\0132$.google.cloud.d" - + "ialogflow.cx.v3.Match\022M\n\023output_audio_co" - + "nfig\030\003 \001(\01320.google.cloud.dialogflow.cx." - + "v3.OutputAudioConfig\"\323\001\n\025FulfillIntentRe" - + "sponse\022\023\n\013response_id\030\001 \001(\t\022@\n\014query_res" - + "ult\030\002 \001(\0132*.google.cloud.dialogflow.cx.v" - + "3.QueryResult\022\024\n\014output_audio\030\003 \001(\014\022M\n\023o" - + "utput_audio_config\030\004 \001(\01320.google.cloud." - + "dialogflow.cx.v3.OutputAudioConfig\";\n\027Se" - + "ntimentAnalysisResult\022\r\n\005score\030\001 \001(\002\022\021\n\t" - + "magnitude\030\002 \001(\0022\304\t\n\010Sessions\022\246\002\n\014DetectI" - + "ntent\0222.google.cloud.dialogflow.cx.v3.De" - + "tectIntentRequest\0323.google.cloud.dialogf" - + "low.cx.v3.DetectIntentResponse\"\254\001\202\323\344\223\002\245\001" - + "\"E/v3/{session=projects/*/locations/*/ag" - + "ents/*/sessions/*}:detectIntent:\001*ZY\"T/v" - + "3/{session=projects/*/locations/*/agents" - + "/*/environments/*/sessions/*}:detectInte" - + "nt:\001*\022\230\001\n\025StreamingDetectIntent\022;.google" - + ".cloud.dialogflow.cx.v3.StreamingDetectI" - + "ntentRequest\032<.google.cloud.dialogflow.c" - + "x.v3.StreamingDetectIntentResponse\"\000(\0010\001" - + "\022\241\002\n\013MatchIntent\0221.google.cloud.dialogfl" - + "ow.cx.v3.MatchIntentRequest\0322.google.clo" - + "ud.dialogflow.cx.v3.MatchIntentResponse\"" - + "\252\001\202\323\344\223\002\243\001\"D/v3/{session=projects/*/locat" - + "ions/*/agents/*/sessions/*}:matchIntent:" - + "\001*ZX\"S/v3/{session=projects/*/locations/" - + "*/agents/*/environments/*/sessions/*}:ma" - + "tchIntent:\001*\022\325\002\n\rFulfillIntent\0223.google." - + "cloud.dialogflow.cx.v3.FulfillIntentRequ" - + "est\0324.google.cloud.dialogflow.cx.v3.Fulf" - + "illIntentResponse\"\330\001\202\323\344\223\002\321\001\"[/v3/{match_" - + "intent_request.session=projects/*/locati" - + "ons/*/agents/*/sessions/*}:fulfillIntent" - + ":\001*Zo\"j/v3/{match_intent_request.session" - + "=projects/*/locations/*/agents/*/environ" - + "ments/*/sessions/*}:fulfillIntent:\001*\032x\312A" - + "\031dialogflow.googleapis.com\322AYhttps://www" - + ".googleapis.com/auth/cloud-platform,http" - + "s://www.googleapis.com/auth/dialogflowB\364" - + "\002\n!com.google.cloud.dialogflow.cx.v3B\014Se" - + "ssionProtoP\001Z?google.golang.org/genproto" - + "/googleapis/cloud/dialogflow/cx/v3;cx\370\001\001" - + "\242\002\002DF\252\002\035Google.Cloud.Dialogflow.Cx.V3\352A\324" - + "\001\n!dialogflow.googleapis.com/Session\022Ipr" - + "ojects/{project}/locations/{location}/ag" - + "ents/{agent}/sessions/{session}\022dproject" - + "s/{project}/locations/{location}/agents/" - + "{agent}/environments/{environment}/sessi" - + "ons/{session}b\006proto3" + + "2\027.google.protobuf.Struct\022\027\n\017disable_web" + + "hook\030\007 \001(\010\022$\n\034analyze_query_text_sentime" + + "nt\030\010 \001(\010\022[\n\017webhook_headers\030\n \003(\0132B.goog" + + "le.cloud.dialogflow.cx.v3.QueryParameter" + + "s.WebhookHeadersEntry\0325\n\023WebhookHeadersE" + + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\333\002\n" + + "\nQueryInput\0228\n\004text\030\002 \001(\0132(.google.cloud" + + ".dialogflow.cx.v3.TextInputH\000\022<\n\006intent\030" + + "\003 \001(\0132*.google.cloud.dialogflow.cx.v3.In" + + "tentInputH\000\022:\n\005audio\030\005 \001(\0132).google.clou" + + "d.dialogflow.cx.v3.AudioInputH\000\022:\n\005event" + + "\030\006 \001(\0132).google.cloud.dialogflow.cx.v3.E" + + "ventInputH\000\0228\n\004dtmf\030\007 \001(\0132(.google.cloud" + + ".dialogflow.cx.v3.DtmfInputH\000\022\032\n\rlanguag" + + "e_code\030\004 \001(\tB\003\340A\002B\007\n\005input\"\300\005\n\013QueryResu" + + "lt\022\016\n\004text\030\001 \001(\tH\000\022\030\n\016trigger_intent\030\013 \001" + + "(\tH\000\022\024\n\ntranscript\030\014 \001(\tH\000\022\027\n\rtrigger_ev" + + "ent\030\016 \001(\tH\000\022\025\n\rlanguage_code\030\002 \001(\t\022+\n\npa" + + "rameters\030\003 \001(\0132\027.google.protobuf.Struct\022" + + "I\n\021response_messages\030\004 \003(\0132..google.clou" + + "d.dialogflow.cx.v3.ResponseMessage\022,\n\020we" + + "bhook_statuses\030\r \003(\0132\022.google.rpc.Status" + + "\0221\n\020webhook_payloads\030\006 \003(\0132\027.google.prot" + + "obuf.Struct\0229\n\014current_page\030\007 \001(\0132#.goog" + + "le.cloud.dialogflow.cx.v3.Page\0229\n\006intent" + + "\030\010 \001(\0132%.google.cloud.dialogflow.cx.v3.I" + + "ntentB\002\030\001\022\'\n\033intent_detection_confidence" + + "\030\t \001(\002B\002\030\001\0223\n\005match\030\017 \001(\0132$.google.cloud" + + ".dialogflow.cx.v3.Match\0220\n\017diagnostic_in" + + "fo\030\n \001(\0132\027.google.protobuf.Struct\022Y\n\031sen" + + "timent_analysis_result\030\021 \001(\01326.google.cl" + + "oud.dialogflow.cx.v3.SentimentAnalysisRe" + + "sultB\007\n\005query\"\036\n\tTextInput\022\021\n\004text\030\001 \001(\t" + + "B\003\340A\002\"G\n\013IntentInput\0228\n\006intent\030\001 \001(\tB(\340A" + + "\002\372A\"\n dialogflow.googleapis.com/Intent\"a" + + "\n\nAudioInput\022D\n\006config\030\001 \001(\0132/.google.cl" + + "oud.dialogflow.cx.v3.InputAudioConfigB\003\340" + + "A\002\022\r\n\005audio\030\002 \001(\014\"\033\n\nEventInput\022\r\n\005event" + + "\030\001 \001(\t\"1\n\tDtmfInput\022\016\n\006digits\030\001 \001(\t\022\024\n\014f" + + "inish_digit\030\002 \001(\t\"\361\002\n\005Match\0225\n\006intent\030\001 " + + "\001(\0132%.google.cloud.dialogflow.cx.v3.Inte" + + "nt\022\r\n\005event\030\006 \001(\t\022+\n\nparameters\030\002 \001(\0132\027." + + "google.protobuf.Struct\022\026\n\016resolved_input" + + "\030\003 \001(\t\022B\n\nmatch_type\030\004 \001(\0162..google.clou" + + "d.dialogflow.cx.v3.Match.MatchType\022\022\n\nco" + + "nfidence\030\005 \001(\002\"\204\001\n\tMatchType\022\032\n\026MATCH_TY" + + "PE_UNSPECIFIED\020\000\022\n\n\006INTENT\020\001\022\021\n\rDIRECT_I" + + "NTENT\020\002\022\025\n\021PARAMETER_FILLING\020\003\022\014\n\010NO_MAT" + + "CH\020\004\022\014\n\010NO_INPUT\020\005\022\t\n\005EVENT\020\006\"\333\001\n\022MatchI" + + "ntentRequest\022:\n\007session\030\001 \001(\tB)\340A\002\372A#\n!d" + + "ialogflow.googleapis.com/Session\022D\n\014quer" + + "y_params\030\002 \001(\0132..google.cloud.dialogflow" + + ".cx.v3.QueryParameters\022C\n\013query_input\030\003 " + + "\001(\0132).google.cloud.dialogflow.cx.v3.Quer" + + "yInputB\003\340A\002\"\351\001\n\023MatchIntentResponse\022\016\n\004t" + + "ext\030\001 \001(\tH\000\022\030\n\016trigger_intent\030\002 \001(\tH\000\022\024\n" + + "\ntranscript\030\003 \001(\tH\000\022\027\n\rtrigger_event\030\006 \001" + + "(\tH\000\0225\n\007matches\030\004 \003(\0132$.google.cloud.dia" + + "logflow.cx.v3.Match\0229\n\014current_page\030\005 \001(" + + "\0132#.google.cloud.dialogflow.cx.v3.PageB\007" + + "\n\005query\"\353\001\n\024FulfillIntentRequest\022O\n\024matc" + + "h_intent_request\030\001 \001(\01321.google.cloud.di" + + "alogflow.cx.v3.MatchIntentRequest\0223\n\005mat" + + "ch\030\002 \001(\0132$.google.cloud.dialogflow.cx.v3" + + ".Match\022M\n\023output_audio_config\030\003 \001(\01320.go" + + "ogle.cloud.dialogflow.cx.v3.OutputAudioC" + + "onfig\"\323\001\n\025FulfillIntentResponse\022\023\n\013respo" + + "nse_id\030\001 \001(\t\022@\n\014query_result\030\002 \001(\0132*.goo" + + "gle.cloud.dialogflow.cx.v3.QueryResult\022\024" + + "\n\014output_audio\030\003 \001(\014\022M\n\023output_audio_con" + + "fig\030\004 \001(\01320.google.cloud.dialogflow.cx.v" + + "3.OutputAudioConfig\";\n\027SentimentAnalysis" + + "Result\022\r\n\005score\030\001 \001(\002\022\021\n\tmagnitude\030\002 \001(\002" + + "2\304\t\n\010Sessions\022\246\002\n\014DetectIntent\0222.google." + + "cloud.dialogflow.cx.v3.DetectIntentReque" + + "st\0323.google.cloud.dialogflow.cx.v3.Detec" + + "tIntentResponse\"\254\001\202\323\344\223\002\245\001\"E/v3/{session=" + + "projects/*/locations/*/agents/*/sessions" + + "/*}:detectIntent:\001*ZY\"T/v3/{session=proj" + + "ects/*/locations/*/agents/*/environments" + + "/*/sessions/*}:detectIntent:\001*\022\230\001\n\025Strea" + + "mingDetectIntent\022;.google.cloud.dialogfl" + + "ow.cx.v3.StreamingDetectIntentRequest\032<." + + "google.cloud.dialogflow.cx.v3.StreamingD" + + "etectIntentResponse\"\000(\0010\001\022\241\002\n\013MatchInten" + + "t\0221.google.cloud.dialogflow.cx.v3.MatchI" + + "ntentRequest\0322.google.cloud.dialogflow.c" + + "x.v3.MatchIntentResponse\"\252\001\202\323\344\223\002\243\001\"D/v3/" + + "{session=projects/*/locations/*/agents/*" + + "/sessions/*}:matchIntent:\001*ZX\"S/v3/{sess" + + "ion=projects/*/locations/*/agents/*/envi" + + "ronments/*/sessions/*}:matchIntent:\001*\022\325\002" + + "\n\rFulfillIntent\0223.google.cloud.dialogflo" + + "w.cx.v3.FulfillIntentRequest\0324.google.cl" + + "oud.dialogflow.cx.v3.FulfillIntentRespon" + + "se\"\330\001\202\323\344\223\002\321\001\"[/v3/{match_intent_request." + + "session=projects/*/locations/*/agents/*/" + + "sessions/*}:fulfillIntent:\001*Zo\"j/v3/{mat" + + "ch_intent_request.session=projects/*/loc" + + "ations/*/agents/*/environments/*/session" + + "s/*}:fulfillIntent:\001*\032x\312A\031dialogflow.goo" + + "gleapis.com\322AYhttps://www.googleapis.com" + + "/auth/cloud-platform,https://www.googlea" + + "pis.com/auth/dialogflowB\364\002\n!com.google.c" + + "loud.dialogflow.cx.v3B\014SessionProtoP\001Z?g" + + "oogle.golang.org/genproto/googleapis/clo" + + "ud/dialogflow/cx/v3;cx\370\001\001\242\002\002DF\252\002\035Google." + + "Cloud.Dialogflow.Cx.V3\352A\324\001\n!dialogflow.g" + + "oogleapis.com/Session\022Iprojects/{project" + + "}/locations/{location}/agents/{agent}/se" + + "ssions/{session}\022dprojects/{project}/loc" + + "ations/{location}/agents/{agent}/environ" + + "ments/{environment}/sessions/{session}b\006" + + "proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -363,6 +364,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SessionEntityTypes", "Payload", "Parameters", + "DisableWebhook", "AnalyzeQueryTextSentiment", "WebhookHeaders", }); diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto index dc9c911b9..e444bbe6b 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto @@ -29,31 +29,6 @@ option java_outer_classname = "AudioConfigProto"; option java_package = "com.google.cloud.dialogflow.cx.v3"; option objc_class_prefix = "DF"; -// Information for a word recognized by the speech recognizer. -message SpeechWordInfo { - // The word this info is for. - string word = 3; - - // Time offset relative to the beginning of the audio that corresponds to the - // start of the spoken word. This is an experimental feature and the accuracy - // of the time offset can vary. - google.protobuf.Duration start_offset = 1; - - // Time offset relative to the beginning of the audio that corresponds to the - // end of the spoken word. This is an experimental feature and the accuracy of - // the time offset can vary. - google.protobuf.Duration end_offset = 2; - - // The Speech confidence between 0.0 and 1.0 for this word. A higher number - // indicates an estimated greater likelihood that the recognized word is - // correct. The default of 0.0 is a sentinel value indicating that confidence - // was not set. - // - // This field is not guaranteed to be fully stable over time for the same - // audio input. Users should also not rely on it to always be provided. - float confidence = 4; -} - // Audio encoding of the audio content sent in the conversational query request. // Refer to the // [Cloud Speech API @@ -103,6 +78,31 @@ enum AudioEncoding { AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; } +// Information for a word recognized by the speech recognizer. +message SpeechWordInfo { + // The word this info is for. + string word = 3; + + // Time offset relative to the beginning of the audio that corresponds to the + // start of the spoken word. This is an experimental feature and the accuracy + // of the time offset can vary. + google.protobuf.Duration start_offset = 1; + + // Time offset relative to the beginning of the audio that corresponds to the + // end of the spoken word. This is an experimental feature and the accuracy of + // the time offset can vary. + google.protobuf.Duration end_offset = 2; + + // The Speech confidence between 0.0 and 1.0 for this word. A higher number + // indicates an estimated greater likelihood that the recognized word is + // correct. The default of 0.0 is a sentinel value indicating that confidence + // was not set. + // + // This field is not guaranteed to be fully stable over time for the same + // audio input. Users should also not rely on it to always be provided. + float confidence = 4; +} + // Instructs the speech recognizer on how to process the audio content. message InputAudioConfig { // Required. Audio encoding of the audio content to process. diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto index 53b720a67..37a6ac653 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/response_message.proto @@ -184,8 +184,8 @@ message ResponseMessage { // Output only. A signal that indicates the interaction with the Dialogflow agent has // ended. // This message is generated by Dialogflow only when the conversation - // reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be - // defined by the user. + // reaches `END_SESSION` page. It is not supposed to be defined by the user. + // // It's guaranteed that there is at most one such message in each response. EndInteraction end_interaction = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session.proto b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session.proto index a013a0f62..2e485a56d 100644 --- a/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session.proto +++ b/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/session.proto @@ -388,6 +388,9 @@ message QueryParameters { // - Else: parameter value google.protobuf.Struct parameters = 5; + // Whether to disable webhook calls for this request. + bool disable_webhook = 7; + // Configures whether sentiment analysis should be performed. If not // provided, sentiment analysis is not performed. bool analyze_query_text_sentiment = 8; diff --git a/synth.metadata b/synth.metadata index 65d533fc3..7108a03d8 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,23 +4,23 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-dialogflow-cx.git", - "sha": "2922b2bc85a9c892bd3f651e406a6bf9092876ef" + "sha": "17ff97848778900c946b13cca420cd7fd7d60a5d" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "718eadce2fcaa3c4246ab56b6a507096cb100950", - "internalRef": "359860671" + "sha": "a031936991b3baac2d62f91acf891d3dbac18753", + "internalRef": "360468675" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "718eadce2fcaa3c4246ab56b6a507096cb100950", - "internalRef": "359860671" + "sha": "a031936991b3baac2d62f91acf891d3dbac18753", + "internalRef": "360468675" } }, {