Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit 60e5204

Browse files
feat: allow to disable webhook invocation per request (#158)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/ee71d617-e341-4f08-b5ee-4a7d066ce934/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 360468675 Source-Link: googleapis/googleapis@a031936
1 parent 02d61c3 commit 60e5204

File tree

9 files changed

+268
-175
lines changed

9 files changed

+268
-175
lines changed

proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParameters.java

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,11 @@ private QueryParameters(
133133
parameters_ = subBuilder.buildPartial();
134134
}
135135

136+
break;
137+
}
138+
case 56:
139+
{
140+
disableWebhook_ = input.readBool();
136141
break;
137142
}
138143
case 64:
@@ -535,6 +540,24 @@ public com.google.protobuf.StructOrBuilder getParametersOrBuilder() {
535540
return getParameters();
536541
}
537542

543+
public static final int DISABLE_WEBHOOK_FIELD_NUMBER = 7;
544+
private boolean disableWebhook_;
545+
/**
546+
*
547+
*
548+
* <pre>
549+
* Whether to disable webhook calls for this request.
550+
* </pre>
551+
*
552+
* <code>bool disable_webhook = 7;</code>
553+
*
554+
* @return The disableWebhook.
555+
*/
556+
@java.lang.Override
557+
public boolean getDisableWebhook() {
558+
return disableWebhook_;
559+
}
560+
538561
public static final int ANALYZE_QUERY_TEXT_SENTIMENT_FIELD_NUMBER = 8;
539562
private boolean analyzeQueryTextSentiment_;
540563
/**
@@ -712,6 +735,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
712735
if (parameters_ != null) {
713736
output.writeMessage(5, getParameters());
714737
}
738+
if (disableWebhook_ != false) {
739+
output.writeBool(7, disableWebhook_);
740+
}
715741
if (analyzeQueryTextSentiment_ != false) {
716742
output.writeBool(8, analyzeQueryTextSentiment_);
717743
}
@@ -742,6 +768,9 @@ public int getSerializedSize() {
742768
if (parameters_ != null) {
743769
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getParameters());
744770
}
771+
if (disableWebhook_ != false) {
772+
size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, disableWebhook_);
773+
}
745774
if (analyzeQueryTextSentiment_ != false) {
746775
size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, analyzeQueryTextSentiment_);
747776
}
@@ -785,6 +814,7 @@ public boolean equals(final java.lang.Object obj) {
785814
if (hasParameters()) {
786815
if (!getParameters().equals(other.getParameters())) return false;
787816
}
817+
if (getDisableWebhook() != other.getDisableWebhook()) return false;
788818
if (getAnalyzeQueryTextSentiment() != other.getAnalyzeQueryTextSentiment()) return false;
789819
if (!internalGetWebhookHeaders().equals(other.internalGetWebhookHeaders())) return false;
790820
if (!unknownFields.equals(other.unknownFields)) return false;
@@ -816,6 +846,8 @@ public int hashCode() {
816846
hash = (37 * hash) + PARAMETERS_FIELD_NUMBER;
817847
hash = (53 * hash) + getParameters().hashCode();
818848
}
849+
hash = (37 * hash) + DISABLE_WEBHOOK_FIELD_NUMBER;
850+
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableWebhook());
819851
hash = (37 * hash) + ANALYZE_QUERY_TEXT_SENTIMENT_FIELD_NUMBER;
820852
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAnalyzeQueryTextSentiment());
821853
if (!internalGetWebhookHeaders().getMap().isEmpty()) {
@@ -1015,6 +1047,8 @@ public Builder clear() {
10151047
parameters_ = null;
10161048
parametersBuilder_ = null;
10171049
}
1050+
disableWebhook_ = false;
1051+
10181052
analyzeQueryTextSentiment_ = false;
10191053

10201054
internalGetMutableWebhookHeaders().clear();
@@ -1071,6 +1105,7 @@ public com.google.cloud.dialogflow.cx.v3.QueryParameters buildPartial() {
10711105
} else {
10721106
result.parameters_ = parametersBuilder_.build();
10731107
}
1108+
result.disableWebhook_ = disableWebhook_;
10741109
result.analyzeQueryTextSentiment_ = analyzeQueryTextSentiment_;
10751110
result.webhookHeaders_ = internalGetWebhookHeaders();
10761111
result.webhookHeaders_.makeImmutable();
@@ -1164,6 +1199,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.QueryParameters other
11641199
if (other.hasParameters()) {
11651200
mergeParameters(other.getParameters());
11661201
}
1202+
if (other.getDisableWebhook() != false) {
1203+
setDisableWebhook(other.getDisableWebhook());
1204+
}
11671205
if (other.getAnalyzeQueryTextSentiment() != false) {
11681206
setAnalyzeQueryTextSentiment(other.getAnalyzeQueryTextSentiment());
11691207
}
@@ -2425,6 +2463,58 @@ public com.google.protobuf.StructOrBuilder getParametersOrBuilder() {
24252463
return parametersBuilder_;
24262464
}
24272465

2466+
private boolean disableWebhook_;
2467+
/**
2468+
*
2469+
*
2470+
* <pre>
2471+
* Whether to disable webhook calls for this request.
2472+
* </pre>
2473+
*
2474+
* <code>bool disable_webhook = 7;</code>
2475+
*
2476+
* @return The disableWebhook.
2477+
*/
2478+
@java.lang.Override
2479+
public boolean getDisableWebhook() {
2480+
return disableWebhook_;
2481+
}
2482+
/**
2483+
*
2484+
*
2485+
* <pre>
2486+
* Whether to disable webhook calls for this request.
2487+
* </pre>
2488+
*
2489+
* <code>bool disable_webhook = 7;</code>
2490+
*
2491+
* @param value The disableWebhook to set.
2492+
* @return This builder for chaining.
2493+
*/
2494+
public Builder setDisableWebhook(boolean value) {
2495+
2496+
disableWebhook_ = value;
2497+
onChanged();
2498+
return this;
2499+
}
2500+
/**
2501+
*
2502+
*
2503+
* <pre>
2504+
* Whether to disable webhook calls for this request.
2505+
* </pre>
2506+
*
2507+
* <code>bool disable_webhook = 7;</code>
2508+
*
2509+
* @return This builder for chaining.
2510+
*/
2511+
public Builder clearDisableWebhook() {
2512+
2513+
disableWebhook_ = false;
2514+
onChanged();
2515+
return this;
2516+
}
2517+
24282518
private boolean analyzeQueryTextSentiment_;
24292519
/**
24302520
*

proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParametersOrBuilder.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,19 @@ com.google.cloud.dialogflow.cx.v3.SessionEntityTypeOrBuilder getSessionEntityTyp
278278
*/
279279
com.google.protobuf.StructOrBuilder getParametersOrBuilder();
280280

281+
/**
282+
*
283+
*
284+
* <pre>
285+
* Whether to disable webhook calls for this request.
286+
* </pre>
287+
*
288+
* <code>bool disable_webhook = 7;</code>
289+
*
290+
* @return The disableWebhook.
291+
*/
292+
boolean getDisableWebhook();
293+
281294
/**
282295
*
283296
*

proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessage.java

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7796,8 +7796,7 @@ public com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff getLiv
77967796
* Output only. A signal that indicates the interaction with the Dialogflow agent has
77977797
* ended.
77987798
* This message is generated by Dialogflow only when the conversation
7799-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
7800-
* defined by the user.
7799+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
78017800
* It's guaranteed that there is at most one such message in each response.
78027801
* </pre>
78037802
*
@@ -7818,8 +7817,7 @@ public boolean hasEndInteraction() {
78187817
* Output only. A signal that indicates the interaction with the Dialogflow agent has
78197818
* ended.
78207819
* This message is generated by Dialogflow only when the conversation
7821-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
7822-
* defined by the user.
7820+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
78237821
* It's guaranteed that there is at most one such message in each response.
78247822
* </pre>
78257823
*
@@ -7843,8 +7841,7 @@ public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction getEndIn
78437841
* Output only. A signal that indicates the interaction with the Dialogflow agent has
78447842
* ended.
78457843
* This message is generated by Dialogflow only when the conversation
7846-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
7847-
* defined by the user.
7844+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
78487845
* It's guaranteed that there is at most one such message in each response.
78497846
* </pre>
78507847
*
@@ -9706,8 +9703,7 @@ public Builder clearLiveAgentHandoff() {
97069703
* Output only. A signal that indicates the interaction with the Dialogflow agent has
97079704
* ended.
97089705
* This message is generated by Dialogflow only when the conversation
9709-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
9710-
* defined by the user.
9706+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
97119707
* It's guaranteed that there is at most one such message in each response.
97129708
* </pre>
97139709
*
@@ -9728,8 +9724,7 @@ public boolean hasEndInteraction() {
97289724
* Output only. A signal that indicates the interaction with the Dialogflow agent has
97299725
* ended.
97309726
* This message is generated by Dialogflow only when the conversation
9731-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
9732-
* defined by the user.
9727+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
97339728
* It's guaranteed that there is at most one such message in each response.
97349729
* </pre>
97359730
*
@@ -9762,8 +9757,7 @@ public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction getEndIn
97629757
* Output only. A signal that indicates the interaction with the Dialogflow agent has
97639758
* ended.
97649759
* This message is generated by Dialogflow only when the conversation
9765-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
9766-
* defined by the user.
9760+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
97679761
* It's guaranteed that there is at most one such message in each response.
97689762
* </pre>
97699763
*
@@ -9792,8 +9786,7 @@ public Builder setEndInteraction(
97929786
* Output only. A signal that indicates the interaction with the Dialogflow agent has
97939787
* ended.
97949788
* This message is generated by Dialogflow only when the conversation
9795-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
9796-
* defined by the user.
9789+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
97979790
* It's guaranteed that there is at most one such message in each response.
97989791
* </pre>
97999792
*
@@ -9819,8 +9812,7 @@ public Builder setEndInteraction(
98199812
* Output only. A signal that indicates the interaction with the Dialogflow agent has
98209813
* ended.
98219814
* This message is generated by Dialogflow only when the conversation
9822-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
9823-
* defined by the user.
9815+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
98249816
* It's guaranteed that there is at most one such message in each response.
98259817
* </pre>
98269818
*
@@ -9860,8 +9852,7 @@ public Builder mergeEndInteraction(
98609852
* Output only. A signal that indicates the interaction with the Dialogflow agent has
98619853
* ended.
98629854
* This message is generated by Dialogflow only when the conversation
9863-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
9864-
* defined by the user.
9855+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
98659856
* It's guaranteed that there is at most one such message in each response.
98669857
* </pre>
98679858
*
@@ -9892,8 +9883,7 @@ public Builder clearEndInteraction() {
98929883
* Output only. A signal that indicates the interaction with the Dialogflow agent has
98939884
* ended.
98949885
* This message is generated by Dialogflow only when the conversation
9895-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
9896-
* defined by the user.
9886+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
98979887
* It's guaranteed that there is at most one such message in each response.
98989888
* </pre>
98999889
*
@@ -9912,8 +9902,7 @@ public Builder clearEndInteraction() {
99129902
* Output only. A signal that indicates the interaction with the Dialogflow agent has
99139903
* ended.
99149904
* This message is generated by Dialogflow only when the conversation
9915-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
9916-
* defined by the user.
9905+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
99179906
* It's guaranteed that there is at most one such message in each response.
99189907
* </pre>
99199908
*
@@ -9941,8 +9930,7 @@ public Builder clearEndInteraction() {
99419930
* Output only. A signal that indicates the interaction with the Dialogflow agent has
99429931
* ended.
99439932
* This message is generated by Dialogflow only when the conversation
9944-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
9945-
* defined by the user.
9933+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
99469934
* It's guaranteed that there is at most one such message in each response.
99479935
* </pre>
99489936
*

proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ResponseMessageOrBuilder.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,7 @@ public interface ResponseMessageOrBuilder
223223
* Output only. A signal that indicates the interaction with the Dialogflow agent has
224224
* ended.
225225
* This message is generated by Dialogflow only when the conversation
226-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
227-
* defined by the user.
226+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
228227
* It's guaranteed that there is at most one such message in each response.
229228
* </pre>
230229
*
@@ -242,8 +241,7 @@ public interface ResponseMessageOrBuilder
242241
* Output only. A signal that indicates the interaction with the Dialogflow agent has
243242
* ended.
244243
* This message is generated by Dialogflow only when the conversation
245-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
246-
* defined by the user.
244+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
247245
* It's guaranteed that there is at most one such message in each response.
248246
* </pre>
249247
*
@@ -261,8 +259,7 @@ public interface ResponseMessageOrBuilder
261259
* Output only. A signal that indicates the interaction with the Dialogflow agent has
262260
* ended.
263261
* This message is generated by Dialogflow only when the conversation
264-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
265-
* defined by the user.
262+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
266263
* It's guaranteed that there is at most one such message in each response.
267264
* </pre>
268265
*

0 commit comments

Comments
 (0)