Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
6 changes: 3 additions & 3 deletions java-dialogflow-cx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ If you are using Maven, add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-dialogflow-cx</artifactId>
<version>0.20.0</version>
<version>0.22.0</version>
</dependency>
```

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

```Groovy
implementation 'com.google.cloud:google-cloud-dialogflow-cx:0.20.0'
implementation 'com.google.cloud:google-cloud-dialogflow-cx:0.22.0'
```

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

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-dialogflow-cx" % "0.20.0"
libraryDependencies += "com.google.cloud" % "google-cloud-dialogflow-cx" % "0.22.0"
```

## Authentication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ public final UnaryCallable<DetectIntentRequest, DetectIntentResponse> detectInte
* .toString())
* .setQueryParams(QueryParameters.newBuilder().build())
* .setQueryInput(QueryInput.newBuilder().build())
* .setPersistParameterChanges(true)
* .build();
* MatchIntentResponse response = sessionsClient.matchIntent(request);
* }
Expand Down Expand Up @@ -359,6 +360,7 @@ public final MatchIntentResponse matchIntent(MatchIntentRequest request) {
* .toString())
* .setQueryParams(QueryParameters.newBuilder().build())
* .setQueryInput(QueryInput.newBuilder().build())
* .setPersistParameterChanges(true)
* .build();
* ApiFuture<MatchIntentResponse> future =
* sessionsClient.matchIntentCallable().futureCall(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ public void getAgentTest() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -265,6 +266,7 @@ public void getAgentTest2() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -324,6 +326,7 @@ public void createAgentTest() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -385,6 +388,7 @@ public void createAgentTest2() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -446,6 +450,7 @@ public void updateAgentTest() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand All @@ -467,6 +472,7 @@ public void updateAgentTest() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
FieldMask updateMask = FieldMask.newBuilder().build();

Expand Down Expand Up @@ -514,6 +520,7 @@ public void updateAgentExceptionTest() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
FieldMask updateMask = FieldMask.newBuilder().build();
client.updateAgent(agent, updateMask);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ public void getAgentTest() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockAgents.addResponse(expectedResponse);

Expand Down Expand Up @@ -255,6 +256,7 @@ public void getAgentTest2() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockAgents.addResponse(expectedResponse);

Expand Down Expand Up @@ -308,6 +310,7 @@ public void createAgentTest() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockAgents.addResponse(expectedResponse);

Expand Down Expand Up @@ -364,6 +367,7 @@ public void createAgentTest2() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockAgents.addResponse(expectedResponse);

Expand Down Expand Up @@ -420,6 +424,7 @@ public void updateAgentTest() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockAgents.addResponse(expectedResponse);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ public void matchIntentTest() throws Exception {
.toString())
.setQueryParams(QueryParameters.newBuilder().build())
.setQueryInput(QueryInput.newBuilder().build())
.setPersistParameterChanges(true)
.build();

MatchIntentResponse actualResponse = client.matchIntent(request);
Expand Down Expand Up @@ -207,6 +208,7 @@ public void matchIntentExceptionTest() throws Exception {
.toString())
.setQueryParams(QueryParameters.newBuilder().build())
.setQueryInput(QueryInput.newBuilder().build())
.setPersistParameterChanges(true)
.build();
client.matchIntent(request);
Assert.fail("No exception raised");
Expand Down Expand Up @@ -236,6 +238,7 @@ public void fulfillIntentTest() throws Exception {
.toString())
.setQueryParams(QueryParameters.newBuilder().build())
.setQueryInput(QueryInput.newBuilder().build())
.setPersistParameterChanges(true)
.build())
.setMatch(Match.newBuilder().build())
.setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
Expand Down Expand Up @@ -277,6 +280,7 @@ public void fulfillIntentExceptionTest() throws Exception {
.toString())
.setQueryParams(QueryParameters.newBuilder().build())
.setQueryInput(QueryInput.newBuilder().build())
.setPersistParameterChanges(true)
.build())
.setMatch(Match.newBuilder().build())
.setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ public void matchIntentTest() throws Exception {
.toString())
.setQueryParams(QueryParameters.newBuilder().build())
.setQueryInput(QueryInput.newBuilder().build())
.setPersistParameterChanges(true)
.build();

MatchIntentResponse actualResponse = client.matchIntent(request);
Expand All @@ -253,6 +254,8 @@ public void matchIntentTest() throws Exception {
Assert.assertEquals(request.getSession(), actualRequest.getSession());
Assert.assertEquals(request.getQueryParams(), actualRequest.getQueryParams());
Assert.assertEquals(request.getQueryInput(), actualRequest.getQueryInput());
Assert.assertEquals(
request.getPersistParameterChanges(), actualRequest.getPersistParameterChanges());
Assert.assertTrue(
channelProvider.isHeaderSent(
ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
Expand All @@ -273,6 +276,7 @@ public void matchIntentExceptionTest() throws Exception {
.toString())
.setQueryParams(QueryParameters.newBuilder().build())
.setQueryInput(QueryInput.newBuilder().build())
.setPersistParameterChanges(true)
.build();
client.matchIntent(request);
Assert.fail("No exception raised");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ public void getAgentTest() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -265,6 +266,7 @@ public void getAgentTest2() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -324,6 +326,7 @@ public void createAgentTest() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -385,6 +388,7 @@ public void createAgentTest2() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -446,6 +450,7 @@ public void updateAgentTest() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand All @@ -467,6 +472,7 @@ public void updateAgentTest() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
FieldMask updateMask = FieldMask.newBuilder().build();

Expand Down Expand Up @@ -514,6 +520,7 @@ public void updateAgentExceptionTest() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
FieldMask updateMask = FieldMask.newBuilder().build();
client.updateAgent(agent, updateMask);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ public void getAgentTest() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockAgents.addResponse(expectedResponse);

Expand Down Expand Up @@ -255,6 +256,7 @@ public void getAgentTest2() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockAgents.addResponse(expectedResponse);

Expand Down Expand Up @@ -308,6 +310,7 @@ public void createAgentTest() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockAgents.addResponse(expectedResponse);

Expand Down Expand Up @@ -364,6 +367,7 @@ public void createAgentTest2() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockAgents.addResponse(expectedResponse);

Expand Down Expand Up @@ -420,6 +424,7 @@ public void updateAgentTest() throws Exception {
.setEnableSpellCorrection(true)
.setLocked(true)
.setAdvancedSettings(AdvancedSettings.newBuilder().build())
.setTextToSpeechSettings(TextToSpeechSettings.newBuilder().build())
.build();
mockAgents.addResponse(expectedResponse);

Expand Down
Loading