Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [dialogflow] added cx_current_page field to AutomatedAgentReply #8820

Merged
merged 4 commits into from
Nov 18, 2022
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
32 changes: 16 additions & 16 deletions java-dialogflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-dialogflow</artifactId>
<version>4.11.0</version>
<version>4.12.0</version>
</dependency>
```

If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-dialogflow:4.11.0'
implementation 'com.google.cloud:google-cloud-dialogflow:4.12.0'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-dialogflow" % "4.11.0"
libraryDependencies += "com.google.cloud" % "google-cloud-dialogflow" % "4.12.0"
```

## Authentication
Expand Down Expand Up @@ -159,16 +159,16 @@ Java is a registered trademark of Oracle and/or its affiliates.

[product-docs]: https://cloud.google.com/dialogflow-enterprise/
[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-dialogflow/latest/overview
[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-dialogflow/java7.svg
[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-dialogflow/java7.html
[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-dialogflow/java8.svg
[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-dialogflow/java8.html
[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-dialogflow/java8-osx.svg
[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-dialogflow/java8-osx.html
[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-dialogflow/java8-win.svg
[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-dialogflow/java8-win.html
[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-dialogflow/java11.svg
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-dialogflow/java11.html
[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.svg
[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.html
[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.svg
[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.html
[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.svg
[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.html
[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.svg
[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.html
[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.svg
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-dialogflow.svg
[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-dialogflow&core=gav
Expand All @@ -180,9 +180,9 @@ Java is a registered trademark of Oracle and/or its affiliates.
[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects
[cloud-sdk]: https://cloud.google.com/sdk/
[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting
[contributing]: https://github.com/googleapis/java-dialogflow/blob/main/CONTRIBUTING.md
[code-of-conduct]: https://github.com/googleapis/java-dialogflow/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
[license]: https://github.com/googleapis/java-dialogflow/blob/main/LICENSE
[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md
[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
[license]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE
[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing
[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=dialogflow.googleapis.com
[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ private AutomatedAgentReply(com.google.protobuf.GeneratedMessageV3.Builder<?> bu
private AutomatedAgentReply() {
responseMessages_ = java.util.Collections.emptyList();
automatedAgentReplyType_ = 0;
cxCurrentPage_ = "";
}

@java.lang.Override
Expand Down Expand Up @@ -796,6 +797,59 @@ public boolean getAllowCancellation() {
return allowCancellation_;
}

public static final int CX_CURRENT_PAGE_FIELD_NUMBER = 11;
private volatile java.lang.Object cxCurrentPage_;
/**
*
*
* <pre>
* The unique identifier of the current Dialogflow CX conversation page.
* Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
* ID&gt;/flows/&lt;Flow ID&gt;/pages/&lt;Page ID&gt;`.
* </pre>
*
* <code>string cx_current_page = 11;</code>
*
* @return The cxCurrentPage.
*/
@java.lang.Override
public java.lang.String getCxCurrentPage() {
java.lang.Object ref = cxCurrentPage_;
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();
cxCurrentPage_ = s;
return s;
}
}
/**
*
*
* <pre>
* The unique identifier of the current Dialogflow CX conversation page.
* Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
* ID&gt;/flows/&lt;Flow ID&gt;/pages/&lt;Page ID&gt;`.
* </pre>
*
* <code>string cx_current_page = 11;</code>
*
* @return The bytes for cxCurrentPage.
*/
@java.lang.Override
public com.google.protobuf.ByteString getCxCurrentPageBytes() {
java.lang.Object ref = cxCurrentPage_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
cxCurrentPage_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}

private byte memoizedIsInitialized = -1;

@java.lang.Override
Expand Down Expand Up @@ -840,6 +894,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (parameters_ != null) {
output.writeMessage(10, getParameters());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cxCurrentPage_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 11, cxCurrentPage_);
}
getUnknownFields().writeTo(output);
}

Expand Down Expand Up @@ -881,6 +938,9 @@ public int getSerializedSize() {
if (parameters_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getParameters());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cxCurrentPage_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, cxCurrentPage_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
Expand Down Expand Up @@ -910,6 +970,7 @@ public boolean equals(final java.lang.Object obj) {
}
if (automatedAgentReplyType_ != other.automatedAgentReplyType_) return false;
if (getAllowCancellation() != other.getAllowCancellation()) return false;
if (!getCxCurrentPage().equals(other.getCxCurrentPage())) return false;
if (!getResponseCase().equals(other.getResponseCase())) return false;
switch (responseCase_) {
case 1:
Expand Down Expand Up @@ -958,6 +1019,8 @@ public int hashCode() {
hash = (53 * hash) + automatedAgentReplyType_;
hash = (37 * hash) + ALLOW_CANCELLATION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowCancellation());
hash = (37 * hash) + CX_CURRENT_PAGE_FIELD_NUMBER;
hash = (53 * hash) + getCxCurrentPage().hashCode();
switch (responseCase_) {
case 1:
hash = (37 * hash) + DETECT_INTENT_RESPONSE_FIELD_NUMBER;
Expand Down Expand Up @@ -1145,6 +1208,8 @@ public Builder clear() {

allowCancellation_ = false;

cxCurrentPage_ = "";

responseCase_ = 0;
response_ = null;
matchCase_ = 0;
Expand Down Expand Up @@ -1212,6 +1277,7 @@ public com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply buildPartial() {
}
result.automatedAgentReplyType_ = automatedAgentReplyType_;
result.allowCancellation_ = allowCancellation_;
result.cxCurrentPage_ = cxCurrentPage_;
result.responseCase_ = responseCase_;
result.matchCase_ = matchCase_;
onBuilt();
Expand Down Expand Up @@ -1306,6 +1372,10 @@ public Builder mergeFrom(com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply
if (other.getAllowCancellation() != false) {
setAllowCancellation(other.getAllowCancellation());
}
if (!other.getCxCurrentPage().isEmpty()) {
cxCurrentPage_ = other.cxCurrentPage_;
onChanged();
}
switch (other.getResponseCase()) {
case DETECT_INTENT_RESPONSE:
{
Expand Down Expand Up @@ -1429,6 +1499,12 @@ public Builder mergeFrom(

break;
} // case 82
case 90:
{
cxCurrentPage_ = input.readStringRequireUtf8();

break;
} // case 90
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
Expand Down Expand Up @@ -2981,6 +3057,122 @@ public Builder clearAllowCancellation() {
return this;
}

private java.lang.Object cxCurrentPage_ = "";
/**
*
*
* <pre>
* The unique identifier of the current Dialogflow CX conversation page.
* Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
* ID&gt;/flows/&lt;Flow ID&gt;/pages/&lt;Page ID&gt;`.
* </pre>
*
* <code>string cx_current_page = 11;</code>
*
* @return The cxCurrentPage.
*/
public java.lang.String getCxCurrentPage() {
java.lang.Object ref = cxCurrentPage_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
cxCurrentPage_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
* <pre>
* The unique identifier of the current Dialogflow CX conversation page.
* Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
* ID&gt;/flows/&lt;Flow ID&gt;/pages/&lt;Page ID&gt;`.
* </pre>
*
* <code>string cx_current_page = 11;</code>
*
* @return The bytes for cxCurrentPage.
*/
public com.google.protobuf.ByteString getCxCurrentPageBytes() {
java.lang.Object ref = cxCurrentPage_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
cxCurrentPage_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
* <pre>
* The unique identifier of the current Dialogflow CX conversation page.
* Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
* ID&gt;/flows/&lt;Flow ID&gt;/pages/&lt;Page ID&gt;`.
* </pre>
*
* <code>string cx_current_page = 11;</code>
*
* @param value The cxCurrentPage to set.
* @return This builder for chaining.
*/
public Builder setCxCurrentPage(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}

cxCurrentPage_ = value;
onChanged();
return this;
}
/**
*
*
* <pre>
* The unique identifier of the current Dialogflow CX conversation page.
* Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
* ID&gt;/flows/&lt;Flow ID&gt;/pages/&lt;Page ID&gt;`.
* </pre>
*
* <code>string cx_current_page = 11;</code>
*
* @return This builder for chaining.
*/
public Builder clearCxCurrentPage() {

cxCurrentPage_ = getDefaultInstance().getCxCurrentPage();
onChanged();
return this;
}
/**
*
*
* <pre>
* The unique identifier of the current Dialogflow CX conversation page.
* Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
* ID&gt;/flows/&lt;Flow ID&gt;/pages/&lt;Page ID&gt;`.
* </pre>
*
* <code>string cx_current_page = 11;</code>
*
* @param value The bytes for cxCurrentPage to set.
* @return This builder for chaining.
*/
public Builder setCxCurrentPageBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);

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

@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,35 @@ com.google.cloud.dialogflow.v2beta1.ResponseMessageOrBuilder getResponseMessages
*/
boolean getAllowCancellation();

/**
*
*
* <pre>
* The unique identifier of the current Dialogflow CX conversation page.
* Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
* ID&gt;/flows/&lt;Flow ID&gt;/pages/&lt;Page ID&gt;`.
* </pre>
*
* <code>string cx_current_page = 11;</code>
*
* @return The cxCurrentPage.
*/
java.lang.String getCxCurrentPage();
/**
*
*
* <pre>
* The unique identifier of the current Dialogflow CX conversation page.
* Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
* ID&gt;/flows/&lt;Flow ID&gt;/pages/&lt;Page ID&gt;`.
* </pre>
*
* <code>string cx_current_page = 11;</code>
*
* @return The bytes for cxCurrentPage.
*/
com.google.protobuf.ByteString getCxCurrentPageBytes();

public com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.ResponseCase getResponseCase();

public com.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.MatchCase getMatchCase();
Expand Down
Loading