Skip to content

Commit

Permalink
feat: [dialogflow-cx] extended CreateAgent timeout to 180 seconds (#9412
Browse files Browse the repository at this point in the history
)

- [ ] Regenerate this pull request now.

feat: added debug info to StreamingDetectIntent
feat: added dtmf digits to WebhookRequest
feat: added FLOW as a new DiffType in TestRunDifference

PiperOrigin-RevId: 530032469

Source-Link: https://togithub.com/googleapis/googleapis/commit/ff708e3c524d07dbdbd8fed166ad04826b698978

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/0578b38c68f029328a20bac22b288353bdaac4b7
Copy-Tag: eyJwIjoiamF2YS1kaWFsb2dmbG93LWN4Ly5Pd2xCb3QueWFtbCIsImgiOiIwNTc4YjM4YzY4ZjAyOTMyOGEyMGJhYzIyYjI4ODM1M2JkYWFjNGI3In0=

BEGIN_NESTED_COMMIT
feat: [dialogflow-cx] extended CreateAgent timeout to 180 seconds
feat: added debug info to StreamingDetectIntent
feat: added dtmf digits to WebhookRequest
feat: added FLOW as a new DiffType in TestRunDifference

PiperOrigin-RevId: 529897408

Source-Link: https://togithub.com/googleapis/googleapis/commit/4de416f616c8d3be32ea5cf54a49527e0a642db4

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/a9b661f9feb75e2803fe1b5b635e35b89cb1bc76
Copy-Tag: eyJwIjoiamF2YS1kaWFsb2dmbG93LWN4Ly5Pd2xCb3QueWFtbCIsImgiOiJhOWI2NjFmOWZlYjc1ZTI4MDNmZTFiNWI2MzVlMzViODljYjFiYzc2In0=
END_NESTED_COMMIT
  • Loading branch information
gcf-owl-bot[bot] authored May 9, 2023
1 parent 01db330 commit 20ddfda
Show file tree
Hide file tree
Showing 107 changed files with 14,428 additions and 1,442 deletions.
4 changes: 2 additions & 2 deletions java-dialogflow-cx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.11.0</version>
<version>26.14.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[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-preview-yellow
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-dialogflow-cx.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dialogflow-cx/0.25.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dialogflow-cx/0.27.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ public final UnaryCallable<DetectIntentRequest, DetectIntentResponse> detectInte
* .setQueryInput(QueryInput.newBuilder().build())
* .setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
* .setEnablePartialResponse(true)
* .setEnableDebuggingInfo(true)
* .build();
* bidiStream.send(request);
* for (StreamingDetectIntentResponse response : bidiStream) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,9 @@ public static class Builder extends StubSettings.Builder<AgentsStubSettings, Bui
definitions.put(
"retry_policy_0_codes",
ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList(StatusCode.Code.UNAVAILABLE)));
definitions.put(
"retry_policy_1_codes",
ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList(StatusCode.Code.UNAVAILABLE)));
RETRYABLE_CODE_DEFINITIONS = definitions.build();
}

Expand All @@ -489,6 +492,17 @@ public static class Builder extends StubSettings.Builder<AgentsStubSettings, Bui
.setTotalTimeout(Duration.ofMillis(60000L))
.build();
definitions.put("retry_policy_0_params", settings);
settings =
RetrySettings.newBuilder()
.setInitialRetryDelay(Duration.ofMillis(100L))
.setRetryDelayMultiplier(1.3)
.setMaxRetryDelay(Duration.ofMillis(60000L))
.setInitialRpcTimeout(Duration.ofMillis(180000L))
.setRpcTimeoutMultiplier(1.0)
.setMaxRpcTimeout(Duration.ofMillis(180000L))
.setTotalTimeout(Duration.ofMillis(180000L))
.build();
definitions.put("retry_policy_1_params", settings);
RETRY_PARAM_DEFINITIONS = definitions.build();
}

Expand Down Expand Up @@ -600,8 +614,8 @@ private static Builder initDefaults(Builder builder) {

builder
.createAgentSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));

builder
.updateAgentSettings()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,10 +341,10 @@ public static class Builder extends StubSettings.Builder<SessionsStubSettings, B
ImmutableMap.Builder<String, ImmutableSet<StatusCode.Code>> definitions =
ImmutableMap.builder();
definitions.put(
"retry_policy_1_codes",
"retry_policy_2_codes",
ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList(StatusCode.Code.UNAVAILABLE)));
definitions.put(
"no_retry_2_codes", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
"no_retry_3_codes", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
definitions.put(
"retry_policy_0_codes",
ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList(StatusCode.Code.UNAVAILABLE)));
Expand All @@ -366,15 +366,15 @@ public static class Builder extends StubSettings.Builder<SessionsStubSettings, B
.setMaxRpcTimeout(Duration.ofMillis(220000L))
.setTotalTimeout(Duration.ofMillis(220000L))
.build();
definitions.put("retry_policy_1_params", settings);
definitions.put("retry_policy_2_params", settings);
settings =
RetrySettings.newBuilder()
.setInitialRpcTimeout(Duration.ofMillis(220000L))
.setRpcTimeoutMultiplier(1.0)
.setMaxRpcTimeout(Duration.ofMillis(220000L))
.setTotalTimeout(Duration.ofMillis(220000L))
.build();
definitions.put("no_retry_2_params", settings);
definitions.put("no_retry_3_params", settings);
settings =
RetrySettings.newBuilder()
.setInitialRetryDelay(Duration.ofMillis(100L))
Expand Down Expand Up @@ -461,8 +461,8 @@ private static Builder createHttpJsonDefault() {
private static Builder initDefaults(Builder builder) {
builder
.detectIntentSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params"));

builder
.matchIntentSettings()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ public final UnaryCallable<DetectIntentRequest, DetectIntentResponse> detectInte
* .setQueryInput(QueryInput.newBuilder().build())
* .setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
* .setEnablePartialResponse(true)
* .setEnableDebuggingInfo(true)
* .build();
* bidiStream.send(request);
* for (StreamingDetectIntentResponse response : bidiStream) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,9 @@ public static class Builder extends StubSettings.Builder<AgentsStubSettings, Bui
definitions.put(
"retry_policy_0_codes",
ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList(StatusCode.Code.UNAVAILABLE)));
definitions.put(
"retry_policy_1_codes",
ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList(StatusCode.Code.UNAVAILABLE)));
RETRYABLE_CODE_DEFINITIONS = definitions.build();
}

Expand All @@ -490,6 +493,17 @@ public static class Builder extends StubSettings.Builder<AgentsStubSettings, Bui
.setTotalTimeout(Duration.ofMillis(60000L))
.build();
definitions.put("retry_policy_0_params", settings);
settings =
RetrySettings.newBuilder()
.setInitialRetryDelay(Duration.ofMillis(100L))
.setRetryDelayMultiplier(1.3)
.setMaxRetryDelay(Duration.ofMillis(60000L))
.setInitialRpcTimeout(Duration.ofMillis(180000L))
.setRpcTimeoutMultiplier(1.0)
.setMaxRpcTimeout(Duration.ofMillis(180000L))
.setTotalTimeout(Duration.ofMillis(180000L))
.build();
definitions.put("retry_policy_1_params", settings);
RETRY_PARAM_DEFINITIONS = definitions.build();
}

Expand Down Expand Up @@ -601,8 +615,8 @@ private static Builder initDefaults(Builder builder) {

builder
.createAgentSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));

builder
.updateAgentSettings()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,10 @@ public static class Builder extends StubSettings.Builder<SessionsStubSettings, B
ImmutableMap.Builder<String, ImmutableSet<StatusCode.Code>> definitions =
ImmutableMap.builder();
definitions.put(
"retry_policy_1_codes",
"retry_policy_2_codes",
ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList(StatusCode.Code.UNAVAILABLE)));
definitions.put(
"no_retry_2_codes", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
"no_retry_3_codes", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
definitions.put(
"retry_policy_0_codes",
ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList(StatusCode.Code.UNAVAILABLE)));
Expand All @@ -367,15 +367,15 @@ public static class Builder extends StubSettings.Builder<SessionsStubSettings, B
.setMaxRpcTimeout(Duration.ofMillis(220000L))
.setTotalTimeout(Duration.ofMillis(220000L))
.build();
definitions.put("retry_policy_1_params", settings);
definitions.put("retry_policy_2_params", settings);
settings =
RetrySettings.newBuilder()
.setInitialRpcTimeout(Duration.ofMillis(220000L))
.setRpcTimeoutMultiplier(1.0)
.setMaxRpcTimeout(Duration.ofMillis(220000L))
.setTotalTimeout(Duration.ofMillis(220000L))
.build();
definitions.put("no_retry_2_params", settings);
definitions.put("no_retry_3_params", settings);
settings =
RetrySettings.newBuilder()
.setInitialRetryDelay(Duration.ofMillis(100L))
Expand Down Expand Up @@ -462,8 +462,8 @@ private static Builder createHttpJsonDefault() {
private static Builder initDefaults(Builder builder) {
builder
.detectIntentSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params"));

builder
.matchIntentSettings()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ public void detectIntentExceptionTest() throws Exception {
@Test
public void streamingDetectIntentTest() throws Exception {
StreamingDetectIntentResponse expectedResponse =
StreamingDetectIntentResponse.newBuilder().build();
StreamingDetectIntentResponse.newBuilder()
.setDebuggingInfo(CloudConversationDebuggingInfo.newBuilder().build())
.build();
mockSessions.addResponse(expectedResponse);
StreamingDetectIntentRequest request =
StreamingDetectIntentRequest.newBuilder()
Expand All @@ -172,6 +174,7 @@ public void streamingDetectIntentTest() throws Exception {
.setQueryInput(QueryInput.newBuilder().build())
.setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
.setEnablePartialResponse(true)
.setEnableDebuggingInfo(true)
.build();

MockStreamObserver<StreamingDetectIntentResponse> responseObserver = new MockStreamObserver<>();
Expand Down Expand Up @@ -203,6 +206,7 @@ public void streamingDetectIntentExceptionTest() throws Exception {
.setQueryInput(QueryInput.newBuilder().build())
.setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
.setEnablePartialResponse(true)
.setEnableDebuggingInfo(true)
.build();

MockStreamObserver<StreamingDetectIntentResponse> responseObserver = new MockStreamObserver<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ public void detectIntentExceptionTest() throws Exception {
@Test
public void streamingDetectIntentTest() throws Exception {
StreamingDetectIntentResponse expectedResponse =
StreamingDetectIntentResponse.newBuilder().build();
StreamingDetectIntentResponse.newBuilder()
.setDebuggingInfo(CloudConversationDebuggingInfo.newBuilder().build())
.build();
mockSessions.addResponse(expectedResponse);
StreamingDetectIntentRequest request =
StreamingDetectIntentRequest.newBuilder()
Expand All @@ -172,6 +174,7 @@ public void streamingDetectIntentTest() throws Exception {
.setQueryInput(QueryInput.newBuilder().build())
.setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
.setEnablePartialResponse(true)
.setEnableDebuggingInfo(true)
.build();

MockStreamObserver<StreamingDetectIntentResponse> responseObserver = new MockStreamObserver<>();
Expand Down Expand Up @@ -203,6 +206,7 @@ public void streamingDetectIntentExceptionTest() throws Exception {
.setQueryInput(QueryInput.newBuilder().build())
.setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
.setEnablePartialResponse(true)
.setEnableDebuggingInfo(true)
.build();

MockStreamObserver<StreamingDetectIntentResponse> responseObserver = new MockStreamObserver<>();
Expand Down
Loading

0 comments on commit 20ddfda

Please sign in to comment.