Skip to content
This repository was archived by the owner on Dec 3, 2023. It is now read-only.

Commit 866ca0f

Browse files
docs: recommend AnalyzeContent for future users (#743)
* docs: recommend AnalyzeContent for future users PiperOrigin-RevId: 401877120 Source-Link: googleapis/googleapis@9af371c Source-Link: https://github.com/googleapis/googleapis-gen/commit/0db2e0b8656681fb10f186f44e87440ba3e9d873 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGRiMmUwYjg2NTY2ODFmYjEwZjE4NmY0NGU4NzQ0MGJhM2U5ZDg3MyJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: fix duplicate deprecate annotation * Update owlbot.py Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Neenu1995 <neenushaji@google.com> Co-authored-by: Neenu Shaji <Neenu1995@users.noreply.github.com>
1 parent 55bd28f commit 866ca0f

File tree

4 files changed

+145
-64
lines changed
  • google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1
  • grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1
  • proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1

4 files changed

+145
-64
lines changed

google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/SessionsClient.java

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@ public SessionsStub getStub() {
148148
* method is not idempotent, because it may cause contexts and session entity types to be updated,
149149
* which in turn might affect results of future queries.
150150
*
151+
* <p>If you might use [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa) or other CCAI
152+
* products now or in the future, consider using
153+
* [AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent] instead of
154+
* `DetectIntent`. `AnalyzeContent` has additional functionality for Agent Assist and other CCAI
155+
* products.
156+
*
151157
* <p>Note: Always use agent versions for production traffic. See [Versions and
152158
* environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
153159
*
@@ -200,6 +206,12 @@ public final DetectIntentResponse detectIntent(SessionName session, QueryInput q
200206
* method is not idempotent, because it may cause contexts and session entity types to be updated,
201207
* which in turn might affect results of future queries.
202208
*
209+
* <p>If you might use [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa) or other CCAI
210+
* products now or in the future, consider using
211+
* [AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent] instead of
212+
* `DetectIntent`. `AnalyzeContent` has additional functionality for Agent Assist and other CCAI
213+
* products.
214+
*
203215
* <p>Note: Always use agent versions for production traffic. See [Versions and
204216
* environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
205217
*
@@ -249,6 +261,12 @@ public final DetectIntentResponse detectIntent(String session, QueryInput queryI
249261
* method is not idempotent, because it may cause contexts and session entity types to be updated,
250262
* which in turn might affect results of future queries.
251263
*
264+
* <p>If you might use [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa) or other CCAI
265+
* products now or in the future, consider using
266+
* [AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent] instead of
267+
* `DetectIntent`. `AnalyzeContent` has additional functionality for Agent Assist and other CCAI
268+
* products.
269+
*
252270
* <p>Note: Always use agent versions for production traffic. See [Versions and
253271
* environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
254272
*
@@ -282,6 +300,12 @@ public final DetectIntentResponse detectIntent(DetectIntentRequest request) {
282300
* method is not idempotent, because it may cause contexts and session entity types to be updated,
283301
* which in turn might affect results of future queries.
284302
*
303+
* <p>If you might use [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa) or other CCAI
304+
* products now or in the future, consider using
305+
* [AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent] instead of
306+
* `DetectIntent`. `AnalyzeContent` has additional functionality for Agent Assist and other CCAI
307+
* products.
308+
*
285309
* <p>Note: Always use agent versions for production traffic. See [Versions and
286310
* environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
287311
*
@@ -315,6 +339,12 @@ public final UnaryCallable<DetectIntentRequest, DetectIntentResponse> detectInte
315339
* structured, actionable data as a result. This method is only available via the gRPC API (not
316340
* REST).
317341
*
342+
* <p>If you might use [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa) or other CCAI
343+
* products now or in the future, consider using
344+
* [StreamingAnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.StreamingAnalyzeContent]
345+
* instead of `StreamingDetectIntent`. `StreamingAnalyzeContent` has additional functionality for
346+
* Agent Assist and other CCAI products.
347+
*
318348
* <p>Note: Always use agent versions for production traffic. See [Versions and
319349
* environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
320350
*

grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SessionsGrpc.java

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@ public abstract static class SessionsImplBase implements io.grpc.BindableService
190190
* as a result. This method is not idempotent, because it may cause contexts
191191
* and session entity types to be updated, which in turn might affect
192192
* results of future queries.
193+
* If you might use
194+
* [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa)
195+
* or other CCAI products now or in the future, consider using
196+
* [AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent]
197+
* instead of `DetectIntent`. `AnalyzeContent` has additional
198+
* functionality for Agent Assist and other CCAI products.
193199
* Note: Always use agent versions for production traffic.
194200
* See [Versions and
195201
* environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
@@ -210,6 +216,12 @@ public void detectIntent(
210216
* Processes a natural language query in audio format in a streaming fashion
211217
* and returns structured, actionable data as a result. This method is only
212218
* available via the gRPC API (not REST).
219+
* If you might use
220+
* [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa)
221+
* or other CCAI products now or in the future, consider using
222+
* [StreamingAnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.StreamingAnalyzeContent]
223+
* instead of `StreamingDetectIntent`. `StreamingAnalyzeContent` has
224+
* additional functionality for Agent Assist and other CCAI products.
213225
* Note: Always use agent versions for production traffic.
214226
* See [Versions and
215227
* environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
@@ -273,6 +285,12 @@ protected SessionsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOp
273285
* as a result. This method is not idempotent, because it may cause contexts
274286
* and session entity types to be updated, which in turn might affect
275287
* results of future queries.
288+
* If you might use
289+
* [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa)
290+
* or other CCAI products now or in the future, consider using
291+
* [AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent]
292+
* instead of `DetectIntent`. `AnalyzeContent` has additional
293+
* functionality for Agent Assist and other CCAI products.
276294
* Note: Always use agent versions for production traffic.
277295
* See [Versions and
278296
* environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
@@ -295,6 +313,12 @@ public void detectIntent(
295313
* Processes a natural language query in audio format in a streaming fashion
296314
* and returns structured, actionable data as a result. This method is only
297315
* available via the gRPC API (not REST).
316+
* If you might use
317+
* [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa)
318+
* or other CCAI products now or in the future, consider using
319+
* [StreamingAnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.StreamingAnalyzeContent]
320+
* instead of `StreamingDetectIntent`. `StreamingAnalyzeContent` has
321+
* additional functionality for Agent Assist and other CCAI products.
298322
* Note: Always use agent versions for production traffic.
299323
* See [Versions and
300324
* environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
@@ -340,6 +364,12 @@ protected SessionsBlockingStub build(io.grpc.Channel channel, io.grpc.CallOption
340364
* as a result. This method is not idempotent, because it may cause contexts
341365
* and session entity types to be updated, which in turn might affect
342366
* results of future queries.
367+
* If you might use
368+
* [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa)
369+
* or other CCAI products now or in the future, consider using
370+
* [AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent]
371+
* instead of `DetectIntent`. `AnalyzeContent` has additional
372+
* functionality for Agent Assist and other CCAI products.
343373
* Note: Always use agent versions for production traffic.
344374
* See [Versions and
345375
* environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
@@ -380,6 +410,12 @@ protected SessionsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions
380410
* as a result. This method is not idempotent, because it may cause contexts
381411
* and session entity types to be updated, which in turn might affect
382412
* results of future queries.
413+
* If you might use
414+
* [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa)
415+
* or other CCAI products now or in the future, consider using
416+
* [AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent]
417+
* instead of `DetectIntent`. `AnalyzeContent` has additional
418+
* functionality for Agent Assist and other CCAI products.
383419
* Note: Always use agent versions for production traffic.
384420
* See [Versions and
385421
* environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).

owlbot.py

Lines changed: 65 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -19,75 +19,76 @@
1919
for library in s.get_staging_dirs():
2020
# put any special-case replacements here
2121
# TODO: remove this for the next major version bump
22-
s.replace(
23-
'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java',
24-
'public static String formatProjectName',
25-
'public static String formatProjectAgentName'
26-
)
27-
s.replace(
28-
'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java',
29-
'public static String formatProjectLocationName',
30-
'public static String formatProjectLocationAgentName'
31-
)
32-
s.replace(
33-
'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java',
34-
'ProjectBuilder',
35-
'ProjectAgentBuilder'
36-
)
37-
s.replace(
38-
'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java',
39-
'ProjectLocationBuilder',
40-
'ProjectLocationAgentBuilder'
41-
)
22+
if 'formatProjectAgentName' not in open('owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java').read():
23+
s.replace(
24+
'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java',
25+
'public static String formatProjectName',
26+
'public static String formatProjectAgentName'
27+
)
28+
s.replace(
29+
'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java',
30+
'public static String formatProjectLocationName',
31+
'public static String formatProjectLocationAgentName'
32+
)
33+
s.replace(
34+
'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java',
35+
'ProjectBuilder',
36+
'ProjectAgentBuilder'
37+
)
38+
s.replace(
39+
'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java',
40+
'ProjectLocationBuilder',
41+
'ProjectLocationAgentBuilder'
42+
)
4243

43-
DEPRECATION_JAVADOC = """Please use {{@link #{new_method}()}} instead"""
44+
DEPRECATION_JAVADOC = """Please use {{@link #{new_method}()}} instead"""
4445

4546

46-
java.copy_and_rename_method(
47-
'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java',
48-
'public static AgentName ofProjectName(String project)',
49-
'ofProjectName',
50-
'ofProjectAgentName'
51-
)
52-
java.deprecate_method(
53-
'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java',
54-
'public static AgentName ofProjectAgentName(String project)',
55-
DEPRECATION_JAVADOC.format(new_method='ofProjectName')
56-
)
57-
s.replace(
58-
'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java',
59-
'return ofProjectName',
60-
'return ofProjectAgentName'
61-
)
62-
s.replace(
63-
'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java',
64-
'return ofProjectLocationName',
65-
'return ofProjectLocationAgentName'
66-
)
67-
java.copy_and_rename_method(
68-
'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java',
69-
'public static AgentName ofProjectLocationName(String project, String location)',
70-
'ofProjectLocationName',
71-
'ofProjectLocationAgentName'
72-
)
73-
java.deprecate_method(
74-
'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java',
75-
'public static AgentName ofProjectLocationAgentName(String project, String location)',
76-
DEPRECATION_JAVADOC.format(new_method='ofProjectLocationName')
77-
)
47+
java.copy_and_rename_method(
48+
'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java',
49+
'public static AgentName ofProjectName(String project)',
50+
'ofProjectName',
51+
'ofProjectAgentName'
52+
)
53+
java.deprecate_method(
54+
'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java',
55+
'public static AgentName ofProjectAgentName(String project)',
56+
DEPRECATION_JAVADOC.format(new_method='ofProjectName')
57+
)
58+
s.replace(
59+
'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java',
60+
'return ofProjectName',
61+
'return ofProjectAgentName'
62+
)
63+
s.replace(
64+
'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java',
65+
'return ofProjectLocationName',
66+
'return ofProjectLocationAgentName'
67+
)
68+
java.copy_and_rename_method(
69+
'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java',
70+
'public static AgentName ofProjectLocationName(String project, String location)',
71+
'ofProjectLocationName',
72+
'ofProjectLocationAgentName'
73+
)
74+
java.deprecate_method(
75+
'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java',
76+
'public static AgentName ofProjectLocationAgentName(String project, String location)',
77+
DEPRECATION_JAVADOC.format(new_method='ofProjectLocationName')
78+
)
7879

79-
s.replace(
80-
[
81-
'owl-bot-staging/v2beta1/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/AgentsClientTest.java',
82-
'owl-bot-staging/v2beta1/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/EnvironmentsClientTest.java',
83-
'owl-bot-staging/v2beta1/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/EntityTypesClientTest.java',
84-
'owl-bot-staging/v2beta1/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/IntentsClientTest.java',
85-
'owl-bot-staging/v2beta1/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/VersionsClientTest.java'
80+
s.replace(
81+
[
82+
'owl-bot-staging/v2beta1/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/AgentsClientTest.java',
83+
'owl-bot-staging/v2beta1/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/EnvironmentsClientTest.java',
84+
'owl-bot-staging/v2beta1/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/EntityTypesClientTest.java',
85+
'owl-bot-staging/v2beta1/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/IntentsClientTest.java',
86+
'owl-bot-staging/v2beta1/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/VersionsClientTest.java'
8687

87-
],
88-
'ofProjectName',
89-
'ofProjectAgentName'
90-
)
88+
],
89+
'ofProjectName',
90+
'ofProjectAgentName'
91+
)
9192
s.move(library)
9293

9394
s.remove_staging_dirs()

proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/session.proto

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ service Sessions {
6262
// and session entity types to be updated, which in turn might affect
6363
// results of future queries.
6464
//
65+
// If you might use
66+
// [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa)
67+
// or other CCAI products now or in the future, consider using
68+
// [AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent]
69+
// instead of `DetectIntent`. `AnalyzeContent` has additional
70+
// functionality for Agent Assist and other CCAI products.
71+
//
6572
// Note: Always use agent versions for production traffic.
6673
// See [Versions and
6774
// environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
@@ -89,6 +96,13 @@ service Sessions {
8996
// and returns structured, actionable data as a result. This method is only
9097
// available via the gRPC API (not REST).
9198
//
99+
// If you might use
100+
// [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa)
101+
// or other CCAI products now or in the future, consider using
102+
// [StreamingAnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.StreamingAnalyzeContent]
103+
// instead of `StreamingDetectIntent`. `StreamingAnalyzeContent` has
104+
// additional functionality for Agent Assist and other CCAI products.
105+
//
92106
// Note: Always use agent versions for production traffic.
93107
// See [Versions and
94108
// environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).

0 commit comments

Comments
 (0)