diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/SessionsClient.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/SessionsClient.java index 4e2db6dce..7a9b6a581 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/SessionsClient.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/SessionsClient.java @@ -148,6 +148,12 @@ public SessionsStub getStub() { * method is not idempotent, because it may cause contexts and session entity types to be updated, * which in turn might affect results of future queries. * + *

If you might use [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa) or other CCAI + * products now or in the future, consider using + * [AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent] instead of + * `DetectIntent`. `AnalyzeContent` has additional functionality for Agent Assist and other CCAI + * products. + * *

Note: Always use agent versions for production traffic. See [Versions and * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). * @@ -200,6 +206,12 @@ public final DetectIntentResponse detectIntent(SessionName session, QueryInput q * method is not idempotent, because it may cause contexts and session entity types to be updated, * which in turn might affect results of future queries. * + *

If you might use [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa) or other CCAI + * products now or in the future, consider using + * [AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent] instead of + * `DetectIntent`. `AnalyzeContent` has additional functionality for Agent Assist and other CCAI + * products. + * *

Note: Always use agent versions for production traffic. See [Versions and * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). * @@ -249,6 +261,12 @@ public final DetectIntentResponse detectIntent(String session, QueryInput queryI * method is not idempotent, because it may cause contexts and session entity types to be updated, * which in turn might affect results of future queries. * + *

If you might use [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa) or other CCAI + * products now or in the future, consider using + * [AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent] instead of + * `DetectIntent`. `AnalyzeContent` has additional functionality for Agent Assist and other CCAI + * products. + * *

Note: Always use agent versions for production traffic. See [Versions and * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). * @@ -282,6 +300,12 @@ public final DetectIntentResponse detectIntent(DetectIntentRequest request) { * method is not idempotent, because it may cause contexts and session entity types to be updated, * which in turn might affect results of future queries. * + *

If you might use [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa) or other CCAI + * products now or in the future, consider using + * [AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent] instead of + * `DetectIntent`. `AnalyzeContent` has additional functionality for Agent Assist and other CCAI + * products. + * *

Note: Always use agent versions for production traffic. See [Versions and * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). * @@ -315,6 +339,12 @@ public final UnaryCallable detectInte * structured, actionable data as a result. This method is only available via the gRPC API (not * REST). * + *

If you might use [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa) or other CCAI + * products now or in the future, consider using + * [StreamingAnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.StreamingAnalyzeContent] + * instead of `StreamingDetectIntent`. `StreamingAnalyzeContent` has additional functionality for + * Agent Assist and other CCAI products. + * *

Note: Always use agent versions for production traffic. See [Versions and * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). * diff --git a/grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SessionsGrpc.java b/grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SessionsGrpc.java index 9883d83fd..029b01aab 100644 --- a/grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SessionsGrpc.java +++ b/grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SessionsGrpc.java @@ -190,6 +190,12 @@ public abstract static class SessionsImplBase implements io.grpc.BindableService * as a result. This method is not idempotent, because it may cause contexts * and session entity types to be updated, which in turn might affect * results of future queries. + * If you might use + * [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa) + * or other CCAI products now or in the future, consider using + * [AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent] + * instead of `DetectIntent`. `AnalyzeContent` has additional + * functionality for Agent Assist and other CCAI products. * Note: Always use agent versions for production traffic. * See [Versions and * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). @@ -210,6 +216,12 @@ public void detectIntent( * Processes a natural language query in audio format in a streaming fashion * and returns structured, actionable data as a result. This method is only * available via the gRPC API (not REST). + * If you might use + * [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa) + * or other CCAI products now or in the future, consider using + * [StreamingAnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.StreamingAnalyzeContent] + * instead of `StreamingDetectIntent`. `StreamingAnalyzeContent` has + * additional functionality for Agent Assist and other CCAI products. * Note: Always use agent versions for production traffic. * See [Versions and * 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 * as a result. This method is not idempotent, because it may cause contexts * and session entity types to be updated, which in turn might affect * results of future queries. + * If you might use + * [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa) + * or other CCAI products now or in the future, consider using + * [AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent] + * instead of `DetectIntent`. `AnalyzeContent` has additional + * functionality for Agent Assist and other CCAI products. * Note: Always use agent versions for production traffic. * See [Versions and * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). @@ -295,6 +313,12 @@ public void detectIntent( * Processes a natural language query in audio format in a streaming fashion * and returns structured, actionable data as a result. This method is only * available via the gRPC API (not REST). + * If you might use + * [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa) + * or other CCAI products now or in the future, consider using + * [StreamingAnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.StreamingAnalyzeContent] + * instead of `StreamingDetectIntent`. `StreamingAnalyzeContent` has + * additional functionality for Agent Assist and other CCAI products. * Note: Always use agent versions for production traffic. * See [Versions and * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). @@ -340,6 +364,12 @@ protected SessionsBlockingStub build(io.grpc.Channel channel, io.grpc.CallOption * as a result. This method is not idempotent, because it may cause contexts * and session entity types to be updated, which in turn might affect * results of future queries. + * If you might use + * [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa) + * or other CCAI products now or in the future, consider using + * [AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent] + * instead of `DetectIntent`. `AnalyzeContent` has additional + * functionality for Agent Assist and other CCAI products. * Note: Always use agent versions for production traffic. * See [Versions and * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). @@ -380,6 +410,12 @@ protected SessionsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions * as a result. This method is not idempotent, because it may cause contexts * and session entity types to be updated, which in turn might affect * results of future queries. + * If you might use + * [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa) + * or other CCAI products now or in the future, consider using + * [AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent] + * instead of `DetectIntent`. `AnalyzeContent` has additional + * functionality for Agent Assist and other CCAI products. * Note: Always use agent versions for production traffic. * See [Versions and * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). diff --git a/owlbot.py b/owlbot.py index d5db2784e..3270e310d 100644 --- a/owlbot.py +++ b/owlbot.py @@ -19,75 +19,76 @@ for library in s.get_staging_dirs(): # put any special-case replacements here # TODO: remove this for the next major version bump - s.replace( - 'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java', - 'public static String formatProjectName', - 'public static String formatProjectAgentName' - ) - s.replace( - 'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java', - 'public static String formatProjectLocationName', - 'public static String formatProjectLocationAgentName' - ) - s.replace( - 'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java', - 'ProjectBuilder', - 'ProjectAgentBuilder' - ) - s.replace( - 'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java', - 'ProjectLocationBuilder', - 'ProjectLocationAgentBuilder' - ) + 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(): + s.replace( + 'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java', + 'public static String formatProjectName', + 'public static String formatProjectAgentName' + ) + s.replace( + 'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java', + 'public static String formatProjectLocationName', + 'public static String formatProjectLocationAgentName' + ) + s.replace( + 'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java', + 'ProjectBuilder', + 'ProjectAgentBuilder' + ) + s.replace( + 'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java', + 'ProjectLocationBuilder', + 'ProjectLocationAgentBuilder' + ) - DEPRECATION_JAVADOC = """Please use {{@link #{new_method}()}} instead""" + DEPRECATION_JAVADOC = """Please use {{@link #{new_method}()}} instead""" - java.copy_and_rename_method( - 'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java', - 'public static AgentName ofProjectName(String project)', - 'ofProjectName', - 'ofProjectAgentName' - ) - java.deprecate_method( - 'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java', - 'public static AgentName ofProjectAgentName(String project)', - DEPRECATION_JAVADOC.format(new_method='ofProjectName') - ) - s.replace( - 'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java', - 'return ofProjectName', - 'return ofProjectAgentName' - ) - s.replace( - 'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java', - 'return ofProjectLocationName', - 'return ofProjectLocationAgentName' - ) - java.copy_and_rename_method( - 'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java', - 'public static AgentName ofProjectLocationName(String project, String location)', - 'ofProjectLocationName', - 'ofProjectLocationAgentName' - ) - java.deprecate_method( - 'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java', - 'public static AgentName ofProjectLocationAgentName(String project, String location)', - DEPRECATION_JAVADOC.format(new_method='ofProjectLocationName') - ) + java.copy_and_rename_method( + 'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java', + 'public static AgentName ofProjectName(String project)', + 'ofProjectName', + 'ofProjectAgentName' + ) + java.deprecate_method( + 'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java', + 'public static AgentName ofProjectAgentName(String project)', + DEPRECATION_JAVADOC.format(new_method='ofProjectName') + ) + s.replace( + 'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java', + 'return ofProjectName', + 'return ofProjectAgentName' + ) + s.replace( + 'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java', + 'return ofProjectLocationName', + 'return ofProjectLocationAgentName' + ) + java.copy_and_rename_method( + 'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java', + 'public static AgentName ofProjectLocationName(String project, String location)', + 'ofProjectLocationName', + 'ofProjectLocationAgentName' + ) + java.deprecate_method( + 'owl-bot-staging/v2beta1/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentName.java', + 'public static AgentName ofProjectLocationAgentName(String project, String location)', + DEPRECATION_JAVADOC.format(new_method='ofProjectLocationName') + ) - s.replace( - [ - 'owl-bot-staging/v2beta1/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/AgentsClientTest.java', - 'owl-bot-staging/v2beta1/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/EnvironmentsClientTest.java', - 'owl-bot-staging/v2beta1/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/EntityTypesClientTest.java', - 'owl-bot-staging/v2beta1/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/IntentsClientTest.java', - 'owl-bot-staging/v2beta1/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/VersionsClientTest.java' + s.replace( + [ + 'owl-bot-staging/v2beta1/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/AgentsClientTest.java', + 'owl-bot-staging/v2beta1/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/EnvironmentsClientTest.java', + 'owl-bot-staging/v2beta1/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/EntityTypesClientTest.java', + 'owl-bot-staging/v2beta1/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/IntentsClientTest.java', + 'owl-bot-staging/v2beta1/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/VersionsClientTest.java' - ], - 'ofProjectName', - 'ofProjectAgentName' - ) + ], + 'ofProjectName', + 'ofProjectAgentName' + ) s.move(library) s.remove_staging_dirs() diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/session.proto b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/session.proto index cd1363c88..e2690677c 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/session.proto +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/session.proto @@ -62,6 +62,13 @@ service Sessions { // and session entity types to be updated, which in turn might affect // results of future queries. // + // If you might use + // [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa) + // or other CCAI products now or in the future, consider using + // [AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent] + // instead of `DetectIntent`. `AnalyzeContent` has additional + // functionality for Agent Assist and other CCAI products. + // // Note: Always use agent versions for production traffic. // See [Versions and // environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). @@ -89,6 +96,13 @@ service Sessions { // and returns structured, actionable data as a result. This method is only // available via the gRPC API (not REST). // + // If you might use + // [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa) + // or other CCAI products now or in the future, consider using + // [StreamingAnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.StreamingAnalyzeContent] + // instead of `StreamingDetectIntent`. `StreamingAnalyzeContent` has + // additional functionality for Agent Assist and other CCAI products. + // // Note: Always use agent versions for production traffic. // See [Versions and // environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).