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

Commit e41831d

Browse files
feat: allow to disable webhook invocation per request
PiperOrigin-RevId: 359860671 Source-Author: Google APIs <[email protected]> Source-Date: Fri Feb 26 16:18:07 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: 718eadce2fcaa3c4246ab56b6a507096cb100950 Source-Link: googleapis/googleapis@718eadc
1 parent 0f41ee5 commit e41831d

8 files changed

Lines changed: 247 additions & 155 deletions

File tree

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

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

137+
break;
138+
}
139+
case 56:
140+
{
141+
disableWebhook_ = input.readBool();
137142
break;
138143
}
139144
case 64:
@@ -537,6 +542,24 @@ public com.google.protobuf.StructOrBuilder getParametersOrBuilder() {
537542
return getParameters();
538543
}
539544

545+
public static final int DISABLE_WEBHOOK_FIELD_NUMBER = 7;
546+
private boolean disableWebhook_;
547+
/**
548+
*
549+
*
550+
* <pre>
551+
* Whether to disable webhook calls for this request.
552+
* </pre>
553+
*
554+
* <code>bool disable_webhook = 7;</code>
555+
*
556+
* @return The disableWebhook.
557+
*/
558+
@java.lang.Override
559+
public boolean getDisableWebhook() {
560+
return disableWebhook_;
561+
}
562+
540563
public static final int ANALYZE_QUERY_TEXT_SENTIMENT_FIELD_NUMBER = 8;
541564
private boolean analyzeQueryTextSentiment_;
542565
/**
@@ -714,6 +737,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
714737
if (parameters_ != null) {
715738
output.writeMessage(5, getParameters());
716739
}
740+
if (disableWebhook_ != false) {
741+
output.writeBool(7, disableWebhook_);
742+
}
717743
if (analyzeQueryTextSentiment_ != false) {
718744
output.writeBool(8, analyzeQueryTextSentiment_);
719745
}
@@ -744,6 +770,9 @@ public int getSerializedSize() {
744770
if (parameters_ != null) {
745771
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getParameters());
746772
}
773+
if (disableWebhook_ != false) {
774+
size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, disableWebhook_);
775+
}
747776
if (analyzeQueryTextSentiment_ != false) {
748777
size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, analyzeQueryTextSentiment_);
749778
}
@@ -787,6 +816,7 @@ public boolean equals(final java.lang.Object obj) {
787816
if (hasParameters()) {
788817
if (!getParameters().equals(other.getParameters())) return false;
789818
}
819+
if (getDisableWebhook() != other.getDisableWebhook()) return false;
790820
if (getAnalyzeQueryTextSentiment() != other.getAnalyzeQueryTextSentiment()) return false;
791821
if (!internalGetWebhookHeaders().equals(other.internalGetWebhookHeaders())) return false;
792822
if (!unknownFields.equals(other.unknownFields)) return false;
@@ -818,6 +848,8 @@ public int hashCode() {
818848
hash = (37 * hash) + PARAMETERS_FIELD_NUMBER;
819849
hash = (53 * hash) + getParameters().hashCode();
820850
}
851+
hash = (37 * hash) + DISABLE_WEBHOOK_FIELD_NUMBER;
852+
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableWebhook());
821853
hash = (37 * hash) + ANALYZE_QUERY_TEXT_SENTIMENT_FIELD_NUMBER;
822854
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAnalyzeQueryTextSentiment());
823855
if (!internalGetWebhookHeaders().getMap().isEmpty()) {
@@ -1018,6 +1050,8 @@ public Builder clear() {
10181050
parameters_ = null;
10191051
parametersBuilder_ = null;
10201052
}
1053+
disableWebhook_ = false;
1054+
10211055
analyzeQueryTextSentiment_ = false;
10221056

10231057
internalGetMutableWebhookHeaders().clear();
@@ -1074,6 +1108,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.QueryParameters buildPartial() {
10741108
} else {
10751109
result.parameters_ = parametersBuilder_.build();
10761110
}
1111+
result.disableWebhook_ = disableWebhook_;
10771112
result.analyzeQueryTextSentiment_ = analyzeQueryTextSentiment_;
10781113
result.webhookHeaders_ = internalGetWebhookHeaders();
10791114
result.webhookHeaders_.makeImmutable();
@@ -1167,6 +1202,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.QueryParameters
11671202
if (other.hasParameters()) {
11681203
mergeParameters(other.getParameters());
11691204
}
1205+
if (other.getDisableWebhook() != false) {
1206+
setDisableWebhook(other.getDisableWebhook());
1207+
}
11701208
if (other.getAnalyzeQueryTextSentiment() != false) {
11711209
setAnalyzeQueryTextSentiment(other.getAnalyzeQueryTextSentiment());
11721210
}
@@ -2452,6 +2490,58 @@ public com.google.protobuf.StructOrBuilder getParametersOrBuilder() {
24522490
return parametersBuilder_;
24532491
}
24542492

2493+
private boolean disableWebhook_;
2494+
/**
2495+
*
2496+
*
2497+
* <pre>
2498+
* Whether to disable webhook calls for this request.
2499+
* </pre>
2500+
*
2501+
* <code>bool disable_webhook = 7;</code>
2502+
*
2503+
* @return The disableWebhook.
2504+
*/
2505+
@java.lang.Override
2506+
public boolean getDisableWebhook() {
2507+
return disableWebhook_;
2508+
}
2509+
/**
2510+
*
2511+
*
2512+
* <pre>
2513+
* Whether to disable webhook calls for this request.
2514+
* </pre>
2515+
*
2516+
* <code>bool disable_webhook = 7;</code>
2517+
*
2518+
* @param value The disableWebhook to set.
2519+
* @return This builder for chaining.
2520+
*/
2521+
public Builder setDisableWebhook(boolean value) {
2522+
2523+
disableWebhook_ = value;
2524+
onChanged();
2525+
return this;
2526+
}
2527+
/**
2528+
*
2529+
*
2530+
* <pre>
2531+
* Whether to disable webhook calls for this request.
2532+
* </pre>
2533+
*
2534+
* <code>bool disable_webhook = 7;</code>
2535+
*
2536+
* @return This builder for chaining.
2537+
*/
2538+
public Builder clearDisableWebhook() {
2539+
2540+
disableWebhook_ = false;
2541+
onChanged();
2542+
return this;
2543+
}
2544+
24552545
private boolean analyzeQueryTextSentiment_;
24562546
/**
24572547
*

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

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

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

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

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7884,8 +7884,7 @@ public boolean hasLiveAgentHandoff() {
78847884
* Output only. A signal that indicates the interaction with the Dialogflow agent has
78857885
* ended.
78867886
* This message is generated by Dialogflow only when the conversation
7887-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
7888-
* defined by the user.
7887+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
78897888
* It's guaranteed that there is at most one such message in each response.
78907889
* </pre>
78917890
*
@@ -7906,8 +7905,7 @@ public boolean hasEndInteraction() {
79067905
* Output only. A signal that indicates the interaction with the Dialogflow agent has
79077906
* ended.
79087907
* This message is generated by Dialogflow only when the conversation
7909-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
7910-
* defined by the user.
7908+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
79117909
* It's guaranteed that there is at most one such message in each response.
79127910
* </pre>
79137911
*
@@ -7932,8 +7930,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction get
79327930
* Output only. A signal that indicates the interaction with the Dialogflow agent has
79337931
* ended.
79347932
* This message is generated by Dialogflow only when the conversation
7935-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
7936-
* defined by the user.
7933+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
79377934
* It's guaranteed that there is at most one such message in each response.
79387935
* </pre>
79397936
*
@@ -9820,8 +9817,7 @@ public Builder clearLiveAgentHandoff() {
98209817
* Output only. A signal that indicates the interaction with the Dialogflow agent has
98219818
* ended.
98229819
* This message is generated by Dialogflow only when the conversation
9823-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
9824-
* defined by the user.
9820+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
98259821
* It's guaranteed that there is at most one such message in each response.
98269822
* </pre>
98279823
*
@@ -9842,8 +9838,7 @@ public boolean hasEndInteraction() {
98429838
* Output only. A signal that indicates the interaction with the Dialogflow agent has
98439839
* ended.
98449840
* This message is generated by Dialogflow only when the conversation
9845-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
9846-
* defined by the user.
9841+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
98479842
* It's guaranteed that there is at most one such message in each response.
98489843
* </pre>
98499844
*
@@ -9877,8 +9872,7 @@ public boolean hasEndInteraction() {
98779872
* Output only. A signal that indicates the interaction with the Dialogflow agent has
98789873
* ended.
98799874
* This message is generated by Dialogflow only when the conversation
9880-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
9881-
* defined by the user.
9875+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
98829876
* It's guaranteed that there is at most one such message in each response.
98839877
* </pre>
98849878
*
@@ -9907,8 +9901,7 @@ public Builder setEndInteraction(
99079901
* Output only. A signal that indicates the interaction with the Dialogflow agent has
99089902
* ended.
99099903
* This message is generated by Dialogflow only when the conversation
9910-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
9911-
* defined by the user.
9904+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
99129905
* It's guaranteed that there is at most one such message in each response.
99139906
* </pre>
99149907
*
@@ -9935,8 +9928,7 @@ public Builder setEndInteraction(
99359928
* Output only. A signal that indicates the interaction with the Dialogflow agent has
99369929
* ended.
99379930
* This message is generated by Dialogflow only when the conversation
9938-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
9939-
* defined by the user.
9931+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
99409932
* It's guaranteed that there is at most one such message in each response.
99419933
* </pre>
99429934
*
@@ -9977,8 +9969,7 @@ public Builder mergeEndInteraction(
99779969
* Output only. A signal that indicates the interaction with the Dialogflow agent has
99789970
* ended.
99799971
* This message is generated by Dialogflow only when the conversation
9980-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
9981-
* defined by the user.
9972+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
99829973
* It's guaranteed that there is at most one such message in each response.
99839974
* </pre>
99849975
*
@@ -10009,8 +10000,7 @@ public Builder clearEndInteraction() {
1000910000
* Output only. A signal that indicates the interaction with the Dialogflow agent has
1001010001
* ended.
1001110002
* This message is generated by Dialogflow only when the conversation
10012-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
10013-
* defined by the user.
10003+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
1001410004
* It's guaranteed that there is at most one such message in each response.
1001510005
* </pre>
1001610006
*
@@ -10029,8 +10019,7 @@ public Builder clearEndInteraction() {
1002910019
* Output only. A signal that indicates the interaction with the Dialogflow agent has
1003010020
* ended.
1003110021
* This message is generated by Dialogflow only when the conversation
10032-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
10033-
* defined by the user.
10022+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
1003410023
* It's guaranteed that there is at most one such message in each response.
1003510024
* </pre>
1003610025
*
@@ -10058,8 +10047,7 @@ public Builder clearEndInteraction() {
1005810047
* Output only. A signal that indicates the interaction with the Dialogflow agent has
1005910048
* ended.
1006010049
* This message is generated by Dialogflow only when the conversation
10061-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
10062-
* defined by the user.
10050+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
1006310051
* It's guaranteed that there is at most one such message in each response.
1006410052
* </pre>
1006510053
*

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,7 @@ public interface ResponseMessageOrBuilder
230230
* Output only. A signal that indicates the interaction with the Dialogflow agent has
231231
* ended.
232232
* This message is generated by Dialogflow only when the conversation
233-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
234-
* defined by the user.
233+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
235234
* It's guaranteed that there is at most one such message in each response.
236235
* </pre>
237236
*
@@ -249,8 +248,7 @@ public interface ResponseMessageOrBuilder
249248
* Output only. A signal that indicates the interaction with the Dialogflow agent has
250249
* ended.
251250
* This message is generated by Dialogflow only when the conversation
252-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
253-
* defined by the user.
251+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
254252
* It's guaranteed that there is at most one such message in each response.
255253
* </pre>
256254
*
@@ -268,8 +266,7 @@ public interface ResponseMessageOrBuilder
268266
* Output only. A signal that indicates the interaction with the Dialogflow agent has
269267
* ended.
270268
* This message is generated by Dialogflow only when the conversation
271-
* reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
272-
* defined by the user.
269+
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
273270
* It's guaranteed that there is at most one such message in each response.
274271
* </pre>
275272
*

0 commit comments

Comments
 (0)