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

feat: added the display name of the current page in webhook requests #380

Merged
merged 2 commits into from
Dec 28, 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 @@ -39,6 +39,7 @@ private PageInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {

private PageInfo() {
currentPage_ = "";
displayName_ = "";
}

@java.lang.Override
Expand Down Expand Up @@ -92,6 +93,13 @@ private PageInfo(
formInfo_ = subBuilder.buildPartial();
}

break;
}
case 34:
{
java.lang.String s = input.readStringRequireUtf8();

displayName_ = s;
break;
}
default:
Expand Down Expand Up @@ -3021,6 +3029,57 @@ public com.google.protobuf.ByteString getCurrentPageBytes() {
}
}

public static final int DISPLAY_NAME_FIELD_NUMBER = 4;
private volatile java.lang.Object displayName_;
/**
*
*
* <pre>
* Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
* The display name of the current page.
* </pre>
*
* <code>string display_name = 4;</code>
*
* @return The displayName.
*/
@java.lang.Override
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
displayName_ = s;
return s;
}
}
/**
*
*
* <pre>
* Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
* The display name of the current page.
* </pre>
*
* <code>string display_name = 4;</code>
*
* @return The bytes for displayName.
*/
@java.lang.Override
public com.google.protobuf.ByteString getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}

public static final int FORM_INFO_FIELD_NUMBER = 3;
private com.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo formInfo_;
/**
Expand Down Expand Up @@ -3092,6 +3151,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (formInfo_ != null) {
output.writeMessage(3, getFormInfo());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_);
}
unknownFields.writeTo(output);
}

Expand All @@ -3107,6 +3169,9 @@ public int getSerializedSize() {
if (formInfo_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFormInfo());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
Expand All @@ -3124,6 +3189,7 @@ public boolean equals(final java.lang.Object obj) {
(com.google.cloud.dialogflow.cx.v3.PageInfo) obj;

if (!getCurrentPage().equals(other.getCurrentPage())) return false;
if (!getDisplayName().equals(other.getDisplayName())) return false;
if (hasFormInfo() != other.hasFormInfo()) return false;
if (hasFormInfo()) {
if (!getFormInfo().equals(other.getFormInfo())) return false;
Expand All @@ -3141,6 +3207,8 @@ public int hashCode() {
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CURRENT_PAGE_FIELD_NUMBER;
hash = (53 * hash) + getCurrentPage().hashCode();
hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDisplayName().hashCode();
if (hasFormInfo()) {
hash = (37 * hash) + FORM_INFO_FIELD_NUMBER;
hash = (53 * hash) + getFormInfo().hashCode();
Expand Down Expand Up @@ -3292,6 +3360,8 @@ public Builder clear() {
super.clear();
currentPage_ = "";

displayName_ = "";

if (formInfoBuilder_ == null) {
formInfo_ = null;
} else {
Expand Down Expand Up @@ -3326,6 +3396,7 @@ public com.google.cloud.dialogflow.cx.v3.PageInfo buildPartial() {
com.google.cloud.dialogflow.cx.v3.PageInfo result =
new com.google.cloud.dialogflow.cx.v3.PageInfo(this);
result.currentPage_ = currentPage_;
result.displayName_ = displayName_;
if (formInfoBuilder_ == null) {
result.formInfo_ = formInfo_;
} else {
Expand Down Expand Up @@ -3384,6 +3455,10 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.PageInfo other) {
currentPage_ = other.currentPage_;
onChanged();
}
if (!other.getDisplayName().isEmpty()) {
displayName_ = other.displayName_;
onChanged();
}
if (other.hasFormInfo()) {
mergeFormInfo(other.getFormInfo());
}
Expand Down Expand Up @@ -3537,6 +3612,117 @@ public Builder setCurrentPageBytes(com.google.protobuf.ByteString value) {
return this;
}

private java.lang.Object displayName_ = "";
/**
*
*
* <pre>
* Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
* The display name of the current page.
* </pre>
*
* <code>string display_name = 4;</code>
*
* @return The displayName.
*/
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
displayName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
* <pre>
* Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
* The display name of the current page.
* </pre>
*
* <code>string display_name = 4;</code>
*
* @return The bytes for displayName.
*/
public com.google.protobuf.ByteString getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
* <pre>
* Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
* The display name of the current page.
* </pre>
*
* <code>string display_name = 4;</code>
*
* @param value The displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}

displayName_ = value;
onChanged();
return this;
}
/**
*
*
* <pre>
* Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
* The display name of the current page.
* </pre>
*
* <code>string display_name = 4;</code>
*
* @return This builder for chaining.
*/
public Builder clearDisplayName() {

displayName_ = getDefaultInstance().getDisplayName();
onChanged();
return this;
}
/**
*
*
* <pre>
* Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
* The display name of the current page.
* </pre>
*
* <code>string display_name = 4;</code>
*
* @param value The bytes for displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);

displayName_ = value;
onChanged();
return this;
}

private com.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo formInfo_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,33 @@ public interface PageInfoOrBuilder
*/
com.google.protobuf.ByteString getCurrentPageBytes();

/**
*
*
* <pre>
* Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
* The display name of the current page.
* </pre>
*
* <code>string display_name = 4;</code>
*
* @return The displayName.
*/
java.lang.String getDisplayName();
/**
*
*
* <pre>
* Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
* The display name of the current page.
* </pre>
*
* <code>string display_name = 4;</code>
*
* @return The bytes for displayName.
*/
com.google.protobuf.ByteString getDisplayNameBytes();

/**
*
*
Expand Down
Loading