From ac55eb4c8dd02a87f22563ce93e4280fef6a535e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 26 Jul 2022 00:46:24 +0000 Subject: [PATCH 01/10] chore: resolve issue with prerelease presubmit [autoapprove] (#541) Source-Link: https://github.com/googleapis/synthtool/commit/1b9ad7694e44ddb4d9844df55ff7af77b51a4435 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:9db98b055a7f8bd82351238ccaacfd3cda58cdf73012ab58b8da146368330021 --- .github/.OwlBot.lock.yaml | 4 ++-- noxfile.py | 33 ++++++++++++++++++--------------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 58fcbeeed..0eb02fda4 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:c8878270182edaab99f2927969d4f700c3af265accd472c3425deedff2b7fd93 -# created: 2022-07-14T01:58:16.015625351Z + digest: sha256:9db98b055a7f8bd82351238ccaacfd3cda58cdf73012ab58b8da146368330021 +# created: 2022-07-25T16:02:49.174178716Z diff --git a/noxfile.py b/noxfile.py index 35a3b0706..e4802a2e9 100644 --- a/noxfile.py +++ b/noxfile.py @@ -332,7 +332,8 @@ def prerelease_deps(session): # Install all dependencies session.install("-e", ".[all, tests, tracing]") - session.install(*UNIT_TEST_STANDARD_DEPENDENCIES) + unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES + session.install(*unit_deps_all) system_deps_all = ( SYSTEM_TEST_STANDARD_DEPENDENCIES + SYSTEM_TEST_EXTERNAL_DEPENDENCIES @@ -361,12 +362,6 @@ def prerelease_deps(session): session.install(*constraints_deps) - if os.path.exists("samples/snippets/requirements.txt"): - session.install("-r", "samples/snippets/requirements.txt") - - if os.path.exists("samples/snippets/requirements-test.txt"): - session.install("-r", "samples/snippets/requirements-test.txt") - prerel_deps = [ "protobuf", # dependency of grpc @@ -403,11 +398,19 @@ def prerelease_deps(session): system_test_folder_path = os.path.join("tests", "system") # Only run system tests if found. - if os.path.exists(system_test_path) or os.path.exists(system_test_folder_path): - session.run("py.test", "tests/system") - - snippets_test_path = os.path.join("samples", "snippets") - - # Only run samples tests if found. - if os.path.exists(snippets_test_path): - session.run("py.test", "samples/snippets") + if os.path.exists(system_test_path): + session.run( + "py.test", + "--verbose", + f"--junitxml=system_{session.python}_sponge_log.xml", + system_test_path, + *session.posargs, + ) + if os.path.exists(system_test_folder_path): + session.run( + "py.test", + "--verbose", + f"--junitxml=system_{session.python}_sponge_log.xml", + system_test_folder_path, + *session.posargs, + ) From f57dde9537ca74ee96c43d00b03cc043e34452e8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 25 Jul 2022 21:27:57 -0400 Subject: [PATCH 02/10] chore(bazel): update protobuf to v3.21.3 (#542) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(bazel): update protobuf to v3.21.3 chore(bazel): update gax-java to 2.18.4 PiperOrigin-RevId: 463115700 Source-Link: https://github.com/googleapis/googleapis/commit/52130a9c3c289e6bc4ab1784bdde6081abdf3dd9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/6a4d9d9bb3afb20b0f5fa4f5d9f6740b1d0eb19a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmE0ZDlkOWJiM2FmYjIwYjBmNWZhNGY1ZDlmNjc0MGIxZDBlYjE5YSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- .../dialogflow_v2/services/agents/async_client.py | 9 --------- google/cloud/dialogflow_v2/services/agents/client.py | 9 --------- .../services/conversation_datasets/async_client.py | 3 --- .../services/conversation_datasets/client.py | 3 --- .../services/conversation_models/async_client.py | 9 --------- .../services/conversation_models/client.py | 9 --------- .../dialogflow_v2/services/documents/async_client.py | 3 --- .../cloud/dialogflow_v2/services/documents/client.py | 3 --- .../services/entity_types/async_client.py | 12 ------------ .../dialogflow_v2/services/entity_types/client.py | 12 ------------ .../dialogflow_v2/services/intents/async_client.py | 3 --- .../cloud/dialogflow_v2/services/intents/client.py | 3 --- .../services/agents/async_client.py | 9 --------- .../dialogflow_v2beta1/services/agents/client.py | 9 --------- .../services/documents/async_client.py | 3 --- .../dialogflow_v2beta1/services/documents/client.py | 3 --- .../services/entity_types/async_client.py | 12 ------------ .../services/entity_types/client.py | 12 ------------ .../services/intents/async_client.py | 3 --- .../dialogflow_v2beta1/services/intents/client.py | 3 --- 20 files changed, 132 deletions(-) diff --git a/google/cloud/dialogflow_v2/services/agents/async_client.py b/google/cloud/dialogflow_v2/services/agents/async_client.py index 43bc91abb..9da918da5 100644 --- a/google/cloud/dialogflow_v2/services/agents/async_client.py +++ b/google/cloud/dialogflow_v2/services/agents/async_client.py @@ -695,9 +695,6 @@ async def sample_train_agent(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have @@ -958,9 +955,6 @@ async def sample_import_agent(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. request = agent.ImportAgentRequest(request) @@ -1083,9 +1077,6 @@ async def sample_restore_agent(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. request = agent.RestoreAgentRequest(request) diff --git a/google/cloud/dialogflow_v2/services/agents/client.py b/google/cloud/dialogflow_v2/services/agents/client.py index a5b967dfc..14221963b 100644 --- a/google/cloud/dialogflow_v2/services/agents/client.py +++ b/google/cloud/dialogflow_v2/services/agents/client.py @@ -921,9 +921,6 @@ def sample_train_agent(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have @@ -1184,9 +1181,6 @@ def sample_import_agent(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Minor optimization to avoid making a copy if the user passes @@ -1310,9 +1304,6 @@ def sample_restore_agent(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Minor optimization to avoid making a copy if the user passes diff --git a/google/cloud/dialogflow_v2/services/conversation_datasets/async_client.py b/google/cloud/dialogflow_v2/services/conversation_datasets/async_client.py index afef6513e..e2f474ba8 100644 --- a/google/cloud/dialogflow_v2/services/conversation_datasets/async_client.py +++ b/google/cloud/dialogflow_v2/services/conversation_datasets/async_client.py @@ -648,9 +648,6 @@ async def sample_delete_conversation_dataset(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have diff --git a/google/cloud/dialogflow_v2/services/conversation_datasets/client.py b/google/cloud/dialogflow_v2/services/conversation_datasets/client.py index f7b6f4e4e..a9d1da96a 100644 --- a/google/cloud/dialogflow_v2/services/conversation_datasets/client.py +++ b/google/cloud/dialogflow_v2/services/conversation_datasets/client.py @@ -876,9 +876,6 @@ def sample_delete_conversation_dataset(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have diff --git a/google/cloud/dialogflow_v2/services/conversation_models/async_client.py b/google/cloud/dialogflow_v2/services/conversation_models/async_client.py index c9a22932b..6c2c5d667 100644 --- a/google/cloud/dialogflow_v2/services/conversation_models/async_client.py +++ b/google/cloud/dialogflow_v2/services/conversation_models/async_client.py @@ -643,9 +643,6 @@ async def sample_delete_conversation_model(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have @@ -768,9 +765,6 @@ async def sample_deploy_conversation_model(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. request = conversation_model.DeployConversationModelRequest(request) @@ -882,9 +876,6 @@ async def sample_undeploy_conversation_model(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. request = conversation_model.UndeployConversationModelRequest(request) diff --git a/google/cloud/dialogflow_v2/services/conversation_models/client.py b/google/cloud/dialogflow_v2/services/conversation_models/client.py index 67fc7fd5c..cdd1a92a6 100644 --- a/google/cloud/dialogflow_v2/services/conversation_models/client.py +++ b/google/cloud/dialogflow_v2/services/conversation_models/client.py @@ -919,9 +919,6 @@ def sample_delete_conversation_model(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have @@ -1046,9 +1043,6 @@ def sample_deploy_conversation_model(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Minor optimization to avoid making a copy if the user passes @@ -1163,9 +1157,6 @@ def sample_undeploy_conversation_model(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Minor optimization to avoid making a copy if the user passes diff --git a/google/cloud/dialogflow_v2/services/documents/async_client.py b/google/cloud/dialogflow_v2/services/documents/async_client.py index 9a3b94807..2f29eeeb1 100644 --- a/google/cloud/dialogflow_v2/services/documents/async_client.py +++ b/google/cloud/dialogflow_v2/services/documents/async_client.py @@ -746,9 +746,6 @@ async def sample_delete_document(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have diff --git a/google/cloud/dialogflow_v2/services/documents/client.py b/google/cloud/dialogflow_v2/services/documents/client.py index 78424e660..3d13ccdce 100644 --- a/google/cloud/dialogflow_v2/services/documents/client.py +++ b/google/cloud/dialogflow_v2/services/documents/client.py @@ -976,9 +976,6 @@ def sample_delete_document(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have diff --git a/google/cloud/dialogflow_v2/services/entity_types/async_client.py b/google/cloud/dialogflow_v2/services/entity_types/async_client.py index 8223c2d7e..8f06b022c 100644 --- a/google/cloud/dialogflow_v2/services/entity_types/async_client.py +++ b/google/cloud/dialogflow_v2/services/entity_types/async_client.py @@ -997,9 +997,6 @@ async def sample_batch_delete_entity_types(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have @@ -1156,9 +1153,6 @@ async def sample_batch_create_entities(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have @@ -1321,9 +1315,6 @@ async def sample_batch_update_entities(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have @@ -1481,9 +1472,6 @@ async def sample_batch_delete_entities(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have diff --git a/google/cloud/dialogflow_v2/services/entity_types/client.py b/google/cloud/dialogflow_v2/services/entity_types/client.py index 3c8c23fb4..b8d730a8a 100644 --- a/google/cloud/dialogflow_v2/services/entity_types/client.py +++ b/google/cloud/dialogflow_v2/services/entity_types/client.py @@ -1224,9 +1224,6 @@ def sample_batch_delete_entity_types(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have @@ -1385,9 +1382,6 @@ def sample_batch_create_entities(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have @@ -1550,9 +1544,6 @@ def sample_batch_update_entities(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have @@ -1710,9 +1701,6 @@ def sample_batch_delete_entities(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have diff --git a/google/cloud/dialogflow_v2/services/intents/async_client.py b/google/cloud/dialogflow_v2/services/intents/async_client.py index d76ae65d3..61c7259b8 100644 --- a/google/cloud/dialogflow_v2/services/intents/async_client.py +++ b/google/cloud/dialogflow_v2/services/intents/async_client.py @@ -1051,9 +1051,6 @@ async def sample_batch_delete_intents(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have diff --git a/google/cloud/dialogflow_v2/services/intents/client.py b/google/cloud/dialogflow_v2/services/intents/client.py index 9236a306a..b9f0b7dbc 100644 --- a/google/cloud/dialogflow_v2/services/intents/client.py +++ b/google/cloud/dialogflow_v2/services/intents/client.py @@ -1297,9 +1297,6 @@ def sample_batch_delete_intents(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have diff --git a/google/cloud/dialogflow_v2beta1/services/agents/async_client.py b/google/cloud/dialogflow_v2beta1/services/agents/async_client.py index 2bab757e8..cf2b1d1eb 100644 --- a/google/cloud/dialogflow_v2beta1/services/agents/async_client.py +++ b/google/cloud/dialogflow_v2beta1/services/agents/async_client.py @@ -697,9 +697,6 @@ async def sample_train_agent(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have @@ -961,9 +958,6 @@ async def sample_import_agent(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. request = agent.ImportAgentRequest(request) @@ -1087,9 +1081,6 @@ async def sample_restore_agent(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. request = agent.RestoreAgentRequest(request) diff --git a/google/cloud/dialogflow_v2beta1/services/agents/client.py b/google/cloud/dialogflow_v2beta1/services/agents/client.py index 0a712b29b..e53f2cae4 100644 --- a/google/cloud/dialogflow_v2beta1/services/agents/client.py +++ b/google/cloud/dialogflow_v2beta1/services/agents/client.py @@ -923,9 +923,6 @@ def sample_train_agent(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have @@ -1187,9 +1184,6 @@ def sample_import_agent(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Minor optimization to avoid making a copy if the user passes @@ -1314,9 +1308,6 @@ def sample_restore_agent(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Minor optimization to avoid making a copy if the user passes diff --git a/google/cloud/dialogflow_v2beta1/services/documents/async_client.py b/google/cloud/dialogflow_v2beta1/services/documents/async_client.py index 6f4579477..9297143b2 100644 --- a/google/cloud/dialogflow_v2beta1/services/documents/async_client.py +++ b/google/cloud/dialogflow_v2beta1/services/documents/async_client.py @@ -759,9 +759,6 @@ async def sample_delete_document(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have diff --git a/google/cloud/dialogflow_v2beta1/services/documents/client.py b/google/cloud/dialogflow_v2beta1/services/documents/client.py index d6c92023c..8fc0e437d 100644 --- a/google/cloud/dialogflow_v2beta1/services/documents/client.py +++ b/google/cloud/dialogflow_v2beta1/services/documents/client.py @@ -989,9 +989,6 @@ def sample_delete_document(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have diff --git a/google/cloud/dialogflow_v2beta1/services/entity_types/async_client.py b/google/cloud/dialogflow_v2beta1/services/entity_types/async_client.py index ea956af86..9e3414aec 100644 --- a/google/cloud/dialogflow_v2beta1/services/entity_types/async_client.py +++ b/google/cloud/dialogflow_v2beta1/services/entity_types/async_client.py @@ -1023,9 +1023,6 @@ async def sample_batch_delete_entity_types(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have @@ -1183,9 +1180,6 @@ async def sample_batch_create_entities(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have @@ -1349,9 +1343,6 @@ async def sample_batch_update_entities(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have @@ -1511,9 +1502,6 @@ async def sample_batch_delete_entities(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have diff --git a/google/cloud/dialogflow_v2beta1/services/entity_types/client.py b/google/cloud/dialogflow_v2beta1/services/entity_types/client.py index 23d1e9f7c..6e1aa3596 100644 --- a/google/cloud/dialogflow_v2beta1/services/entity_types/client.py +++ b/google/cloud/dialogflow_v2beta1/services/entity_types/client.py @@ -1250,9 +1250,6 @@ def sample_batch_delete_entity_types(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have @@ -1412,9 +1409,6 @@ def sample_batch_create_entities(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have @@ -1578,9 +1572,6 @@ def sample_batch_update_entities(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have @@ -1740,9 +1731,6 @@ def sample_batch_delete_entities(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have diff --git a/google/cloud/dialogflow_v2beta1/services/intents/async_client.py b/google/cloud/dialogflow_v2beta1/services/intents/async_client.py index e744a3a0f..ae483dcf2 100644 --- a/google/cloud/dialogflow_v2beta1/services/intents/async_client.py +++ b/google/cloud/dialogflow_v2beta1/services/intents/async_client.py @@ -1069,9 +1069,6 @@ async def sample_batch_delete_intents(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have diff --git a/google/cloud/dialogflow_v2beta1/services/intents/client.py b/google/cloud/dialogflow_v2beta1/services/intents/client.py index 23dde6433..176d95ff9 100644 --- a/google/cloud/dialogflow_v2beta1/services/intents/client.py +++ b/google/cloud/dialogflow_v2beta1/services/intents/client.py @@ -1315,9 +1315,6 @@ def sample_batch_delete_intents(): } - The JSON representation for Empty is empty JSON - object {}. - """ # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have From 4b36501ada91f1eb97e3d80da6b429ea591b432c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 26 Jul 2022 12:35:34 -0400 Subject: [PATCH 03/10] docs: added an explicit note that DetectIntentRequest's text input is limited by 256 characters (#543) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: added an explicit note that DetectIntentRequest's text input is limited by 256 characters PiperOrigin-RevId: 463252698 Source-Link: https://github.com/googleapis/googleapis/commit/eeacaabc368d70217b086f66c2c1644b105f337c Source-Link: https://github.com/googleapis/googleapis-gen/commit/da3bfa08ba77d14ba66e6eeee5ad159ef365df0f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZGEzYmZhMDhiYTc3ZDE0YmE2NmU2ZWVlZTVhZDE1OWVmMzY1ZGYwZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- google/cloud/dialogflow_v2/types/session.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/google/cloud/dialogflow_v2/types/session.py b/google/cloud/dialogflow_v2/types/session.py index a29bf163e..2fc0874c5 100644 --- a/google/cloud/dialogflow_v2/types/session.py +++ b/google/cloud/dialogflow_v2/types/session.py @@ -305,6 +305,8 @@ class QueryInput(proto.Message): This field is a member of `oneof`_ ``input``. text (google.cloud.dialogflow_v2.types.TextInput): The natural language text to be processed. + Text length must not exceed 256 character for + virtual agent interactions. This field is a member of `oneof`_ ``input``. event (google.cloud.dialogflow_v2.types.EventInput): @@ -866,7 +868,8 @@ class TextInput(proto.Message): text (str): Required. The UTF-8 encoded natural language text to be processed. Text length must not - exceed 256 characters. + exceed 256 characters for virtual agent + interactions. language_code (str): Required. The language of this conversational query. See `Language From 1efd10881e1bb40de1452c4c6e6696cf61b81c90 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 27 Jul 2022 11:35:27 -0400 Subject: [PATCH 04/10] docs: updated some method comments and added an explicit note that DetectIntentRequest's text input is limited by 256 characters (#545) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: updated some method comments and added an explicit note that DetectIntentRequest's text input is limited by 256 characters PiperOrigin-RevId: 463362184 Source-Link: https://github.com/googleapis/googleapis/commit/1805fc2b06fd2813572f54553b8d030bf9f8b6bb Source-Link: https://github.com/googleapis/googleapis-gen/commit/c47083a7b829c85e3423250f7cf431f07238ad04 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzQ3MDgzYTdiODI5Yzg1ZTM0MjMyNTBmN2NmNDMxZjA3MjM4YWQwNCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../services/participants/async_client.py | 18 ++++++++--------- .../services/participants/client.py | 18 ++++++++--------- .../dialogflow_v2beta1/types/answer_record.py | 3 --- .../dialogflow_v2beta1/types/participant.py | 7 ++++--- .../cloud/dialogflow_v2beta1/types/session.py | 3 ++- .../snippet_metadata_dialogflow_v2beta1.json | 16 +++++++-------- .../dialogflow_v2beta1/test_participants.py | 20 ++++++------------- 7 files changed, 38 insertions(+), 47 deletions(-) diff --git a/google/cloud/dialogflow_v2beta1/services/participants/async_client.py b/google/cloud/dialogflow_v2beta1/services/participants/async_client.py index 27d0d5c62..955f5908f 100644 --- a/google/cloud/dialogflow_v2beta1/services/participants/async_client.py +++ b/google/cloud/dialogflow_v2beta1/services/participants/async_client.py @@ -650,8 +650,8 @@ async def analyze_content( *, participant: str = None, text_input: session.TextInput = None, - event_input: session.EventInput = None, audio_input: gcd_participant.AudioInput = None, + event_input: session.EventInput = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), @@ -701,11 +701,6 @@ async def sample_analyze_content(): This corresponds to the ``text_input`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - event_input (:class:`google.cloud.dialogflow_v2beta1.types.EventInput`): - An input event to send to Dialogflow. - This corresponds to the ``event_input`` field - on the ``request`` instance; if ``request`` is provided, this - should not be set. audio_input (:class:`google.cloud.dialogflow_v2beta1.types.AudioInput`): The natural language speech audio to be processed. @@ -713,6 +708,11 @@ async def sample_analyze_content(): This corresponds to the ``audio_input`` field on the ``request`` instance; if ``request`` is provided, this should not be set. + event_input (:class:`google.cloud.dialogflow_v2beta1.types.EventInput`): + An input event to send to Dialogflow. + This corresponds to the ``event_input`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -728,7 +728,7 @@ async def sample_analyze_content(): # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. - has_flattened_params = any([participant, text_input, event_input, audio_input]) + has_flattened_params = any([participant, text_input, audio_input, event_input]) if request is not None and has_flattened_params: raise ValueError( "If the `request` argument is set, then none of " @@ -743,10 +743,10 @@ async def sample_analyze_content(): request.participant = participant if text_input is not None: request.text_input = text_input - if event_input is not None: - request.event_input = event_input if audio_input is not None: request.audio_input = audio_input + if event_input is not None: + request.event_input = event_input # Wrap the RPC method; this adds retry and timeout information, # and friendly error handling. diff --git a/google/cloud/dialogflow_v2beta1/services/participants/client.py b/google/cloud/dialogflow_v2beta1/services/participants/client.py index b54559c8f..bca7714f2 100644 --- a/google/cloud/dialogflow_v2beta1/services/participants/client.py +++ b/google/cloud/dialogflow_v2beta1/services/participants/client.py @@ -988,8 +988,8 @@ def analyze_content( *, participant: str = None, text_input: session.TextInput = None, - event_input: session.EventInput = None, audio_input: gcd_participant.AudioInput = None, + event_input: session.EventInput = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), @@ -1039,11 +1039,6 @@ def sample_analyze_content(): This corresponds to the ``text_input`` field on the ``request`` instance; if ``request`` is provided, this should not be set. - event_input (google.cloud.dialogflow_v2beta1.types.EventInput): - An input event to send to Dialogflow. - This corresponds to the ``event_input`` field - on the ``request`` instance; if ``request`` is provided, this - should not be set. audio_input (google.cloud.dialogflow_v2beta1.types.AudioInput): The natural language speech audio to be processed. @@ -1051,6 +1046,11 @@ def sample_analyze_content(): This corresponds to the ``audio_input`` field on the ``request`` instance; if ``request`` is provided, this should not be set. + event_input (google.cloud.dialogflow_v2beta1.types.EventInput): + An input event to send to Dialogflow. + This corresponds to the ``event_input`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1066,7 +1066,7 @@ def sample_analyze_content(): # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. - has_flattened_params = any([participant, text_input, event_input, audio_input]) + has_flattened_params = any([participant, text_input, audio_input, event_input]) if request is not None and has_flattened_params: raise ValueError( "If the `request` argument is set, then none of " @@ -1085,10 +1085,10 @@ def sample_analyze_content(): request.participant = participant if text_input is not None: request.text_input = text_input - if event_input is not None: - request.event_input = event_input if audio_input is not None: request.audio_input = audio_input + if event_input is not None: + request.event_input = event_input # Wrap the RPC method; this adds retry and timeout information, # and friendly error handling. diff --git a/google/cloud/dialogflow_v2beta1/types/answer_record.py b/google/cloud/dialogflow_v2beta1/types/answer_record.py index 26659b81b..e449a4e32 100644 --- a/google/cloud/dialogflow_v2beta1/types/answer_record.py +++ b/google/cloud/dialogflow_v2beta1/types/answer_record.py @@ -339,9 +339,6 @@ class ListAnswerRecordsRequest(proto.Message): Optional. Filters to restrict results to specific answer records. - Marked deprecated as it hasn't been, and isn't currently, - supported. - For more information about filtering, see `API Filtering `__. page_size (int): diff --git a/google/cloud/dialogflow_v2beta1/types/participant.py b/google/cloud/dialogflow_v2beta1/types/participant.py index 0355c5418..36330ebee 100644 --- a/google/cloud/dialogflow_v2beta1/types/participant.py +++ b/google/cloud/dialogflow_v2beta1/types/participant.py @@ -375,7 +375,7 @@ class AudioInput(proto.Message): to be processed. A single request can contain up to 1 minute of speech audio data. The transcribed text cannot contain more than 256 - bytes. + bytes for virtual agent interactions. """ config = proto.Field( @@ -934,8 +934,9 @@ class StreamingAnalyzeContentRequest(proto.Message): input_text (str): The UTF-8 encoded natural language text to be processed. Must be sent if ``text_config`` is set in the first message. - Text length must not exceed 256 bytes. The ``input_text`` - field can be only sent once. + Text length must not exceed 256 bytes for virtual agent + interactions. The ``input_text`` field can be only sent + once. This field is a member of `oneof`_ ``input``. input_dtmf (google.cloud.dialogflow_v2beta1.types.TelephonyDtmfEvents): diff --git a/google/cloud/dialogflow_v2beta1/types/session.py b/google/cloud/dialogflow_v2beta1/types/session.py index 9f75fdadc..295b0a360 100644 --- a/google/cloud/dialogflow_v2beta1/types/session.py +++ b/google/cloud/dialogflow_v2beta1/types/session.py @@ -1057,7 +1057,8 @@ class TextInput(proto.Message): text (str): Required. The UTF-8 encoded natural language text to be processed. Text length must not - exceed 256 characters. + exceed 256 characters for virtual agent + interactions. language_code (str): Required. The language of this conversational query. See `Language diff --git a/samples/generated_samples/snippet_metadata_dialogflow_v2beta1.json b/samples/generated_samples/snippet_metadata_dialogflow_v2beta1.json index e33a863da..ae72eaba8 100644 --- a/samples/generated_samples/snippet_metadata_dialogflow_v2beta1.json +++ b/samples/generated_samples/snippet_metadata_dialogflow_v2beta1.json @@ -11124,14 +11124,14 @@ "name": "text_input", "type": "google.cloud.dialogflow_v2beta1.types.TextInput" }, - { - "name": "event_input", - "type": "google.cloud.dialogflow_v2beta1.types.EventInput" - }, { "name": "audio_input", "type": "google.cloud.dialogflow_v2beta1.types.AudioInput" }, + { + "name": "event_input", + "type": "google.cloud.dialogflow_v2beta1.types.EventInput" + }, { "name": "retry", "type": "google.api_core.retry.Retry" @@ -11216,14 +11216,14 @@ "name": "text_input", "type": "google.cloud.dialogflow_v2beta1.types.TextInput" }, - { - "name": "event_input", - "type": "google.cloud.dialogflow_v2beta1.types.EventInput" - }, { "name": "audio_input", "type": "google.cloud.dialogflow_v2beta1.types.AudioInput" }, + { + "name": "event_input", + "type": "google.cloud.dialogflow_v2beta1.types.EventInput" + }, { "name": "retry", "type": "google.api_core.retry.Retry" diff --git a/tests/unit/gapic/dialogflow_v2beta1/test_participants.py b/tests/unit/gapic/dialogflow_v2beta1/test_participants.py index bc2ce9d0e..3ef8a55ec 100644 --- a/tests/unit/gapic/dialogflow_v2beta1/test_participants.py +++ b/tests/unit/gapic/dialogflow_v2beta1/test_participants.py @@ -2061,12 +2061,12 @@ def test_analyze_content_flattened(): client.analyze_content( participant="participant_value", text_input=session.TextInput(text="text_value"), - event_input=session.EventInput(name="name_value"), audio_input=gcd_participant.AudioInput( config=audio_config.InputAudioConfig( audio_encoding=audio_config.AudioEncoding.AUDIO_ENCODING_LINEAR_16 ) ), + event_input=session.EventInput(name="name_value"), ) # Establish that the underlying call was made with the expected @@ -2076,11 +2076,7 @@ def test_analyze_content_flattened(): arg = args[0].participant mock_val = "participant_value" assert arg == mock_val - assert args[0].audio_input == gcd_participant.AudioInput( - config=audio_config.InputAudioConfig( - audio_encoding=audio_config.AudioEncoding.AUDIO_ENCODING_LINEAR_16 - ) - ) + assert args[0].event_input == session.EventInput(name="name_value") def test_analyze_content_flattened_error(): @@ -2095,12 +2091,12 @@ def test_analyze_content_flattened_error(): gcd_participant.AnalyzeContentRequest(), participant="participant_value", text_input=session.TextInput(text="text_value"), - event_input=session.EventInput(name="name_value"), audio_input=gcd_participant.AudioInput( config=audio_config.InputAudioConfig( audio_encoding=audio_config.AudioEncoding.AUDIO_ENCODING_LINEAR_16 ) ), + event_input=session.EventInput(name="name_value"), ) @@ -2123,12 +2119,12 @@ async def test_analyze_content_flattened_async(): response = await client.analyze_content( participant="participant_value", text_input=session.TextInput(text="text_value"), - event_input=session.EventInput(name="name_value"), audio_input=gcd_participant.AudioInput( config=audio_config.InputAudioConfig( audio_encoding=audio_config.AudioEncoding.AUDIO_ENCODING_LINEAR_16 ) ), + event_input=session.EventInput(name="name_value"), ) # Establish that the underlying call was made with the expected @@ -2138,11 +2134,7 @@ async def test_analyze_content_flattened_async(): arg = args[0].participant mock_val = "participant_value" assert arg == mock_val - assert args[0].audio_input == gcd_participant.AudioInput( - config=audio_config.InputAudioConfig( - audio_encoding=audio_config.AudioEncoding.AUDIO_ENCODING_LINEAR_16 - ) - ) + assert args[0].event_input == session.EventInput(name="name_value") @pytest.mark.asyncio @@ -2158,12 +2150,12 @@ async def test_analyze_content_flattened_error_async(): gcd_participant.AnalyzeContentRequest(), participant="participant_value", text_input=session.TextInput(text="text_value"), - event_input=session.EventInput(name="name_value"), audio_input=gcd_participant.AudioInput( config=audio_config.InputAudioConfig( audio_encoding=audio_config.AudioEncoding.AUDIO_ENCODING_LINEAR_16 ) ), + event_input=session.EventInput(name="name_value"), ) From 4f4624c06f2e69eb01797e158d2c38473d1536bf Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 2 Aug 2022 15:50:38 +0200 Subject: [PATCH 05/10] chore(deps): update all dependencies (#546) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- samples/snippets/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index 83efa4ee4..9c721a384 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1,2 +1,2 @@ -google-cloud-dialogflow==2.14.1 -Flask==2.1.2 +google-cloud-dialogflow==2.15.0 +Flask==2.1.3 From be4e72bf3ea822cccc21e1f1170e17fad9cbc09c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 2 Aug 2022 16:26:03 +0200 Subject: [PATCH 06/10] chore(deps): update all dependencies (#547) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- samples/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index 9c721a384..75fb1cdab 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1,2 +1,2 @@ google-cloud-dialogflow==2.15.0 -Flask==2.1.3 +Flask==2.2.0 From 6a19c2cc1eea06de59fa878c9b13bf17c63219e4 Mon Sep 17 00:00:00 2001 From: Jiaqi Liu Date: Thu, 4 Aug 2022 12:49:22 -0700 Subject: [PATCH 07/10] samples: update logs for knowledge base management sample (#550) --- samples/snippets/knowledge_base_management.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/snippets/knowledge_base_management.py b/samples/snippets/knowledge_base_management.py index 5bd71d46d..5f7227d0e 100644 --- a/samples/snippets/knowledge_base_management.py +++ b/samples/snippets/knowledge_base_management.py @@ -51,7 +51,7 @@ def create_knowledge_base(project_id, display_name): print("Knowledge Base created:\n") print("Display Name: {}\n".format(response.display_name)) - print("Knowledge ID: {}\n".format(response.name)) + print("Name: {}\n".format(response.name)) # [END dialogflow_create_knowledge_base] @@ -73,7 +73,7 @@ def get_knowledge_base(project_id, knowledge_base_id): print("Got Knowledge Base:") print(" - Display Name: {}".format(response.display_name)) - print(" - Knowledge ID: {}".format(response.name)) + print(" - Name: {}".format(response.name)) return response From 4b4b21a3800057b1e8f12f1b934ef2451237529e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 5 Aug 2022 21:49:48 +0200 Subject: [PATCH 08/10] chore(deps): update all dependencies (#549) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- samples/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index 75fb1cdab..60671f365 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1,2 +1,2 @@ google-cloud-dialogflow==2.15.0 -Flask==2.2.0 +Flask==2.2.1 From 1b9956063d96864eeb1d53aa4ffde67895f97b95 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 9 Aug 2022 02:54:51 +0200 Subject: [PATCH 09/10] chore(deps): update all dependencies (#551) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- samples/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index 60671f365..3755d49df 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1,2 +1,2 @@ google-cloud-dialogflow==2.15.0 -Flask==2.2.1 +Flask==2.2.2 From 426600d41780a0d6d5251112ca09f4bbd75c66a2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 9 Aug 2022 07:43:11 -0400 Subject: [PATCH 10/10] chore(main): release 2.15.1 (#544) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 8 ++++++++ setup.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59c4a013e..67ceb26d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ [1]: https://pypi.org/project/dialogflow/#history +## [2.15.1](https://github.com/googleapis/python-dialogflow/compare/v2.15.0...v2.15.1) (2022-08-09) + + +### Documentation + +* added an explicit note that DetectIntentRequest's text input is limited by 256 characters ([#543](https://github.com/googleapis/python-dialogflow/issues/543)) ([4b36501](https://github.com/googleapis/python-dialogflow/commit/4b36501ada91f1eb97e3d80da6b429ea591b432c)) +* updated some method comments and added an explicit note that DetectIntentRequest's text input is limited by 256 characters ([#545](https://github.com/googleapis/python-dialogflow/issues/545)) ([1efd108](https://github.com/googleapis/python-dialogflow/commit/1efd10881e1bb40de1452c4c6e6696cf61b81c90)) + ## [2.15.0](https://github.com/googleapis/python-dialogflow/compare/v2.14.1...v2.15.0) (2022-07-16) diff --git a/setup.py b/setup.py index 0e56d18b1..647df8f55 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ name = "dialogflow" description = "Client library for the Dialogflow API" -version = "2.15.0" +version = "2.15.1" release_status = "Development Status :: 5 - Production/Stable" dependencies = [ "google-api-core[grpc] >= 1.32.0, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*",