Skip to content

Commit

Permalink
feat: [dialogflow] Add the enable_partial_automated_agent_reply flag (#…
Browse files Browse the repository at this point in the history
…9906)

* feat: Add the enable_partial_automated_agent_reply flag
feat: Remove backend API deadline

PiperOrigin-RevId: 568908437

Source-Link: googleapis/googleapis@56f0766

Source-Link: googleapis/googleapis-gen@5949657
Copy-Tag: eyJwIjoiamF2YS1kaWFsb2dmbG93Ly5Pd2xCb3QueWFtbCIsImgiOiI1OTQ5NjU3NTE5ZjhmMGI3NTJlMGU4ODdjNjFlNzM3ZWI1YjdiYjIyIn0=

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Sep 28, 2023
1 parent 6e77d5b commit e88fe30
Show file tree
Hide file tree
Showing 8 changed files with 476 additions and 253 deletions.
6 changes: 3 additions & 3 deletions java-dialogflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-dialogflow</artifactId>
<version>4.31.0</version>
<version>4.30.0</version>
</dependency>
```

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

```Groovy
implementation 'com.google.cloud:google-cloud-dialogflow:4.31.0'
implementation 'com.google.cloud:google-cloud-dialogflow:4.30.0'
```

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

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-dialogflow" % "4.31.0"
libraryDependencies += "com.google.cloud" % "google-cloud-dialogflow" % "4.30.0"
```
<!-- {x-version-update-end} -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,7 @@ public final AnalyzeContentResponse analyzeContent(AnalyzeContentRequest request
* .setAssistQueryParams(AssistQueryParameters.newBuilder().build())
* .setCxParameters(Struct.newBuilder().build())
* .setCxCurrentPage("cxCurrentPage1596907507")
* .setEnableExtendedStreaming(true)
* .setEnablePartialAutomatedAgentReply(true)
* .setEnableDebuggingInfo(true)
* .build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,7 @@ public void streamingAnalyzeContentTest() throws Exception {
.setAssistQueryParams(AssistQueryParameters.newBuilder().build())
.setCxParameters(Struct.newBuilder().build())
.setCxCurrentPage("cxCurrentPage1596907507")
.setEnableExtendedStreaming(true)
.setEnablePartialAutomatedAgentReply(true)
.setEnableDebuggingInfo(true)
.build();
Expand Down Expand Up @@ -772,6 +773,7 @@ public void streamingAnalyzeContentExceptionTest() throws Exception {
.setAssistQueryParams(AssistQueryParameters.newBuilder().build())
.setCxParameters(Struct.newBuilder().build())
.setCxCurrentPage("cxCurrentPage1596907507")
.setEnableExtendedStreaming(true)
.setEnablePartialAutomatedAgentReply(true)
.setEnableDebuggingInfo(true)
.build();
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,42 @@ public com.google.protobuf.ByteString getCxCurrentPageBytes() {
}
}

public static final int ENABLE_EXTENDED_STREAMING_FIELD_NUMBER = 11;
private boolean enableExtendedStreaming_ = false;
/**
*
*
* <pre>
* Optional. Enable full bidirectional streaming. You can keep streaming the
* audio until timeout, and there's no need to half close the stream to get
* the response.
*
* Restrictions:
*
* - Timeout: 3 mins.
* - Audio Encoding: only supports
* [AudioEncoding.AUDIO_ENCODING_LINEAR_16][google.cloud.dialogflow.v2beta1.AudioEncoding.AUDIO_ENCODING_LINEAR_16]
* and
* [AudioEncoding.AUDIO_ENCODING_MULAW][google.cloud.dialogflow.v2beta1.AudioEncoding.AUDIO_ENCODING_MULAW]
* - Lifecycle: conversation should be in `Assist Stage`, go to
* [Conversation.CreateConversation][] for more information.
*
* InvalidArgument Error will be returned if the one of restriction checks
* failed.
*
* You can find more details in
* https://cloud.google.com/agent-assist/docs/extended-streaming
* </pre>
*
* <code>bool enable_extended_streaming = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
*
* @return The enableExtendedStreaming.
*/
@java.lang.Override
public boolean getEnableExtendedStreaming() {
return enableExtendedStreaming_;
}

public static final int ENABLE_PARTIAL_AUTOMATED_AGENT_REPLY_FIELD_NUMBER = 12;
private boolean enablePartialAutomatedAgentReply_ = false;
/**
Expand Down Expand Up @@ -930,6 +966,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (inputCase_ == 9) {
output.writeMessage(9, (com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents) input_);
}
if (enableExtendedStreaming_ != false) {
output.writeBool(11, enableExtendedStreaming_);
}
if (enablePartialAutomatedAgentReply_ != false) {
output.writeBool(12, enablePartialAutomatedAgentReply_);
}
Expand Down Expand Up @@ -986,6 +1025,9 @@ public int getSerializedSize() {
com.google.protobuf.CodedOutputStream.computeMessageSize(
9, (com.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents) input_);
}
if (enableExtendedStreaming_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, enableExtendedStreaming_);
}
if (enablePartialAutomatedAgentReply_ != false) {
size +=
com.google.protobuf.CodedOutputStream.computeBoolSize(
Expand Down Expand Up @@ -1034,6 +1076,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getCxParameters().equals(other.getCxParameters())) return false;
}
if (!getCxCurrentPage().equals(other.getCxCurrentPage())) return false;
if (getEnableExtendedStreaming() != other.getEnableExtendedStreaming()) return false;
if (getEnablePartialAutomatedAgentReply() != other.getEnablePartialAutomatedAgentReply())
return false;
if (getEnableDebuggingInfo() != other.getEnableDebuggingInfo()) return false;
Expand Down Expand Up @@ -1093,6 +1136,8 @@ public int hashCode() {
}
hash = (37 * hash) + CX_CURRENT_PAGE_FIELD_NUMBER;
hash = (53 * hash) + getCxCurrentPage().hashCode();
hash = (37 * hash) + ENABLE_EXTENDED_STREAMING_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableExtendedStreaming());
hash = (37 * hash) + ENABLE_PARTIAL_AUTOMATED_AGENT_REPLY_FIELD_NUMBER;
hash =
(53 * hash)
Expand Down Expand Up @@ -1343,6 +1388,7 @@ public Builder clear() {
cxParametersBuilder_ = null;
}
cxCurrentPage_ = "";
enableExtendedStreaming_ = false;
enablePartialAutomatedAgentReply_ = false;
enableDebuggingInfo_ = false;
configCase_ = 0;
Expand Down Expand Up @@ -1414,9 +1460,12 @@ private void buildPartial0(
result.cxCurrentPage_ = cxCurrentPage_;
}
if (((from_bitField0_ & 0x00000800) != 0)) {
result.enablePartialAutomatedAgentReply_ = enablePartialAutomatedAgentReply_;
result.enableExtendedStreaming_ = enableExtendedStreaming_;
}
if (((from_bitField0_ & 0x00001000) != 0)) {
result.enablePartialAutomatedAgentReply_ = enablePartialAutomatedAgentReply_;
}
if (((from_bitField0_ & 0x00002000) != 0)) {
result.enableDebuggingInfo_ = enableDebuggingInfo_;
}
}
Expand Down Expand Up @@ -1509,6 +1558,9 @@ public Builder mergeFrom(
bitField0_ |= 0x00000400;
onChanged();
}
if (other.getEnableExtendedStreaming() != false) {
setEnableExtendedStreaming(other.getEnableExtendedStreaming());
}
if (other.getEnablePartialAutomatedAgentReply() != false) {
setEnablePartialAutomatedAgentReply(other.getEnablePartialAutomatedAgentReply());
}
Expand Down Expand Up @@ -1637,10 +1689,16 @@ public Builder mergeFrom(
inputCase_ = 9;
break;
} // case 74
case 88:
{
enableExtendedStreaming_ = input.readBool();
bitField0_ |= 0x00000800;
break;
} // case 88
case 96:
{
enablePartialAutomatedAgentReply_ = input.readBool();
bitField0_ |= 0x00000800;
bitField0_ |= 0x00001000;
break;
} // case 96
case 106:
Expand All @@ -1658,7 +1716,7 @@ public Builder mergeFrom(
case 152:
{
enableDebuggingInfo_ = input.readBool();
bitField0_ |= 0x00001000;
bitField0_ |= 0x00002000;
break;
} // case 152
default:
Expand Down Expand Up @@ -3722,6 +3780,113 @@ public Builder setCxCurrentPageBytes(com.google.protobuf.ByteString value) {
return this;
}

private boolean enableExtendedStreaming_;
/**
*
*
* <pre>
* Optional. Enable full bidirectional streaming. You can keep streaming the
* audio until timeout, and there's no need to half close the stream to get
* the response.
*
* Restrictions:
*
* - Timeout: 3 mins.
* - Audio Encoding: only supports
* [AudioEncoding.AUDIO_ENCODING_LINEAR_16][google.cloud.dialogflow.v2beta1.AudioEncoding.AUDIO_ENCODING_LINEAR_16]
* and
* [AudioEncoding.AUDIO_ENCODING_MULAW][google.cloud.dialogflow.v2beta1.AudioEncoding.AUDIO_ENCODING_MULAW]
* - Lifecycle: conversation should be in `Assist Stage`, go to
* [Conversation.CreateConversation][] for more information.
*
* InvalidArgument Error will be returned if the one of restriction checks
* failed.
*
* You can find more details in
* https://cloud.google.com/agent-assist/docs/extended-streaming
* </pre>
*
* <code>bool enable_extended_streaming = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
*
* @return The enableExtendedStreaming.
*/
@java.lang.Override
public boolean getEnableExtendedStreaming() {
return enableExtendedStreaming_;
}
/**
*
*
* <pre>
* Optional. Enable full bidirectional streaming. You can keep streaming the
* audio until timeout, and there's no need to half close the stream to get
* the response.
*
* Restrictions:
*
* - Timeout: 3 mins.
* - Audio Encoding: only supports
* [AudioEncoding.AUDIO_ENCODING_LINEAR_16][google.cloud.dialogflow.v2beta1.AudioEncoding.AUDIO_ENCODING_LINEAR_16]
* and
* [AudioEncoding.AUDIO_ENCODING_MULAW][google.cloud.dialogflow.v2beta1.AudioEncoding.AUDIO_ENCODING_MULAW]
* - Lifecycle: conversation should be in `Assist Stage`, go to
* [Conversation.CreateConversation][] for more information.
*
* InvalidArgument Error will be returned if the one of restriction checks
* failed.
*
* You can find more details in
* https://cloud.google.com/agent-assist/docs/extended-streaming
* </pre>
*
* <code>bool enable_extended_streaming = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
*
* @param value The enableExtendedStreaming to set.
* @return This builder for chaining.
*/
public Builder setEnableExtendedStreaming(boolean value) {

enableExtendedStreaming_ = value;
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
*
* <pre>
* Optional. Enable full bidirectional streaming. You can keep streaming the
* audio until timeout, and there's no need to half close the stream to get
* the response.
*
* Restrictions:
*
* - Timeout: 3 mins.
* - Audio Encoding: only supports
* [AudioEncoding.AUDIO_ENCODING_LINEAR_16][google.cloud.dialogflow.v2beta1.AudioEncoding.AUDIO_ENCODING_LINEAR_16]
* and
* [AudioEncoding.AUDIO_ENCODING_MULAW][google.cloud.dialogflow.v2beta1.AudioEncoding.AUDIO_ENCODING_MULAW]
* - Lifecycle: conversation should be in `Assist Stage`, go to
* [Conversation.CreateConversation][] for more information.
*
* InvalidArgument Error will be returned if the one of restriction checks
* failed.
*
* You can find more details in
* https://cloud.google.com/agent-assist/docs/extended-streaming
* </pre>
*
* <code>bool enable_extended_streaming = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
*
* @return This builder for chaining.
*/
public Builder clearEnableExtendedStreaming() {
bitField0_ = (bitField0_ & ~0x00000800);
enableExtendedStreaming_ = false;
onChanged();
return this;
}

private boolean enablePartialAutomatedAgentReply_;
/**
*
Expand Down Expand Up @@ -3759,7 +3924,7 @@ public boolean getEnablePartialAutomatedAgentReply() {
public Builder setEnablePartialAutomatedAgentReply(boolean value) {

enablePartialAutomatedAgentReply_ = value;
bitField0_ |= 0x00000800;
bitField0_ |= 0x00001000;
onChanged();
return this;
}
Expand All @@ -3778,7 +3943,7 @@ public Builder setEnablePartialAutomatedAgentReply(boolean value) {
* @return This builder for chaining.
*/
public Builder clearEnablePartialAutomatedAgentReply() {
bitField0_ = (bitField0_ & ~0x00000800);
bitField0_ = (bitField0_ & ~0x00001000);
enablePartialAutomatedAgentReply_ = false;
onChanged();
return this;
Expand Down Expand Up @@ -3817,7 +3982,7 @@ public boolean getEnableDebuggingInfo() {
public Builder setEnableDebuggingInfo(boolean value) {

enableDebuggingInfo_ = value;
bitField0_ |= 0x00001000;
bitField0_ |= 0x00002000;
onChanged();
return this;
}
Expand All @@ -3834,7 +3999,7 @@ public Builder setEnableDebuggingInfo(boolean value) {
* @return This builder for chaining.
*/
public Builder clearEnableDebuggingInfo() {
bitField0_ = (bitField0_ & ~0x00001000);
bitField0_ = (bitField0_ & ~0x00002000);
enableDebuggingInfo_ = false;
onChanged();
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,37 @@ public interface StreamingAnalyzeContentRequestOrBuilder
*/
com.google.protobuf.ByteString getCxCurrentPageBytes();

/**
*
*
* <pre>
* Optional. Enable full bidirectional streaming. You can keep streaming the
* audio until timeout, and there's no need to half close the stream to get
* the response.
*
* Restrictions:
*
* - Timeout: 3 mins.
* - Audio Encoding: only supports
* [AudioEncoding.AUDIO_ENCODING_LINEAR_16][google.cloud.dialogflow.v2beta1.AudioEncoding.AUDIO_ENCODING_LINEAR_16]
* and
* [AudioEncoding.AUDIO_ENCODING_MULAW][google.cloud.dialogflow.v2beta1.AudioEncoding.AUDIO_ENCODING_MULAW]
* - Lifecycle: conversation should be in `Assist Stage`, go to
* [Conversation.CreateConversation][] for more information.
*
* InvalidArgument Error will be returned if the one of restriction checks
* failed.
*
* You can find more details in
* https://cloud.google.com/agent-assist/docs/extended-streaming
* </pre>
*
* <code>bool enable_extended_streaming = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
*
* @return The enableExtendedStreaming.
*/
boolean getEnableExtendedStreaming();

/**
*
*
Expand Down
Loading

0 comments on commit e88fe30

Please sign in to comment.