Skip to content

Commit d1a38a3

Browse files
authored
dialogflow: delete samples that are not in docs (#2602)
* dialogflow: delete samples that are not in docs and fix the tests that are broken after the deletions * update README
1 parent e0a6d4a commit d1a38a3

20 files changed

+196
-1174
lines changed

dialogflow/cloud-client/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ To get started, [download][maven-download] and [install][maven-install] it.
3737
```
3838
* Set PROJECT_ID in pom.xml to your Google Cloud Project Id.
3939
* Set SESSION_ID in pom.xml to a session name of your choice. (Defaults to SESSION_ID)
40-
* Set CONTEXT_ID in pom.xml to a context name of your choice. (Defaults to CONTEXT_ID)
4140

4241
[cloud-console]: https://console.cloud.google.com
4342
[dialogflow-api]: https://console.cloud.google.com/apis/library/dialogflow.googleapis.com

dialogflow/cloud-client/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333

3434
<projectId>java-docs-samples-testing</projectId> <!-- TODO SET PROJECT_ID -->
3535
<sessionId>SESSION_ID</sessionId> <!-- TODO SET SESSION_ID -->
36-
<contextId>CONTEXT_ID</contextId> <!-- TODO SET CONTEXT_ID -->
3736
</properties>
3837

3938
<dependencies>

dialogflow/cloud-client/src/main/java/com/example/dialogflow/ContextManagement.java

Lines changed: 0 additions & 131 deletions
This file was deleted.

dialogflow/cloud-client/src/main/java/com/example/dialogflow/DetectIntentKnowledge.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import com.google.cloud.dialogflow.v2beta1.SessionName;
2929
import com.google.cloud.dialogflow.v2beta1.SessionsClient;
3030
import com.google.cloud.dialogflow.v2beta1.TextInput;
31-
import com.google.cloud.dialogflow.v2beta1.TextInput.Builder;
3231
import com.google.common.collect.Maps;
3332
import java.util.List;
3433
import java.util.Map;
@@ -67,7 +66,8 @@ public static Map<String, KnowledgeAnswers> detectIntentKnowledge(
6766
// Detect intents for each text input
6867
for (String text : texts) {
6968
// Set the text and language code (en-US) for the query
70-
Builder textInput = TextInput.newBuilder().setText(text).setLanguageCode(languageCode);
69+
TextInput.Builder textInput =
70+
TextInput.newBuilder().setText(text).setLanguageCode(languageCode);
7171
// Build the query with the TextInput
7272
QueryInput queryInput = QueryInput.newBuilder().setText(textInput).build();
7373

dialogflow/cloud-client/src/main/java/com/example/dialogflow/DetectIntentTexts.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import com.google.cloud.dialogflow.v2.SessionName;
2525
import com.google.cloud.dialogflow.v2.SessionsClient;
2626
import com.google.cloud.dialogflow.v2.TextInput;
27-
import com.google.cloud.dialogflow.v2.TextInput.Builder;
2827
import com.google.common.collect.Maps;
2928
import java.util.List;
3029
import java.util.Map;
@@ -61,7 +60,8 @@ public static Map<String, QueryResult> detectIntentTexts(
6160
// Detect intents for each text input
6261
for (String text : texts) {
6362
// Set the text (hello) and language code (en-US) for the query
64-
Builder textInput = TextInput.newBuilder().setText(text).setLanguageCode(languageCode);
63+
TextInput.Builder textInput =
64+
TextInput.newBuilder().setText(text).setLanguageCode(languageCode);
6565

6666
// Build the query with the TextInput
6767
QueryInput queryInput = QueryInput.newBuilder().setText(textInput).build();

dialogflow/cloud-client/src/main/java/com/example/dialogflow/DetectIntentWithModelSelection.java

Lines changed: 0 additions & 100 deletions
This file was deleted.

dialogflow/cloud-client/src/main/java/com/example/dialogflow/DetectIntentWithSentimentAnalysis.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import com.google.cloud.dialogflow.v2.SessionName;
2626
import com.google.cloud.dialogflow.v2.SessionsClient;
2727
import com.google.cloud.dialogflow.v2.TextInput;
28-
import com.google.cloud.dialogflow.v2.TextInput.Builder;
2928
import com.google.common.collect.Maps;
3029
import java.util.List;
3130
import java.util.Map;
@@ -59,7 +58,8 @@ public static Map<String, QueryResult> detectIntentSentimentAnalysis(
5958
// Detect intents for each text input
6059
for (String text : texts) {
6160
// Set the text (hello) and language code (en-US) for the query
62-
Builder textInput = TextInput.newBuilder().setText(text).setLanguageCode(languageCode);
61+
TextInput.Builder textInput =
62+
TextInput.newBuilder().setText(text).setLanguageCode(languageCode);
6363

6464
// Build the query with the TextInput
6565
QueryInput queryInput = QueryInput.newBuilder().setText(textInput).build();

dialogflow/cloud-client/src/main/java/com/example/dialogflow/DetectIntentWithTextToSpeechResponse.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import com.google.cloud.dialogflow.v2.SessionName;
2626
import com.google.cloud.dialogflow.v2.SessionsClient;
2727
import com.google.cloud.dialogflow.v2.TextInput;
28-
import com.google.cloud.dialogflow.v2.TextInput.Builder;
2928
import com.google.common.collect.Maps;
3029
import java.util.List;
3130
import java.util.Map;
@@ -59,7 +58,8 @@ public static Map<String, QueryResult> detectIntentWithTexttoSpeech(
5958
// Detect intents for each text input
6059
for (String text : texts) {
6160
// Set the text (hello) and language code (en-US) for the query
62-
Builder textInput = TextInput.newBuilder().setText(text).setLanguageCode(languageCode);
61+
TextInput.Builder textInput =
62+
TextInput.newBuilder().setText(text).setLanguageCode(languageCode);
6363

6464
// Build the query with the TextInput
6565
QueryInput queryInput = QueryInput.newBuilder().setText(textInput).build();

0 commit comments

Comments
 (0)