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

feat: allow to disable webhook invocation per request #158

Merged
merged 1 commit into from
Mar 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ private QueryParameters(
parameters_ = subBuilder.buildPartial();
}

break;
}
case 56:
{
disableWebhook_ = input.readBool();
break;
}
case 64:
Expand Down Expand Up @@ -535,6 +540,24 @@ public com.google.protobuf.StructOrBuilder getParametersOrBuilder() {
return getParameters();
}

public static final int DISABLE_WEBHOOK_FIELD_NUMBER = 7;
private boolean disableWebhook_;
/**
*
*
* <pre>
* Whether to disable webhook calls for this request.
* </pre>
*
* <code>bool disable_webhook = 7;</code>
*
* @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_;
/**
Expand Down Expand Up @@ -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_);
}
Expand Down Expand Up @@ -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_);
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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()) {
Expand Down Expand Up @@ -1015,6 +1047,8 @@ public Builder clear() {
parameters_ = null;
parametersBuilder_ = null;
}
disableWebhook_ = false;

analyzeQueryTextSentiment_ = false;

internalGetMutableWebhookHeaders().clear();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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());
}
Expand Down Expand Up @@ -2425,6 +2463,58 @@ public com.google.protobuf.StructOrBuilder getParametersOrBuilder() {
return parametersBuilder_;
}

private boolean disableWebhook_;
/**
*
*
* <pre>
* Whether to disable webhook calls for this request.
* </pre>
*
* <code>bool disable_webhook = 7;</code>
*
* @return The disableWebhook.
*/
@java.lang.Override
public boolean getDisableWebhook() {
return disableWebhook_;
}
/**
*
*
* <pre>
* Whether to disable webhook calls for this request.
* </pre>
*
* <code>bool disable_webhook = 7;</code>
*
* @param value The disableWebhook to set.
* @return This builder for chaining.
*/
public Builder setDisableWebhook(boolean value) {

disableWebhook_ = value;
onChanged();
return this;
}
/**
*
*
* <pre>
* Whether to disable webhook calls for this request.
* </pre>
*
* <code>bool disable_webhook = 7;</code>
*
* @return This builder for chaining.
*/
public Builder clearDisableWebhook() {

disableWebhook_ = false;
onChanged();
return this;
}

private boolean analyzeQueryTextSentiment_;
/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,19 @@ com.google.cloud.dialogflow.cx.v3.SessionEntityTypeOrBuilder getSessionEntityTyp
*/
com.google.protobuf.StructOrBuilder getParametersOrBuilder();

/**
*
*
* <pre>
* Whether to disable webhook calls for this request.
* </pre>
*
* <code>bool disable_webhook = 7;</code>
*
* @return The disableWebhook.
*/
boolean getDisableWebhook();

/**
*
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* </pre>
*
Expand All @@ -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.
* </pre>
*
Expand All @@ -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.
* </pre>
*
Expand Down Expand Up @@ -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.
* </pre>
*
Expand All @@ -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.
* </pre>
*
Expand Down Expand Up @@ -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.
* </pre>
*
Expand Down Expand Up @@ -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.
* </pre>
*
Expand All @@ -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.
* </pre>
*
Expand Down Expand Up @@ -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.
* </pre>
*
Expand Down Expand Up @@ -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.
* </pre>
*
Expand All @@ -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.
* </pre>
*
Expand Down Expand Up @@ -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.
* </pre>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* </pre>
*
Expand All @@ -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.
* </pre>
*
Expand All @@ -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.
* </pre>
*
Expand Down
Loading