From 57c90a5b72668e599047b358f634f939d70a051f Mon Sep 17 00:00:00 2001
From: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
Date: Mon, 14 Dec 2020 13:59:16 -0700
Subject: [PATCH] feat!: use microgenerator (#239)
See UPGRADING.md for a list of changes.
---
.coveragerc | 16 +-
.github/ISSUE_TEMPLATE/bug_report.md | 4 +-
.github/PULL_REQUEST_TEMPLATE.md | 2 +-
.kokoro/build.sh | 2 +-
.kokoro/continuous/common.cfg | 4 +-
.kokoro/docs/common.cfg | 4 +-
.kokoro/presubmit/common.cfg | 4 +-
.kokoro/release.sh | 2 +-
.kokoro/release/common.cfg | 4 +-
.kokoro/samples/lint/common.cfg | 4 +-
.kokoro/samples/python3.6/common.cfg | 4 +-
.kokoro/samples/python3.7/common.cfg | 4 +-
.kokoro/samples/python3.8/common.cfg | 4 +-
.kokoro/test-samples.sh | 2 +-
.pre-commit-config.yaml | 17 +
.repo-metadata.json | 4 +-
CONTRIBUTING.rst | 36 +-
README.rst | 35 +-
UPGRADING.md | 251 +
dialogflow_v2/__init__.py | 87 -
dialogflow_v2/gapic/__init__.py | 0
dialogflow_v2/gapic/agents_client.py | 1004 ---
dialogflow_v2/gapic/agents_client_config.py | 97 -
dialogflow_v2/gapic/contexts_client.py | 704 --
dialogflow_v2/gapic/contexts_client_config.py | 82 -
dialogflow_v2/gapic/entity_types_client.py | 1176 ---
.../gapic/entity_types_client_config.py | 102 -
dialogflow_v2/gapic/enums.py | 504 --
dialogflow_v2/gapic/environments_client.py | 307 -
.../gapic/environments_client_config.py | 57 -
dialogflow_v2/gapic/intents_client.py | 880 --
dialogflow_v2/gapic/intents_client_config.py | 87 -
.../gapic/session_entity_types_client.py | 665 --
.../session_entity_types_client_config.py | 77 -
dialogflow_v2/gapic/sessions_client.py | 413 -
dialogflow_v2/gapic/sessions_client_config.py | 62 -
dialogflow_v2/gapic/transports/__init__.py | 0
.../gapic/transports/agents_grpc_transport.py | 268 -
.../transports/contexts_grpc_transport.py | 189 -
.../transports/entity_types_grpc_transport.py | 261 -
.../transports/environments_grpc_transport.py | 124 -
.../transports/intents_grpc_transport.py | 212 -
.../session_entity_types_grpc_transport.py | 201 -
.../transports/sessions_grpc_transport.py | 140 -
dialogflow_v2/proto/__init__.py | 0
dialogflow_v2/proto/agent_pb2.py | 1640 ----
dialogflow_v2/proto/agent_pb2_grpc.py | 476 --
dialogflow_v2/proto/audio_config_pb2.py | 1163 ---
dialogflow_v2/proto/audio_config_pb2_grpc.py | 3 -
dialogflow_v2/proto/context_pb2.py | 843 --
dialogflow_v2/proto/context_pb2_grpc.py | 306 -
dialogflow_v2/proto/entity_type_pb2.py | 1888 -----
dialogflow_v2/proto/entity_type_pb2_grpc.py | 497 --
dialogflow_v2/proto/environment_pb2.py | 486 --
dialogflow_v2/proto/environment_pb2_grpc.py | 83 -
dialogflow_v2/proto/intent_pb2.py | 5837 -------------
dialogflow_v2/proto/intent_pb2_grpc.py | 356 -
.../proto/session_entity_type_pb2.py | 813 --
.../proto/session_entity_type_pb2_grpc.py | 283 -
dialogflow_v2/proto/session_pb2.py | 2399 ------
dialogflow_v2/proto/session_pb2_grpc.py | 141 -
dialogflow_v2/proto/validation_result_pb2.py | 260 -
.../proto/validation_result_pb2_grpc.py | 3 -
dialogflow_v2/proto/webhook_pb2.py | 560 --
dialogflow_v2/proto/webhook_pb2_grpc.py | 3 -
dialogflow_v2/types.py | 82 -
dialogflow_v2beta1/__init__.py | 101 -
dialogflow_v2beta1/gapic/__init__.py | 0
dialogflow_v2beta1/gapic/agents_client.py | 1010 ---
.../gapic/agents_client_config.py | 107 -
dialogflow_v2beta1/gapic/contexts_client.py | 729 --
.../gapic/contexts_client_config.py | 92 -
dialogflow_v2beta1/gapic/documents_client.py | 783 --
.../gapic/documents_client_config.py | 92 -
.../gapic/entity_types_client.py | 1188 ---
.../gapic/entity_types_client_config.py | 112 -
dialogflow_v2beta1/gapic/enums.py | 630 --
.../gapic/environments_client.py | 299 -
.../gapic/environments_client_config.py | 67 -
dialogflow_v2beta1/gapic/intents_client.py | 890 --
.../gapic/intents_client_config.py | 97 -
.../gapic/knowledge_bases_client.py | 640 --
.../gapic/knowledge_bases_client_config.py | 87 -
.../gapic/session_entity_types_client.py | 695 --
.../session_entity_types_client_config.py | 87 -
dialogflow_v2beta1/gapic/sessions_client.py | 429 -
.../gapic/sessions_client_config.py | 72 -
.../gapic/transports/__init__.py | 0
.../gapic/transports/agents_grpc_transport.py | 266 -
.../transports/contexts_grpc_transport.py | 189 -
.../transports/documents_grpc_transport.py | 217 -
.../transports/entity_types_grpc_transport.py | 259 -
.../transports/environments_grpc_transport.py | 124 -
.../transports/intents_grpc_transport.py | 212 -
.../knowledge_bases_grpc_transport.py | 191 -
.../session_entity_types_grpc_transport.py | 201 -
.../transports/sessions_grpc_transport.py | 140 -
dialogflow_v2beta1/proto/__init__.py | 0
dialogflow_v2beta1/proto/agent_pb2.py | 1712 ----
dialogflow_v2beta1/proto/agent_pb2_grpc.py | 479 --
dialogflow_v2beta1/proto/audio_config_pb2.py | 1164 ---
.../proto/audio_config_pb2_grpc.py | 3 -
dialogflow_v2beta1/proto/context_pb2.py | 838 --
dialogflow_v2beta1/proto/context_pb2_grpc.py | 306 -
dialogflow_v2beta1/proto/document_pb2.py | 1376 ---
dialogflow_v2beta1/proto/document_pb2_grpc.py | 327 -
dialogflow_v2beta1/proto/entity_type_pb2.py | 1885 -----
.../proto/entity_type_pb2_grpc.py | 493 --
dialogflow_v2beta1/proto/environment_pb2.py | 492 --
.../proto/environment_pb2_grpc.py | 83 -
dialogflow_v2beta1/proto/gcs_pb2.py | 93 -
dialogflow_v2beta1/proto/gcs_pb2_grpc.py | 3 -
dialogflow_v2beta1/proto/intent_pb2.py | 7499 -----------------
dialogflow_v2beta1/proto/intent_pb2_grpc.py | 356 -
.../proto/knowledge_base_pb2.py | 756 --
.../proto/knowledge_base_pb2_grpc.py | 275 -
.../proto/session_entity_type_pb2.py | 812 --
.../proto/session_entity_type_pb2_grpc.py | 283 -
dialogflow_v2beta1/proto/session_pb2.py | 2955 -------
dialogflow_v2beta1/proto/session_pb2_grpc.py | 141 -
.../proto/validation_result_pb2.py | 260 -
.../proto/validation_result_pb2_grpc.py | 3 -
dialogflow_v2beta1/proto/webhook_pb2.py | 612 --
dialogflow_v2beta1/proto/webhook_pb2_grpc.py | 3 -
dialogflow_v2beta1/types.py | 88 -
docs/UPGRADING.md | 1 +
docs/conf.py | 38 +-
docs/dialogflow_v2/services.rst | 24 +
docs/dialogflow_v2/types.rst | 6 +
docs/dialogflow_v2beta1/services.rst | 30 +
docs/dialogflow_v2beta1/types.rst | 6 +
docs/gapic/v2/api.rst | 6 -
docs/gapic/v2/types.rst | 5 -
docs/gapic/v2beta1/api.rst | 6 -
docs/gapic/v2beta1/types.rst | 5 -
docs/index.rst | 27 +-
docs/v2.rst | 7 -
docs/v2beta1.rst | 7 -
google/cloud/dialogflow/__init__.py | 240 +
google/cloud/dialogflow/py.typed | 2 +
google/cloud/dialogflow_v2/__init__.py | 203 +
.../cloud/dialogflow_v2}/proto/agent.proto | 5 +-
.../dialogflow_v2}/proto/audio_config.proto | 60 +-
.../cloud/dialogflow_v2}/proto/context.proto | 0
.../dialogflow_v2}/proto/entity_type.proto | 0
.../dialogflow_v2}/proto/environment.proto | 0
.../cloud/dialogflow_v2}/proto/intent.proto | 0
.../cloud/dialogflow_v2}/proto/session.proto | 125 +-
.../proto/session_entity_type.proto | 0
.../proto/validation_result.proto | 0
.../cloud/dialogflow_v2}/proto/webhook.proto | 4 +-
google/cloud/dialogflow_v2/py.typed | 2 +
.../cloud/dialogflow_v2/services/__init__.py | 16 +
.../dialogflow_v2/services/agents/__init__.py | 21 +-
.../services/agents/async_client.py | 883 ++
.../dialogflow_v2/services/agents/client.py | 1086 +++
.../dialogflow_v2/services/agents/pagers.py | 148 +
.../services/agents/transports/__init__.py | 36 +
.../services/agents/transports/base.py | 240 +
.../services/agents/transports/grpc.py | 526 ++
.../agents/transports/grpc_asyncio.py | 537 ++
.../services/contexts/__init__.py | 24 +
.../services/contexts/async_client.py | 671 ++
.../dialogflow_v2/services/contexts/client.py | 874 ++
.../dialogflow_v2/services/contexts/pagers.py | 148 +
.../services/contexts/transports/__init__.py | 36 +
.../services/contexts/transports/base.py | 191 +
.../services/contexts/transports/grpc.py | 390 +
.../contexts/transports/grpc_asyncio.py | 400 +
.../services/entity_types/__init__.py | 24 +
.../services/entity_types/async_client.py | 1155 +++
.../services/entity_types/client.py | 1361 +++
.../services/entity_types/pagers.py | 148 +
.../entity_types/transports/__init__.py | 36 +
.../services/entity_types/transports/base.py | 261 +
.../services/entity_types/transports/grpc.py | 538 ++
.../entity_types/transports/grpc_asyncio.py | 555 ++
.../services/environments/__init__.py | 24 +
.../services/environments/async_client.py | 213 +
.../services/environments/client.py | 406 +
.../services/environments/pagers.py | 148 +
.../environments/transports/__init__.py | 36 +
.../services/environments/transports/base.py | 130 +
.../services/environments/transports/grpc.py | 263 +
.../environments/transports/grpc_asyncio.py | 268 +
.../services/intents/__init__.py | 24 +
.../services/intents/async_client.py | 830 ++
.../dialogflow_v2/services/intents/client.py | 1045 +++
.../dialogflow_v2/services/intents/pagers.py | 148 +
.../services/intents/transports/__init__.py | 36 +
.../services/intents/transports/base.py | 214 +
.../services/intents/transports/grpc.py | 439 +
.../intents/transports/grpc_asyncio.py | 447 +
.../session_entity_types}/__init__.py | 25 +-
.../session_entity_types/async_client.py | 611 ++
.../services/session_entity_types/client.py | 816 ++
.../services/session_entity_types/pagers.py | 152 +
.../transports/__init__.py | 38 +
.../session_entity_types/transports/base.py | 201 +
.../session_entity_types/transports/grpc.py | 399 +
.../transports/grpc_asyncio.py | 405 +
.../services/sessions/__init__.py | 24 +
.../services/sessions/async_client.py | 384 +
.../dialogflow_v2/services/sessions/client.py | 609 ++
.../services/sessions/transports/__init__.py | 36 +
.../services/sessions/transports/base.py | 156 +
.../services/sessions/transports/grpc.py | 305 +
.../sessions/transports/grpc_asyncio.py | 312 +
google/cloud/dialogflow_v2/types/__init__.py | 199 +
google/cloud/dialogflow_v2/types/agent.py | 371 +
.../cloud/dialogflow_v2/types/audio_config.py | 372 +
google/cloud/dialogflow_v2/types/context.py | 257 +
.../cloud/dialogflow_v2/types/entity_type.py | 459 +
.../cloud/dialogflow_v2/types/environment.py | 148 +
google/cloud/dialogflow_v2/types/intent.py | 1351 +++
google/cloud/dialogflow_v2/types/session.py | 818 ++
.../types/session_entity_type.py | 222 +
.../dialogflow_v2/types/validation_result.py | 85 +
google/cloud/dialogflow_v2/types/webhook.py | 203 +
google/cloud/dialogflow_v2beta1/__init__.py | 249 +
.../dialogflow_v2beta1}/proto/agent.proto | 42 +-
.../proto/audio_config.proto | 121 +-
.../dialogflow_v2beta1}/proto/context.proto | 110 +-
.../dialogflow_v2beta1}/proto/document.proto | 91 +-
.../proto/entity_type.proto | 54 +-
.../proto/environment.proto | 12 +-
.../cloud/dialogflow_v2beta1}/proto/gcs.proto | 1 +
.../dialogflow_v2beta1}/proto/intent.proto | 41 +-
.../proto/knowledge_base.proto | 69 +-
.../dialogflow_v2beta1}/proto/session.proto | 86 +-
.../proto/session_entity_type.proto | 98 +-
.../proto/validation_result.proto | 0
.../dialogflow_v2beta1}/proto/webhook.proto | 16 +-
google/cloud/dialogflow_v2beta1/py.typed | 2 +
.../dialogflow_v2beta1/services/__init__.py | 16 +
.../services/agents/__init__.py | 24 +
.../services/agents/async_client.py | 891 ++
.../services/agents/client.py | 1094 +++
.../services/agents/pagers.py | 148 +
.../services/agents/transports/__init__.py | 36 +
.../services/agents/transports/base.py | 240 +
.../services/agents/transports/grpc.py | 528 ++
.../agents/transports/grpc_asyncio.py | 539 ++
.../services/contexts/__init__.py | 24 +
.../services/contexts/async_client.py | 699 ++
.../services/contexts/client.py | 902 ++
.../services/contexts/pagers.py | 148 +
.../services/contexts/transports/__init__.py | 36 +
.../services/contexts/transports/base.py | 191 +
.../services/contexts/transports/grpc.py | 391 +
.../contexts/transports/grpc_asyncio.py | 401 +
.../services/documents/__init__.py | 24 +
.../services/documents/async_client.py | 742 ++
.../services/documents/client.py | 943 +++
.../services/documents/pagers.py | 148 +
.../services/documents/transports/__init__.py | 36 +
.../services/documents/transports/base.py | 198 +
.../services/documents/transports/grpc.py | 435 +
.../documents/transports/grpc_asyncio.py | 445 +
.../services/entity_types/__init__.py | 24 +
.../services/entity_types/async_client.py | 1183 +++
.../services/entity_types/client.py | 1389 +++
.../services/entity_types/pagers.py | 148 +
.../entity_types/transports/__init__.py | 36 +
.../services/entity_types/transports/base.py | 261 +
.../services/entity_types/transports/grpc.py | 535 ++
.../entity_types/transports/grpc_asyncio.py | 552 ++
.../services/environments/__init__.py | 24 +
.../services/environments/async_client.py | 237 +
.../services/environments/client.py | 430 +
.../services/environments/pagers.py | 148 +
.../environments/transports/__init__.py | 36 +
.../services/environments/transports/base.py | 130 +
.../services/environments/transports/grpc.py | 263 +
.../environments/transports/grpc_asyncio.py | 268 +
.../services/intents/__init__.py | 24 +
.../services/intents/async_client.py | 848 ++
.../services/intents/client.py | 1063 +++
.../services/intents/pagers.py | 148 +
.../services/intents/transports/__init__.py | 36 +
.../services/intents/transports/base.py | 214 +
.../services/intents/transports/grpc.py | 440 +
.../intents/transports/grpc_asyncio.py | 448 +
.../services/knowledge_bases/__init__.py | 24 +
.../services/knowledge_bases/async_client.py | 592 ++
.../services/knowledge_bases/client.py | 785 ++
.../services/knowledge_bases/pagers.py | 148 +
.../knowledge_bases/transports/__init__.py | 36 +
.../knowledge_bases/transports/base.py | 196 +
.../knowledge_bases/transports/grpc.py | 392 +
.../transports/grpc_asyncio.py | 397 +
.../services/session_entity_types/__init__.py | 24 +
.../session_entity_types/async_client.py | 631 ++
.../services/session_entity_types/client.py | 836 ++
.../services/session_entity_types/pagers.py | 152 +
.../transports/__init__.py | 38 +
.../session_entity_types/transports/base.py | 201 +
.../session_entity_types/transports/grpc.py | 399 +
.../transports/grpc_asyncio.py | 405 +
.../services/sessions/__init__.py | 24 +
.../services/sessions/async_client.py | 394 +
.../services/sessions/client.py | 633 ++
.../services/sessions/transports/__init__.py | 36 +
.../services/sessions/transports/base.py | 156 +
.../services/sessions/transports/grpc.py | 305 +
.../sessions/transports/grpc_asyncio.py | 312 +
.../dialogflow_v2beta1/types/__init__.py | 243 +
.../cloud/dialogflow_v2beta1/types/agent.py | 400 +
.../dialogflow_v2beta1/types/audio_config.py | 409 +
.../cloud/dialogflow_v2beta1/types/context.py | 286 +
.../dialogflow_v2beta1/types/document.py | 342 +
.../dialogflow_v2beta1/types/entity_type.py | 484 ++
.../dialogflow_v2beta1/types/environment.py | 153 +
google/cloud/dialogflow_v2beta1/types/gcs.py | 41 +
.../cloud/dialogflow_v2beta1/types/intent.py | 1839 ++++
.../types/knowledge_base.py | 219 +
.../cloud/dialogflow_v2beta1/types/session.py | 975 +++
.../types/session_entity_type.py | 245 +
.../types/validation_result.py | 85 +
.../cloud/dialogflow_v2beta1/types/webhook.py | 221 +
mypy.ini | 3 +
noxfile.py | 136 +-
samples/snippets/create_document_test.py | 15 +-
.../snippets/create_knowledge_base_test.py | 6 +-
samples/snippets/detect_intent_audio.py | 19 +-
samples/snippets/detect_intent_knowledge.py | 20 +-
samples/snippets/detect_intent_stream.py | 14 +-
samples/snippets/detect_intent_texts.py | 8 +-
.../detect_intent_with_sentiment_analysis.py | 13 +-
...etect_intent_with_texttospeech_response.py | 19 +-
samples/snippets/document_management.py | 13 +-
samples/snippets/intent_management.py | 32 +-
samples/snippets/intent_management_test.py | 3 +-
samples/snippets/knowledge_base_management.py | 11 +-
scripts/fixup_dialogflow_v2_keywords.py | 218 +
scripts/fixup_dialogflow_v2beta1_keywords.py | 229 +
setup.py | 17 +-
synth.metadata | 6 +-
synth.py | 301 +-
tests/unit/gapic/dialogflow_v2/__init__.py | 1 +
tests/unit/gapic/dialogflow_v2/test_agents.py | 2607 ++++++
.../unit/gapic/dialogflow_v2/test_contexts.py | 2148 +++++
.../gapic/dialogflow_v2/test_entity_types.py | 3230 +++++++
.../gapic/dialogflow_v2/test_environments.py | 1154 +++
.../unit/gapic/dialogflow_v2/test_intents.py | 2717 ++++++
.../test_session_entity_types.py | 2248 +++++
.../unit/gapic/dialogflow_v2/test_sessions.py | 1248 +++
.../unit/gapic/dialogflow_v2beta1/__init__.py | 1 +
.../gapic/dialogflow_v2beta1/test_agents.py | 2607 ++++++
.../gapic/dialogflow_v2beta1/test_contexts.py | 2148 +++++
.../dialogflow_v2beta1/test_documents.py | 2243 +++++
.../dialogflow_v2beta1/test_entity_types.py | 3238 +++++++
.../dialogflow_v2beta1/test_environments.py | 1227 +++
.../gapic/dialogflow_v2beta1/test_intents.py | 2753 ++++++
.../test_knowledge_bases.py | 2170 +++++
.../test_session_entity_types.py | 2248 +++++
.../gapic/dialogflow_v2beta1/test_sessions.py | 1274 +++
tests/unit/gapic/v2/test_agents_client_v2.py | 490 --
.../unit/gapic/v2/test_contexts_client_v2.py | 288 -
.../gapic/v2/test_entity_types_client_v2.py | 548 --
.../gapic/v2/test_environments_client_v2.py | 109 -
tests/unit/gapic/v2/test_intents_client_v2.py | 413 -
.../v2/test_session_entity_types_client_v2.py | 273 -
.../unit/gapic/v2/test_sessions_client_v2.py | 162 -
.../v2beta1/test_agents_client_v2beta1.py | 486 --
.../v2beta1/test_contexts_client_v2beta1.py | 288 -
.../v2beta1/test_documents_client_v2beta1.py | 393 -
.../test_entity_types_client_v2beta1.py | 548 --
.../test_environments_client_v2beta1.py | 109 -
.../v2beta1/test_intents_client_v2beta1.py | 425 -
.../test_knowledge_bases_client_v2beta1.py | 279 -
...est_session_entity_types_client_v2beta1.py | 273 -
.../v2beta1/test_sessions_client_v2beta1.py | 162 -
373 files changed, 92889 insertions(+), 65186 deletions(-)
create mode 100644 .pre-commit-config.yaml
create mode 100644 UPGRADING.md
delete mode 100644 dialogflow_v2/__init__.py
delete mode 100644 dialogflow_v2/gapic/__init__.py
delete mode 100644 dialogflow_v2/gapic/agents_client.py
delete mode 100644 dialogflow_v2/gapic/agents_client_config.py
delete mode 100644 dialogflow_v2/gapic/contexts_client.py
delete mode 100644 dialogflow_v2/gapic/contexts_client_config.py
delete mode 100644 dialogflow_v2/gapic/entity_types_client.py
delete mode 100644 dialogflow_v2/gapic/entity_types_client_config.py
delete mode 100644 dialogflow_v2/gapic/enums.py
delete mode 100644 dialogflow_v2/gapic/environments_client.py
delete mode 100644 dialogflow_v2/gapic/environments_client_config.py
delete mode 100644 dialogflow_v2/gapic/intents_client.py
delete mode 100644 dialogflow_v2/gapic/intents_client_config.py
delete mode 100644 dialogflow_v2/gapic/session_entity_types_client.py
delete mode 100644 dialogflow_v2/gapic/session_entity_types_client_config.py
delete mode 100644 dialogflow_v2/gapic/sessions_client.py
delete mode 100644 dialogflow_v2/gapic/sessions_client_config.py
delete mode 100644 dialogflow_v2/gapic/transports/__init__.py
delete mode 100644 dialogflow_v2/gapic/transports/agents_grpc_transport.py
delete mode 100644 dialogflow_v2/gapic/transports/contexts_grpc_transport.py
delete mode 100644 dialogflow_v2/gapic/transports/entity_types_grpc_transport.py
delete mode 100644 dialogflow_v2/gapic/transports/environments_grpc_transport.py
delete mode 100644 dialogflow_v2/gapic/transports/intents_grpc_transport.py
delete mode 100644 dialogflow_v2/gapic/transports/session_entity_types_grpc_transport.py
delete mode 100644 dialogflow_v2/gapic/transports/sessions_grpc_transport.py
delete mode 100644 dialogflow_v2/proto/__init__.py
delete mode 100644 dialogflow_v2/proto/agent_pb2.py
delete mode 100644 dialogflow_v2/proto/agent_pb2_grpc.py
delete mode 100644 dialogflow_v2/proto/audio_config_pb2.py
delete mode 100644 dialogflow_v2/proto/audio_config_pb2_grpc.py
delete mode 100644 dialogflow_v2/proto/context_pb2.py
delete mode 100644 dialogflow_v2/proto/context_pb2_grpc.py
delete mode 100644 dialogflow_v2/proto/entity_type_pb2.py
delete mode 100644 dialogflow_v2/proto/entity_type_pb2_grpc.py
delete mode 100644 dialogflow_v2/proto/environment_pb2.py
delete mode 100644 dialogflow_v2/proto/environment_pb2_grpc.py
delete mode 100644 dialogflow_v2/proto/intent_pb2.py
delete mode 100644 dialogflow_v2/proto/intent_pb2_grpc.py
delete mode 100644 dialogflow_v2/proto/session_entity_type_pb2.py
delete mode 100644 dialogflow_v2/proto/session_entity_type_pb2_grpc.py
delete mode 100644 dialogflow_v2/proto/session_pb2.py
delete mode 100644 dialogflow_v2/proto/session_pb2_grpc.py
delete mode 100644 dialogflow_v2/proto/validation_result_pb2.py
delete mode 100644 dialogflow_v2/proto/validation_result_pb2_grpc.py
delete mode 100644 dialogflow_v2/proto/webhook_pb2.py
delete mode 100644 dialogflow_v2/proto/webhook_pb2_grpc.py
delete mode 100644 dialogflow_v2/types.py
delete mode 100644 dialogflow_v2beta1/__init__.py
delete mode 100644 dialogflow_v2beta1/gapic/__init__.py
delete mode 100644 dialogflow_v2beta1/gapic/agents_client.py
delete mode 100644 dialogflow_v2beta1/gapic/agents_client_config.py
delete mode 100644 dialogflow_v2beta1/gapic/contexts_client.py
delete mode 100644 dialogflow_v2beta1/gapic/contexts_client_config.py
delete mode 100644 dialogflow_v2beta1/gapic/documents_client.py
delete mode 100644 dialogflow_v2beta1/gapic/documents_client_config.py
delete mode 100644 dialogflow_v2beta1/gapic/entity_types_client.py
delete mode 100644 dialogflow_v2beta1/gapic/entity_types_client_config.py
delete mode 100644 dialogflow_v2beta1/gapic/enums.py
delete mode 100644 dialogflow_v2beta1/gapic/environments_client.py
delete mode 100644 dialogflow_v2beta1/gapic/environments_client_config.py
delete mode 100644 dialogflow_v2beta1/gapic/intents_client.py
delete mode 100644 dialogflow_v2beta1/gapic/intents_client_config.py
delete mode 100644 dialogflow_v2beta1/gapic/knowledge_bases_client.py
delete mode 100644 dialogflow_v2beta1/gapic/knowledge_bases_client_config.py
delete mode 100644 dialogflow_v2beta1/gapic/session_entity_types_client.py
delete mode 100644 dialogflow_v2beta1/gapic/session_entity_types_client_config.py
delete mode 100644 dialogflow_v2beta1/gapic/sessions_client.py
delete mode 100644 dialogflow_v2beta1/gapic/sessions_client_config.py
delete mode 100644 dialogflow_v2beta1/gapic/transports/__init__.py
delete mode 100644 dialogflow_v2beta1/gapic/transports/agents_grpc_transport.py
delete mode 100644 dialogflow_v2beta1/gapic/transports/contexts_grpc_transport.py
delete mode 100644 dialogflow_v2beta1/gapic/transports/documents_grpc_transport.py
delete mode 100644 dialogflow_v2beta1/gapic/transports/entity_types_grpc_transport.py
delete mode 100644 dialogflow_v2beta1/gapic/transports/environments_grpc_transport.py
delete mode 100644 dialogflow_v2beta1/gapic/transports/intents_grpc_transport.py
delete mode 100644 dialogflow_v2beta1/gapic/transports/knowledge_bases_grpc_transport.py
delete mode 100644 dialogflow_v2beta1/gapic/transports/session_entity_types_grpc_transport.py
delete mode 100644 dialogflow_v2beta1/gapic/transports/sessions_grpc_transport.py
delete mode 100644 dialogflow_v2beta1/proto/__init__.py
delete mode 100644 dialogflow_v2beta1/proto/agent_pb2.py
delete mode 100644 dialogflow_v2beta1/proto/agent_pb2_grpc.py
delete mode 100644 dialogflow_v2beta1/proto/audio_config_pb2.py
delete mode 100644 dialogflow_v2beta1/proto/audio_config_pb2_grpc.py
delete mode 100644 dialogflow_v2beta1/proto/context_pb2.py
delete mode 100644 dialogflow_v2beta1/proto/context_pb2_grpc.py
delete mode 100644 dialogflow_v2beta1/proto/document_pb2.py
delete mode 100644 dialogflow_v2beta1/proto/document_pb2_grpc.py
delete mode 100644 dialogflow_v2beta1/proto/entity_type_pb2.py
delete mode 100644 dialogflow_v2beta1/proto/entity_type_pb2_grpc.py
delete mode 100644 dialogflow_v2beta1/proto/environment_pb2.py
delete mode 100644 dialogflow_v2beta1/proto/environment_pb2_grpc.py
delete mode 100644 dialogflow_v2beta1/proto/gcs_pb2.py
delete mode 100644 dialogflow_v2beta1/proto/gcs_pb2_grpc.py
delete mode 100644 dialogflow_v2beta1/proto/intent_pb2.py
delete mode 100644 dialogflow_v2beta1/proto/intent_pb2_grpc.py
delete mode 100644 dialogflow_v2beta1/proto/knowledge_base_pb2.py
delete mode 100644 dialogflow_v2beta1/proto/knowledge_base_pb2_grpc.py
delete mode 100644 dialogflow_v2beta1/proto/session_entity_type_pb2.py
delete mode 100644 dialogflow_v2beta1/proto/session_entity_type_pb2_grpc.py
delete mode 100644 dialogflow_v2beta1/proto/session_pb2.py
delete mode 100644 dialogflow_v2beta1/proto/session_pb2_grpc.py
delete mode 100644 dialogflow_v2beta1/proto/validation_result_pb2.py
delete mode 100644 dialogflow_v2beta1/proto/validation_result_pb2_grpc.py
delete mode 100644 dialogflow_v2beta1/proto/webhook_pb2.py
delete mode 100644 dialogflow_v2beta1/proto/webhook_pb2_grpc.py
delete mode 100644 dialogflow_v2beta1/types.py
create mode 120000 docs/UPGRADING.md
create mode 100644 docs/dialogflow_v2/services.rst
create mode 100644 docs/dialogflow_v2/types.rst
create mode 100644 docs/dialogflow_v2beta1/services.rst
create mode 100644 docs/dialogflow_v2beta1/types.rst
delete mode 100644 docs/gapic/v2/api.rst
delete mode 100644 docs/gapic/v2/types.rst
delete mode 100644 docs/gapic/v2beta1/api.rst
delete mode 100644 docs/gapic/v2beta1/types.rst
delete mode 100644 docs/v2.rst
delete mode 100644 docs/v2beta1.rst
create mode 100644 google/cloud/dialogflow/__init__.py
create mode 100644 google/cloud/dialogflow/py.typed
create mode 100644 google/cloud/dialogflow_v2/__init__.py
rename {dialogflow_v2 => google/cloud/dialogflow_v2}/proto/agent.proto (99%)
rename {dialogflow_v2 => google/cloud/dialogflow_v2}/proto/audio_config.proto (100%)
rename {dialogflow_v2 => google/cloud/dialogflow_v2}/proto/context.proto (100%)
rename {dialogflow_v2 => google/cloud/dialogflow_v2}/proto/entity_type.proto (100%)
rename {dialogflow_v2 => google/cloud/dialogflow_v2}/proto/environment.proto (100%)
rename {dialogflow_v2 => google/cloud/dialogflow_v2}/proto/intent.proto (100%)
rename {dialogflow_v2 => google/cloud/dialogflow_v2}/proto/session.proto (85%)
rename {dialogflow_v2 => google/cloud/dialogflow_v2}/proto/session_entity_type.proto (100%)
rename {dialogflow_v2 => google/cloud/dialogflow_v2}/proto/validation_result.proto (100%)
rename {dialogflow_v2 => google/cloud/dialogflow_v2}/proto/webhook.proto (98%)
create mode 100644 google/cloud/dialogflow_v2/py.typed
create mode 100644 google/cloud/dialogflow_v2/services/__init__.py
rename tests/unit/test_versionless.py => google/cloud/dialogflow_v2/services/agents/__init__.py (62%)
create mode 100644 google/cloud/dialogflow_v2/services/agents/async_client.py
create mode 100644 google/cloud/dialogflow_v2/services/agents/client.py
create mode 100644 google/cloud/dialogflow_v2/services/agents/pagers.py
create mode 100644 google/cloud/dialogflow_v2/services/agents/transports/__init__.py
create mode 100644 google/cloud/dialogflow_v2/services/agents/transports/base.py
create mode 100644 google/cloud/dialogflow_v2/services/agents/transports/grpc.py
create mode 100644 google/cloud/dialogflow_v2/services/agents/transports/grpc_asyncio.py
create mode 100644 google/cloud/dialogflow_v2/services/contexts/__init__.py
create mode 100644 google/cloud/dialogflow_v2/services/contexts/async_client.py
create mode 100644 google/cloud/dialogflow_v2/services/contexts/client.py
create mode 100644 google/cloud/dialogflow_v2/services/contexts/pagers.py
create mode 100644 google/cloud/dialogflow_v2/services/contexts/transports/__init__.py
create mode 100644 google/cloud/dialogflow_v2/services/contexts/transports/base.py
create mode 100644 google/cloud/dialogflow_v2/services/contexts/transports/grpc.py
create mode 100644 google/cloud/dialogflow_v2/services/contexts/transports/grpc_asyncio.py
create mode 100644 google/cloud/dialogflow_v2/services/entity_types/__init__.py
create mode 100644 google/cloud/dialogflow_v2/services/entity_types/async_client.py
create mode 100644 google/cloud/dialogflow_v2/services/entity_types/client.py
create mode 100644 google/cloud/dialogflow_v2/services/entity_types/pagers.py
create mode 100644 google/cloud/dialogflow_v2/services/entity_types/transports/__init__.py
create mode 100644 google/cloud/dialogflow_v2/services/entity_types/transports/base.py
create mode 100644 google/cloud/dialogflow_v2/services/entity_types/transports/grpc.py
create mode 100644 google/cloud/dialogflow_v2/services/entity_types/transports/grpc_asyncio.py
create mode 100644 google/cloud/dialogflow_v2/services/environments/__init__.py
create mode 100644 google/cloud/dialogflow_v2/services/environments/async_client.py
create mode 100644 google/cloud/dialogflow_v2/services/environments/client.py
create mode 100644 google/cloud/dialogflow_v2/services/environments/pagers.py
create mode 100644 google/cloud/dialogflow_v2/services/environments/transports/__init__.py
create mode 100644 google/cloud/dialogflow_v2/services/environments/transports/base.py
create mode 100644 google/cloud/dialogflow_v2/services/environments/transports/grpc.py
create mode 100644 google/cloud/dialogflow_v2/services/environments/transports/grpc_asyncio.py
create mode 100644 google/cloud/dialogflow_v2/services/intents/__init__.py
create mode 100644 google/cloud/dialogflow_v2/services/intents/async_client.py
create mode 100644 google/cloud/dialogflow_v2/services/intents/client.py
create mode 100644 google/cloud/dialogflow_v2/services/intents/pagers.py
create mode 100644 google/cloud/dialogflow_v2/services/intents/transports/__init__.py
create mode 100644 google/cloud/dialogflow_v2/services/intents/transports/base.py
create mode 100644 google/cloud/dialogflow_v2/services/intents/transports/grpc.py
create mode 100644 google/cloud/dialogflow_v2/services/intents/transports/grpc_asyncio.py
rename {dialogflow => google/cloud/dialogflow_v2/services/session_entity_types}/__init__.py (53%)
create mode 100644 google/cloud/dialogflow_v2/services/session_entity_types/async_client.py
create mode 100644 google/cloud/dialogflow_v2/services/session_entity_types/client.py
create mode 100644 google/cloud/dialogflow_v2/services/session_entity_types/pagers.py
create mode 100644 google/cloud/dialogflow_v2/services/session_entity_types/transports/__init__.py
create mode 100644 google/cloud/dialogflow_v2/services/session_entity_types/transports/base.py
create mode 100644 google/cloud/dialogflow_v2/services/session_entity_types/transports/grpc.py
create mode 100644 google/cloud/dialogflow_v2/services/session_entity_types/transports/grpc_asyncio.py
create mode 100644 google/cloud/dialogflow_v2/services/sessions/__init__.py
create mode 100644 google/cloud/dialogflow_v2/services/sessions/async_client.py
create mode 100644 google/cloud/dialogflow_v2/services/sessions/client.py
create mode 100644 google/cloud/dialogflow_v2/services/sessions/transports/__init__.py
create mode 100644 google/cloud/dialogflow_v2/services/sessions/transports/base.py
create mode 100644 google/cloud/dialogflow_v2/services/sessions/transports/grpc.py
create mode 100644 google/cloud/dialogflow_v2/services/sessions/transports/grpc_asyncio.py
create mode 100644 google/cloud/dialogflow_v2/types/__init__.py
create mode 100644 google/cloud/dialogflow_v2/types/agent.py
create mode 100644 google/cloud/dialogflow_v2/types/audio_config.py
create mode 100644 google/cloud/dialogflow_v2/types/context.py
create mode 100644 google/cloud/dialogflow_v2/types/entity_type.py
create mode 100644 google/cloud/dialogflow_v2/types/environment.py
create mode 100644 google/cloud/dialogflow_v2/types/intent.py
create mode 100644 google/cloud/dialogflow_v2/types/session.py
create mode 100644 google/cloud/dialogflow_v2/types/session_entity_type.py
create mode 100644 google/cloud/dialogflow_v2/types/validation_result.py
create mode 100644 google/cloud/dialogflow_v2/types/webhook.py
create mode 100644 google/cloud/dialogflow_v2beta1/__init__.py
rename {dialogflow_v2beta1 => google/cloud/dialogflow_v2beta1}/proto/agent.proto (92%)
rename {dialogflow_v2beta1 => google/cloud/dialogflow_v2beta1}/proto/audio_config.proto (93%)
rename {dialogflow_v2beta1 => google/cloud/dialogflow_v2beta1}/proto/context.proto (73%)
rename {dialogflow_v2beta1 => google/cloud/dialogflow_v2beta1}/proto/document.proto (81%)
rename {dialogflow_v2beta1 => google/cloud/dialogflow_v2beta1}/proto/entity_type.proto (92%)
rename {dialogflow_v2beta1 => google/cloud/dialogflow_v2beta1}/proto/environment.proto (94%)
rename {dialogflow_v2beta1 => google/cloud/dialogflow_v2beta1}/proto/gcs.proto (96%)
rename {dialogflow_v2beta1 => google/cloud/dialogflow_v2beta1}/proto/intent.proto (97%)
rename {dialogflow_v2beta1 => google/cloud/dialogflow_v2beta1}/proto/knowledge_base.proto (77%)
rename {dialogflow_v2beta1 => google/cloud/dialogflow_v2beta1}/proto/session.proto (90%)
rename {dialogflow_v2beta1 => google/cloud/dialogflow_v2beta1}/proto/session_entity_type.proto (75%)
rename {dialogflow_v2beta1 => google/cloud/dialogflow_v2beta1}/proto/validation_result.proto (100%)
rename {dialogflow_v2beta1 => google/cloud/dialogflow_v2beta1}/proto/webhook.proto (93%)
create mode 100644 google/cloud/dialogflow_v2beta1/py.typed
create mode 100644 google/cloud/dialogflow_v2beta1/services/__init__.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/agents/__init__.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/agents/async_client.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/agents/client.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/agents/pagers.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/agents/transports/__init__.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/agents/transports/base.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/agents/transports/grpc.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/agents/transports/grpc_asyncio.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/contexts/__init__.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/contexts/async_client.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/contexts/client.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/contexts/pagers.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/contexts/transports/__init__.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/contexts/transports/base.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/contexts/transports/grpc.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/contexts/transports/grpc_asyncio.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/documents/__init__.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/documents/async_client.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/documents/client.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/documents/pagers.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/documents/transports/__init__.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/documents/transports/base.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/documents/transports/grpc.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/documents/transports/grpc_asyncio.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/entity_types/__init__.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/entity_types/async_client.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/entity_types/client.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/entity_types/pagers.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/entity_types/transports/__init__.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/entity_types/transports/base.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/entity_types/transports/grpc.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/entity_types/transports/grpc_asyncio.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/environments/__init__.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/environments/async_client.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/environments/client.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/environments/pagers.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/environments/transports/__init__.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/environments/transports/base.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/environments/transports/grpc.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/environments/transports/grpc_asyncio.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/intents/__init__.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/intents/async_client.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/intents/client.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/intents/pagers.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/intents/transports/__init__.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/intents/transports/base.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/intents/transports/grpc.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/intents/transports/grpc_asyncio.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/knowledge_bases/__init__.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/knowledge_bases/async_client.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/knowledge_bases/client.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/knowledge_bases/pagers.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/knowledge_bases/transports/__init__.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/knowledge_bases/transports/base.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/knowledge_bases/transports/grpc.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/knowledge_bases/transports/grpc_asyncio.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/session_entity_types/__init__.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/session_entity_types/async_client.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/session_entity_types/client.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/session_entity_types/pagers.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/session_entity_types/transports/__init__.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/session_entity_types/transports/base.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/session_entity_types/transports/grpc.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/session_entity_types/transports/grpc_asyncio.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/sessions/__init__.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/sessions/async_client.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/sessions/client.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/sessions/transports/__init__.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/sessions/transports/base.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/sessions/transports/grpc.py
create mode 100644 google/cloud/dialogflow_v2beta1/services/sessions/transports/grpc_asyncio.py
create mode 100644 google/cloud/dialogflow_v2beta1/types/__init__.py
create mode 100644 google/cloud/dialogflow_v2beta1/types/agent.py
create mode 100644 google/cloud/dialogflow_v2beta1/types/audio_config.py
create mode 100644 google/cloud/dialogflow_v2beta1/types/context.py
create mode 100644 google/cloud/dialogflow_v2beta1/types/document.py
create mode 100644 google/cloud/dialogflow_v2beta1/types/entity_type.py
create mode 100644 google/cloud/dialogflow_v2beta1/types/environment.py
create mode 100644 google/cloud/dialogflow_v2beta1/types/gcs.py
create mode 100644 google/cloud/dialogflow_v2beta1/types/intent.py
create mode 100644 google/cloud/dialogflow_v2beta1/types/knowledge_base.py
create mode 100644 google/cloud/dialogflow_v2beta1/types/session.py
create mode 100644 google/cloud/dialogflow_v2beta1/types/session_entity_type.py
create mode 100644 google/cloud/dialogflow_v2beta1/types/validation_result.py
create mode 100644 google/cloud/dialogflow_v2beta1/types/webhook.py
create mode 100644 mypy.ini
create mode 100644 scripts/fixup_dialogflow_v2_keywords.py
create mode 100644 scripts/fixup_dialogflow_v2beta1_keywords.py
create mode 100644 tests/unit/gapic/dialogflow_v2/__init__.py
create mode 100644 tests/unit/gapic/dialogflow_v2/test_agents.py
create mode 100644 tests/unit/gapic/dialogflow_v2/test_contexts.py
create mode 100644 tests/unit/gapic/dialogflow_v2/test_entity_types.py
create mode 100644 tests/unit/gapic/dialogflow_v2/test_environments.py
create mode 100644 tests/unit/gapic/dialogflow_v2/test_intents.py
create mode 100644 tests/unit/gapic/dialogflow_v2/test_session_entity_types.py
create mode 100644 tests/unit/gapic/dialogflow_v2/test_sessions.py
create mode 100644 tests/unit/gapic/dialogflow_v2beta1/__init__.py
create mode 100644 tests/unit/gapic/dialogflow_v2beta1/test_agents.py
create mode 100644 tests/unit/gapic/dialogflow_v2beta1/test_contexts.py
create mode 100644 tests/unit/gapic/dialogflow_v2beta1/test_documents.py
create mode 100644 tests/unit/gapic/dialogflow_v2beta1/test_entity_types.py
create mode 100644 tests/unit/gapic/dialogflow_v2beta1/test_environments.py
create mode 100644 tests/unit/gapic/dialogflow_v2beta1/test_intents.py
create mode 100644 tests/unit/gapic/dialogflow_v2beta1/test_knowledge_bases.py
create mode 100644 tests/unit/gapic/dialogflow_v2beta1/test_session_entity_types.py
create mode 100644 tests/unit/gapic/dialogflow_v2beta1/test_sessions.py
delete mode 100644 tests/unit/gapic/v2/test_agents_client_v2.py
delete mode 100644 tests/unit/gapic/v2/test_contexts_client_v2.py
delete mode 100644 tests/unit/gapic/v2/test_entity_types_client_v2.py
delete mode 100644 tests/unit/gapic/v2/test_environments_client_v2.py
delete mode 100644 tests/unit/gapic/v2/test_intents_client_v2.py
delete mode 100644 tests/unit/gapic/v2/test_session_entity_types_client_v2.py
delete mode 100644 tests/unit/gapic/v2/test_sessions_client_v2.py
delete mode 100644 tests/unit/gapic/v2beta1/test_agents_client_v2beta1.py
delete mode 100644 tests/unit/gapic/v2beta1/test_contexts_client_v2beta1.py
delete mode 100644 tests/unit/gapic/v2beta1/test_documents_client_v2beta1.py
delete mode 100644 tests/unit/gapic/v2beta1/test_entity_types_client_v2beta1.py
delete mode 100644 tests/unit/gapic/v2beta1/test_environments_client_v2beta1.py
delete mode 100644 tests/unit/gapic/v2beta1/test_intents_client_v2beta1.py
delete mode 100644 tests/unit/gapic/v2beta1/test_knowledge_bases_client_v2beta1.py
delete mode 100644 tests/unit/gapic/v2beta1/test_session_entity_types_client_v2beta1.py
delete mode 100644 tests/unit/gapic/v2beta1/test_sessions_client_v2beta1.py
diff --git a/.coveragerc b/.coveragerc
index 0d8e6297d..6bf364f90 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -17,22 +17,18 @@
# Generated by synthtool. DO NOT EDIT!
[run]
branch = True
-omit =
- google/cloud/__init__.py
[report]
fail_under = 100
show_missing = True
+omit = google/cloud/dialogflow/__init__.py
exclude_lines =
# Re-enable the standard pragma
pragma: NO COVER
# Ignore debug-only repr
def __repr__
- # Ignore abstract methods
- raise NotImplementedError
-omit =
- */gapic/*.py
- */proto/*.py
- */core/*.py
- */site-packages/*.py
- google/cloud/__init__.py
+ # Ignore pkg_resources exceptions.
+ # This is added at the module level as a safeguard for if someone
+ # generates the code and tries to run it without pip installing. This
+ # makes it virtually impossible to test properly.
+ except pkg_resources.DistributionNotFound
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 4369a419d..fe8554689 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -10,7 +10,7 @@ Thanks for stopping by to let us know something could be better!
Please run down the following list and make sure you've tried the usual "quick fixes":
- - Search the issues already opened: https://github.com/googleapis/dialogflow-python-client-v2/issues
+ - Search the issues already opened: https://github.com/googleapis/python-dialogflow/issues
- Search StackOverflow: https://stackoverflow.com/questions/tagged/google-cloud-platform+python
If you are still having issues, please be sure to include as much information as possible:
@@ -20,7 +20,7 @@ If you are still having issues, please be sure to include as much information as
- OS type and version:
- Python version: `python --version`
- pip version: `pip --version`
- - `dialogflow` version: `pip show dialogflow`
+ - `google-cloud-dialogflow` version: `pip show google-cloud-dialogflow`
#### Steps to reproduce
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 7c3dd5284..e4f3b0305 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,5 +1,5 @@
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
-- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/dialogflow-python-client-v2/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
+- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-dialogflow/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)
diff --git a/.kokoro/build.sh b/.kokoro/build.sh
index 682c163b3..f97d0c63b 100755
--- a/.kokoro/build.sh
+++ b/.kokoro/build.sh
@@ -15,7 +15,7 @@
set -eo pipefail
-cd github/dialogflow-python-client-v2
+cd github/python-dialogflow
# Disable buffering, so that the logs stream through.
export PYTHONUNBUFFERED=1
diff --git a/.kokoro/continuous/common.cfg b/.kokoro/continuous/common.cfg
index ef672c96e..76c8fc565 100644
--- a/.kokoro/continuous/common.cfg
+++ b/.kokoro/continuous/common.cfg
@@ -14,7 +14,7 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-python"
# Use the trampoline script to run in docker.
-build_file: "dialogflow-python-client-v2/.kokoro/trampoline.sh"
+build_file: "python-dialogflow/.kokoro/trampoline.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
@@ -23,5 +23,5 @@ env_vars: {
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
- value: "github/dialogflow-python-client-v2/.kokoro/build.sh"
+ value: "github/python-dialogflow/.kokoro/build.sh"
}
diff --git a/.kokoro/docs/common.cfg b/.kokoro/docs/common.cfg
index 69334436e..d03febf04 100644
--- a/.kokoro/docs/common.cfg
+++ b/.kokoro/docs/common.cfg
@@ -11,7 +11,7 @@ action {
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
# Use the trampoline script to run in docker.
-build_file: "dialogflow-python-client-v2/.kokoro/trampoline_v2.sh"
+build_file: "python-dialogflow/.kokoro/trampoline_v2.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
@@ -20,7 +20,7 @@ env_vars: {
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
- value: "github/dialogflow-python-client-v2/.kokoro/publish-docs.sh"
+ value: "github/python-dialogflow/.kokoro/publish-docs.sh"
}
env_vars: {
diff --git a/.kokoro/presubmit/common.cfg b/.kokoro/presubmit/common.cfg
index ef672c96e..76c8fc565 100644
--- a/.kokoro/presubmit/common.cfg
+++ b/.kokoro/presubmit/common.cfg
@@ -14,7 +14,7 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-python"
# Use the trampoline script to run in docker.
-build_file: "dialogflow-python-client-v2/.kokoro/trampoline.sh"
+build_file: "python-dialogflow/.kokoro/trampoline.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
@@ -23,5 +23,5 @@ env_vars: {
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
- value: "github/dialogflow-python-client-v2/.kokoro/build.sh"
+ value: "github/python-dialogflow/.kokoro/build.sh"
}
diff --git a/.kokoro/release.sh b/.kokoro/release.sh
index a573045a5..836c14c7f 100755
--- a/.kokoro/release.sh
+++ b/.kokoro/release.sh
@@ -27,6 +27,6 @@ export PYTHONUNBUFFERED=1
# Move into the package, build the distribution and upload.
TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google_cloud_pypi_password")
-cd github/dialogflow-python-client-v2
+cd github/python-dialogflow
python3 setup.py sdist bdist_wheel
twine upload --username gcloudpypi --password "${TWINE_PASSWORD}" dist/*
diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg
index b8cf8768f..d9a882620 100644
--- a/.kokoro/release/common.cfg
+++ b/.kokoro/release/common.cfg
@@ -11,7 +11,7 @@ action {
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
# Use the trampoline script to run in docker.
-build_file: "dialogflow-python-client-v2/.kokoro/trampoline.sh"
+build_file: "python-dialogflow/.kokoro/trampoline.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
@@ -20,7 +20,7 @@ env_vars: {
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
- value: "github/dialogflow-python-client-v2/.kokoro/release.sh"
+ value: "github/python-dialogflow/.kokoro/release.sh"
}
# Fetch PyPI password
diff --git a/.kokoro/samples/lint/common.cfg b/.kokoro/samples/lint/common.cfg
index eb9ca02f3..5879caec3 100644
--- a/.kokoro/samples/lint/common.cfg
+++ b/.kokoro/samples/lint/common.cfg
@@ -15,7 +15,7 @@ env_vars: {
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
- value: "github/dialogflow-python-client-v2/.kokoro/test-samples.sh"
+ value: "github/python-dialogflow/.kokoro/test-samples.sh"
}
# Configure the docker image for kokoro-trampoline.
@@ -31,4 +31,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
# Use the trampoline script to run in docker.
-build_file: "dialogflow-python-client-v2/.kokoro/trampoline.sh"
\ No newline at end of file
+build_file: "python-dialogflow/.kokoro/trampoline.sh"
\ No newline at end of file
diff --git a/.kokoro/samples/python3.6/common.cfg b/.kokoro/samples/python3.6/common.cfg
index c29a70c6f..e3daafd4b 100644
--- a/.kokoro/samples/python3.6/common.cfg
+++ b/.kokoro/samples/python3.6/common.cfg
@@ -21,7 +21,7 @@ env_vars: {
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
- value: "github/dialogflow-python-client-v2/.kokoro/test-samples.sh"
+ value: "github/python-dialogflow/.kokoro/test-samples.sh"
}
# Configure the docker image for kokoro-trampoline.
@@ -37,4 +37,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
# Use the trampoline script to run in docker.
-build_file: "dialogflow-python-client-v2/.kokoro/trampoline.sh"
\ No newline at end of file
+build_file: "python-dialogflow/.kokoro/trampoline.sh"
\ No newline at end of file
diff --git a/.kokoro/samples/python3.7/common.cfg b/.kokoro/samples/python3.7/common.cfg
index 8698a7deb..e7a49f99c 100644
--- a/.kokoro/samples/python3.7/common.cfg
+++ b/.kokoro/samples/python3.7/common.cfg
@@ -21,7 +21,7 @@ env_vars: {
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
- value: "github/dialogflow-python-client-v2/.kokoro/test-samples.sh"
+ value: "github/python-dialogflow/.kokoro/test-samples.sh"
}
# Configure the docker image for kokoro-trampoline.
@@ -37,4 +37,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
# Use the trampoline script to run in docker.
-build_file: "dialogflow-python-client-v2/.kokoro/trampoline.sh"
\ No newline at end of file
+build_file: "python-dialogflow/.kokoro/trampoline.sh"
\ No newline at end of file
diff --git a/.kokoro/samples/python3.8/common.cfg b/.kokoro/samples/python3.8/common.cfg
index 7c19fc300..ff4f743a8 100644
--- a/.kokoro/samples/python3.8/common.cfg
+++ b/.kokoro/samples/python3.8/common.cfg
@@ -21,7 +21,7 @@ env_vars: {
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
- value: "github/dialogflow-python-client-v2/.kokoro/test-samples.sh"
+ value: "github/python-dialogflow/.kokoro/test-samples.sh"
}
# Configure the docker image for kokoro-trampoline.
@@ -37,4 +37,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
# Use the trampoline script to run in docker.
-build_file: "dialogflow-python-client-v2/.kokoro/trampoline.sh"
\ No newline at end of file
+build_file: "python-dialogflow/.kokoro/trampoline.sh"
\ No newline at end of file
diff --git a/.kokoro/test-samples.sh b/.kokoro/test-samples.sh
index fe08751d6..96c719f54 100755
--- a/.kokoro/test-samples.sh
+++ b/.kokoro/test-samples.sh
@@ -20,7 +20,7 @@ set -eo pipefail
# Enables `**` to include files nested inside sub-folders
shopt -s globstar
-cd github/dialogflow-python-client-v2
+cd github/python-dialogflow
# Run periodic samples tests at latest release
if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 000000000..6ad83346e
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,17 @@
+# See https://pre-commit.com for more information
+# See https://pre-commit.com/hooks.html for more hooks
+repos:
+- repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v3.3.0
+ hooks:
+ - id: trailing-whitespace
+ - id: end-of-file-fixer
+ - id: check-yaml
+- repo: https://github.com/psf/black
+ rev: 19.10b0
+ hooks:
+ - id: black
+- repo: https://gitlab.com/pycqa/flake8
+ rev: 3.8.4
+ hooks:
+ - id: flake8
diff --git a/.repo-metadata.json b/.repo-metadata.json
index 00d50fee7..9be62d8e9 100644
--- a/.repo-metadata.json
+++ b/.repo-metadata.json
@@ -6,8 +6,8 @@
"issue_tracker": "https://issuetracker.google.com/savedsearches/5300385",
"release_level": "ga",
"language": "python",
- "repo": "googleapis/dialogflow-python-client-v2",
- "distribution_name": "dialogflow",
+ "repo": "googleapis/python-dialogflow",
+ "distribution_name": "google-cloud-dialogflow",
"api_id": "dialogflow.googleapis.com",
"requires_billing": true
}
\ No newline at end of file
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 06f69f64c..2e5c52884 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -35,21 +35,21 @@ Using a Development Checkout
You'll have to create a development environment using a Git checkout:
- While logged into your GitHub account, navigate to the
- ``dialogflow-python-client-v2`` `repo`_ on GitHub.
+ ``python-dialogflow`` `repo`_ on GitHub.
-- Fork and clone the ``dialogflow-python-client-v2`` repository to your GitHub account by
+- Fork and clone the ``python-dialogflow`` repository to your GitHub account by
clicking the "Fork" button.
-- Clone your fork of ``dialogflow-python-client-v2`` from your GitHub account to your local
+- Clone your fork of ``python-dialogflow`` from your GitHub account to your local
computer, substituting your account username and specifying the destination
- as ``hack-on-dialogflow-python-client-v2``. E.g.::
+ as ``hack-on-python-dialogflow``. E.g.::
$ cd ${HOME}
- $ git clone git@github.com:USERNAME/dialogflow-python-client-v2.git hack-on-dialogflow-python-client-v2
- $ cd hack-on-dialogflow-python-client-v2
- # Configure remotes such that you can pull changes from the googleapis/dialogflow-python-client-v2
+ $ git clone git@github.com:USERNAME/python-dialogflow.git hack-on-python-dialogflow
+ $ cd hack-on-python-dialogflow
+ # Configure remotes such that you can pull changes from the googleapis/python-dialogflow
# repository into your local repository.
- $ git remote add upstream git@github.com:googleapis/dialogflow-python-client-v2.git
+ $ git remote add upstream git@github.com:googleapis/python-dialogflow.git
# fetch and merge changes from upstream into master
$ git fetch upstream
$ git merge upstream/master
@@ -60,7 +60,7 @@ repo, from which you can submit a pull request.
To work on the codebase and run the tests, we recommend using ``nox``,
but you can also use a ``virtualenv`` of your own creation.
-.. _repo: https://github.com/googleapis/dialogflow-python-client-v2
+.. _repo: https://github.com/googleapis/python-dialogflow
Using ``nox``
=============
@@ -107,10 +107,20 @@ Coding Style
export GOOGLE_CLOUD_TESTING_BRANCH="master"
By doing this, you are specifying the location of the most up-to-date
- version of ``dialogflow-python-client-v2``. The the suggested remote name ``upstream``
+ version of ``python-dialogflow``. The the suggested remote name ``upstream``
should point to the official ``googleapis`` checkout and the
the branch should be the main branch on that remote (``master``).
+- This repository contains configuration for the
+ `pre-commit `__ tool, which automates checking
+ our linters during a commit. If you have it installed on your ``$PATH``,
+ you can enable enforcing those checks via:
+
+.. code-block:: bash
+
+ $ pre-commit install
+ pre-commit installed at .git/hooks/pre-commit
+
Exceptions to PEP8:
- Many unit tests use a helper method, ``_call_fut`` ("FUT" is short for
@@ -180,10 +190,10 @@ The `description on PyPI`_ for the project comes directly from the
``README``. Due to the reStructuredText (``rst``) parser used by
PyPI, relative links which will work on GitHub (e.g. ``CONTRIBUTING.rst``
instead of
-``https://github.com/googleapis/dialogflow-python-client-v2/blob/master/CONTRIBUTING.rst``)
+``https://github.com/googleapis/python-dialogflow/blob/master/CONTRIBUTING.rst``)
may cause problems creating links or rendering the description.
-.. _description on PyPI: https://pypi.org/project/dialogflow
+.. _description on PyPI: https://pypi.org/project/google-cloud-dialogflow
*************************
@@ -205,7 +215,7 @@ We support:
Supported versions can be found in our ``noxfile.py`` `config`_.
-.. _config: https://github.com/googleapis/dialogflow-python-client-v2/blob/master/noxfile.py
+.. _config: https://github.com/googleapis/python-dialogflow/blob/master/noxfile.py
Python 2.7 support is deprecated. All code changes should maintain Python 2.7 compatibility until January 1, 2020.
diff --git a/README.rst b/README.rst
index a6de1f722..3f197fae8 100644
--- a/README.rst
+++ b/README.rst
@@ -1,23 +1,28 @@
Dialogflow: Python Client
=========================
-|release level|
+|ga| |pypi| |versions|
- Python idiomatic client for `Dialogflow`_
+ Python idiomatic client for `Dialogflow ES`_
-`Dialogflow`_ is an enterprise-grade NLU platform that makes it easy for
+`Dialogflow ES`_ is an enterprise-grade NLU platform that makes it easy for
developers to design and integrate conversational user interfaces into
mobile apps, web applications, devices, and bots.
-* `Dialogflow Python Client API Reference `_
-* `Dialogflow Standard Edition Documentation `_
-* `Dialogflow Enterprise Edition Documentation `_
+* `Dialogflow ES Python Client API Reference `_
+* `Dialogflow ES Documentation `_
Read more about the client libraries for Cloud APIs, including the older
Google APIs Client Libraries, in
`Client Libraries Explained `_.
-.. _Dialogflow: https://dialogflow.com/
+.. |ga| image:: https://img.shields.io/badge/support-ga-gold.svg
+ :target: https://github.com/googleapis/google-cloud-python/blob/master/README.rst#ga-support
+.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-dialogflow.svg
+ :target: https://pypi.org/project/google-cloud-dialogflow/
+.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-dialogflow.svg
+ :target: https://pypi.org/project/google-cloud-dialogflow/
+.. _Dialogflow ES: https://cloud.google.com/dialogflow/docs/
Before you begin
@@ -40,7 +45,7 @@ Installation
.. code-block:: shell
- pip install dialogflow
+ pip install google-cloud-dialogflow
.. note::
@@ -50,11 +55,11 @@ Installation
Supported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^
-Python >= 3.5
+Python >= 3.6
-Deprecated Python Versions
-^^^^^^^^^^^^^^^^^^^^^^^^^^
-Python == 2.7. Python 2.7 support will be removed on January 1, 2020.
+Unsupported Python Versions
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+The last version of this library compatible with Python 2.7 is dialogflow==1.1.0.
Usage
@@ -84,8 +89,4 @@ License
Apache Version 2.0
-See `the LICENSE file `_ for more information.
-
-
-.. |release level| image:: https://img.shields.io/badge/support-GA-gold.svg
- :target: https://github.com/googleapis/google-cloud-python/blob/master/README.rst#general-availability
\ No newline at end of file
+See `the LICENSE file `_ for more information.
\ No newline at end of file
diff --git a/UPGRADING.md b/UPGRADING.md
new file mode 100644
index 000000000..7fe4a8b31
--- /dev/null
+++ b/UPGRADING.md
@@ -0,0 +1,251 @@
+# 2.0.0 Migration Guide
+
+The 2.0 release of the `google-cloud-dialogflow` client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-python), and includes substantial interface changes. Existing code written for earlier versions of this library will likely require updates to use this version. This document describes the changes that have been made, and what you need to do to update your usage.
+
+If you experience issues or have questions, please file an [issue](https://github.com/googleapis/python-dialogflow/issues).
+
+
+## Package import and naming
+> **WARNING**: Breaking change
+
+The 2.0.0 release changes the name and import path of the library to fall under the google-cloud namespace.
+
+No further updates will be made to the package [dialogflow](https://pypi.org/project/dialogflow/) on PyPI.
+
+**Before:**
+
+```sh
+python3 -m pip install dialogflow
+```
+
+```py
+import dialogflow
+```
+
+**After:**
+
+```sh
+python3 -m pip install google-cloud-dialogflow
+```
+
+```py
+from google.cloud import dialogflow
+```
+
+
+## Supported Python Versions
+> **WARNING**: Breaking change
+
+The 2.0.0 release requires Python 3.6+.
+
+## Method Calls
+> **WARNING**: Breaking change
+
+Methods expect request objects. We provide a script that will convert most common use cases.
+
+* Install the library
+```sh
+$ python3 -m pip install google-cloud-dialogflow
+```
+* The scripts `fixup_dialogflow_v2_keywords.py` and `fixup_dialogflow_v2beta1_keywords.py` are shipped with the library. It expects an input directory (with the code to convert) and an empty destination directory.
+
+```sh
+$ fixup_dialogflow_v2_keywords.py --input-directory .samples/ --output-directory samples/
+```
+**Before:**
+
+```py
+import dialogflow
+client = dialogflow.ContextsClient()
+
+response = client.list_contexts(parent="projects/1337/agent/sessions/1024")
+```
+
+**After:**
+```py
+from google.cloud import dialogflow
+
+client = dialogflow.ContextsClient()
+
+response = client.list_contexts(request={"parent": "projects/1337/agent/sessions/1024", page_size=10})
+```
+
+### More Details
+In google-cloud-dialogflow<2.0.0, parameters required by the API were positional parameters and optional parameters were keyword parameters.
+
+**Before:**
+```py
+ def detect_intent(
+ self,
+ session,
+ query_input,
+ query_params=None,
+ output_audio_config=None,
+ output_audio_config_mask=None,
+ input_audio=None,
+ retry=google.api_core.gapic_v1.method.DEFAULT,
+ timeout=google.api_core.gapic_v1.method.DEFAULT,
+ metadata=None,
+ ):
+```
+
+In the 2.0.0 release, all methods have a single positional parameter request. Method docstrings indicate whether a parameter is required or optional.
+
+Some methods have additional keyword only parameters. The available parameters depend on the [`google.api.method_signature` annotation](https://github.com/googleapis/googleapis/blob/master/google/cloud/translate/v3/translation_service.proto#L55) specified by the API producer.
+
+**After:**:
+```py
+ def detect_intent(self,
+ request=None,
+ *,
+ session: str=None,
+ query_input=None,
+ retry=gapic_v1.method.DEFAULT,
+ timeout=None,
+ metadata=(),
+ ):
+```
+
+> **NOTE:** The `request` parameter and flattened keyword parameters for the API are mutually exclusive. Passing both will result in an error.
+
+Both of these calls are valid:
+```py
+response = client.create_context(
+ request={
+ "parent": "parent_value",
+ "context": dialogflow.Context(name="name_value"),
+ }
+)
+response = client.create_context(
+ parent="parent_value",
+ context=dialogflow.Context(name="name_value"),
+)
+```
+
+This call is invalid because it mixes `request` with a keyword argument `audio_config`. Executing this code will result in an error.
+
+```py
+response = client.create_context(
+ request={
+ "parent": "parent_value",
+ },
+ context=dialogflow.Context(name="name_value"),
+)
+```
+
+## Enums and Types
+
+> **WARNING:** Breaking change
+
+The submodules `enums` and `types` have been removed in the versionless module.
+
+**Before:**
+
+```py
+import dialogflow
+
+encoding = dialogflow.enums.AudioEncoding.AUDIO_ENCODING_FLAC
+query_params = dialogflow.types.QueryParameters(time_zone="Europe/Paris")
+```
+
+**After:**
+
+```py
+from google.cloud import dialogflow
+
+encoding = dialogflow.AudioEncoding.AUDIO_ENCODING_FLAC
+query_params = dialogflow.QueryParameters(time_zone="Europe/Paris")
+```
+
+The `types` submodule is still present in the versioned module.
+
+E.g.
+
+```py
+from google.cloud import dialogvlow_v2
+
+query_params = dialogvlow_v2.types.QueryParameters(time_zone="Europe/Paris")
+```
+
+
+## Resource path helpers
+
+> **WARNING**: Breaking change
+
+Some resource path helpers have been renamed, and others have been removed.
+See below for an alternative method or a string.
+
+
+**v2**
+```py
+from google.cloud import dialogflow_v2
+
+# AgentsClient
+project_path = dialogflow_v2.AgentsClient.common_project_path("PROJECT")
+
+# ContextsClient
+session_path = dialogflow_v2.SessionsClient.session_path("PROJECT", "SESSION")
+
+# EntityTypesClient
+agent_path = dialogflow_v2.AgentsClient.agent_path("PROJECT")
+project_agent_path = dialogflow_v2.AgentsClient.agent_path("PROJECT")
+
+# EnvironmentsClient
+agent_path = dialogflow_v2.AgentsClient.agent_path("PROJECT")
+
+# IntentsClient
+agent_path = dialogflow_v2.AgentsClient.agent_path("PROJECT")
+project_agent_path = dialogflow_v2.AgentsClient.agent_path("PROJECT")
+
+# SessionEntityTypesClient
+session_path = dialogflow_v2.SessionsClient.session_path("PROJECT", "SESSION")
+
+```
+
+**v2beta1**
+
+```py
+from google.cloud import dialogflow_v2beta1
+
+context = "CONTEXT"
+entity_type = "ENTITY_TYPE"
+environmnent = "ENVIRONMENT"
+project = "PROJECT"
+session = "SESSION"
+user = "USER"
+
+# AgentsClient
+location_path = dialogflow_v2beta1.AgentsClient.common_location_path(
+ "PROJECT", "LOCATION"
+)
+project_path = dialogflow_v2beta1.AgentsClient.common_project_path("PROJECT")
+
+# ContextsClient
+environment_context_path = f"projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}"
+environment_session_path = f"projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}"
+session_path = dialogflow_v2beta1.SessionsClient.session_path("PROJECT", "SESSION")
+
+# DocumentsClient
+knowledge_base_path = dialogflow_v2beta1.KnowledgeBasesClient.knowledge_base_path(
+ "PROJECT", "KNOWLEDGE_BASE"
+)
+
+# EnvironmentsClient
+agent_path = dialogflow_v2beta1.AgentsClient.agent_path("PROJECT")
+
+# IntentsClient
+agent_path = dialogflow_v2beta1.AgentsClient.agent_path("PROJECT")
+project_path = dialogflow_v2beta1.AgentsClient.common_project_path("PROJECT")
+
+# KnowledgeBasesClient
+project_path = dialogflow_v2beta1.KnowledgeBasesClient.common_project_path("PROJECT")
+
+# SessionEntityTypesClient
+environment_session_path = f"projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}"
+environment_sessions_entity_path = f"projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}"
+session_path = f"projects/{project}/agent/sessions/{session}"
+
+
+# SessionsClient
+environment_session_path = f"projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}"
+```
\ No newline at end of file
diff --git a/dialogflow_v2/__init__.py b/dialogflow_v2/__init__.py
deleted file mode 100644
index 2181eae23..000000000
--- a/dialogflow_v2/__init__.py
+++ /dev/null
@@ -1,87 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright 2020 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-from __future__ import absolute_import
-import sys
-import warnings
-
-from dialogflow_v2 import types
-from dialogflow_v2.gapic import agents_client
-from dialogflow_v2.gapic import contexts_client
-from dialogflow_v2.gapic import entity_types_client
-from dialogflow_v2.gapic import enums
-from dialogflow_v2.gapic import environments_client
-from dialogflow_v2.gapic import intents_client
-from dialogflow_v2.gapic import session_entity_types_client
-from dialogflow_v2.gapic import sessions_client
-
-
-if sys.version_info[:2] == (2, 7):
- message = (
- "A future version of this library will drop support for Python 2.7. "
- "More details about Python 2 support for Google Cloud Client Libraries "
- "can be found at https://cloud.google.com/python/docs/python2-sunset/"
- )
- warnings.warn(message, DeprecationWarning)
-
-
-class AgentsClient(agents_client.AgentsClient):
- __doc__ = agents_client.AgentsClient.__doc__
- enums = enums
-
-
-class ContextsClient(contexts_client.ContextsClient):
- __doc__ = contexts_client.ContextsClient.__doc__
- enums = enums
-
-
-class EntityTypesClient(entity_types_client.EntityTypesClient):
- __doc__ = entity_types_client.EntityTypesClient.__doc__
- enums = enums
-
-
-class EnvironmentsClient(environments_client.EnvironmentsClient):
- __doc__ = environments_client.EnvironmentsClient.__doc__
- enums = enums
-
-
-class IntentsClient(intents_client.IntentsClient):
- __doc__ = intents_client.IntentsClient.__doc__
- enums = enums
-
-
-class SessionEntityTypesClient(session_entity_types_client.SessionEntityTypesClient):
- __doc__ = session_entity_types_client.SessionEntityTypesClient.__doc__
- enums = enums
-
-
-class SessionsClient(sessions_client.SessionsClient):
- __doc__ = sessions_client.SessionsClient.__doc__
- enums = enums
-
-
-__all__ = (
- "enums",
- "types",
- "AgentsClient",
- "ContextsClient",
- "EntityTypesClient",
- "EnvironmentsClient",
- "IntentsClient",
- "SessionEntityTypesClient",
- "SessionsClient",
-)
diff --git a/dialogflow_v2/gapic/__init__.py b/dialogflow_v2/gapic/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/dialogflow_v2/gapic/agents_client.py b/dialogflow_v2/gapic/agents_client.py
deleted file mode 100644
index b71ee653b..000000000
--- a/dialogflow_v2/gapic/agents_client.py
+++ /dev/null
@@ -1,1004 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright 2020 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Accesses the google.cloud.dialogflow.v2 Agents API."""
-
-import functools
-import pkg_resources
-import warnings
-
-from google.oauth2 import service_account
-import google.api_core.client_options
-import google.api_core.gapic_v1.client_info
-import google.api_core.gapic_v1.config
-import google.api_core.gapic_v1.method
-import google.api_core.gapic_v1.routing_header
-import google.api_core.grpc_helpers
-import google.api_core.operation
-import google.api_core.operations_v1
-import google.api_core.page_iterator
-import google.api_core.path_template
-import google.api_core.protobuf_helpers
-import grpc
-
-from dialogflow_v2.gapic import agents_client_config
-from dialogflow_v2.gapic import enums
-from dialogflow_v2.gapic.transports import agents_grpc_transport
-from dialogflow_v2.proto import agent_pb2
-from dialogflow_v2.proto import agent_pb2_grpc
-from dialogflow_v2.proto import validation_result_pb2
-from google.longrunning import operations_pb2
-from google.protobuf import empty_pb2
-from google.protobuf import field_mask_pb2
-from google.protobuf import struct_pb2
-
-
-_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("dialogflow").version
-
-
-class AgentsClient(object):
- """Service for managing ``Agents``."""
-
- SERVICE_ADDRESS = "dialogflow.googleapis.com:443"
- """The default address of the service."""
-
- # The name of the interface for this client. This is the key used to
- # find the method configuration in the client_config dictionary.
- _INTERFACE_NAME = "google.cloud.dialogflow.v2.Agents"
-
- @classmethod
- def from_service_account_file(cls, filename, *args, **kwargs):
- """Creates an instance of this client using the provided credentials
- file.
-
- Args:
- filename (str): The path to the service account private key json
- file.
- args: Additional arguments to pass to the constructor.
- kwargs: Additional arguments to pass to the constructor.
-
- Returns:
- dialogflow_v2.AgentsClient: The constructed client.
- """
- credentials = service_account.Credentials.from_service_account_file(filename)
- kwargs["credentials"] = credentials
- return cls(*args, **kwargs)
-
- from_service_account_json = from_service_account_file
-
- @classmethod
- def project_path(cls, project):
- """Return a fully-qualified project string."""
- return google.api_core.path_template.expand(
- "projects/{project}", project=project
- )
-
- def __init__(
- self,
- transport=None,
- channel=None,
- credentials=None,
- client_config=None,
- client_info=None,
- client_options=None,
- ):
- """Constructor.
-
- Args:
- transport (Union[~.AgentsGrpcTransport,
- Callable[[~.Credentials, type], ~.AgentsGrpcTransport]): A transport
- instance, responsible for actually making the API calls.
- The default transport uses the gRPC protocol.
- This argument may also be a callable which returns a
- transport instance. Callables will be sent the credentials
- as the first argument and the default transport class as
- the second argument.
- channel (grpc.Channel): DEPRECATED. A ``Channel`` instance
- through which to make calls. This argument is mutually exclusive
- with ``credentials``; providing both will raise an exception.
- credentials (google.auth.credentials.Credentials): The
- authorization credentials to attach to requests. These
- credentials identify this application to the service. If none
- are specified, the client will attempt to ascertain the
- credentials from the environment.
- This argument is mutually exclusive with providing a
- transport instance to ``transport``; doing so will raise
- an exception.
- client_config (dict): DEPRECATED. A dictionary of call options for
- each method. If not specified, the default configuration is used.
- client_info (google.api_core.gapic_v1.client_info.ClientInfo):
- The client info used to send a user-agent string along with
- API requests. If ``None``, then default info will be used.
- Generally, you only need to set this if you're developing
- your own client library.
- client_options (Union[dict, google.api_core.client_options.ClientOptions]):
- Client options used to set user options on the client. API Endpoint
- should be set through client_options.
- """
- # Raise deprecation warnings for things we want to go away.
- if client_config is not None:
- warnings.warn(
- "The `client_config` argument is deprecated.",
- PendingDeprecationWarning,
- stacklevel=2,
- )
- else:
- client_config = agents_client_config.config
-
- if channel:
- warnings.warn(
- "The `channel` argument is deprecated; use " "`transport` instead.",
- PendingDeprecationWarning,
- stacklevel=2,
- )
-
- api_endpoint = self.SERVICE_ADDRESS
- if client_options:
- if type(client_options) == dict:
- client_options = google.api_core.client_options.from_dict(
- client_options
- )
- if client_options.api_endpoint:
- api_endpoint = client_options.api_endpoint
-
- # Instantiate the transport.
- # The transport is responsible for handling serialization and
- # deserialization and actually sending data to the service.
- if transport:
- if callable(transport):
- self.transport = transport(
- credentials=credentials,
- default_class=agents_grpc_transport.AgentsGrpcTransport,
- address=api_endpoint,
- )
- else:
- if credentials:
- raise ValueError(
- "Received both a transport instance and "
- "credentials; these are mutually exclusive."
- )
- self.transport = transport
- else:
- self.transport = agents_grpc_transport.AgentsGrpcTransport(
- address=api_endpoint, channel=channel, credentials=credentials
- )
-
- if client_info is None:
- client_info = google.api_core.gapic_v1.client_info.ClientInfo(
- gapic_version=_GAPIC_LIBRARY_VERSION
- )
- else:
- client_info.gapic_version = _GAPIC_LIBRARY_VERSION
- self._client_info = client_info
-
- # Parse out the default settings for retry and timeout for each RPC
- # from the client configuration.
- # (Ordinarily, these are the defaults specified in the `*_config.py`
- # file next to this one.)
- self._method_configs = google.api_core.gapic_v1.config.parse_method_configs(
- client_config["interfaces"][self._INTERFACE_NAME]
- )
-
- # Save a dictionary of cached API call functions.
- # These are the actual callables which invoke the proper
- # transport methods, wrapped with `wrap_method` to add retry,
- # timeout, and the like.
- self._inner_api_calls = {}
-
- # Service calls
- def get_agent(
- self,
- parent,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Retrieves the specified agent.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.AgentsClient()
- >>>
- >>> parent = client.project_path('[PROJECT]')
- >>>
- >>> response = client.get_agent(parent)
-
- Args:
- parent (str): Required. The project that the agent to fetch is associated with.
- Format: ``projects/``.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types.Agent` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "get_agent" not in self._inner_api_calls:
- self._inner_api_calls[
- "get_agent"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.get_agent,
- default_retry=self._method_configs["GetAgent"].retry,
- default_timeout=self._method_configs["GetAgent"].timeout,
- client_info=self._client_info,
- )
-
- request = agent_pb2.GetAgentRequest(parent=parent)
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- return self._inner_api_calls["get_agent"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
-
- def set_agent(
- self,
- agent,
- update_mask=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Creates/updates the specified agent.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.AgentsClient()
- >>>
- >>> # TODO: Initialize `agent`:
- >>> agent = {}
- >>>
- >>> response = client.set_agent(agent)
-
- Args:
- agent (Union[dict, ~google.cloud.dialogflow_v2.types.Agent]): Required. The agent to update.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.Agent`
- update_mask (Union[dict, ~google.cloud.dialogflow_v2.types.FieldMask]): Optional. The mask to control which fields get updated.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.FieldMask`
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types.Agent` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "set_agent" not in self._inner_api_calls:
- self._inner_api_calls[
- "set_agent"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.set_agent,
- default_retry=self._method_configs["SetAgent"].retry,
- default_timeout=self._method_configs["SetAgent"].timeout,
- client_info=self._client_info,
- )
-
- request = agent_pb2.SetAgentRequest(agent=agent, update_mask=update_mask)
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("agent.parent", agent.parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- return self._inner_api_calls["set_agent"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
-
- def delete_agent(
- self,
- parent,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Deletes the specified agent.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.AgentsClient()
- >>>
- >>> parent = client.project_path('[PROJECT]')
- >>>
- >>> client.delete_agent(parent)
-
- Args:
- parent (str): Required. The project that the agent to delete is associated with.
- Format: ``projects/``.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "delete_agent" not in self._inner_api_calls:
- self._inner_api_calls[
- "delete_agent"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.delete_agent,
- default_retry=self._method_configs["DeleteAgent"].retry,
- default_timeout=self._method_configs["DeleteAgent"].timeout,
- client_info=self._client_info,
- )
-
- request = agent_pb2.DeleteAgentRequest(parent=parent)
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- self._inner_api_calls["delete_agent"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
-
- def search_agents(
- self,
- parent,
- page_size=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Returns the list of agents.
-
- Since there is at most one conversational agent per project, this method
- is useful primarily for listing all agents across projects the caller
- has access to. One can achieve that with a wildcard project collection
- id "-". Refer to `List
- Sub-Collections `__.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.AgentsClient()
- >>>
- >>> parent = client.project_path('[PROJECT]')
- >>>
- >>> # Iterate over all results
- >>> for element in client.search_agents(parent):
- ... # process element
- ... pass
- >>>
- >>>
- >>> # Alternatively:
- >>>
- >>> # Iterate over results one page at a time
- >>> for page in client.search_agents(parent).pages:
- ... for element in page:
- ... # process element
- ... pass
-
- Args:
- parent (str): Required. The project to list agents from. Format:
- ``projects/``.
- page_size (int): The maximum number of resources contained in the
- underlying API response. If page streaming is performed per-
- resource, this parameter does not affect the return value. If page
- streaming is performed per-page, this determines the maximum number
- of resources in a page.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.api_core.page_iterator.PageIterator` instance.
- An iterable of :class:`~google.cloud.dialogflow_v2.types.Agent` instances.
- You can also iterate over the pages of the response
- using its `pages` property.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "search_agents" not in self._inner_api_calls:
- self._inner_api_calls[
- "search_agents"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.search_agents,
- default_retry=self._method_configs["SearchAgents"].retry,
- default_timeout=self._method_configs["SearchAgents"].timeout,
- client_info=self._client_info,
- )
-
- request = agent_pb2.SearchAgentsRequest(parent=parent, page_size=page_size)
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- iterator = google.api_core.page_iterator.GRPCIterator(
- client=None,
- method=functools.partial(
- self._inner_api_calls["search_agents"],
- retry=retry,
- timeout=timeout,
- metadata=metadata,
- ),
- request=request,
- items_field="agents",
- request_token_field="page_token",
- response_token_field="next_page_token",
- )
- return iterator
-
- def train_agent(
- self,
- parent,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Trains the specified agent.
-
- Operation
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.AgentsClient()
- >>>
- >>> parent = client.project_path('[PROJECT]')
- >>>
- >>> response = client.train_agent(parent)
- >>>
- >>> def callback(operation_future):
- ... # Handle result.
- ... result = operation_future.result()
- >>>
- >>> response.add_done_callback(callback)
- >>>
- >>> # Handle metadata.
- >>> metadata = response.metadata()
-
- Args:
- parent (str): Required. The project that the agent to train is associated with.
- Format: ``projects/``.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types._OperationFuture` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "train_agent" not in self._inner_api_calls:
- self._inner_api_calls[
- "train_agent"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.train_agent,
- default_retry=self._method_configs["TrainAgent"].retry,
- default_timeout=self._method_configs["TrainAgent"].timeout,
- client_info=self._client_info,
- )
-
- request = agent_pb2.TrainAgentRequest(parent=parent)
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- operation = self._inner_api_calls["train_agent"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
- return google.api_core.operation.from_gapic(
- operation,
- self.transport._operations_client,
- empty_pb2.Empty,
- metadata_type=struct_pb2.Struct,
- )
-
- def export_agent(
- self,
- parent,
- agent_uri=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Exports the specified agent to a ZIP file.
-
- Operation
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.AgentsClient()
- >>>
- >>> parent = client.project_path('[PROJECT]')
- >>>
- >>> # TODO: Initialize `agent_uri`:
- >>> agent_uri = ''
- >>>
- >>> response = client.export_agent(parent, agent_uri)
- >>>
- >>> def callback(operation_future):
- ... # Handle result.
- ... result = operation_future.result()
- >>>
- >>> response.add_done_callback(callback)
- >>>
- >>> # Handle metadata.
- >>> metadata = response.metadata()
-
- Args:
- parent (str): Required. The project that the agent to export is associated with.
- Format: ``projects/``.
- agent_uri (str): Required. The `Google Cloud
- Storage `__ URI to export the
- agent to. The format of this URI must be
- ``gs:///``. If left unspecified, the
- serialized agent is returned inline.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types._OperationFuture` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "export_agent" not in self._inner_api_calls:
- self._inner_api_calls[
- "export_agent"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.export_agent,
- default_retry=self._method_configs["ExportAgent"].retry,
- default_timeout=self._method_configs["ExportAgent"].timeout,
- client_info=self._client_info,
- )
-
- request = agent_pb2.ExportAgentRequest(parent=parent, agent_uri=agent_uri)
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- operation = self._inner_api_calls["export_agent"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
- return google.api_core.operation.from_gapic(
- operation,
- self.transport._operations_client,
- agent_pb2.ExportAgentResponse,
- metadata_type=struct_pb2.Struct,
- )
-
- def import_agent(
- self,
- parent,
- agent_uri=None,
- agent_content=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Imports the specified agent from a ZIP file.
-
- Uploads new intents and entity types without deleting the existing ones.
- Intents and entity types with the same name are replaced with the new
- versions from ``ImportAgentRequest``. After the import, the imported
- draft agent will be trained automatically (unless disabled in agent
- settings). However, once the import is done, training may not be
- completed yet. Please call ``TrainAgent`` and wait for the operation it
- returns in order to train explicitly.
-
- Operation An operation which
- tracks when importing is complete. It only tracks when the draft agent
- is updated not when it is done training.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.AgentsClient()
- >>>
- >>> parent = client.project_path('[PROJECT]')
- >>>
- >>> response = client.import_agent(parent)
- >>>
- >>> def callback(operation_future):
- ... # Handle result.
- ... result = operation_future.result()
- >>>
- >>> response.add_done_callback(callback)
- >>>
- >>> # Handle metadata.
- >>> metadata = response.metadata()
-
- Args:
- parent (str): Required. The project that the agent to import is associated with.
- Format: ``projects/``.
- agent_uri (str): The URI to a Google Cloud Storage file containing the agent to import.
- Note: The URI must start with "gs://".
- agent_content (bytes): Zip compressed raw byte content for agent.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types._OperationFuture` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "import_agent" not in self._inner_api_calls:
- self._inner_api_calls[
- "import_agent"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.import_agent,
- default_retry=self._method_configs["ImportAgent"].retry,
- default_timeout=self._method_configs["ImportAgent"].timeout,
- client_info=self._client_info,
- )
-
- # Sanity check: We have some fields which are mutually exclusive;
- # raise ValueError if more than one is sent.
- google.api_core.protobuf_helpers.check_oneof(
- agent_uri=agent_uri, agent_content=agent_content
- )
-
- request = agent_pb2.ImportAgentRequest(
- parent=parent, agent_uri=agent_uri, agent_content=agent_content
- )
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- operation = self._inner_api_calls["import_agent"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
- return google.api_core.operation.from_gapic(
- operation,
- self.transport._operations_client,
- empty_pb2.Empty,
- metadata_type=struct_pb2.Struct,
- )
-
- def restore_agent(
- self,
- parent,
- agent_uri=None,
- agent_content=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Restores the specified agent from a ZIP file.
-
- Replaces the current agent version with a new one. All the intents and
- entity types in the older version are deleted. After the restore, the
- restored draft agent will be trained automatically (unless disabled in
- agent settings). However, once the restore is done, training may not be
- completed yet. Please call ``TrainAgent`` and wait for the operation it
- returns in order to train explicitly.
-
- Operation An operation which
- tracks when restoring is complete. It only tracks when the draft agent
- is updated not when it is done training.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.AgentsClient()
- >>>
- >>> parent = client.project_path('[PROJECT]')
- >>>
- >>> response = client.restore_agent(parent)
- >>>
- >>> def callback(operation_future):
- ... # Handle result.
- ... result = operation_future.result()
- >>>
- >>> response.add_done_callback(callback)
- >>>
- >>> # Handle metadata.
- >>> metadata = response.metadata()
-
- Args:
- parent (str): Required. The project that the agent to restore is associated with.
- Format: ``projects/``.
- agent_uri (str): The URI to a Google Cloud Storage file containing the agent to restore.
- Note: The URI must start with "gs://".
- agent_content (bytes): Zip compressed raw byte content for agent.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types._OperationFuture` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "restore_agent" not in self._inner_api_calls:
- self._inner_api_calls[
- "restore_agent"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.restore_agent,
- default_retry=self._method_configs["RestoreAgent"].retry,
- default_timeout=self._method_configs["RestoreAgent"].timeout,
- client_info=self._client_info,
- )
-
- # Sanity check: We have some fields which are mutually exclusive;
- # raise ValueError if more than one is sent.
- google.api_core.protobuf_helpers.check_oneof(
- agent_uri=agent_uri, agent_content=agent_content
- )
-
- request = agent_pb2.RestoreAgentRequest(
- parent=parent, agent_uri=agent_uri, agent_content=agent_content
- )
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- operation = self._inner_api_calls["restore_agent"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
- return google.api_core.operation.from_gapic(
- operation,
- self.transport._operations_client,
- empty_pb2.Empty,
- metadata_type=struct_pb2.Struct,
- )
-
- def get_validation_result(
- self,
- parent=None,
- language_code=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Gets agent validation result. Agent validation is performed during
- training time and is updated automatically when training is completed.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.AgentsClient()
- >>>
- >>> parent = client.project_path('[PROJECT]')
- >>>
- >>> response = client.get_validation_result(parent)
-
- Args:
- parent (str): Required. The project that the agent is associated with. Format:
- ``projects/``.
- language_code (str): Optional. The language for which you want a validation result. If
- not specified, the agent's default language is used. `Many
- languages `__
- are supported. Note: languages must be enabled in the agent before they
- can be used.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types.ValidationResult` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "get_validation_result" not in self._inner_api_calls:
- self._inner_api_calls[
- "get_validation_result"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.get_validation_result,
- default_retry=self._method_configs["GetValidationResult"].retry,
- default_timeout=self._method_configs["GetValidationResult"].timeout,
- client_info=self._client_info,
- )
-
- request = agent_pb2.GetValidationResultRequest(
- parent=parent, language_code=language_code
- )
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- return self._inner_api_calls["get_validation_result"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
diff --git a/dialogflow_v2/gapic/agents_client_config.py b/dialogflow_v2/gapic/agents_client_config.py
deleted file mode 100644
index 69aa6b3e0..000000000
--- a/dialogflow_v2/gapic/agents_client_config.py
+++ /dev/null
@@ -1,97 +0,0 @@
-config = {
- "interfaces": {
- "google.cloud.dialogflow.v2.Agents": {
- "retry_codes": {
- "retry_policy_1_codes": ["UNAVAILABLE"],
- "no_retry_codes": [],
- "retry_policy_2_codes": ["UNAVAILABLE"],
- "no_retry_1_codes": [],
- },
- "retry_params": {
- "retry_policy_1_params": {
- "initial_retry_delay_millis": 100,
- "retry_delay_multiplier": 1.3,
- "max_retry_delay_millis": 60000,
- "initial_rpc_timeout_millis": 60000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 60000,
- "total_timeout_millis": 60000,
- },
- "retry_policy_2_params": {
- "initial_retry_delay_millis": 100,
- "retry_delay_multiplier": 1.3,
- "max_retry_delay_millis": 60000,
- "initial_rpc_timeout_millis": 220000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 220000,
- "total_timeout_millis": 220000,
- },
- "no_retry_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 0,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 0,
- "total_timeout_millis": 0,
- },
- "no_retry_1_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 220000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 220000,
- "total_timeout_millis": 220000,
- },
- },
- "methods": {
- "GetAgent": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "SetAgent": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "DeleteAgent": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "SearchAgents": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "TrainAgent": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "ExportAgent": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "ImportAgent": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "RestoreAgent": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "GetValidationResult": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- },
- }
- }
-}
diff --git a/dialogflow_v2/gapic/contexts_client.py b/dialogflow_v2/gapic/contexts_client.py
deleted file mode 100644
index c0592c94a..000000000
--- a/dialogflow_v2/gapic/contexts_client.py
+++ /dev/null
@@ -1,704 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright 2020 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Accesses the google.cloud.dialogflow.v2 Contexts API."""
-
-import functools
-import pkg_resources
-import warnings
-
-from google.oauth2 import service_account
-import google.api_core.client_options
-import google.api_core.gapic_v1.client_info
-import google.api_core.gapic_v1.config
-import google.api_core.gapic_v1.method
-import google.api_core.gapic_v1.routing_header
-import google.api_core.grpc_helpers
-import google.api_core.page_iterator
-import google.api_core.path_template
-import grpc
-
-from dialogflow_v2.gapic import contexts_client_config
-from dialogflow_v2.gapic import enums
-from dialogflow_v2.gapic.transports import contexts_grpc_transport
-from dialogflow_v2.proto import agent_pb2
-from dialogflow_v2.proto import agent_pb2_grpc
-from dialogflow_v2.proto import context_pb2
-from dialogflow_v2.proto import context_pb2_grpc
-from dialogflow_v2.proto import validation_result_pb2
-from google.longrunning import operations_pb2
-from google.protobuf import empty_pb2
-from google.protobuf import field_mask_pb2
-from google.protobuf import struct_pb2
-
-
-_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("dialogflow").version
-
-
-class ContextsClient(object):
- """Service for managing ``Contexts``."""
-
- SERVICE_ADDRESS = "dialogflow.googleapis.com:443"
- """The default address of the service."""
-
- # The name of the interface for this client. This is the key used to
- # find the method configuration in the client_config dictionary.
- _INTERFACE_NAME = "google.cloud.dialogflow.v2.Contexts"
-
- @classmethod
- def from_service_account_file(cls, filename, *args, **kwargs):
- """Creates an instance of this client using the provided credentials
- file.
-
- Args:
- filename (str): The path to the service account private key json
- file.
- args: Additional arguments to pass to the constructor.
- kwargs: Additional arguments to pass to the constructor.
-
- Returns:
- dialogflow_v2.ContextsClient: The constructed client.
- """
- credentials = service_account.Credentials.from_service_account_file(filename)
- kwargs["credentials"] = credentials
- return cls(*args, **kwargs)
-
- from_service_account_json = from_service_account_file
-
- @classmethod
- def context_path(cls, project, session, context):
- """Return a fully-qualified context string."""
- return google.api_core.path_template.expand(
- "projects/{project}/agent/sessions/{session}/contexts/{context}",
- project=project,
- session=session,
- context=context,
- )
-
- @classmethod
- def session_path(cls, project, session):
- """Return a fully-qualified session string."""
- return google.api_core.path_template.expand(
- "projects/{project}/agent/sessions/{session}",
- project=project,
- session=session,
- )
-
- def __init__(
- self,
- transport=None,
- channel=None,
- credentials=None,
- client_config=None,
- client_info=None,
- client_options=None,
- ):
- """Constructor.
-
- Args:
- transport (Union[~.ContextsGrpcTransport,
- Callable[[~.Credentials, type], ~.ContextsGrpcTransport]): A transport
- instance, responsible for actually making the API calls.
- The default transport uses the gRPC protocol.
- This argument may also be a callable which returns a
- transport instance. Callables will be sent the credentials
- as the first argument and the default transport class as
- the second argument.
- channel (grpc.Channel): DEPRECATED. A ``Channel`` instance
- through which to make calls. This argument is mutually exclusive
- with ``credentials``; providing both will raise an exception.
- credentials (google.auth.credentials.Credentials): The
- authorization credentials to attach to requests. These
- credentials identify this application to the service. If none
- are specified, the client will attempt to ascertain the
- credentials from the environment.
- This argument is mutually exclusive with providing a
- transport instance to ``transport``; doing so will raise
- an exception.
- client_config (dict): DEPRECATED. A dictionary of call options for
- each method. If not specified, the default configuration is used.
- client_info (google.api_core.gapic_v1.client_info.ClientInfo):
- The client info used to send a user-agent string along with
- API requests. If ``None``, then default info will be used.
- Generally, you only need to set this if you're developing
- your own client library.
- client_options (Union[dict, google.api_core.client_options.ClientOptions]):
- Client options used to set user options on the client. API Endpoint
- should be set through client_options.
- """
- # Raise deprecation warnings for things we want to go away.
- if client_config is not None:
- warnings.warn(
- "The `client_config` argument is deprecated.",
- PendingDeprecationWarning,
- stacklevel=2,
- )
- else:
- client_config = contexts_client_config.config
-
- if channel:
- warnings.warn(
- "The `channel` argument is deprecated; use " "`transport` instead.",
- PendingDeprecationWarning,
- stacklevel=2,
- )
-
- api_endpoint = self.SERVICE_ADDRESS
- if client_options:
- if type(client_options) == dict:
- client_options = google.api_core.client_options.from_dict(
- client_options
- )
- if client_options.api_endpoint:
- api_endpoint = client_options.api_endpoint
-
- # Instantiate the transport.
- # The transport is responsible for handling serialization and
- # deserialization and actually sending data to the service.
- if transport:
- if callable(transport):
- self.transport = transport(
- credentials=credentials,
- default_class=contexts_grpc_transport.ContextsGrpcTransport,
- address=api_endpoint,
- )
- else:
- if credentials:
- raise ValueError(
- "Received both a transport instance and "
- "credentials; these are mutually exclusive."
- )
- self.transport = transport
- else:
- self.transport = contexts_grpc_transport.ContextsGrpcTransport(
- address=api_endpoint, channel=channel, credentials=credentials
- )
-
- if client_info is None:
- client_info = google.api_core.gapic_v1.client_info.ClientInfo(
- gapic_version=_GAPIC_LIBRARY_VERSION
- )
- else:
- client_info.gapic_version = _GAPIC_LIBRARY_VERSION
- self._client_info = client_info
-
- # Parse out the default settings for retry and timeout for each RPC
- # from the client configuration.
- # (Ordinarily, these are the defaults specified in the `*_config.py`
- # file next to this one.)
- self._method_configs = google.api_core.gapic_v1.config.parse_method_configs(
- client_config["interfaces"][self._INTERFACE_NAME]
- )
-
- # Save a dictionary of cached API call functions.
- # These are the actual callables which invoke the proper
- # transport methods, wrapped with `wrap_method` to add retry,
- # timeout, and the like.
- self._inner_api_calls = {}
-
- # Service calls
- def list_contexts(
- self,
- parent,
- page_size=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Returns the list of all contexts in the specified session.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.ContextsClient()
- >>>
- >>> # TODO: Initialize `parent`:
- >>> parent = ''
- >>>
- >>> # Iterate over all results
- >>> for element in client.list_contexts(parent):
- ... # process element
- ... pass
- >>>
- >>>
- >>> # Alternatively:
- >>>
- >>> # Iterate over results one page at a time
- >>> for page in client.list_contexts(parent).pages:
- ... for element in page:
- ... # process element
- ... pass
-
- Args:
- parent (str): Required. The session to list all contexts from. Format:
- ``projects//agent/sessions/`` or
- ``projects//agent/environments//users//sessions/``.
- If ``Environment ID`` is not specified, we assume default 'draft'
- environment. If ``User ID`` is not specified, we assume default '-'
- user.
- page_size (int): The maximum number of resources contained in the
- underlying API response. If page streaming is performed per-
- resource, this parameter does not affect the return value. If page
- streaming is performed per-page, this determines the maximum number
- of resources in a page.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.api_core.page_iterator.PageIterator` instance.
- An iterable of :class:`~google.cloud.dialogflow_v2.types.Context` instances.
- You can also iterate over the pages of the response
- using its `pages` property.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "list_contexts" not in self._inner_api_calls:
- self._inner_api_calls[
- "list_contexts"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.list_contexts,
- default_retry=self._method_configs["ListContexts"].retry,
- default_timeout=self._method_configs["ListContexts"].timeout,
- client_info=self._client_info,
- )
-
- request = context_pb2.ListContextsRequest(parent=parent, page_size=page_size)
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- iterator = google.api_core.page_iterator.GRPCIterator(
- client=None,
- method=functools.partial(
- self._inner_api_calls["list_contexts"],
- retry=retry,
- timeout=timeout,
- metadata=metadata,
- ),
- request=request,
- items_field="contexts",
- request_token_field="page_token",
- response_token_field="next_page_token",
- )
- return iterator
-
- def get_context(
- self,
- name,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Retrieves the specified context.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.ContextsClient()
- >>>
- >>> # TODO: Initialize `name`:
- >>> name = ''
- >>>
- >>> response = client.get_context(name)
-
- Args:
- name (str): Required. The name of the context. Format:
- ``projects//agent/sessions//contexts/``
- or
- ``projects//agent/environments//users//sessions//contexts/``.
- If ``Environment ID`` is not specified, we assume default 'draft'
- environment. If ``User ID`` is not specified, we assume default '-'
- user.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types.Context` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "get_context" not in self._inner_api_calls:
- self._inner_api_calls[
- "get_context"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.get_context,
- default_retry=self._method_configs["GetContext"].retry,
- default_timeout=self._method_configs["GetContext"].timeout,
- client_info=self._client_info,
- )
-
- request = context_pb2.GetContextRequest(name=name)
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("name", name)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- return self._inner_api_calls["get_context"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
-
- def create_context(
- self,
- parent,
- context,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Creates a context.
-
- If the specified context already exists, overrides the context.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.ContextsClient()
- >>>
- >>> # TODO: Initialize `parent`:
- >>> parent = ''
- >>>
- >>> # TODO: Initialize `context`:
- >>> context = {}
- >>>
- >>> response = client.create_context(parent, context)
-
- Args:
- parent (str): Required. The session to create a context for. Format:
- ``projects//agent/sessions/`` or
- ``projects//agent/environments//users//sessions/``.
- If ``Environment ID`` is not specified, we assume default 'draft'
- environment. If ``User ID`` is not specified, we assume default '-'
- user.
- context (Union[dict, ~google.cloud.dialogflow_v2.types.Context]): Required. The context to create.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.Context`
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types.Context` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "create_context" not in self._inner_api_calls:
- self._inner_api_calls[
- "create_context"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.create_context,
- default_retry=self._method_configs["CreateContext"].retry,
- default_timeout=self._method_configs["CreateContext"].timeout,
- client_info=self._client_info,
- )
-
- request = context_pb2.CreateContextRequest(parent=parent, context=context)
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- return self._inner_api_calls["create_context"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
-
- def update_context(
- self,
- context,
- update_mask=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Updates the specified context.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.ContextsClient()
- >>>
- >>> # TODO: Initialize `context`:
- >>> context = {}
- >>>
- >>> response = client.update_context(context)
-
- Args:
- context (Union[dict, ~google.cloud.dialogflow_v2.types.Context]): Required. The context to update.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.Context`
- update_mask (Union[dict, ~google.cloud.dialogflow_v2.types.FieldMask]): Optional. The mask to control which fields get updated.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.FieldMask`
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types.Context` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "update_context" not in self._inner_api_calls:
- self._inner_api_calls[
- "update_context"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.update_context,
- default_retry=self._method_configs["UpdateContext"].retry,
- default_timeout=self._method_configs["UpdateContext"].timeout,
- client_info=self._client_info,
- )
-
- request = context_pb2.UpdateContextRequest(
- context=context, update_mask=update_mask
- )
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("context.name", context.name)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- return self._inner_api_calls["update_context"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
-
- def delete_context(
- self,
- name,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Deletes the specified context.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.ContextsClient()
- >>>
- >>> # TODO: Initialize `name`:
- >>> name = ''
- >>>
- >>> client.delete_context(name)
-
- Args:
- name (str): Required. The name of the context to delete. Format:
- ``projects//agent/sessions//contexts/``
- or
- ``projects//agent/environments//users//sessions//contexts/``.
- If ``Environment ID`` is not specified, we assume default 'draft'
- environment. If ``User ID`` is not specified, we assume default '-'
- user.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "delete_context" not in self._inner_api_calls:
- self._inner_api_calls[
- "delete_context"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.delete_context,
- default_retry=self._method_configs["DeleteContext"].retry,
- default_timeout=self._method_configs["DeleteContext"].timeout,
- client_info=self._client_info,
- )
-
- request = context_pb2.DeleteContextRequest(name=name)
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("name", name)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- self._inner_api_calls["delete_context"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
-
- def delete_all_contexts(
- self,
- parent,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Deletes all active contexts in the specified session.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.ContextsClient()
- >>>
- >>> # TODO: Initialize `parent`:
- >>> parent = ''
- >>>
- >>> client.delete_all_contexts(parent)
-
- Args:
- parent (str): Required. The name of the session to delete all contexts from.
- Format: ``projects//agent/sessions/`` or
- ``projects//agent/environments//users//sessions/``.
- If ``Environment ID`` is not specified we assume default 'draft'
- environment. If ``User ID`` is not specified, we assume default '-'
- user.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "delete_all_contexts" not in self._inner_api_calls:
- self._inner_api_calls[
- "delete_all_contexts"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.delete_all_contexts,
- default_retry=self._method_configs["DeleteAllContexts"].retry,
- default_timeout=self._method_configs["DeleteAllContexts"].timeout,
- client_info=self._client_info,
- )
-
- request = context_pb2.DeleteAllContextsRequest(parent=parent)
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- self._inner_api_calls["delete_all_contexts"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
diff --git a/dialogflow_v2/gapic/contexts_client_config.py b/dialogflow_v2/gapic/contexts_client_config.py
deleted file mode 100644
index 76d84ffba..000000000
--- a/dialogflow_v2/gapic/contexts_client_config.py
+++ /dev/null
@@ -1,82 +0,0 @@
-config = {
- "interfaces": {
- "google.cloud.dialogflow.v2.Contexts": {
- "retry_codes": {
- "retry_policy_1_codes": ["UNAVAILABLE"],
- "no_retry_codes": [],
- "retry_policy_2_codes": ["UNAVAILABLE"],
- "no_retry_1_codes": [],
- },
- "retry_params": {
- "retry_policy_1_params": {
- "initial_retry_delay_millis": 100,
- "retry_delay_multiplier": 1.3,
- "max_retry_delay_millis": 60000,
- "initial_rpc_timeout_millis": 60000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 60000,
- "total_timeout_millis": 60000,
- },
- "retry_policy_2_params": {
- "initial_retry_delay_millis": 100,
- "retry_delay_multiplier": 1.3,
- "max_retry_delay_millis": 60000,
- "initial_rpc_timeout_millis": 220000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 220000,
- "total_timeout_millis": 220000,
- },
- "no_retry_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 0,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 0,
- "total_timeout_millis": 0,
- },
- "no_retry_1_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 220000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 220000,
- "total_timeout_millis": 220000,
- },
- },
- "methods": {
- "ListContexts": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "GetContext": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "CreateContext": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "UpdateContext": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "DeleteContext": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "DeleteAllContexts": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- },
- }
- }
-}
diff --git a/dialogflow_v2/gapic/entity_types_client.py b/dialogflow_v2/gapic/entity_types_client.py
deleted file mode 100644
index fe8f0d29d..000000000
--- a/dialogflow_v2/gapic/entity_types_client.py
+++ /dev/null
@@ -1,1176 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright 2020 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Accesses the google.cloud.dialogflow.v2 EntityTypes API."""
-
-import functools
-import pkg_resources
-import warnings
-
-from google.oauth2 import service_account
-import google.api_core.client_options
-import google.api_core.gapic_v1.client_info
-import google.api_core.gapic_v1.config
-import google.api_core.gapic_v1.method
-import google.api_core.gapic_v1.routing_header
-import google.api_core.grpc_helpers
-import google.api_core.operation
-import google.api_core.operations_v1
-import google.api_core.page_iterator
-import google.api_core.path_template
-import google.api_core.protobuf_helpers
-import grpc
-
-from dialogflow_v2.gapic import entity_types_client_config
-from dialogflow_v2.gapic import enums
-from dialogflow_v2.gapic.transports import entity_types_grpc_transport
-from dialogflow_v2.proto import agent_pb2
-from dialogflow_v2.proto import agent_pb2_grpc
-from dialogflow_v2.proto import context_pb2
-from dialogflow_v2.proto import context_pb2_grpc
-from dialogflow_v2.proto import entity_type_pb2
-from dialogflow_v2.proto import entity_type_pb2_grpc
-from dialogflow_v2.proto import validation_result_pb2
-from google.longrunning import operations_pb2
-from google.protobuf import empty_pb2
-from google.protobuf import field_mask_pb2
-from google.protobuf import struct_pb2
-
-
-_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("dialogflow").version
-
-
-class EntityTypesClient(object):
- """Service for managing ``EntityTypes``."""
-
- SERVICE_ADDRESS = "dialogflow.googleapis.com:443"
- """The default address of the service."""
-
- # The name of the interface for this client. This is the key used to
- # find the method configuration in the client_config dictionary.
- _INTERFACE_NAME = "google.cloud.dialogflow.v2.EntityTypes"
-
- @classmethod
- def from_service_account_file(cls, filename, *args, **kwargs):
- """Creates an instance of this client using the provided credentials
- file.
-
- Args:
- filename (str): The path to the service account private key json
- file.
- args: Additional arguments to pass to the constructor.
- kwargs: Additional arguments to pass to the constructor.
-
- Returns:
- dialogflow_v2.EntityTypesClient: The constructed client.
- """
- credentials = service_account.Credentials.from_service_account_file(filename)
- kwargs["credentials"] = credentials
- return cls(*args, **kwargs)
-
- from_service_account_json = from_service_account_file
-
- @classmethod
- def project_agent_path(cls, project):
- """Return a fully-qualified project_agent string."""
- return google.api_core.path_template.expand(
- "projects/{project}/agent", project=project
- )
-
- @classmethod
- def agent_path(cls, project):
- """Return a fully-qualified agent string."""
- return google.api_core.path_template.expand(
- "projects/{project}/agent", project=project
- )
-
- @classmethod
- def entity_type_path(cls, project, entity_type):
- """Return a fully-qualified entity_type string."""
- return google.api_core.path_template.expand(
- "projects/{project}/agent/entityTypes/{entity_type}",
- project=project,
- entity_type=entity_type,
- )
-
- def __init__(
- self,
- transport=None,
- channel=None,
- credentials=None,
- client_config=None,
- client_info=None,
- client_options=None,
- ):
- """Constructor.
-
- Args:
- transport (Union[~.EntityTypesGrpcTransport,
- Callable[[~.Credentials, type], ~.EntityTypesGrpcTransport]): A transport
- instance, responsible for actually making the API calls.
- The default transport uses the gRPC protocol.
- This argument may also be a callable which returns a
- transport instance. Callables will be sent the credentials
- as the first argument and the default transport class as
- the second argument.
- channel (grpc.Channel): DEPRECATED. A ``Channel`` instance
- through which to make calls. This argument is mutually exclusive
- with ``credentials``; providing both will raise an exception.
- credentials (google.auth.credentials.Credentials): The
- authorization credentials to attach to requests. These
- credentials identify this application to the service. If none
- are specified, the client will attempt to ascertain the
- credentials from the environment.
- This argument is mutually exclusive with providing a
- transport instance to ``transport``; doing so will raise
- an exception.
- client_config (dict): DEPRECATED. A dictionary of call options for
- each method. If not specified, the default configuration is used.
- client_info (google.api_core.gapic_v1.client_info.ClientInfo):
- The client info used to send a user-agent string along with
- API requests. If ``None``, then default info will be used.
- Generally, you only need to set this if you're developing
- your own client library.
- client_options (Union[dict, google.api_core.client_options.ClientOptions]):
- Client options used to set user options on the client. API Endpoint
- should be set through client_options.
- """
- # Raise deprecation warnings for things we want to go away.
- if client_config is not None:
- warnings.warn(
- "The `client_config` argument is deprecated.",
- PendingDeprecationWarning,
- stacklevel=2,
- )
- else:
- client_config = entity_types_client_config.config
-
- if channel:
- warnings.warn(
- "The `channel` argument is deprecated; use " "`transport` instead.",
- PendingDeprecationWarning,
- stacklevel=2,
- )
-
- api_endpoint = self.SERVICE_ADDRESS
- if client_options:
- if type(client_options) == dict:
- client_options = google.api_core.client_options.from_dict(
- client_options
- )
- if client_options.api_endpoint:
- api_endpoint = client_options.api_endpoint
-
- # Instantiate the transport.
- # The transport is responsible for handling serialization and
- # deserialization and actually sending data to the service.
- if transport:
- if callable(transport):
- self.transport = transport(
- credentials=credentials,
- default_class=entity_types_grpc_transport.EntityTypesGrpcTransport,
- address=api_endpoint,
- )
- else:
- if credentials:
- raise ValueError(
- "Received both a transport instance and "
- "credentials; these are mutually exclusive."
- )
- self.transport = transport
- else:
- self.transport = entity_types_grpc_transport.EntityTypesGrpcTransport(
- address=api_endpoint, channel=channel, credentials=credentials
- )
-
- if client_info is None:
- client_info = google.api_core.gapic_v1.client_info.ClientInfo(
- gapic_version=_GAPIC_LIBRARY_VERSION
- )
- else:
- client_info.gapic_version = _GAPIC_LIBRARY_VERSION
- self._client_info = client_info
-
- # Parse out the default settings for retry and timeout for each RPC
- # from the client configuration.
- # (Ordinarily, these are the defaults specified in the `*_config.py`
- # file next to this one.)
- self._method_configs = google.api_core.gapic_v1.config.parse_method_configs(
- client_config["interfaces"][self._INTERFACE_NAME]
- )
-
- # Save a dictionary of cached API call functions.
- # These are the actual callables which invoke the proper
- # transport methods, wrapped with `wrap_method` to add retry,
- # timeout, and the like.
- self._inner_api_calls = {}
-
- # Service calls
- def list_entity_types(
- self,
- parent,
- language_code=None,
- page_size=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Returns the list of all entity types in the specified agent.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.EntityTypesClient()
- >>>
- >>> parent = client.agent_path('[PROJECT]')
- >>>
- >>> # Iterate over all results
- >>> for element in client.list_entity_types(parent):
- ... # process element
- ... pass
- >>>
- >>>
- >>> # Alternatively:
- >>>
- >>> # Iterate over results one page at a time
- >>> for page in client.list_entity_types(parent).pages:
- ... for element in page:
- ... # process element
- ... pass
-
- Args:
- parent (str): Required. The agent to list all entity types from. Format:
- ``projects//agent``.
- language_code (str): Optional. The language used to access language-specific data. If not
- specified, the agent's default language is used. For more information,
- see `Multilingual intent and entity
- data `__.
- page_size (int): The maximum number of resources contained in the
- underlying API response. If page streaming is performed per-
- resource, this parameter does not affect the return value. If page
- streaming is performed per-page, this determines the maximum number
- of resources in a page.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.api_core.page_iterator.PageIterator` instance.
- An iterable of :class:`~google.cloud.dialogflow_v2.types.EntityType` instances.
- You can also iterate over the pages of the response
- using its `pages` property.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "list_entity_types" not in self._inner_api_calls:
- self._inner_api_calls[
- "list_entity_types"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.list_entity_types,
- default_retry=self._method_configs["ListEntityTypes"].retry,
- default_timeout=self._method_configs["ListEntityTypes"].timeout,
- client_info=self._client_info,
- )
-
- request = entity_type_pb2.ListEntityTypesRequest(
- parent=parent, language_code=language_code, page_size=page_size
- )
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- iterator = google.api_core.page_iterator.GRPCIterator(
- client=None,
- method=functools.partial(
- self._inner_api_calls["list_entity_types"],
- retry=retry,
- timeout=timeout,
- metadata=metadata,
- ),
- request=request,
- items_field="entity_types",
- request_token_field="page_token",
- response_token_field="next_page_token",
- )
- return iterator
-
- def get_entity_type(
- self,
- name,
- language_code=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Retrieves the specified entity type.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.EntityTypesClient()
- >>>
- >>> name = client.entity_type_path('[PROJECT]', '[ENTITY_TYPE]')
- >>>
- >>> response = client.get_entity_type(name)
-
- Args:
- name (str): Required. The name of the entity type. Format:
- ``projects//agent/entityTypes/``.
- language_code (str): Optional. The language used to access language-specific data. If not
- specified, the agent's default language is used. For more information,
- see `Multilingual intent and entity
- data `__.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types.EntityType` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "get_entity_type" not in self._inner_api_calls:
- self._inner_api_calls[
- "get_entity_type"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.get_entity_type,
- default_retry=self._method_configs["GetEntityType"].retry,
- default_timeout=self._method_configs["GetEntityType"].timeout,
- client_info=self._client_info,
- )
-
- request = entity_type_pb2.GetEntityTypeRequest(
- name=name, language_code=language_code
- )
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("name", name)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- return self._inner_api_calls["get_entity_type"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
-
- def create_entity_type(
- self,
- parent,
- entity_type,
- language_code=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Creates an entity type in the specified agent.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.EntityTypesClient()
- >>>
- >>> parent = client.agent_path('[PROJECT]')
- >>>
- >>> # TODO: Initialize `entity_type`:
- >>> entity_type = {}
- >>>
- >>> response = client.create_entity_type(parent, entity_type)
-
- Args:
- parent (str): Required. The agent to create a entity type for. Format:
- ``projects//agent``.
- entity_type (Union[dict, ~google.cloud.dialogflow_v2.types.EntityType]): Required. The entity type to create.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.EntityType`
- language_code (str): Optional. The language used to access language-specific data. If not
- specified, the agent's default language is used. For more information,
- see `Multilingual intent and entity
- data `__.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types.EntityType` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "create_entity_type" not in self._inner_api_calls:
- self._inner_api_calls[
- "create_entity_type"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.create_entity_type,
- default_retry=self._method_configs["CreateEntityType"].retry,
- default_timeout=self._method_configs["CreateEntityType"].timeout,
- client_info=self._client_info,
- )
-
- request = entity_type_pb2.CreateEntityTypeRequest(
- parent=parent, entity_type=entity_type, language_code=language_code
- )
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- return self._inner_api_calls["create_entity_type"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
-
- def update_entity_type(
- self,
- entity_type,
- language_code=None,
- update_mask=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Updates the specified entity type.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.EntityTypesClient()
- >>>
- >>> # TODO: Initialize `entity_type`:
- >>> entity_type = {}
- >>>
- >>> response = client.update_entity_type(entity_type)
-
- Args:
- entity_type (Union[dict, ~google.cloud.dialogflow_v2.types.EntityType]): Required. The entity type to update.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.EntityType`
- language_code (str): Optional. The language used to access language-specific data. If not
- specified, the agent's default language is used. For more information,
- see `Multilingual intent and entity
- data `__.
- update_mask (Union[dict, ~google.cloud.dialogflow_v2.types.FieldMask]): Optional. The mask to control which fields get updated.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.FieldMask`
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types.EntityType` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "update_entity_type" not in self._inner_api_calls:
- self._inner_api_calls[
- "update_entity_type"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.update_entity_type,
- default_retry=self._method_configs["UpdateEntityType"].retry,
- default_timeout=self._method_configs["UpdateEntityType"].timeout,
- client_info=self._client_info,
- )
-
- request = entity_type_pb2.UpdateEntityTypeRequest(
- entity_type=entity_type,
- language_code=language_code,
- update_mask=update_mask,
- )
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("entity_type.name", entity_type.name)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- return self._inner_api_calls["update_entity_type"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
-
- def delete_entity_type(
- self,
- name,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Deletes the specified entity type.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.EntityTypesClient()
- >>>
- >>> name = client.entity_type_path('[PROJECT]', '[ENTITY_TYPE]')
- >>>
- >>> client.delete_entity_type(name)
-
- Args:
- name (str): Required. The name of the entity type to delete. Format:
- ``projects//agent/entityTypes/``.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "delete_entity_type" not in self._inner_api_calls:
- self._inner_api_calls[
- "delete_entity_type"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.delete_entity_type,
- default_retry=self._method_configs["DeleteEntityType"].retry,
- default_timeout=self._method_configs["DeleteEntityType"].timeout,
- client_info=self._client_info,
- )
-
- request = entity_type_pb2.DeleteEntityTypeRequest(name=name)
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("name", name)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- self._inner_api_calls["delete_entity_type"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
-
- def batch_update_entity_types(
- self,
- parent,
- entity_type_batch_uri=None,
- entity_type_batch_inline=None,
- language_code=None,
- update_mask=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Updates/Creates multiple entity types in the specified agent.
-
- Operation
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.EntityTypesClient()
- >>>
- >>> parent = client.agent_path('[PROJECT]')
- >>>
- >>> response = client.batch_update_entity_types(parent)
- >>>
- >>> def callback(operation_future):
- ... # Handle result.
- ... result = operation_future.result()
- >>>
- >>> response.add_done_callback(callback)
- >>>
- >>> # Handle metadata.
- >>> metadata = response.metadata()
-
- Args:
- parent (str): Required. The name of the agent to update or create entity types in.
- Format: ``projects//agent``.
- entity_type_batch_uri (str): The URI to a Google Cloud Storage file containing entity types to update
- or create. The file format can either be a serialized proto (of
- EntityBatch type) or a JSON object. Note: The URI must start with
- "gs://".
- entity_type_batch_inline (Union[dict, ~google.cloud.dialogflow_v2.types.EntityTypeBatch]): The collection of entity types to update or create.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.EntityTypeBatch`
- language_code (str): Optional. The language used to access language-specific data. If not
- specified, the agent's default language is used. For more information,
- see `Multilingual intent and entity
- data `__.
- update_mask (Union[dict, ~google.cloud.dialogflow_v2.types.FieldMask]): Optional. The mask to control which fields get updated.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.FieldMask`
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types._OperationFuture` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "batch_update_entity_types" not in self._inner_api_calls:
- self._inner_api_calls[
- "batch_update_entity_types"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.batch_update_entity_types,
- default_retry=self._method_configs["BatchUpdateEntityTypes"].retry,
- default_timeout=self._method_configs["BatchUpdateEntityTypes"].timeout,
- client_info=self._client_info,
- )
-
- # Sanity check: We have some fields which are mutually exclusive;
- # raise ValueError if more than one is sent.
- google.api_core.protobuf_helpers.check_oneof(
- entity_type_batch_uri=entity_type_batch_uri,
- entity_type_batch_inline=entity_type_batch_inline,
- )
-
- request = entity_type_pb2.BatchUpdateEntityTypesRequest(
- parent=parent,
- entity_type_batch_uri=entity_type_batch_uri,
- entity_type_batch_inline=entity_type_batch_inline,
- language_code=language_code,
- update_mask=update_mask,
- )
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- operation = self._inner_api_calls["batch_update_entity_types"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
- return google.api_core.operation.from_gapic(
- operation,
- self.transport._operations_client,
- entity_type_pb2.BatchUpdateEntityTypesResponse,
- metadata_type=struct_pb2.Struct,
- )
-
- def batch_delete_entity_types(
- self,
- parent,
- entity_type_names,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Deletes entity types in the specified agent.
-
- Operation
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.EntityTypesClient()
- >>>
- >>> parent = client.agent_path('[PROJECT]')
- >>>
- >>> # TODO: Initialize `entity_type_names`:
- >>> entity_type_names = []
- >>>
- >>> response = client.batch_delete_entity_types(parent, entity_type_names)
- >>>
- >>> def callback(operation_future):
- ... # Handle result.
- ... result = operation_future.result()
- >>>
- >>> response.add_done_callback(callback)
- >>>
- >>> # Handle metadata.
- >>> metadata = response.metadata()
-
- Args:
- parent (str): Required. The name of the agent to delete all entities types for.
- Format: ``projects//agent``.
- entity_type_names (list[str]): Required. The names entity types to delete. All names must point to
- the same agent as ``parent``.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types._OperationFuture` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "batch_delete_entity_types" not in self._inner_api_calls:
- self._inner_api_calls[
- "batch_delete_entity_types"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.batch_delete_entity_types,
- default_retry=self._method_configs["BatchDeleteEntityTypes"].retry,
- default_timeout=self._method_configs["BatchDeleteEntityTypes"].timeout,
- client_info=self._client_info,
- )
-
- request = entity_type_pb2.BatchDeleteEntityTypesRequest(
- parent=parent, entity_type_names=entity_type_names
- )
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- operation = self._inner_api_calls["batch_delete_entity_types"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
- return google.api_core.operation.from_gapic(
- operation,
- self.transport._operations_client,
- empty_pb2.Empty,
- metadata_type=struct_pb2.Struct,
- )
-
- def batch_create_entities(
- self,
- parent,
- entities,
- language_code=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Creates multiple new entities in the specified entity type.
-
- Operation
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.EntityTypesClient()
- >>>
- >>> parent = client.entity_type_path('[PROJECT]', '[ENTITY_TYPE]')
- >>>
- >>> # TODO: Initialize `entities`:
- >>> entities = []
- >>>
- >>> response = client.batch_create_entities(parent, entities)
- >>>
- >>> def callback(operation_future):
- ... # Handle result.
- ... result = operation_future.result()
- >>>
- >>> response.add_done_callback(callback)
- >>>
- >>> # Handle metadata.
- >>> metadata = response.metadata()
-
- Args:
- parent (str): Required. The name of the entity type to create entities in. Format:
- ``projects//agent/entityTypes/``.
- entities (list[Union[dict, ~google.cloud.dialogflow_v2.types.Entity]]): Required. The entities to create.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.Entity`
- language_code (str): Optional. The language used to access language-specific data. If not
- specified, the agent's default language is used. For more information,
- see `Multilingual intent and entity
- data `__.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types._OperationFuture` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "batch_create_entities" not in self._inner_api_calls:
- self._inner_api_calls[
- "batch_create_entities"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.batch_create_entities,
- default_retry=self._method_configs["BatchCreateEntities"].retry,
- default_timeout=self._method_configs["BatchCreateEntities"].timeout,
- client_info=self._client_info,
- )
-
- request = entity_type_pb2.BatchCreateEntitiesRequest(
- parent=parent, entities=entities, language_code=language_code
- )
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- operation = self._inner_api_calls["batch_create_entities"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
- return google.api_core.operation.from_gapic(
- operation,
- self.transport._operations_client,
- empty_pb2.Empty,
- metadata_type=struct_pb2.Struct,
- )
-
- def batch_update_entities(
- self,
- parent,
- entities,
- language_code=None,
- update_mask=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Updates or creates multiple entities in the specified entity type.
- This method does not affect entities in the entity type that aren't
- explicitly specified in the request.
-
- Operation
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.EntityTypesClient()
- >>>
- >>> parent = client.entity_type_path('[PROJECT]', '[ENTITY_TYPE]')
- >>>
- >>> # TODO: Initialize `entities`:
- >>> entities = []
- >>>
- >>> response = client.batch_update_entities(parent, entities)
- >>>
- >>> def callback(operation_future):
- ... # Handle result.
- ... result = operation_future.result()
- >>>
- >>> response.add_done_callback(callback)
- >>>
- >>> # Handle metadata.
- >>> metadata = response.metadata()
-
- Args:
- parent (str): Required. The name of the entity type to update or create entities
- in. Format:
- ``projects//agent/entityTypes/``.
- entities (list[Union[dict, ~google.cloud.dialogflow_v2.types.Entity]]): Required. The entities to update or create.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.Entity`
- language_code (str): Optional. The language used to access language-specific data. If not
- specified, the agent's default language is used. For more information,
- see `Multilingual intent and entity
- data `__.
- update_mask (Union[dict, ~google.cloud.dialogflow_v2.types.FieldMask]): Optional. The mask to control which fields get updated.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.FieldMask`
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types._OperationFuture` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "batch_update_entities" not in self._inner_api_calls:
- self._inner_api_calls[
- "batch_update_entities"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.batch_update_entities,
- default_retry=self._method_configs["BatchUpdateEntities"].retry,
- default_timeout=self._method_configs["BatchUpdateEntities"].timeout,
- client_info=self._client_info,
- )
-
- request = entity_type_pb2.BatchUpdateEntitiesRequest(
- parent=parent,
- entities=entities,
- language_code=language_code,
- update_mask=update_mask,
- )
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- operation = self._inner_api_calls["batch_update_entities"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
- return google.api_core.operation.from_gapic(
- operation,
- self.transport._operations_client,
- empty_pb2.Empty,
- metadata_type=struct_pb2.Struct,
- )
-
- def batch_delete_entities(
- self,
- parent,
- entity_values,
- language_code=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Deletes entities in the specified entity type.
-
- Operation
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.EntityTypesClient()
- >>>
- >>> parent = client.entity_type_path('[PROJECT]', '[ENTITY_TYPE]')
- >>>
- >>> # TODO: Initialize `entity_values`:
- >>> entity_values = []
- >>>
- >>> response = client.batch_delete_entities(parent, entity_values)
- >>>
- >>> def callback(operation_future):
- ... # Handle result.
- ... result = operation_future.result()
- >>>
- >>> response.add_done_callback(callback)
- >>>
- >>> # Handle metadata.
- >>> metadata = response.metadata()
-
- Args:
- parent (str): Required. The name of the entity type to delete entries for. Format:
- ``projects//agent/entityTypes/``.
- entity_values (list[str]): Required. The reference ``values`` of the entities to delete. Note
- that these are not fully-qualified names, i.e. they don't start with
- ``projects/``.
- language_code (str): Optional. The language used to access language-specific data. If not
- specified, the agent's default language is used. For more information,
- see `Multilingual intent and entity
- data `__.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types._OperationFuture` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "batch_delete_entities" not in self._inner_api_calls:
- self._inner_api_calls[
- "batch_delete_entities"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.batch_delete_entities,
- default_retry=self._method_configs["BatchDeleteEntities"].retry,
- default_timeout=self._method_configs["BatchDeleteEntities"].timeout,
- client_info=self._client_info,
- )
-
- request = entity_type_pb2.BatchDeleteEntitiesRequest(
- parent=parent, entity_values=entity_values, language_code=language_code
- )
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- operation = self._inner_api_calls["batch_delete_entities"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
- return google.api_core.operation.from_gapic(
- operation,
- self.transport._operations_client,
- empty_pb2.Empty,
- metadata_type=struct_pb2.Struct,
- )
diff --git a/dialogflow_v2/gapic/entity_types_client_config.py b/dialogflow_v2/gapic/entity_types_client_config.py
deleted file mode 100644
index 095a292f5..000000000
--- a/dialogflow_v2/gapic/entity_types_client_config.py
+++ /dev/null
@@ -1,102 +0,0 @@
-config = {
- "interfaces": {
- "google.cloud.dialogflow.v2.EntityTypes": {
- "retry_codes": {
- "retry_policy_1_codes": ["UNAVAILABLE"],
- "no_retry_codes": [],
- "retry_policy_2_codes": ["UNAVAILABLE"],
- "no_retry_1_codes": [],
- },
- "retry_params": {
- "retry_policy_1_params": {
- "initial_retry_delay_millis": 100,
- "retry_delay_multiplier": 1.3,
- "max_retry_delay_millis": 60000,
- "initial_rpc_timeout_millis": 60000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 60000,
- "total_timeout_millis": 60000,
- },
- "retry_policy_2_params": {
- "initial_retry_delay_millis": 100,
- "retry_delay_multiplier": 1.3,
- "max_retry_delay_millis": 60000,
- "initial_rpc_timeout_millis": 220000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 220000,
- "total_timeout_millis": 220000,
- },
- "no_retry_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 0,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 0,
- "total_timeout_millis": 0,
- },
- "no_retry_1_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 220000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 220000,
- "total_timeout_millis": 220000,
- },
- },
- "methods": {
- "ListEntityTypes": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "GetEntityType": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "CreateEntityType": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "UpdateEntityType": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "DeleteEntityType": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "BatchUpdateEntityTypes": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "BatchDeleteEntityTypes": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "BatchCreateEntities": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "BatchUpdateEntities": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "BatchDeleteEntities": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- },
- }
- }
-}
diff --git a/dialogflow_v2/gapic/enums.py b/dialogflow_v2/gapic/enums.py
deleted file mode 100644
index d7d342fb3..000000000
--- a/dialogflow_v2/gapic/enums.py
+++ /dev/null
@@ -1,504 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright 2020 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Wrappers for protocol buffer enum types."""
-
-import enum
-
-
-class AudioEncoding(enum.IntEnum):
- """
- Audio encoding of the audio content sent in the conversational query
- request. Refer to the `Cloud Speech API
- documentation `__
- for more details.
-
- Attributes:
- AUDIO_ENCODING_UNSPECIFIED (int): Not specified.
- AUDIO_ENCODING_LINEAR_16 (int): Uncompressed 16-bit signed little-endian samples (Linear PCM).
- AUDIO_ENCODING_FLAC (int): ```FLAC`` `__ (Free
- Lossless Audio Codec) is the recommended encoding because it is lossless
- (therefore recognition is not compromised) and requires only about half
- the bandwidth of ``LINEAR16``. ``FLAC`` stream encoding supports 16-bit
- and 24-bit samples, however, not all fields in ``STREAMINFO`` are
- supported.
- AUDIO_ENCODING_MULAW (int): 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
- AUDIO_ENCODING_AMR (int): Adaptive Multi-Rate Narrowband codec. ``sample_rate_hertz`` must be
- 8000.
- AUDIO_ENCODING_AMR_WB (int): Adaptive Multi-Rate Wideband codec. ``sample_rate_hertz`` must be
- 16000.
- AUDIO_ENCODING_OGG_OPUS (int): Opus encoded audio frames in Ogg container
- (`OggOpus `__). ``sample_rate_hertz``
- must be 16000.
- AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE (int): Although the use of lossy encodings is not recommended, if a very
- low bitrate encoding is required, ``OGG_OPUS`` is highly preferred over
- Speex encoding. The `Speex `__ encoding supported by
- Dialogflow API has a header byte in each block, as in MIME type
- ``audio/x-speex-with-header-byte``. It is a variant of the RTP Speex
- encoding defined in `RFC 5574 `__.
- The stream is a sequence of blocks, one block per RTP packet. Each block
- starts with a byte containing the length of the block, in bytes,
- followed by one or more frames of Speex data, padded to an integral
- number of bytes (octets) as specified in RFC 5574. In other words, each
- RTP header is replaced with a single byte containing the block length.
- Only Speex wideband is supported. ``sample_rate_hertz`` must be 16000.
- """
-
- AUDIO_ENCODING_UNSPECIFIED = 0
- AUDIO_ENCODING_LINEAR_16 = 1
- AUDIO_ENCODING_FLAC = 2
- AUDIO_ENCODING_MULAW = 3
- AUDIO_ENCODING_AMR = 4
- AUDIO_ENCODING_AMR_WB = 5
- AUDIO_ENCODING_OGG_OPUS = 6
- AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7
-
-
-class IntentView(enum.IntEnum):
- """
- Represents the options for views of an intent.
- An intent can be a sizable object. Therefore, we provide a resource view that
- does not return training phrases in the response by default.
-
- Attributes:
- INTENT_VIEW_UNSPECIFIED (int): Training phrases field is not populated in the response.
- INTENT_VIEW_FULL (int): All fields are populated.
- """
-
- INTENT_VIEW_UNSPECIFIED = 0
- INTENT_VIEW_FULL = 1
-
-
-class NullValue(enum.IntEnum):
- """
- ``NullValue`` is a singleton enumeration to represent the null value
- for the ``Value`` type union.
-
- The JSON representation for ``NullValue`` is JSON ``null``.
-
- Attributes:
- NULL_VALUE (int): Null value.
- """
-
- NULL_VALUE = 0
-
-
-class OutputAudioEncoding(enum.IntEnum):
- """
- Audio encoding of the output audio format in Text-To-Speech.
-
- Attributes:
- OUTPUT_AUDIO_ENCODING_UNSPECIFIED (int): Not specified.
- OUTPUT_AUDIO_ENCODING_LINEAR_16 (int): Uncompressed 16-bit signed little-endian samples (Linear PCM).
- Audio content returned as LINEAR16 also contains a WAV header.
- OUTPUT_AUDIO_ENCODING_MP3 (int): MP3 audio at 32kbps.
- OUTPUT_AUDIO_ENCODING_OGG_OPUS (int): Opus encoded audio wrapped in an ogg container. The result will be a
- file which can be played natively on Android, and in browsers (at least
- Chrome and Firefox). The quality of the encoding is considerably higher
- than MP3 while using approximately the same bitrate.
- """
-
- OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0
- OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1
- OUTPUT_AUDIO_ENCODING_MP3 = 2
- OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3
-
-
-class SpeechModelVariant(enum.IntEnum):
- """
- Variant of the specified ``Speech model`` to use.
-
- See the `Cloud Speech
- documentation `__
- for which models have different variants. For example, the "phone_call"
- model has both a standard and an enhanced variant. When you use an
- enhanced model, you will generally receive higher quality results than
- for a standard model.
-
- Attributes:
- SPEECH_MODEL_VARIANT_UNSPECIFIED (int): No model variant specified. In this case Dialogflow defaults to
- USE_BEST_AVAILABLE.
- USE_BEST_AVAILABLE (int): Use the best available variant of the ``Speech model`` that the
- caller is eligible for.
-
- Please see the `Dialogflow
- docs `__ for how
- to make your project eligible for enhanced models.
- USE_STANDARD (int): Use standard model variant even if an enhanced model is available.
- See the `Cloud Speech
- documentation `__
- for details about enhanced models.
- USE_ENHANCED (int): Use an enhanced model variant:
-
- - If an enhanced variant does not exist for the given ``model`` and
- request language, Dialogflow falls back to the standard variant.
-
- The `Cloud Speech
- documentation `__
- describes which models have enhanced variants.
-
- - If the API caller isn't eligible for enhanced models, Dialogflow
- returns an error. Please see the `Dialogflow
- docs `__ for
- how to make your project eligible.
- """
-
- SPEECH_MODEL_VARIANT_UNSPECIFIED = 0
- USE_BEST_AVAILABLE = 1
- USE_STANDARD = 2
- USE_ENHANCED = 3
-
-
-class SsmlVoiceGender(enum.IntEnum):
- """
- Gender of the voice as described in `SSML voice
- element `__.
-
- Attributes:
- SSML_VOICE_GENDER_UNSPECIFIED (int): An unspecified gender, which means that the client doesn't care which
- gender the selected voice will have.
- SSML_VOICE_GENDER_MALE (int): A male voice.
- SSML_VOICE_GENDER_FEMALE (int): A female voice.
- SSML_VOICE_GENDER_NEUTRAL (int): A gender-neutral voice.
- """
-
- SSML_VOICE_GENDER_UNSPECIFIED = 0
- SSML_VOICE_GENDER_MALE = 1
- SSML_VOICE_GENDER_FEMALE = 2
- SSML_VOICE_GENDER_NEUTRAL = 3
-
-
-class Agent(object):
- class ApiVersion(enum.IntEnum):
- """
- API version for the agent.
-
- Attributes:
- API_VERSION_UNSPECIFIED (int): Not specified.
- API_VERSION_V1 (int): Legacy V1 API.
- API_VERSION_V2 (int): V2 API.
- API_VERSION_V2_BETA_1 (int): V2beta1 API.
- """
-
- API_VERSION_UNSPECIFIED = 0
- API_VERSION_V1 = 1
- API_VERSION_V2 = 2
- API_VERSION_V2_BETA_1 = 3
-
- class MatchMode(enum.IntEnum):
- """
- Match mode determines how intents are detected from user queries.
-
- Attributes:
- MATCH_MODE_UNSPECIFIED (int): Not specified.
- MATCH_MODE_HYBRID (int): Best for agents with a small number of examples in intents and/or wide
- use of templates syntax and composite entities.
- MATCH_MODE_ML_ONLY (int): Can be used for agents with a large number of examples in intents,
- especially the ones using @sys.any or very large custom entities.
- """
-
- MATCH_MODE_UNSPECIFIED = 0
- MATCH_MODE_HYBRID = 1
- MATCH_MODE_ML_ONLY = 2
-
- class Tier(enum.IntEnum):
- """
- Represents the agent tier.
-
- Attributes:
- TIER_UNSPECIFIED (int): Not specified. This value should never be used.
- TIER_STANDARD (int): Standard tier.
- TIER_ENTERPRISE (int): Enterprise tier (Essentials).
- TIER_ENTERPRISE_PLUS (int): Enterprise tier (Plus).
- """
-
- TIER_UNSPECIFIED = 0
- TIER_STANDARD = 1
- TIER_ENTERPRISE = 2
- TIER_ENTERPRISE_PLUS = 3
-
-
-class EntityType(object):
- class AutoExpansionMode(enum.IntEnum):
- """
- Represents different entity type expansion modes. Automated expansion
- allows an agent to recognize values that have not been explicitly listed in
- the entity (for example, new kinds of shopping list items).
-
- Attributes:
- AUTO_EXPANSION_MODE_UNSPECIFIED (int): Auto expansion disabled for the entity.
- AUTO_EXPANSION_MODE_DEFAULT (int): Allows an agent to recognize values that have not been explicitly
- listed in the entity.
- """
-
- AUTO_EXPANSION_MODE_UNSPECIFIED = 0
- AUTO_EXPANSION_MODE_DEFAULT = 1
-
- class Kind(enum.IntEnum):
- """
- Represents kinds of entities.
-
- Attributes:
- KIND_UNSPECIFIED (int): Not specified. This value should be never used.
- KIND_MAP (int): Map entity types allow mapping of a group of synonyms to a reference
- value.
- KIND_LIST (int): List entity types contain a set of entries that do not map to reference
- values. However, list entity types can contain references to other entity
- types (with or without aliases).
- KIND_REGEXP (int): Regexp entity types allow to specify regular expressions in entries
- values.
- """
-
- KIND_UNSPECIFIED = 0
- KIND_MAP = 1
- KIND_LIST = 2
- KIND_REGEXP = 3
-
-
-class Environment(object):
- class State(enum.IntEnum):
- """
- Represents an environment state. When an environment is pointed to a
- new agent version, the environment is temporarily set to the ``LOADING``
- state. During that time, the environment keeps on serving the previous
- version of the agent. After the new agent version is done loading, the
- environment is set back to the ``RUNNING`` state.
-
- Attributes:
- STATE_UNSPECIFIED (int): Not specified. This value is not used.
- STOPPED (int): Stopped.
- LOADING (int): Loading.
- RUNNING (int): Running.
- """
-
- STATE_UNSPECIFIED = 0
- STOPPED = 1
- LOADING = 2
- RUNNING = 3
-
-
-class Intent(object):
- class WebhookState(enum.IntEnum):
- """
- Represents the different states that webhooks can be in.
-
- Attributes:
- WEBHOOK_STATE_UNSPECIFIED (int): Webhook is disabled in the agent and in the intent.
- WEBHOOK_STATE_ENABLED (int): Webhook is enabled in the agent and in the intent.
- WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING (int): Webhook is enabled in the agent and in the intent. Also, each slot
- filling prompt is forwarded to the webhook.
- """
-
- WEBHOOK_STATE_UNSPECIFIED = 0
- WEBHOOK_STATE_ENABLED = 1
- WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2
-
- class TrainingPhrase(object):
- class Type(enum.IntEnum):
- """
- Represents different types of training phrases.
-
- Attributes:
- TYPE_UNSPECIFIED (int): Not specified. This value should never be used.
- EXAMPLE (int): Examples do not contain @-prefixed entity type names, but example parts
- can be annotated with entity types.
- TEMPLATE (int): Templates are not annotated with entity types, but they can contain
- @-prefixed entity type names as substrings.
- Template mode has been deprecated. Example mode is the only supported
- way to create new training phrases. If you have existing training
- phrases that you've created in template mode, those will continue to
- work.
- """
-
- TYPE_UNSPECIFIED = 0
- EXAMPLE = 1
- TEMPLATE = 2
-
- class Message(object):
- class Platform(enum.IntEnum):
- """
- The rich response message integration platform. See
- `Integrations `__.
-
- Attributes:
- PLATFORM_UNSPECIFIED (int): Default platform.
- FACEBOOK (int): Facebook.
- SLACK (int): Slack.
- TELEGRAM (int): Telegram.
- KIK (int): Kik.
- SKYPE (int): Skype.
- LINE (int): Line.
- VIBER (int): Viber.
- ACTIONS_ON_GOOGLE (int): Google Assistant See `Dialogflow webhook
- format `__
- GOOGLE_HANGOUTS (int): Google Hangouts.
- """
-
- PLATFORM_UNSPECIFIED = 0
- FACEBOOK = 1
- SLACK = 2
- TELEGRAM = 3
- KIK = 4
- SKYPE = 5
- LINE = 6
- VIBER = 7
- ACTIONS_ON_GOOGLE = 8
- GOOGLE_HANGOUTS = 11
-
- class MediaContent(object):
- class ResponseMediaType(enum.IntEnum):
- """
- Format of response media type.
-
- Attributes:
- RESPONSE_MEDIA_TYPE_UNSPECIFIED (int): Unspecified.
- AUDIO (int): Response media type is audio.
- """
-
- RESPONSE_MEDIA_TYPE_UNSPECIFIED = 0
- AUDIO = 1
-
- class BrowseCarouselCard(object):
- class ImageDisplayOptions(enum.IntEnum):
- """
- Image display options for Actions on Google. This should be used for
- when the image's aspect ratio does not match the image container's
- aspect ratio.
-
- Attributes:
- IMAGE_DISPLAY_OPTIONS_UNSPECIFIED (int): Fill the gaps between the image and the image container with gray
- bars.
- GRAY (int): Fill the gaps between the image and the image container with gray
- bars.
- WHITE (int): Fill the gaps between the image and the image container with white
- bars.
- CROPPED (int): Image is scaled such that the image width and height match or exceed
- the container dimensions. This may crop the top and bottom of the
- image if the scaled image height is greater than the container
- height, or crop the left and right of the image if the scaled image
- width is greater than the container width. This is similar to "Zoom
- Mode" on a widescreen TV when playing a 4:3 video.
- BLURRED_BACKGROUND (int): Pad the gaps between image and image frame with a blurred copy of the
- same image.
- """
-
- IMAGE_DISPLAY_OPTIONS_UNSPECIFIED = 0
- GRAY = 1
- WHITE = 2
- CROPPED = 3
- BLURRED_BACKGROUND = 4
-
- class BrowseCarouselCardItem(object):
- class OpenUrlAction(object):
- class UrlTypeHint(enum.IntEnum):
- """
- Type of the URI.
-
- Attributes:
- URL_TYPE_HINT_UNSPECIFIED (int): Unspecified
- AMP_ACTION (int): Url would be an amp action
- AMP_CONTENT (int): URL that points directly to AMP content, or to a canonical URL
- which refers to AMP content via .
- """
-
- URL_TYPE_HINT_UNSPECIFIED = 0
- AMP_ACTION = 1
- AMP_CONTENT = 2
-
- class ColumnProperties(object):
- class HorizontalAlignment(enum.IntEnum):
- """
- Text alignments within a cell.
-
- Attributes:
- HORIZONTAL_ALIGNMENT_UNSPECIFIED (int): Text is aligned to the leading edge of the column.
- LEADING (int): Text is aligned to the leading edge of the column.
- CENTER (int): Text is centered in the column.
- TRAILING (int): Text is aligned to the trailing edge of the column.
- """
-
- HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0
- LEADING = 1
- CENTER = 2
- TRAILING = 3
-
-
-class SessionEntityType(object):
- class EntityOverrideMode(enum.IntEnum):
- """
- The types of modifications for a session entity type.
-
- Attributes:
- ENTITY_OVERRIDE_MODE_UNSPECIFIED (int): Not specified. This value should be never used.
- ENTITY_OVERRIDE_MODE_OVERRIDE (int): The collection of session entities overrides the collection of entities
- in the corresponding custom entity type.
- ENTITY_OVERRIDE_MODE_SUPPLEMENT (int): The collection of session entities extends the collection of
- entities in the corresponding custom entity type.
-
- Note: Even in this override mode calls to ``ListSessionEntityTypes``,
- ``GetSessionEntityType``, ``CreateSessionEntityType`` and
- ``UpdateSessionEntityType`` only return the additional entities added in
- this session entity type. If you want to get the supplemented list,
- please call ``EntityTypes.GetEntityType`` on the custom entity type and
- merge.
- """
-
- ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0
- ENTITY_OVERRIDE_MODE_OVERRIDE = 1
- ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2
-
-
-class StreamingRecognitionResult(object):
- class MessageType(enum.IntEnum):
- """
- Type of the response message.
-
- Attributes:
- MESSAGE_TYPE_UNSPECIFIED (int): Not specified. Should never be used.
- TRANSCRIPT (int): Message contains a (possibly partial) transcript.
- END_OF_SINGLE_UTTERANCE (int): Event indicates that the server has detected the end of the user's
- speech utterance and expects no additional inputs. Therefore, the server
- will not process additional audio (although it may subsequently return
- additional results). The client should stop sending additional audio
- data, half-close the gRPC connection, and wait for any additional
- results until the server closes the gRPC connection. This message is
- only sent if ``single_utterance`` was set to ``true``, and is not used
- otherwise.
- """
-
- MESSAGE_TYPE_UNSPECIFIED = 0
- TRANSCRIPT = 1
- END_OF_SINGLE_UTTERANCE = 2
-
-
-class ValidationError(object):
- class Severity(enum.IntEnum):
- """
- Represents a level of severity.
-
- Attributes:
- SEVERITY_UNSPECIFIED (int): Not specified. This value should never be used.
- INFO (int): The agent doesn't follow Dialogflow best practicies.
- WARNING (int): The agent may not behave as expected.
- ERROR (int): The agent may experience partial failures.
- CRITICAL (int): The agent may completely fail.
- """
-
- SEVERITY_UNSPECIFIED = 0
- INFO = 1
- WARNING = 2
- ERROR = 3
- CRITICAL = 4
diff --git a/dialogflow_v2/gapic/environments_client.py b/dialogflow_v2/gapic/environments_client.py
deleted file mode 100644
index 393d5958f..000000000
--- a/dialogflow_v2/gapic/environments_client.py
+++ /dev/null
@@ -1,307 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright 2020 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Accesses the google.cloud.dialogflow.v2 Environments API."""
-
-import functools
-import pkg_resources
-import warnings
-
-from google.oauth2 import service_account
-import google.api_core.client_options
-import google.api_core.gapic_v1.client_info
-import google.api_core.gapic_v1.config
-import google.api_core.gapic_v1.method
-import google.api_core.gapic_v1.routing_header
-import google.api_core.grpc_helpers
-import google.api_core.page_iterator
-import google.api_core.path_template
-import grpc
-
-from dialogflow_v2.gapic import enums
-from dialogflow_v2.gapic import environments_client_config
-from dialogflow_v2.gapic.transports import environments_grpc_transport
-from dialogflow_v2.proto import agent_pb2
-from dialogflow_v2.proto import agent_pb2_grpc
-from dialogflow_v2.proto import context_pb2
-from dialogflow_v2.proto import context_pb2_grpc
-from dialogflow_v2.proto import entity_type_pb2
-from dialogflow_v2.proto import entity_type_pb2_grpc
-from dialogflow_v2.proto import environment_pb2
-from dialogflow_v2.proto import environment_pb2_grpc
-from dialogflow_v2.proto import validation_result_pb2
-from google.longrunning import operations_pb2
-from google.protobuf import empty_pb2
-from google.protobuf import field_mask_pb2
-from google.protobuf import struct_pb2
-
-
-_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("dialogflow").version
-
-
-class EnvironmentsClient(object):
- """Service for managing ``Environments``."""
-
- SERVICE_ADDRESS = "dialogflow.googleapis.com:443"
- """The default address of the service."""
-
- # The name of the interface for this client. This is the key used to
- # find the method configuration in the client_config dictionary.
- _INTERFACE_NAME = "google.cloud.dialogflow.v2.Environments"
-
- @classmethod
- def from_service_account_file(cls, filename, *args, **kwargs):
- """Creates an instance of this client using the provided credentials
- file.
-
- Args:
- filename (str): The path to the service account private key json
- file.
- args: Additional arguments to pass to the constructor.
- kwargs: Additional arguments to pass to the constructor.
-
- Returns:
- dialogflow_v2.EnvironmentsClient: The constructed client.
- """
- credentials = service_account.Credentials.from_service_account_file(filename)
- kwargs["credentials"] = credentials
- return cls(*args, **kwargs)
-
- from_service_account_json = from_service_account_file
-
- @classmethod
- def agent_path(cls, project):
- """Return a fully-qualified agent string."""
- return google.api_core.path_template.expand(
- "projects/{project}/agent", project=project
- )
-
- def __init__(
- self,
- transport=None,
- channel=None,
- credentials=None,
- client_config=None,
- client_info=None,
- client_options=None,
- ):
- """Constructor.
-
- Args:
- transport (Union[~.EnvironmentsGrpcTransport,
- Callable[[~.Credentials, type], ~.EnvironmentsGrpcTransport]): A transport
- instance, responsible for actually making the API calls.
- The default transport uses the gRPC protocol.
- This argument may also be a callable which returns a
- transport instance. Callables will be sent the credentials
- as the first argument and the default transport class as
- the second argument.
- channel (grpc.Channel): DEPRECATED. A ``Channel`` instance
- through which to make calls. This argument is mutually exclusive
- with ``credentials``; providing both will raise an exception.
- credentials (google.auth.credentials.Credentials): The
- authorization credentials to attach to requests. These
- credentials identify this application to the service. If none
- are specified, the client will attempt to ascertain the
- credentials from the environment.
- This argument is mutually exclusive with providing a
- transport instance to ``transport``; doing so will raise
- an exception.
- client_config (dict): DEPRECATED. A dictionary of call options for
- each method. If not specified, the default configuration is used.
- client_info (google.api_core.gapic_v1.client_info.ClientInfo):
- The client info used to send a user-agent string along with
- API requests. If ``None``, then default info will be used.
- Generally, you only need to set this if you're developing
- your own client library.
- client_options (Union[dict, google.api_core.client_options.ClientOptions]):
- Client options used to set user options on the client. API Endpoint
- should be set through client_options.
- """
- # Raise deprecation warnings for things we want to go away.
- if client_config is not None:
- warnings.warn(
- "The `client_config` argument is deprecated.",
- PendingDeprecationWarning,
- stacklevel=2,
- )
- else:
- client_config = environments_client_config.config
-
- if channel:
- warnings.warn(
- "The `channel` argument is deprecated; use " "`transport` instead.",
- PendingDeprecationWarning,
- stacklevel=2,
- )
-
- api_endpoint = self.SERVICE_ADDRESS
- if client_options:
- if type(client_options) == dict:
- client_options = google.api_core.client_options.from_dict(
- client_options
- )
- if client_options.api_endpoint:
- api_endpoint = client_options.api_endpoint
-
- # Instantiate the transport.
- # The transport is responsible for handling serialization and
- # deserialization and actually sending data to the service.
- if transport:
- if callable(transport):
- self.transport = transport(
- credentials=credentials,
- default_class=environments_grpc_transport.EnvironmentsGrpcTransport,
- address=api_endpoint,
- )
- else:
- if credentials:
- raise ValueError(
- "Received both a transport instance and "
- "credentials; these are mutually exclusive."
- )
- self.transport = transport
- else:
- self.transport = environments_grpc_transport.EnvironmentsGrpcTransport(
- address=api_endpoint, channel=channel, credentials=credentials
- )
-
- if client_info is None:
- client_info = google.api_core.gapic_v1.client_info.ClientInfo(
- gapic_version=_GAPIC_LIBRARY_VERSION
- )
- else:
- client_info.gapic_version = _GAPIC_LIBRARY_VERSION
- self._client_info = client_info
-
- # Parse out the default settings for retry and timeout for each RPC
- # from the client configuration.
- # (Ordinarily, these are the defaults specified in the `*_config.py`
- # file next to this one.)
- self._method_configs = google.api_core.gapic_v1.config.parse_method_configs(
- client_config["interfaces"][self._INTERFACE_NAME]
- )
-
- # Save a dictionary of cached API call functions.
- # These are the actual callables which invoke the proper
- # transport methods, wrapped with `wrap_method` to add retry,
- # timeout, and the like.
- self._inner_api_calls = {}
-
- # Service calls
- def list_environments(
- self,
- parent,
- page_size=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Returns the list of all non-draft environments of the specified agent.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.EnvironmentsClient()
- >>>
- >>> parent = client.agent_path('[PROJECT]')
- >>>
- >>> # Iterate over all results
- >>> for element in client.list_environments(parent):
- ... # process element
- ... pass
- >>>
- >>>
- >>> # Alternatively:
- >>>
- >>> # Iterate over results one page at a time
- >>> for page in client.list_environments(parent).pages:
- ... for element in page:
- ... # process element
- ... pass
-
- Args:
- parent (str): Required. The agent to list all environments from. Format:
- ``projects//agent``.
- page_size (int): The maximum number of resources contained in the
- underlying API response. If page streaming is performed per-
- resource, this parameter does not affect the return value. If page
- streaming is performed per-page, this determines the maximum number
- of resources in a page.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.api_core.page_iterator.PageIterator` instance.
- An iterable of :class:`~google.cloud.dialogflow_v2.types.Environment` instances.
- You can also iterate over the pages of the response
- using its `pages` property.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "list_environments" not in self._inner_api_calls:
- self._inner_api_calls[
- "list_environments"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.list_environments,
- default_retry=self._method_configs["ListEnvironments"].retry,
- default_timeout=self._method_configs["ListEnvironments"].timeout,
- client_info=self._client_info,
- )
-
- request = environment_pb2.ListEnvironmentsRequest(
- parent=parent, page_size=page_size
- )
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- iterator = google.api_core.page_iterator.GRPCIterator(
- client=None,
- method=functools.partial(
- self._inner_api_calls["list_environments"],
- retry=retry,
- timeout=timeout,
- metadata=metadata,
- ),
- request=request,
- items_field="environments",
- request_token_field="page_token",
- response_token_field="next_page_token",
- )
- return iterator
diff --git a/dialogflow_v2/gapic/environments_client_config.py b/dialogflow_v2/gapic/environments_client_config.py
deleted file mode 100644
index 7ffc98679..000000000
--- a/dialogflow_v2/gapic/environments_client_config.py
+++ /dev/null
@@ -1,57 +0,0 @@
-config = {
- "interfaces": {
- "google.cloud.dialogflow.v2.Environments": {
- "retry_codes": {
- "retry_policy_1_codes": ["UNAVAILABLE"],
- "no_retry_codes": [],
- "retry_policy_2_codes": ["UNAVAILABLE"],
- "no_retry_1_codes": [],
- },
- "retry_params": {
- "retry_policy_1_params": {
- "initial_retry_delay_millis": 100,
- "retry_delay_multiplier": 1.3,
- "max_retry_delay_millis": 60000,
- "initial_rpc_timeout_millis": 60000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 60000,
- "total_timeout_millis": 60000,
- },
- "retry_policy_2_params": {
- "initial_retry_delay_millis": 100,
- "retry_delay_multiplier": 1.3,
- "max_retry_delay_millis": 60000,
- "initial_rpc_timeout_millis": 220000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 220000,
- "total_timeout_millis": 220000,
- },
- "no_retry_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 0,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 0,
- "total_timeout_millis": 0,
- },
- "no_retry_1_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 220000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 220000,
- "total_timeout_millis": 220000,
- },
- },
- "methods": {
- "ListEnvironments": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- }
- },
- }
- }
-}
diff --git a/dialogflow_v2/gapic/intents_client.py b/dialogflow_v2/gapic/intents_client.py
deleted file mode 100644
index 0d3188689..000000000
--- a/dialogflow_v2/gapic/intents_client.py
+++ /dev/null
@@ -1,880 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright 2020 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Accesses the google.cloud.dialogflow.v2 Intents API."""
-
-import functools
-import pkg_resources
-import warnings
-
-from google.oauth2 import service_account
-import google.api_core.client_options
-import google.api_core.gapic_v1.client_info
-import google.api_core.gapic_v1.config
-import google.api_core.gapic_v1.method
-import google.api_core.gapic_v1.routing_header
-import google.api_core.grpc_helpers
-import google.api_core.operation
-import google.api_core.operations_v1
-import google.api_core.page_iterator
-import google.api_core.path_template
-import google.api_core.protobuf_helpers
-import grpc
-
-from dialogflow_v2.gapic import enums
-from dialogflow_v2.gapic import intents_client_config
-from dialogflow_v2.gapic.transports import intents_grpc_transport
-from dialogflow_v2.proto import agent_pb2
-from dialogflow_v2.proto import agent_pb2_grpc
-from dialogflow_v2.proto import context_pb2
-from dialogflow_v2.proto import context_pb2_grpc
-from dialogflow_v2.proto import entity_type_pb2
-from dialogflow_v2.proto import entity_type_pb2_grpc
-from dialogflow_v2.proto import environment_pb2
-from dialogflow_v2.proto import environment_pb2_grpc
-from dialogflow_v2.proto import intent_pb2
-from dialogflow_v2.proto import intent_pb2_grpc
-from dialogflow_v2.proto import validation_result_pb2
-from google.longrunning import operations_pb2
-from google.protobuf import empty_pb2
-from google.protobuf import field_mask_pb2
-from google.protobuf import struct_pb2
-
-
-_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("dialogflow").version
-
-
-class IntentsClient(object):
- """Service for managing ``Intents``."""
-
- SERVICE_ADDRESS = "dialogflow.googleapis.com:443"
- """The default address of the service."""
-
- # The name of the interface for this client. This is the key used to
- # find the method configuration in the client_config dictionary.
- _INTERFACE_NAME = "google.cloud.dialogflow.v2.Intents"
-
- @classmethod
- def from_service_account_file(cls, filename, *args, **kwargs):
- """Creates an instance of this client using the provided credentials
- file.
-
- Args:
- filename (str): The path to the service account private key json
- file.
- args: Additional arguments to pass to the constructor.
- kwargs: Additional arguments to pass to the constructor.
-
- Returns:
- dialogflow_v2.IntentsClient: The constructed client.
- """
- credentials = service_account.Credentials.from_service_account_file(filename)
- kwargs["credentials"] = credentials
- return cls(*args, **kwargs)
-
- from_service_account_json = from_service_account_file
-
- @classmethod
- def agent_path(cls, project, agent):
- """Return a fully-qualified agent string."""
- return google.api_core.path_template.expand(
- "projects/{project}/agents/{agent}", project=project, agent=agent
- )
-
- @classmethod
- def project_agent_path(cls, project):
- """Return a fully-qualified project_agent string."""
- return google.api_core.path_template.expand(
- "projects/{project}/agent", project=project
- )
-
- @classmethod
- def intent_path(cls, project, intent):
- """Return a fully-qualified intent string."""
- return google.api_core.path_template.expand(
- "projects/{project}/agent/intents/{intent}", project=project, intent=intent
- )
-
- def __init__(
- self,
- transport=None,
- channel=None,
- credentials=None,
- client_config=None,
- client_info=None,
- client_options=None,
- ):
- """Constructor.
-
- Args:
- transport (Union[~.IntentsGrpcTransport,
- Callable[[~.Credentials, type], ~.IntentsGrpcTransport]): A transport
- instance, responsible for actually making the API calls.
- The default transport uses the gRPC protocol.
- This argument may also be a callable which returns a
- transport instance. Callables will be sent the credentials
- as the first argument and the default transport class as
- the second argument.
- channel (grpc.Channel): DEPRECATED. A ``Channel`` instance
- through which to make calls. This argument is mutually exclusive
- with ``credentials``; providing both will raise an exception.
- credentials (google.auth.credentials.Credentials): The
- authorization credentials to attach to requests. These
- credentials identify this application to the service. If none
- are specified, the client will attempt to ascertain the
- credentials from the environment.
- This argument is mutually exclusive with providing a
- transport instance to ``transport``; doing so will raise
- an exception.
- client_config (dict): DEPRECATED. A dictionary of call options for
- each method. If not specified, the default configuration is used.
- client_info (google.api_core.gapic_v1.client_info.ClientInfo):
- The client info used to send a user-agent string along with
- API requests. If ``None``, then default info will be used.
- Generally, you only need to set this if you're developing
- your own client library.
- client_options (Union[dict, google.api_core.client_options.ClientOptions]):
- Client options used to set user options on the client. API Endpoint
- should be set through client_options.
- """
- # Raise deprecation warnings for things we want to go away.
- if client_config is not None:
- warnings.warn(
- "The `client_config` argument is deprecated.",
- PendingDeprecationWarning,
- stacklevel=2,
- )
- else:
- client_config = intents_client_config.config
-
- if channel:
- warnings.warn(
- "The `channel` argument is deprecated; use " "`transport` instead.",
- PendingDeprecationWarning,
- stacklevel=2,
- )
-
- api_endpoint = self.SERVICE_ADDRESS
- if client_options:
- if type(client_options) == dict:
- client_options = google.api_core.client_options.from_dict(
- client_options
- )
- if client_options.api_endpoint:
- api_endpoint = client_options.api_endpoint
-
- # Instantiate the transport.
- # The transport is responsible for handling serialization and
- # deserialization and actually sending data to the service.
- if transport:
- if callable(transport):
- self.transport = transport(
- credentials=credentials,
- default_class=intents_grpc_transport.IntentsGrpcTransport,
- address=api_endpoint,
- )
- else:
- if credentials:
- raise ValueError(
- "Received both a transport instance and "
- "credentials; these are mutually exclusive."
- )
- self.transport = transport
- else:
- self.transport = intents_grpc_transport.IntentsGrpcTransport(
- address=api_endpoint, channel=channel, credentials=credentials
- )
-
- if client_info is None:
- client_info = google.api_core.gapic_v1.client_info.ClientInfo(
- gapic_version=_GAPIC_LIBRARY_VERSION
- )
- else:
- client_info.gapic_version = _GAPIC_LIBRARY_VERSION
- self._client_info = client_info
-
- # Parse out the default settings for retry and timeout for each RPC
- # from the client configuration.
- # (Ordinarily, these are the defaults specified in the `*_config.py`
- # file next to this one.)
- self._method_configs = google.api_core.gapic_v1.config.parse_method_configs(
- client_config["interfaces"][self._INTERFACE_NAME]
- )
-
- # Save a dictionary of cached API call functions.
- # These are the actual callables which invoke the proper
- # transport methods, wrapped with `wrap_method` to add retry,
- # timeout, and the like.
- self._inner_api_calls = {}
-
- # Service calls
- def list_intents(
- self,
- parent,
- language_code=None,
- intent_view=None,
- page_size=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Returns the list of all intents in the specified agent.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.IntentsClient()
- >>>
- >>> parent = client.agent_path('[PROJECT]')
- >>>
- >>> # Iterate over all results
- >>> for element in client.list_intents(parent):
- ... # process element
- ... pass
- >>>
- >>>
- >>> # Alternatively:
- >>>
- >>> # Iterate over results one page at a time
- >>> for page in client.list_intents(parent).pages:
- ... for element in page:
- ... # process element
- ... pass
-
- Args:
- parent (str): Required. The agent to list all intents from. Format:
- ``projects//agent``.
- language_code (str): Optional. The language used to access language-specific data. If not
- specified, the agent's default language is used. For more information,
- see `Multilingual intent and entity
- data `__.
- intent_view (~google.cloud.dialogflow_v2.types.IntentView): Optional. The resource view to apply to the returned intent.
- page_size (int): The maximum number of resources contained in the
- underlying API response. If page streaming is performed per-
- resource, this parameter does not affect the return value. If page
- streaming is performed per-page, this determines the maximum number
- of resources in a page.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.api_core.page_iterator.PageIterator` instance.
- An iterable of :class:`~google.cloud.dialogflow_v2.types.Intent` instances.
- You can also iterate over the pages of the response
- using its `pages` property.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "list_intents" not in self._inner_api_calls:
- self._inner_api_calls[
- "list_intents"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.list_intents,
- default_retry=self._method_configs["ListIntents"].retry,
- default_timeout=self._method_configs["ListIntents"].timeout,
- client_info=self._client_info,
- )
-
- request = intent_pb2.ListIntentsRequest(
- parent=parent,
- language_code=language_code,
- intent_view=intent_view,
- page_size=page_size,
- )
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- iterator = google.api_core.page_iterator.GRPCIterator(
- client=None,
- method=functools.partial(
- self._inner_api_calls["list_intents"],
- retry=retry,
- timeout=timeout,
- metadata=metadata,
- ),
- request=request,
- items_field="intents",
- request_token_field="page_token",
- response_token_field="next_page_token",
- )
- return iterator
-
- def get_intent(
- self,
- name,
- language_code=None,
- intent_view=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Retrieves the specified intent.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.IntentsClient()
- >>>
- >>> name = client.intent_path('[PROJECT]', '[INTENT]')
- >>>
- >>> response = client.get_intent(name)
-
- Args:
- name (str): Required. The name of the intent. Format:
- ``projects//agent/intents/``.
- language_code (str): Optional. The language used to access language-specific data. If not
- specified, the agent's default language is used. For more information,
- see `Multilingual intent and entity
- data `__.
- intent_view (~google.cloud.dialogflow_v2.types.IntentView): Optional. The resource view to apply to the returned intent.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types.Intent` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "get_intent" not in self._inner_api_calls:
- self._inner_api_calls[
- "get_intent"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.get_intent,
- default_retry=self._method_configs["GetIntent"].retry,
- default_timeout=self._method_configs["GetIntent"].timeout,
- client_info=self._client_info,
- )
-
- request = intent_pb2.GetIntentRequest(
- name=name, language_code=language_code, intent_view=intent_view
- )
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("name", name)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- return self._inner_api_calls["get_intent"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
-
- def create_intent(
- self,
- parent,
- intent,
- language_code=None,
- intent_view=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Creates an intent in the specified agent.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.IntentsClient()
- >>>
- >>> parent = client.agent_path('[PROJECT]')
- >>>
- >>> # TODO: Initialize `intent`:
- >>> intent = {}
- >>>
- >>> response = client.create_intent(parent, intent)
-
- Args:
- parent (str): Required. The agent to create a intent for. Format:
- ``projects//agent``.
- intent (Union[dict, ~google.cloud.dialogflow_v2.types.Intent]): Required. The intent to create.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.Intent`
- language_code (str): Optional. The language used to access language-specific data. If not
- specified, the agent's default language is used. For more information,
- see `Multilingual intent and entity
- data `__.
- intent_view (~google.cloud.dialogflow_v2.types.IntentView): Optional. The resource view to apply to the returned intent.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types.Intent` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "create_intent" not in self._inner_api_calls:
- self._inner_api_calls[
- "create_intent"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.create_intent,
- default_retry=self._method_configs["CreateIntent"].retry,
- default_timeout=self._method_configs["CreateIntent"].timeout,
- client_info=self._client_info,
- )
-
- request = intent_pb2.CreateIntentRequest(
- parent=parent,
- intent=intent,
- language_code=language_code,
- intent_view=intent_view,
- )
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- return self._inner_api_calls["create_intent"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
-
- def update_intent(
- self,
- intent,
- language_code=None,
- update_mask=None,
- intent_view=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Updates the specified intent.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.IntentsClient()
- >>>
- >>> # TODO: Initialize `intent`:
- >>> intent = {}
- >>>
- >>> response = client.update_intent(intent)
-
- Args:
- intent (Union[dict, ~google.cloud.dialogflow_v2.types.Intent]): Required. The intent to update.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.Intent`
- language_code (str): Optional. The language used to access language-specific data. If not
- specified, the agent's default language is used. For more information,
- see `Multilingual intent and entity
- data `__.
- update_mask (Union[dict, ~google.cloud.dialogflow_v2.types.FieldMask]): Optional. The mask to control which fields get updated.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.FieldMask`
- intent_view (~google.cloud.dialogflow_v2.types.IntentView): Optional. The resource view to apply to the returned intent.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types.Intent` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "update_intent" not in self._inner_api_calls:
- self._inner_api_calls[
- "update_intent"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.update_intent,
- default_retry=self._method_configs["UpdateIntent"].retry,
- default_timeout=self._method_configs["UpdateIntent"].timeout,
- client_info=self._client_info,
- )
-
- request = intent_pb2.UpdateIntentRequest(
- intent=intent,
- language_code=language_code,
- update_mask=update_mask,
- intent_view=intent_view,
- )
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("intent.name", intent.name)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- return self._inner_api_calls["update_intent"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
-
- def delete_intent(
- self,
- name,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Deletes the specified intent and its direct or indirect followup intents.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.IntentsClient()
- >>>
- >>> name = client.intent_path('[PROJECT]', '[INTENT]')
- >>>
- >>> client.delete_intent(name)
-
- Args:
- name (str): Required. The name of the intent to delete. If this intent has
- direct or indirect followup intents, we also delete them. Format:
- ``projects//agent/intents/``.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "delete_intent" not in self._inner_api_calls:
- self._inner_api_calls[
- "delete_intent"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.delete_intent,
- default_retry=self._method_configs["DeleteIntent"].retry,
- default_timeout=self._method_configs["DeleteIntent"].timeout,
- client_info=self._client_info,
- )
-
- request = intent_pb2.DeleteIntentRequest(name=name)
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("name", name)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- self._inner_api_calls["delete_intent"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
-
- def batch_update_intents(
- self,
- parent,
- intent_batch_uri=None,
- intent_batch_inline=None,
- language_code=None,
- update_mask=None,
- intent_view=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Updates/Creates multiple intents in the specified agent.
-
- Operation
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.IntentsClient()
- >>>
- >>> parent = client.agent_path('[PROJECT]')
- >>>
- >>> response = client.batch_update_intents(parent)
- >>>
- >>> def callback(operation_future):
- ... # Handle result.
- ... result = operation_future.result()
- >>>
- >>> response.add_done_callback(callback)
- >>>
- >>> # Handle metadata.
- >>> metadata = response.metadata()
-
- Args:
- parent (str): Required. The name of the agent to update or create intents in.
- Format: ``projects//agent``.
- intent_batch_uri (str): The URI to a Google Cloud Storage file containing intents to update or
- create. The file format can either be a serialized proto (of IntentBatch
- type) or JSON object. Note: The URI must start with "gs://".
- intent_batch_inline (Union[dict, ~google.cloud.dialogflow_v2.types.IntentBatch]): The collection of intents to update or create.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.IntentBatch`
- language_code (str): Optional. The language used to access language-specific data. If not
- specified, the agent's default language is used. For more information,
- see `Multilingual intent and entity
- data `__.
- update_mask (Union[dict, ~google.cloud.dialogflow_v2.types.FieldMask]): Optional. The mask to control which fields get updated.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.FieldMask`
- intent_view (~google.cloud.dialogflow_v2.types.IntentView): Optional. The resource view to apply to the returned intent.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types._OperationFuture` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "batch_update_intents" not in self._inner_api_calls:
- self._inner_api_calls[
- "batch_update_intents"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.batch_update_intents,
- default_retry=self._method_configs["BatchUpdateIntents"].retry,
- default_timeout=self._method_configs["BatchUpdateIntents"].timeout,
- client_info=self._client_info,
- )
-
- # Sanity check: We have some fields which are mutually exclusive;
- # raise ValueError if more than one is sent.
- google.api_core.protobuf_helpers.check_oneof(
- intent_batch_uri=intent_batch_uri, intent_batch_inline=intent_batch_inline
- )
-
- request = intent_pb2.BatchUpdateIntentsRequest(
- parent=parent,
- intent_batch_uri=intent_batch_uri,
- intent_batch_inline=intent_batch_inline,
- language_code=language_code,
- update_mask=update_mask,
- intent_view=intent_view,
- )
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- operation = self._inner_api_calls["batch_update_intents"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
- return google.api_core.operation.from_gapic(
- operation,
- self.transport._operations_client,
- intent_pb2.BatchUpdateIntentsResponse,
- metadata_type=struct_pb2.Struct,
- )
-
- def batch_delete_intents(
- self,
- parent,
- intents,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Deletes intents in the specified agent.
-
- Operation
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.IntentsClient()
- >>>
- >>> parent = client.agent_path('[PROJECT]')
- >>>
- >>> # TODO: Initialize `intents`:
- >>> intents = []
- >>>
- >>> response = client.batch_delete_intents(parent, intents)
- >>>
- >>> def callback(operation_future):
- ... # Handle result.
- ... result = operation_future.result()
- >>>
- >>> response.add_done_callback(callback)
- >>>
- >>> # Handle metadata.
- >>> metadata = response.metadata()
-
- Args:
- parent (str): Required. The name of the agent to delete all entities types for.
- Format: ``projects//agent``.
- intents (list[Union[dict, ~google.cloud.dialogflow_v2.types.Intent]]): Required. The collection of intents to delete. Only intent ``name``
- must be filled in.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.Intent`
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types._OperationFuture` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "batch_delete_intents" not in self._inner_api_calls:
- self._inner_api_calls[
- "batch_delete_intents"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.batch_delete_intents,
- default_retry=self._method_configs["BatchDeleteIntents"].retry,
- default_timeout=self._method_configs["BatchDeleteIntents"].timeout,
- client_info=self._client_info,
- )
-
- request = intent_pb2.BatchDeleteIntentsRequest(parent=parent, intents=intents)
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- operation = self._inner_api_calls["batch_delete_intents"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
- return google.api_core.operation.from_gapic(
- operation,
- self.transport._operations_client,
- empty_pb2.Empty,
- metadata_type=struct_pb2.Struct,
- )
diff --git a/dialogflow_v2/gapic/intents_client_config.py b/dialogflow_v2/gapic/intents_client_config.py
deleted file mode 100644
index 91532198c..000000000
--- a/dialogflow_v2/gapic/intents_client_config.py
+++ /dev/null
@@ -1,87 +0,0 @@
-config = {
- "interfaces": {
- "google.cloud.dialogflow.v2.Intents": {
- "retry_codes": {
- "retry_policy_1_codes": ["UNAVAILABLE"],
- "no_retry_codes": [],
- "retry_policy_2_codes": ["UNAVAILABLE"],
- "no_retry_1_codes": [],
- },
- "retry_params": {
- "retry_policy_1_params": {
- "initial_retry_delay_millis": 100,
- "retry_delay_multiplier": 1.3,
- "max_retry_delay_millis": 60000,
- "initial_rpc_timeout_millis": 60000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 60000,
- "total_timeout_millis": 60000,
- },
- "retry_policy_2_params": {
- "initial_retry_delay_millis": 100,
- "retry_delay_multiplier": 1.3,
- "max_retry_delay_millis": 60000,
- "initial_rpc_timeout_millis": 220000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 220000,
- "total_timeout_millis": 220000,
- },
- "no_retry_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 0,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 0,
- "total_timeout_millis": 0,
- },
- "no_retry_1_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 220000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 220000,
- "total_timeout_millis": 220000,
- },
- },
- "methods": {
- "ListIntents": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "GetIntent": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "CreateIntent": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "UpdateIntent": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "DeleteIntent": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "BatchUpdateIntents": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "BatchDeleteIntents": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- },
- }
- }
-}
diff --git a/dialogflow_v2/gapic/session_entity_types_client.py b/dialogflow_v2/gapic/session_entity_types_client.py
deleted file mode 100644
index dd207c1dc..000000000
--- a/dialogflow_v2/gapic/session_entity_types_client.py
+++ /dev/null
@@ -1,665 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright 2020 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Accesses the google.cloud.dialogflow.v2 SessionEntityTypes API."""
-
-import functools
-import pkg_resources
-import warnings
-
-from google.oauth2 import service_account
-import google.api_core.client_options
-import google.api_core.gapic_v1.client_info
-import google.api_core.gapic_v1.config
-import google.api_core.gapic_v1.method
-import google.api_core.gapic_v1.routing_header
-import google.api_core.grpc_helpers
-import google.api_core.page_iterator
-import google.api_core.path_template
-import grpc
-
-from dialogflow_v2.gapic import enums
-from dialogflow_v2.gapic import session_entity_types_client_config
-from dialogflow_v2.gapic.transports import session_entity_types_grpc_transport
-from dialogflow_v2.proto import agent_pb2
-from dialogflow_v2.proto import agent_pb2_grpc
-from dialogflow_v2.proto import context_pb2
-from dialogflow_v2.proto import context_pb2_grpc
-from dialogflow_v2.proto import entity_type_pb2
-from dialogflow_v2.proto import entity_type_pb2_grpc
-from dialogflow_v2.proto import environment_pb2
-from dialogflow_v2.proto import environment_pb2_grpc
-from dialogflow_v2.proto import intent_pb2
-from dialogflow_v2.proto import intent_pb2_grpc
-from dialogflow_v2.proto import session_entity_type_pb2
-from dialogflow_v2.proto import session_entity_type_pb2_grpc
-from dialogflow_v2.proto import validation_result_pb2
-from google.longrunning import operations_pb2
-from google.protobuf import empty_pb2
-from google.protobuf import field_mask_pb2
-from google.protobuf import struct_pb2
-
-
-_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("dialogflow").version
-
-
-class SessionEntityTypesClient(object):
- """Service for managing ``SessionEntityTypes``."""
-
- SERVICE_ADDRESS = "dialogflow.googleapis.com:443"
- """The default address of the service."""
-
- # The name of the interface for this client. This is the key used to
- # find the method configuration in the client_config dictionary.
- _INTERFACE_NAME = "google.cloud.dialogflow.v2.SessionEntityTypes"
-
- @classmethod
- def from_service_account_file(cls, filename, *args, **kwargs):
- """Creates an instance of this client using the provided credentials
- file.
-
- Args:
- filename (str): The path to the service account private key json
- file.
- args: Additional arguments to pass to the constructor.
- kwargs: Additional arguments to pass to the constructor.
-
- Returns:
- dialogflow_v2.SessionEntityTypesClient: The constructed client.
- """
- credentials = service_account.Credentials.from_service_account_file(filename)
- kwargs["credentials"] = credentials
- return cls(*args, **kwargs)
-
- from_service_account_json = from_service_account_file
-
- @classmethod
- def session_path(cls, project, session):
- """Return a fully-qualified session string."""
- return google.api_core.path_template.expand(
- "projects/{project}/agent/sessions/{session}",
- project=project,
- session=session,
- )
-
- @classmethod
- def session_entity_type_path(cls, project, session, entity_type):
- """Return a fully-qualified session_entity_type string."""
- return google.api_core.path_template.expand(
- "projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}",
- project=project,
- session=session,
- entity_type=entity_type,
- )
-
- def __init__(
- self,
- transport=None,
- channel=None,
- credentials=None,
- client_config=None,
- client_info=None,
- client_options=None,
- ):
- """Constructor.
-
- Args:
- transport (Union[~.SessionEntityTypesGrpcTransport,
- Callable[[~.Credentials, type], ~.SessionEntityTypesGrpcTransport]): A transport
- instance, responsible for actually making the API calls.
- The default transport uses the gRPC protocol.
- This argument may also be a callable which returns a
- transport instance. Callables will be sent the credentials
- as the first argument and the default transport class as
- the second argument.
- channel (grpc.Channel): DEPRECATED. A ``Channel`` instance
- through which to make calls. This argument is mutually exclusive
- with ``credentials``; providing both will raise an exception.
- credentials (google.auth.credentials.Credentials): The
- authorization credentials to attach to requests. These
- credentials identify this application to the service. If none
- are specified, the client will attempt to ascertain the
- credentials from the environment.
- This argument is mutually exclusive with providing a
- transport instance to ``transport``; doing so will raise
- an exception.
- client_config (dict): DEPRECATED. A dictionary of call options for
- each method. If not specified, the default configuration is used.
- client_info (google.api_core.gapic_v1.client_info.ClientInfo):
- The client info used to send a user-agent string along with
- API requests. If ``None``, then default info will be used.
- Generally, you only need to set this if you're developing
- your own client library.
- client_options (Union[dict, google.api_core.client_options.ClientOptions]):
- Client options used to set user options on the client. API Endpoint
- should be set through client_options.
- """
- # Raise deprecation warnings for things we want to go away.
- if client_config is not None:
- warnings.warn(
- "The `client_config` argument is deprecated.",
- PendingDeprecationWarning,
- stacklevel=2,
- )
- else:
- client_config = session_entity_types_client_config.config
-
- if channel:
- warnings.warn(
- "The `channel` argument is deprecated; use " "`transport` instead.",
- PendingDeprecationWarning,
- stacklevel=2,
- )
-
- api_endpoint = self.SERVICE_ADDRESS
- if client_options:
- if type(client_options) == dict:
- client_options = google.api_core.client_options.from_dict(
- client_options
- )
- if client_options.api_endpoint:
- api_endpoint = client_options.api_endpoint
-
- # Instantiate the transport.
- # The transport is responsible for handling serialization and
- # deserialization and actually sending data to the service.
- if transport:
- if callable(transport):
- self.transport = transport(
- credentials=credentials,
- default_class=session_entity_types_grpc_transport.SessionEntityTypesGrpcTransport,
- address=api_endpoint,
- )
- else:
- if credentials:
- raise ValueError(
- "Received both a transport instance and "
- "credentials; these are mutually exclusive."
- )
- self.transport = transport
- else:
- self.transport = session_entity_types_grpc_transport.SessionEntityTypesGrpcTransport(
- address=api_endpoint, channel=channel, credentials=credentials
- )
-
- if client_info is None:
- client_info = google.api_core.gapic_v1.client_info.ClientInfo(
- gapic_version=_GAPIC_LIBRARY_VERSION
- )
- else:
- client_info.gapic_version = _GAPIC_LIBRARY_VERSION
- self._client_info = client_info
-
- # Parse out the default settings for retry and timeout for each RPC
- # from the client configuration.
- # (Ordinarily, these are the defaults specified in the `*_config.py`
- # file next to this one.)
- self._method_configs = google.api_core.gapic_v1.config.parse_method_configs(
- client_config["interfaces"][self._INTERFACE_NAME]
- )
-
- # Save a dictionary of cached API call functions.
- # These are the actual callables which invoke the proper
- # transport methods, wrapped with `wrap_method` to add retry,
- # timeout, and the like.
- self._inner_api_calls = {}
-
- # Service calls
- def list_session_entity_types(
- self,
- parent,
- page_size=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Returns the list of all session entity types in the specified session.
-
- This method doesn't work with Google Assistant integration.
- Contact Dialogflow support if you need to use session entities
- with Google Assistant integration.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.SessionEntityTypesClient()
- >>>
- >>> # TODO: Initialize `parent`:
- >>> parent = ''
- >>>
- >>> # Iterate over all results
- >>> for element in client.list_session_entity_types(parent):
- ... # process element
- ... pass
- >>>
- >>>
- >>> # Alternatively:
- >>>
- >>> # Iterate over results one page at a time
- >>> for page in client.list_session_entity_types(parent).pages:
- ... for element in page:
- ... # process element
- ... pass
-
- Args:
- parent (str): Required. The session to list all session entity types from. Format:
- ``projects//agent/sessions/`` or
- ``projects//agent/environments//users// sessions/``.
- If ``Environment ID`` is not specified, we assume default 'draft'
- environment. If ``User ID`` is not specified, we assume default '-'
- user.
- page_size (int): The maximum number of resources contained in the
- underlying API response. If page streaming is performed per-
- resource, this parameter does not affect the return value. If page
- streaming is performed per-page, this determines the maximum number
- of resources in a page.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.api_core.page_iterator.PageIterator` instance.
- An iterable of :class:`~google.cloud.dialogflow_v2.types.SessionEntityType` instances.
- You can also iterate over the pages of the response
- using its `pages` property.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "list_session_entity_types" not in self._inner_api_calls:
- self._inner_api_calls[
- "list_session_entity_types"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.list_session_entity_types,
- default_retry=self._method_configs["ListSessionEntityTypes"].retry,
- default_timeout=self._method_configs["ListSessionEntityTypes"].timeout,
- client_info=self._client_info,
- )
-
- request = session_entity_type_pb2.ListSessionEntityTypesRequest(
- parent=parent, page_size=page_size
- )
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- iterator = google.api_core.page_iterator.GRPCIterator(
- client=None,
- method=functools.partial(
- self._inner_api_calls["list_session_entity_types"],
- retry=retry,
- timeout=timeout,
- metadata=metadata,
- ),
- request=request,
- items_field="session_entity_types",
- request_token_field="page_token",
- response_token_field="next_page_token",
- )
- return iterator
-
- def get_session_entity_type(
- self,
- name,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Retrieves the specified session entity type.
-
- This method doesn't work with Google Assistant integration.
- Contact Dialogflow support if you need to use session entities
- with Google Assistant integration.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.SessionEntityTypesClient()
- >>>
- >>> # TODO: Initialize `name`:
- >>> name = ''
- >>>
- >>> response = client.get_session_entity_type(name)
-
- Args:
- name (str): Required. The name of the session entity type. Format:
- ``projects//agent/sessions//entityTypes/``
- or
- ``projects//agent/environments//users//sessions//entityTypes/``.
- If ``Environment ID`` is not specified, we assume default 'draft'
- environment. If ``User ID`` is not specified, we assume default '-'
- user.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types.SessionEntityType` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "get_session_entity_type" not in self._inner_api_calls:
- self._inner_api_calls[
- "get_session_entity_type"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.get_session_entity_type,
- default_retry=self._method_configs["GetSessionEntityType"].retry,
- default_timeout=self._method_configs["GetSessionEntityType"].timeout,
- client_info=self._client_info,
- )
-
- request = session_entity_type_pb2.GetSessionEntityTypeRequest(name=name)
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("name", name)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- return self._inner_api_calls["get_session_entity_type"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
-
- def create_session_entity_type(
- self,
- parent,
- session_entity_type,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Creates a session entity type.
-
- If the specified session entity type already exists, overrides the session
- entity type.
-
- This method doesn't work with Google Assistant integration.
- Contact Dialogflow support if you need to use session entities
- with Google Assistant integration.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.SessionEntityTypesClient()
- >>>
- >>> # TODO: Initialize `parent`:
- >>> parent = ''
- >>>
- >>> # TODO: Initialize `session_entity_type`:
- >>> session_entity_type = {}
- >>>
- >>> response = client.create_session_entity_type(parent, session_entity_type)
-
- Args:
- parent (str): Required. The session to create a session entity type for. Format:
- ``projects//agent/sessions/`` or
- ``projects//agent/environments//users// sessions/``.
- If ``Environment ID`` is not specified, we assume default 'draft'
- environment. If ``User ID`` is not specified, we assume default '-'
- user.
- session_entity_type (Union[dict, ~google.cloud.dialogflow_v2.types.SessionEntityType]): Required. The session entity type to create.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.SessionEntityType`
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types.SessionEntityType` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "create_session_entity_type" not in self._inner_api_calls:
- self._inner_api_calls[
- "create_session_entity_type"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.create_session_entity_type,
- default_retry=self._method_configs["CreateSessionEntityType"].retry,
- default_timeout=self._method_configs["CreateSessionEntityType"].timeout,
- client_info=self._client_info,
- )
-
- request = session_entity_type_pb2.CreateSessionEntityTypeRequest(
- parent=parent, session_entity_type=session_entity_type
- )
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("parent", parent)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- return self._inner_api_calls["create_session_entity_type"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
-
- def update_session_entity_type(
- self,
- session_entity_type,
- update_mask=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Updates the specified session entity type.
-
- This method doesn't work with Google Assistant integration.
- Contact Dialogflow support if you need to use session entities
- with Google Assistant integration.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.SessionEntityTypesClient()
- >>>
- >>> # TODO: Initialize `session_entity_type`:
- >>> session_entity_type = {}
- >>>
- >>> response = client.update_session_entity_type(session_entity_type)
-
- Args:
- session_entity_type (Union[dict, ~google.cloud.dialogflow_v2.types.SessionEntityType]): Required. The session entity type to update.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.SessionEntityType`
- update_mask (Union[dict, ~google.cloud.dialogflow_v2.types.FieldMask]): Optional. The mask to control which fields get updated.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.FieldMask`
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types.SessionEntityType` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "update_session_entity_type" not in self._inner_api_calls:
- self._inner_api_calls[
- "update_session_entity_type"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.update_session_entity_type,
- default_retry=self._method_configs["UpdateSessionEntityType"].retry,
- default_timeout=self._method_configs["UpdateSessionEntityType"].timeout,
- client_info=self._client_info,
- )
-
- request = session_entity_type_pb2.UpdateSessionEntityTypeRequest(
- session_entity_type=session_entity_type, update_mask=update_mask
- )
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("session_entity_type.name", session_entity_type.name)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- return self._inner_api_calls["update_session_entity_type"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
-
- def delete_session_entity_type(
- self,
- name,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Deletes the specified session entity type.
-
- This method doesn't work with Google Assistant integration.
- Contact Dialogflow support if you need to use session entities
- with Google Assistant integration.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.SessionEntityTypesClient()
- >>>
- >>> # TODO: Initialize `name`:
- >>> name = ''
- >>>
- >>> client.delete_session_entity_type(name)
-
- Args:
- name (str): Required. The name of the entity type to delete. Format:
- ``projects//agent/sessions//entityTypes/``
- or
- ``projects//agent/environments//users//sessions//entityTypes/``.
- If ``Environment ID`` is not specified, we assume default 'draft'
- environment. If ``User ID`` is not specified, we assume default '-'
- user.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "delete_session_entity_type" not in self._inner_api_calls:
- self._inner_api_calls[
- "delete_session_entity_type"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.delete_session_entity_type,
- default_retry=self._method_configs["DeleteSessionEntityType"].retry,
- default_timeout=self._method_configs["DeleteSessionEntityType"].timeout,
- client_info=self._client_info,
- )
-
- request = session_entity_type_pb2.DeleteSessionEntityTypeRequest(name=name)
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("name", name)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- self._inner_api_calls["delete_session_entity_type"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
diff --git a/dialogflow_v2/gapic/session_entity_types_client_config.py b/dialogflow_v2/gapic/session_entity_types_client_config.py
deleted file mode 100644
index d034682e5..000000000
--- a/dialogflow_v2/gapic/session_entity_types_client_config.py
+++ /dev/null
@@ -1,77 +0,0 @@
-config = {
- "interfaces": {
- "google.cloud.dialogflow.v2.SessionEntityTypes": {
- "retry_codes": {
- "retry_policy_1_codes": ["UNAVAILABLE"],
- "no_retry_codes": [],
- "retry_policy_2_codes": ["UNAVAILABLE"],
- "no_retry_1_codes": [],
- },
- "retry_params": {
- "retry_policy_1_params": {
- "initial_retry_delay_millis": 100,
- "retry_delay_multiplier": 1.3,
- "max_retry_delay_millis": 60000,
- "initial_rpc_timeout_millis": 60000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 60000,
- "total_timeout_millis": 60000,
- },
- "retry_policy_2_params": {
- "initial_retry_delay_millis": 100,
- "retry_delay_multiplier": 1.3,
- "max_retry_delay_millis": 60000,
- "initial_rpc_timeout_millis": 220000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 220000,
- "total_timeout_millis": 220000,
- },
- "no_retry_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 0,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 0,
- "total_timeout_millis": 0,
- },
- "no_retry_1_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 220000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 220000,
- "total_timeout_millis": 220000,
- },
- },
- "methods": {
- "ListSessionEntityTypes": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "GetSessionEntityType": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "CreateSessionEntityType": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "UpdateSessionEntityType": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- "DeleteSessionEntityType": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params",
- },
- },
- }
- }
-}
diff --git a/dialogflow_v2/gapic/sessions_client.py b/dialogflow_v2/gapic/sessions_client.py
deleted file mode 100644
index 4d75bc8af..000000000
--- a/dialogflow_v2/gapic/sessions_client.py
+++ /dev/null
@@ -1,413 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright 2020 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Accesses the google.cloud.dialogflow.v2 Sessions API."""
-
-import pkg_resources
-import warnings
-
-from google.oauth2 import service_account
-import google.api_core.client_options
-import google.api_core.gapic_v1.client_info
-import google.api_core.gapic_v1.config
-import google.api_core.gapic_v1.method
-import google.api_core.gapic_v1.routing_header
-import google.api_core.grpc_helpers
-import google.api_core.path_template
-import grpc
-
-from dialogflow_v2.gapic import enums
-from dialogflow_v2.gapic import sessions_client_config
-from dialogflow_v2.gapic.transports import sessions_grpc_transport
-from dialogflow_v2.proto import agent_pb2
-from dialogflow_v2.proto import agent_pb2_grpc
-from dialogflow_v2.proto import audio_config_pb2
-from dialogflow_v2.proto import context_pb2
-from dialogflow_v2.proto import context_pb2_grpc
-from dialogflow_v2.proto import entity_type_pb2
-from dialogflow_v2.proto import entity_type_pb2_grpc
-from dialogflow_v2.proto import environment_pb2
-from dialogflow_v2.proto import environment_pb2_grpc
-from dialogflow_v2.proto import intent_pb2
-from dialogflow_v2.proto import intent_pb2_grpc
-from dialogflow_v2.proto import session_entity_type_pb2
-from dialogflow_v2.proto import session_entity_type_pb2_grpc
-from dialogflow_v2.proto import session_pb2
-from dialogflow_v2.proto import session_pb2_grpc
-from dialogflow_v2.proto import validation_result_pb2
-from google.longrunning import operations_pb2
-from google.protobuf import empty_pb2
-from google.protobuf import field_mask_pb2
-from google.protobuf import struct_pb2
-
-
-_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("dialogflow").version
-
-
-class SessionsClient(object):
- """
- A service used for session interactions.
-
- For more information, see the `API interactions
- guide `__.
- """
-
- SERVICE_ADDRESS = "dialogflow.googleapis.com:443"
- """The default address of the service."""
-
- # The name of the interface for this client. This is the key used to
- # find the method configuration in the client_config dictionary.
- _INTERFACE_NAME = "google.cloud.dialogflow.v2.Sessions"
-
- @classmethod
- def from_service_account_file(cls, filename, *args, **kwargs):
- """Creates an instance of this client using the provided credentials
- file.
-
- Args:
- filename (str): The path to the service account private key json
- file.
- args: Additional arguments to pass to the constructor.
- kwargs: Additional arguments to pass to the constructor.
-
- Returns:
- dialogflow_v2.SessionsClient: The constructed client.
- """
- credentials = service_account.Credentials.from_service_account_file(filename)
- kwargs["credentials"] = credentials
- return cls(*args, **kwargs)
-
- from_service_account_json = from_service_account_file
-
- @classmethod
- def session_path(cls, project, session):
- """Return a fully-qualified session string."""
- return google.api_core.path_template.expand(
- "projects/{project}/agent/sessions/{session}",
- project=project,
- session=session,
- )
-
- def __init__(
- self,
- transport=None,
- channel=None,
- credentials=None,
- client_config=None,
- client_info=None,
- client_options=None,
- ):
- """Constructor.
-
- Args:
- transport (Union[~.SessionsGrpcTransport,
- Callable[[~.Credentials, type], ~.SessionsGrpcTransport]): A transport
- instance, responsible for actually making the API calls.
- The default transport uses the gRPC protocol.
- This argument may also be a callable which returns a
- transport instance. Callables will be sent the credentials
- as the first argument and the default transport class as
- the second argument.
- channel (grpc.Channel): DEPRECATED. A ``Channel`` instance
- through which to make calls. This argument is mutually exclusive
- with ``credentials``; providing both will raise an exception.
- credentials (google.auth.credentials.Credentials): The
- authorization credentials to attach to requests. These
- credentials identify this application to the service. If none
- are specified, the client will attempt to ascertain the
- credentials from the environment.
- This argument is mutually exclusive with providing a
- transport instance to ``transport``; doing so will raise
- an exception.
- client_config (dict): DEPRECATED. A dictionary of call options for
- each method. If not specified, the default configuration is used.
- client_info (google.api_core.gapic_v1.client_info.ClientInfo):
- The client info used to send a user-agent string along with
- API requests. If ``None``, then default info will be used.
- Generally, you only need to set this if you're developing
- your own client library.
- client_options (Union[dict, google.api_core.client_options.ClientOptions]):
- Client options used to set user options on the client. API Endpoint
- should be set through client_options.
- """
- # Raise deprecation warnings for things we want to go away.
- if client_config is not None:
- warnings.warn(
- "The `client_config` argument is deprecated.",
- PendingDeprecationWarning,
- stacklevel=2,
- )
- else:
- client_config = sessions_client_config.config
-
- if channel:
- warnings.warn(
- "The `channel` argument is deprecated; use " "`transport` instead.",
- PendingDeprecationWarning,
- stacklevel=2,
- )
-
- api_endpoint = self.SERVICE_ADDRESS
- if client_options:
- if type(client_options) == dict:
- client_options = google.api_core.client_options.from_dict(
- client_options
- )
- if client_options.api_endpoint:
- api_endpoint = client_options.api_endpoint
-
- # Instantiate the transport.
- # The transport is responsible for handling serialization and
- # deserialization and actually sending data to the service.
- if transport:
- if callable(transport):
- self.transport = transport(
- credentials=credentials,
- default_class=sessions_grpc_transport.SessionsGrpcTransport,
- address=api_endpoint,
- )
- else:
- if credentials:
- raise ValueError(
- "Received both a transport instance and "
- "credentials; these are mutually exclusive."
- )
- self.transport = transport
- else:
- self.transport = sessions_grpc_transport.SessionsGrpcTransport(
- address=api_endpoint, channel=channel, credentials=credentials
- )
-
- if client_info is None:
- client_info = google.api_core.gapic_v1.client_info.ClientInfo(
- gapic_version=_GAPIC_LIBRARY_VERSION
- )
- else:
- client_info.gapic_version = _GAPIC_LIBRARY_VERSION
- self._client_info = client_info
-
- # Parse out the default settings for retry and timeout for each RPC
- # from the client configuration.
- # (Ordinarily, these are the defaults specified in the `*_config.py`
- # file next to this one.)
- self._method_configs = google.api_core.gapic_v1.config.parse_method_configs(
- client_config["interfaces"][self._INTERFACE_NAME]
- )
-
- # Save a dictionary of cached API call functions.
- # These are the actual callables which invoke the proper
- # transport methods, wrapped with `wrap_method` to add retry,
- # timeout, and the like.
- self._inner_api_calls = {}
-
- # Service calls
- def detect_intent(
- self,
- session,
- query_input,
- query_params=None,
- output_audio_config=None,
- output_audio_config_mask=None,
- input_audio=None,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Processes a natural language query and returns structured, actionable data
- 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.
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.SessionsClient()
- >>>
- >>> # TODO: Initialize `session`:
- >>> session = ''
- >>>
- >>> # TODO: Initialize `query_input`:
- >>> query_input = {}
- >>>
- >>> response = client.detect_intent(session, query_input)
-
- Args:
- session (str): Required. The name of the session this query is sent to. Format:
- ``projects//agent/sessions/``, or
- ``projects//agent/environments//users//sessions/``.
- If ``Environment ID`` is not specified, we assume default 'draft'
- environment. If ``User ID`` is not specified, we are using "-". It's up
- to the API caller to choose an appropriate ``Session ID`` and
- ``User Id``. They can be a random number or some type of user and
- session identifiers (preferably hashed). The length of the
- ``Session ID`` and ``User ID`` must not exceed 36 characters.
-
- For more information, see the `API interactions
- guide `__.
- query_input (Union[dict, ~google.cloud.dialogflow_v2.types.QueryInput]): Required. The input specification. It can be set to:
-
- 1. an audio config
- which instructs the speech recognizer how to process the speech audio,
-
- 2. a conversational query in the form of text, or
-
- 3. an event that specifies which intent to trigger.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.QueryInput`
- query_params (Union[dict, ~google.cloud.dialogflow_v2.types.QueryParameters]): The parameters of this query.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.QueryParameters`
- output_audio_config (Union[dict, ~google.cloud.dialogflow_v2.types.OutputAudioConfig]): Instructs the speech synthesizer how to generate the output
- audio. If this field is not set and agent-level speech synthesizer is not
- configured, no output audio is generated.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.OutputAudioConfig`
- output_audio_config_mask (Union[dict, ~google.cloud.dialogflow_v2.types.FieldMask]): Mask for ``output_audio_config`` indicating which settings in this
- request-level config should override speech synthesizer settings defined
- at agent-level.
-
- If unspecified or empty, ``output_audio_config`` replaces the
- agent-level config in its entirety.
-
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.dialogflow_v2.types.FieldMask`
- input_audio (bytes): The natural language speech audio to be processed. This field should
- be populated iff ``query_input`` is set to an input audio config. A
- single request can contain up to 1 minute of speech audio data.
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- A :class:`~google.cloud.dialogflow_v2.types.DetectIntentResponse` instance.
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "detect_intent" not in self._inner_api_calls:
- self._inner_api_calls[
- "detect_intent"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.detect_intent,
- default_retry=self._method_configs["DetectIntent"].retry,
- default_timeout=self._method_configs["DetectIntent"].timeout,
- client_info=self._client_info,
- )
-
- request = session_pb2.DetectIntentRequest(
- session=session,
- query_input=query_input,
- query_params=query_params,
- output_audio_config=output_audio_config,
- output_audio_config_mask=output_audio_config_mask,
- input_audio=input_audio,
- )
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("session", session)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- return self._inner_api_calls["detect_intent"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
-
- def streaming_detect_intent(
- self,
- requests,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- 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).
-
- Example:
- >>> import dialogflow_v2
- >>>
- >>> client = dialogflow_v2.SessionsClient()
- >>>
- >>> # TODO: Initialize `session`:
- >>> session = ''
- >>>
- >>> # TODO: Initialize `query_input`:
- >>> query_input = {}
- >>> request = {'session': session, 'query_input': query_input}
- >>>
- >>> requests = [request]
- >>> for element in client.streaming_detect_intent(requests):
- ... # process element
- ... pass
-
- Args:
- requests (iterator[dict|google.cloud.dialogflow_v2.proto.session_pb2.StreamingDetectIntentRequest]): The input objects. If a dict is provided, it must be of the
- same form as the protobuf message :class:`~google.cloud.dialogflow_v2.types.StreamingDetectIntentRequest`
- retry (Optional[google.api_core.retry.Retry]): A retry object used
- to retry requests. If ``None`` is specified, requests will
- be retried using a default configuration.
- timeout (Optional[float]): The amount of time, in seconds, to wait
- for the request to complete. Note that if ``retry`` is
- specified, the timeout applies to each individual attempt.
- metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
- that is provided to the method.
-
- Returns:
- Iterable[~google.cloud.dialogflow_v2.types.StreamingDetectIntentResponse].
-
- Raises:
- google.api_core.exceptions.GoogleAPICallError: If the request
- failed for any reason.
- google.api_core.exceptions.RetryError: If the request failed due
- to a retryable error and retry attempts failed.
- ValueError: If the parameters are invalid.
- """
- # Wrap the transport method to add retry and timeout logic.
- if "streaming_detect_intent" not in self._inner_api_calls:
- self._inner_api_calls[
- "streaming_detect_intent"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.streaming_detect_intent,
- default_retry=self._method_configs["StreamingDetectIntent"].retry,
- default_timeout=self._method_configs["StreamingDetectIntent"].timeout,
- client_info=self._client_info,
- )
-
- return self._inner_api_calls["streaming_detect_intent"](
- requests, retry=retry, timeout=timeout, metadata=metadata
- )
diff --git a/dialogflow_v2/gapic/sessions_client_config.py b/dialogflow_v2/gapic/sessions_client_config.py
deleted file mode 100644
index 23bcd56dd..000000000
--- a/dialogflow_v2/gapic/sessions_client_config.py
+++ /dev/null
@@ -1,62 +0,0 @@
-config = {
- "interfaces": {
- "google.cloud.dialogflow.v2.Sessions": {
- "retry_codes": {
- "retry_policy_1_codes": ["UNAVAILABLE"],
- "no_retry_codes": [],
- "retry_policy_2_codes": ["UNAVAILABLE"],
- "no_retry_1_codes": [],
- },
- "retry_params": {
- "retry_policy_1_params": {
- "initial_retry_delay_millis": 100,
- "retry_delay_multiplier": 1.3,
- "max_retry_delay_millis": 60000,
- "initial_rpc_timeout_millis": 60000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 60000,
- "total_timeout_millis": 60000,
- },
- "retry_policy_2_params": {
- "initial_retry_delay_millis": 100,
- "retry_delay_multiplier": 1.3,
- "max_retry_delay_millis": 60000,
- "initial_rpc_timeout_millis": 220000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 220000,
- "total_timeout_millis": 220000,
- },
- "no_retry_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 0,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 0,
- "total_timeout_millis": 0,
- },
- "no_retry_1_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 220000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 220000,
- "total_timeout_millis": 220000,
- },
- },
- "methods": {
- "DetectIntent": {
- "timeout_millis": 220000,
- "retry_codes_name": "retry_policy_2_codes",
- "retry_params_name": "retry_policy_2_params",
- },
- "StreamingDetectIntent": {
- "timeout_millis": 220000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params",
- },
- },
- }
- }
-}
diff --git a/dialogflow_v2/gapic/transports/__init__.py b/dialogflow_v2/gapic/transports/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/dialogflow_v2/gapic/transports/agents_grpc_transport.py b/dialogflow_v2/gapic/transports/agents_grpc_transport.py
deleted file mode 100644
index 51018751f..000000000
--- a/dialogflow_v2/gapic/transports/agents_grpc_transport.py
+++ /dev/null
@@ -1,268 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright 2020 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-import google.api_core.grpc_helpers
-import google.api_core.operations_v1
-
-from dialogflow_v2.proto import agent_pb2_grpc
-
-
-class AgentsGrpcTransport(object):
- """gRPC transport class providing stubs for
- google.cloud.dialogflow.v2 Agents API.
-
- The transport provides access to the raw gRPC stubs,
- which can be used to take advantage of advanced
- features of gRPC.
- """
-
- # The scopes needed to make gRPC calls to all of the methods defined
- # in this service.
- _OAUTH_SCOPES = (
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/dialogflow",
- )
-
- def __init__(
- self, channel=None, credentials=None, address="dialogflow.googleapis.com:443"
- ):
- """Instantiate the transport class.
-
- Args:
- channel (grpc.Channel): A ``Channel`` instance through
- which to make calls. This argument is mutually exclusive
- with ``credentials``; providing both will raise an exception.
- credentials (google.auth.credentials.Credentials): The
- authorization credentials to attach to requests. These
- credentials identify this application to the service. If none
- are specified, the client will attempt to ascertain the
- credentials from the environment.
- address (str): The address where the service is hosted.
- """
- # If both `channel` and `credentials` are specified, raise an
- # exception (channels come with credentials baked in already).
- if channel is not None and credentials is not None:
- raise ValueError(
- "The `channel` and `credentials` arguments are mutually " "exclusive."
- )
-
- # Create the channel.
- if channel is None:
- channel = self.create_channel(
- address=address,
- credentials=credentials,
- options={
- "grpc.max_send_message_length": -1,
- "grpc.max_receive_message_length": -1,
- }.items(),
- )
-
- self._channel = channel
-
- # gRPC uses objects called "stubs" that are bound to the
- # channel and provide a basic method for each RPC.
- self._stubs = {"agents_stub": agent_pb2_grpc.AgentsStub(channel)}
-
- # Because this API includes a method that returns a
- # long-running operation (proto: google.longrunning.Operation),
- # instantiate an LRO client.
- self._operations_client = google.api_core.operations_v1.OperationsClient(
- channel
- )
-
- @classmethod
- def create_channel(
- cls, address="dialogflow.googleapis.com:443", credentials=None, **kwargs
- ):
- """Create and return a gRPC channel object.
-
- Args:
- address (str): The host for the channel to use.
- credentials (~.Credentials): The
- authorization credentials to attach to requests. These
- credentials identify this application to the service. If
- none are specified, the client will attempt to ascertain
- the credentials from the environment.
- kwargs (dict): Keyword arguments, which are passed to the
- channel creation.
-
- Returns:
- grpc.Channel: A gRPC channel object.
- """
- return google.api_core.grpc_helpers.create_channel(
- address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs
- )
-
- @property
- def channel(self):
- """The gRPC channel used by the transport.
-
- Returns:
- grpc.Channel: A gRPC channel object.
- """
- return self._channel
-
- @property
- def get_agent(self):
- """Return the gRPC stub for :meth:`AgentsClient.get_agent`.
-
- Retrieves the specified agent.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["agents_stub"].GetAgent
-
- @property
- def set_agent(self):
- """Return the gRPC stub for :meth:`AgentsClient.set_agent`.
-
- Creates/updates the specified agent.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["agents_stub"].SetAgent
-
- @property
- def delete_agent(self):
- """Return the gRPC stub for :meth:`AgentsClient.delete_agent`.
-
- Deletes the specified agent.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["agents_stub"].DeleteAgent
-
- @property
- def search_agents(self):
- """Return the gRPC stub for :meth:`AgentsClient.search_agents`.
-
- Returns the list of agents.
-
- Since there is at most one conversational agent per project, this method
- is useful primarily for listing all agents across projects the caller
- has access to. One can achieve that with a wildcard project collection
- id "-". Refer to `List
- Sub-Collections `__.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["agents_stub"].SearchAgents
-
- @property
- def train_agent(self):
- """Return the gRPC stub for :meth:`AgentsClient.train_agent`.
-
- Trains the specified agent.
-
- Operation
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["agents_stub"].TrainAgent
-
- @property
- def export_agent(self):
- """Return the gRPC stub for :meth:`AgentsClient.export_agent`.
-
- Exports the specified agent to a ZIP file.
-
- Operation
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["agents_stub"].ExportAgent
-
- @property
- def import_agent(self):
- """Return the gRPC stub for :meth:`AgentsClient.import_agent`.
-
- Imports the specified agent from a ZIP file.
-
- Uploads new intents and entity types without deleting the existing ones.
- Intents and entity types with the same name are replaced with the new
- versions from ``ImportAgentRequest``. After the import, the imported
- draft agent will be trained automatically (unless disabled in agent
- settings). However, once the import is done, training may not be
- completed yet. Please call ``TrainAgent`` and wait for the operation it
- returns in order to train explicitly.
-
- Operation An operation which
- tracks when importing is complete. It only tracks when the draft agent
- is updated not when it is done training.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["agents_stub"].ImportAgent
-
- @property
- def restore_agent(self):
- """Return the gRPC stub for :meth:`AgentsClient.restore_agent`.
-
- Restores the specified agent from a ZIP file.
-
- Replaces the current agent version with a new one. All the intents and
- entity types in the older version are deleted. After the restore, the
- restored draft agent will be trained automatically (unless disabled in
- agent settings). However, once the restore is done, training may not be
- completed yet. Please call ``TrainAgent`` and wait for the operation it
- returns in order to train explicitly.
-
- Operation An operation which
- tracks when restoring is complete. It only tracks when the draft agent
- is updated not when it is done training.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["agents_stub"].RestoreAgent
-
- @property
- def get_validation_result(self):
- """Return the gRPC stub for :meth:`AgentsClient.get_validation_result`.
-
- Gets agent validation result. Agent validation is performed during
- training time and is updated automatically when training is completed.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["agents_stub"].GetValidationResult
diff --git a/dialogflow_v2/gapic/transports/contexts_grpc_transport.py b/dialogflow_v2/gapic/transports/contexts_grpc_transport.py
deleted file mode 100644
index f85c8918d..000000000
--- a/dialogflow_v2/gapic/transports/contexts_grpc_transport.py
+++ /dev/null
@@ -1,189 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright 2020 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-import google.api_core.grpc_helpers
-
-from dialogflow_v2.proto import context_pb2_grpc
-
-
-class ContextsGrpcTransport(object):
- """gRPC transport class providing stubs for
- google.cloud.dialogflow.v2 Contexts API.
-
- The transport provides access to the raw gRPC stubs,
- which can be used to take advantage of advanced
- features of gRPC.
- """
-
- # The scopes needed to make gRPC calls to all of the methods defined
- # in this service.
- _OAUTH_SCOPES = (
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/dialogflow",
- )
-
- def __init__(
- self, channel=None, credentials=None, address="dialogflow.googleapis.com:443"
- ):
- """Instantiate the transport class.
-
- Args:
- channel (grpc.Channel): A ``Channel`` instance through
- which to make calls. This argument is mutually exclusive
- with ``credentials``; providing both will raise an exception.
- credentials (google.auth.credentials.Credentials): The
- authorization credentials to attach to requests. These
- credentials identify this application to the service. If none
- are specified, the client will attempt to ascertain the
- credentials from the environment.
- address (str): The address where the service is hosted.
- """
- # If both `channel` and `credentials` are specified, raise an
- # exception (channels come with credentials baked in already).
- if channel is not None and credentials is not None:
- raise ValueError(
- "The `channel` and `credentials` arguments are mutually " "exclusive."
- )
-
- # Create the channel.
- if channel is None:
- channel = self.create_channel(
- address=address,
- credentials=credentials,
- options={
- "grpc.max_send_message_length": -1,
- "grpc.max_receive_message_length": -1,
- }.items(),
- )
-
- self._channel = channel
-
- # gRPC uses objects called "stubs" that are bound to the
- # channel and provide a basic method for each RPC.
- self._stubs = {"contexts_stub": context_pb2_grpc.ContextsStub(channel)}
-
- @classmethod
- def create_channel(
- cls, address="dialogflow.googleapis.com:443", credentials=None, **kwargs
- ):
- """Create and return a gRPC channel object.
-
- Args:
- address (str): The host for the channel to use.
- credentials (~.Credentials): The
- authorization credentials to attach to requests. These
- credentials identify this application to the service. If
- none are specified, the client will attempt to ascertain
- the credentials from the environment.
- kwargs (dict): Keyword arguments, which are passed to the
- channel creation.
-
- Returns:
- grpc.Channel: A gRPC channel object.
- """
- return google.api_core.grpc_helpers.create_channel(
- address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs
- )
-
- @property
- def channel(self):
- """The gRPC channel used by the transport.
-
- Returns:
- grpc.Channel: A gRPC channel object.
- """
- return self._channel
-
- @property
- def list_contexts(self):
- """Return the gRPC stub for :meth:`ContextsClient.list_contexts`.
-
- Returns the list of all contexts in the specified session.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["contexts_stub"].ListContexts
-
- @property
- def get_context(self):
- """Return the gRPC stub for :meth:`ContextsClient.get_context`.
-
- Retrieves the specified context.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["contexts_stub"].GetContext
-
- @property
- def create_context(self):
- """Return the gRPC stub for :meth:`ContextsClient.create_context`.
-
- Creates a context.
-
- If the specified context already exists, overrides the context.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["contexts_stub"].CreateContext
-
- @property
- def update_context(self):
- """Return the gRPC stub for :meth:`ContextsClient.update_context`.
-
- Updates the specified context.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["contexts_stub"].UpdateContext
-
- @property
- def delete_context(self):
- """Return the gRPC stub for :meth:`ContextsClient.delete_context`.
-
- Deletes the specified context.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["contexts_stub"].DeleteContext
-
- @property
- def delete_all_contexts(self):
- """Return the gRPC stub for :meth:`ContextsClient.delete_all_contexts`.
-
- Deletes all active contexts in the specified session.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["contexts_stub"].DeleteAllContexts
diff --git a/dialogflow_v2/gapic/transports/entity_types_grpc_transport.py b/dialogflow_v2/gapic/transports/entity_types_grpc_transport.py
deleted file mode 100644
index a60504564..000000000
--- a/dialogflow_v2/gapic/transports/entity_types_grpc_transport.py
+++ /dev/null
@@ -1,261 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright 2020 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-import google.api_core.grpc_helpers
-import google.api_core.operations_v1
-
-from dialogflow_v2.proto import entity_type_pb2_grpc
-
-
-class EntityTypesGrpcTransport(object):
- """gRPC transport class providing stubs for
- google.cloud.dialogflow.v2 EntityTypes API.
-
- The transport provides access to the raw gRPC stubs,
- which can be used to take advantage of advanced
- features of gRPC.
- """
-
- # The scopes needed to make gRPC calls to all of the methods defined
- # in this service.
- _OAUTH_SCOPES = (
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/dialogflow",
- )
-
- def __init__(
- self, channel=None, credentials=None, address="dialogflow.googleapis.com:443"
- ):
- """Instantiate the transport class.
-
- Args:
- channel (grpc.Channel): A ``Channel`` instance through
- which to make calls. This argument is mutually exclusive
- with ``credentials``; providing both will raise an exception.
- credentials (google.auth.credentials.Credentials): The
- authorization credentials to attach to requests. These
- credentials identify this application to the service. If none
- are specified, the client will attempt to ascertain the
- credentials from the environment.
- address (str): The address where the service is hosted.
- """
- # If both `channel` and `credentials` are specified, raise an
- # exception (channels come with credentials baked in already).
- if channel is not None and credentials is not None:
- raise ValueError(
- "The `channel` and `credentials` arguments are mutually " "exclusive."
- )
-
- # Create the channel.
- if channel is None:
- channel = self.create_channel(
- address=address,
- credentials=credentials,
- options={
- "grpc.max_send_message_length": -1,
- "grpc.max_receive_message_length": -1,
- }.items(),
- )
-
- self._channel = channel
-
- # gRPC uses objects called "stubs" that are bound to the
- # channel and provide a basic method for each RPC.
- self._stubs = {
- "entity_types_stub": entity_type_pb2_grpc.EntityTypesStub(channel)
- }
-
- # Because this API includes a method that returns a
- # long-running operation (proto: google.longrunning.Operation),
- # instantiate an LRO client.
- self._operations_client = google.api_core.operations_v1.OperationsClient(
- channel
- )
-
- @classmethod
- def create_channel(
- cls, address="dialogflow.googleapis.com:443", credentials=None, **kwargs
- ):
- """Create and return a gRPC channel object.
-
- Args:
- address (str): The host for the channel to use.
- credentials (~.Credentials): The
- authorization credentials to attach to requests. These
- credentials identify this application to the service. If
- none are specified, the client will attempt to ascertain
- the credentials from the environment.
- kwargs (dict): Keyword arguments, which are passed to the
- channel creation.
-
- Returns:
- grpc.Channel: A gRPC channel object.
- """
- return google.api_core.grpc_helpers.create_channel(
- address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs
- )
-
- @property
- def channel(self):
- """The gRPC channel used by the transport.
-
- Returns:
- grpc.Channel: A gRPC channel object.
- """
- return self._channel
-
- @property
- def list_entity_types(self):
- """Return the gRPC stub for :meth:`EntityTypesClient.list_entity_types`.
-
- Returns the list of all entity types in the specified agent.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["entity_types_stub"].ListEntityTypes
-
- @property
- def get_entity_type(self):
- """Return the gRPC stub for :meth:`EntityTypesClient.get_entity_type`.
-
- Retrieves the specified entity type.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["entity_types_stub"].GetEntityType
-
- @property
- def create_entity_type(self):
- """Return the gRPC stub for :meth:`EntityTypesClient.create_entity_type`.
-
- Creates an entity type in the specified agent.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["entity_types_stub"].CreateEntityType
-
- @property
- def update_entity_type(self):
- """Return the gRPC stub for :meth:`EntityTypesClient.update_entity_type`.
-
- Updates the specified entity type.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["entity_types_stub"].UpdateEntityType
-
- @property
- def delete_entity_type(self):
- """Return the gRPC stub for :meth:`EntityTypesClient.delete_entity_type`.
-
- Deletes the specified entity type.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["entity_types_stub"].DeleteEntityType
-
- @property
- def batch_update_entity_types(self):
- """Return the gRPC stub for :meth:`EntityTypesClient.batch_update_entity_types`.
-
- Updates/Creates multiple entity types in the specified agent.
-
- Operation
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["entity_types_stub"].BatchUpdateEntityTypes
-
- @property
- def batch_delete_entity_types(self):
- """Return the gRPC stub for :meth:`EntityTypesClient.batch_delete_entity_types`.
-
- Deletes entity types in the specified agent.
-
- Operation
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["entity_types_stub"].BatchDeleteEntityTypes
-
- @property
- def batch_create_entities(self):
- """Return the gRPC stub for :meth:`EntityTypesClient.batch_create_entities`.
-
- Creates multiple new entities in the specified entity type.
-
- Operation
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["entity_types_stub"].BatchCreateEntities
-
- @property
- def batch_update_entities(self):
- """Return the gRPC stub for :meth:`EntityTypesClient.batch_update_entities`.
-
- Updates or creates multiple entities in the specified entity type.
- This method does not affect entities in the entity type that aren't
- explicitly specified in the request.
-
- Operation
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["entity_types_stub"].BatchUpdateEntities
-
- @property
- def batch_delete_entities(self):
- """Return the gRPC stub for :meth:`EntityTypesClient.batch_delete_entities`.
-
- Deletes entities in the specified entity type.
-
- Operation
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["entity_types_stub"].BatchDeleteEntities
diff --git a/dialogflow_v2/gapic/transports/environments_grpc_transport.py b/dialogflow_v2/gapic/transports/environments_grpc_transport.py
deleted file mode 100644
index e9ea3719b..000000000
--- a/dialogflow_v2/gapic/transports/environments_grpc_transport.py
+++ /dev/null
@@ -1,124 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright 2020 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-import google.api_core.grpc_helpers
-
-from dialogflow_v2.proto import environment_pb2_grpc
-
-
-class EnvironmentsGrpcTransport(object):
- """gRPC transport class providing stubs for
- google.cloud.dialogflow.v2 Environments API.
-
- The transport provides access to the raw gRPC stubs,
- which can be used to take advantage of advanced
- features of gRPC.
- """
-
- # The scopes needed to make gRPC calls to all of the methods defined
- # in this service.
- _OAUTH_SCOPES = (
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/dialogflow",
- )
-
- def __init__(
- self, channel=None, credentials=None, address="dialogflow.googleapis.com:443"
- ):
- """Instantiate the transport class.
-
- Args:
- channel (grpc.Channel): A ``Channel`` instance through
- which to make calls. This argument is mutually exclusive
- with ``credentials``; providing both will raise an exception.
- credentials (google.auth.credentials.Credentials): The
- authorization credentials to attach to requests. These
- credentials identify this application to the service. If none
- are specified, the client will attempt to ascertain the
- credentials from the environment.
- address (str): The address where the service is hosted.
- """
- # If both `channel` and `credentials` are specified, raise an
- # exception (channels come with credentials baked in already).
- if channel is not None and credentials is not None:
- raise ValueError(
- "The `channel` and `credentials` arguments are mutually " "exclusive."
- )
-
- # Create the channel.
- if channel is None:
- channel = self.create_channel(
- address=address,
- credentials=credentials,
- options={
- "grpc.max_send_message_length": -1,
- "grpc.max_receive_message_length": -1,
- }.items(),
- )
-
- self._channel = channel
-
- # gRPC uses objects called "stubs" that are bound to the
- # channel and provide a basic method for each RPC.
- self._stubs = {
- "environments_stub": environment_pb2_grpc.EnvironmentsStub(channel)
- }
-
- @classmethod
- def create_channel(
- cls, address="dialogflow.googleapis.com:443", credentials=None, **kwargs
- ):
- """Create and return a gRPC channel object.
-
- Args:
- address (str): The host for the channel to use.
- credentials (~.Credentials): The
- authorization credentials to attach to requests. These
- credentials identify this application to the service. If
- none are specified, the client will attempt to ascertain
- the credentials from the environment.
- kwargs (dict): Keyword arguments, which are passed to the
- channel creation.
-
- Returns:
- grpc.Channel: A gRPC channel object.
- """
- return google.api_core.grpc_helpers.create_channel(
- address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs
- )
-
- @property
- def channel(self):
- """The gRPC channel used by the transport.
-
- Returns:
- grpc.Channel: A gRPC channel object.
- """
- return self._channel
-
- @property
- def list_environments(self):
- """Return the gRPC stub for :meth:`EnvironmentsClient.list_environments`.
-
- Returns the list of all non-draft environments of the specified agent.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["environments_stub"].ListEnvironments
diff --git a/dialogflow_v2/gapic/transports/intents_grpc_transport.py b/dialogflow_v2/gapic/transports/intents_grpc_transport.py
deleted file mode 100644
index 520c66ff8..000000000
--- a/dialogflow_v2/gapic/transports/intents_grpc_transport.py
+++ /dev/null
@@ -1,212 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright 2020 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-import google.api_core.grpc_helpers
-import google.api_core.operations_v1
-
-from dialogflow_v2.proto import intent_pb2_grpc
-
-
-class IntentsGrpcTransport(object):
- """gRPC transport class providing stubs for
- google.cloud.dialogflow.v2 Intents API.
-
- The transport provides access to the raw gRPC stubs,
- which can be used to take advantage of advanced
- features of gRPC.
- """
-
- # The scopes needed to make gRPC calls to all of the methods defined
- # in this service.
- _OAUTH_SCOPES = (
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/dialogflow",
- )
-
- def __init__(
- self, channel=None, credentials=None, address="dialogflow.googleapis.com:443"
- ):
- """Instantiate the transport class.
-
- Args:
- channel (grpc.Channel): A ``Channel`` instance through
- which to make calls. This argument is mutually exclusive
- with ``credentials``; providing both will raise an exception.
- credentials (google.auth.credentials.Credentials): The
- authorization credentials to attach to requests. These
- credentials identify this application to the service. If none
- are specified, the client will attempt to ascertain the
- credentials from the environment.
- address (str): The address where the service is hosted.
- """
- # If both `channel` and `credentials` are specified, raise an
- # exception (channels come with credentials baked in already).
- if channel is not None and credentials is not None:
- raise ValueError(
- "The `channel` and `credentials` arguments are mutually " "exclusive."
- )
-
- # Create the channel.
- if channel is None:
- channel = self.create_channel(
- address=address,
- credentials=credentials,
- options={
- "grpc.max_send_message_length": -1,
- "grpc.max_receive_message_length": -1,
- }.items(),
- )
-
- self._channel = channel
-
- # gRPC uses objects called "stubs" that are bound to the
- # channel and provide a basic method for each RPC.
- self._stubs = {"intents_stub": intent_pb2_grpc.IntentsStub(channel)}
-
- # Because this API includes a method that returns a
- # long-running operation (proto: google.longrunning.Operation),
- # instantiate an LRO client.
- self._operations_client = google.api_core.operations_v1.OperationsClient(
- channel
- )
-
- @classmethod
- def create_channel(
- cls, address="dialogflow.googleapis.com:443", credentials=None, **kwargs
- ):
- """Create and return a gRPC channel object.
-
- Args:
- address (str): The host for the channel to use.
- credentials (~.Credentials): The
- authorization credentials to attach to requests. These
- credentials identify this application to the service. If
- none are specified, the client will attempt to ascertain
- the credentials from the environment.
- kwargs (dict): Keyword arguments, which are passed to the
- channel creation.
-
- Returns:
- grpc.Channel: A gRPC channel object.
- """
- return google.api_core.grpc_helpers.create_channel(
- address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs
- )
-
- @property
- def channel(self):
- """The gRPC channel used by the transport.
-
- Returns:
- grpc.Channel: A gRPC channel object.
- """
- return self._channel
-
- @property
- def list_intents(self):
- """Return the gRPC stub for :meth:`IntentsClient.list_intents`.
-
- Returns the list of all intents in the specified agent.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["intents_stub"].ListIntents
-
- @property
- def get_intent(self):
- """Return the gRPC stub for :meth:`IntentsClient.get_intent`.
-
- Retrieves the specified intent.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["intents_stub"].GetIntent
-
- @property
- def create_intent(self):
- """Return the gRPC stub for :meth:`IntentsClient.create_intent`.
-
- Creates an intent in the specified agent.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["intents_stub"].CreateIntent
-
- @property
- def update_intent(self):
- """Return the gRPC stub for :meth:`IntentsClient.update_intent`.
-
- Updates the specified intent.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["intents_stub"].UpdateIntent
-
- @property
- def delete_intent(self):
- """Return the gRPC stub for :meth:`IntentsClient.delete_intent`.
-
- Deletes the specified intent and its direct or indirect followup intents.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["intents_stub"].DeleteIntent
-
- @property
- def batch_update_intents(self):
- """Return the gRPC stub for :meth:`IntentsClient.batch_update_intents`.
-
- Updates/Creates multiple intents in the specified agent.
-
- Operation
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["intents_stub"].BatchUpdateIntents
-
- @property
- def batch_delete_intents(self):
- """Return the gRPC stub for :meth:`IntentsClient.batch_delete_intents`.
-
- Deletes intents in the specified agent.
-
- Operation
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["intents_stub"].BatchDeleteIntents
diff --git a/dialogflow_v2/gapic/transports/session_entity_types_grpc_transport.py b/dialogflow_v2/gapic/transports/session_entity_types_grpc_transport.py
deleted file mode 100644
index ab03ff5ea..000000000
--- a/dialogflow_v2/gapic/transports/session_entity_types_grpc_transport.py
+++ /dev/null
@@ -1,201 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright 2020 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-import google.api_core.grpc_helpers
-
-from dialogflow_v2.proto import session_entity_type_pb2_grpc
-
-
-class SessionEntityTypesGrpcTransport(object):
- """gRPC transport class providing stubs for
- google.cloud.dialogflow.v2 SessionEntityTypes API.
-
- The transport provides access to the raw gRPC stubs,
- which can be used to take advantage of advanced
- features of gRPC.
- """
-
- # The scopes needed to make gRPC calls to all of the methods defined
- # in this service.
- _OAUTH_SCOPES = (
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/dialogflow",
- )
-
- def __init__(
- self, channel=None, credentials=None, address="dialogflow.googleapis.com:443"
- ):
- """Instantiate the transport class.
-
- Args:
- channel (grpc.Channel): A ``Channel`` instance through
- which to make calls. This argument is mutually exclusive
- with ``credentials``; providing both will raise an exception.
- credentials (google.auth.credentials.Credentials): The
- authorization credentials to attach to requests. These
- credentials identify this application to the service. If none
- are specified, the client will attempt to ascertain the
- credentials from the environment.
- address (str): The address where the service is hosted.
- """
- # If both `channel` and `credentials` are specified, raise an
- # exception (channels come with credentials baked in already).
- if channel is not None and credentials is not None:
- raise ValueError(
- "The `channel` and `credentials` arguments are mutually " "exclusive."
- )
-
- # Create the channel.
- if channel is None:
- channel = self.create_channel(
- address=address,
- credentials=credentials,
- options={
- "grpc.max_send_message_length": -1,
- "grpc.max_receive_message_length": -1,
- }.items(),
- )
-
- self._channel = channel
-
- # gRPC uses objects called "stubs" that are bound to the
- # channel and provide a basic method for each RPC.
- self._stubs = {
- "session_entity_types_stub": session_entity_type_pb2_grpc.SessionEntityTypesStub(
- channel
- )
- }
-
- @classmethod
- def create_channel(
- cls, address="dialogflow.googleapis.com:443", credentials=None, **kwargs
- ):
- """Create and return a gRPC channel object.
-
- Args:
- address (str): The host for the channel to use.
- credentials (~.Credentials): The
- authorization credentials to attach to requests. These
- credentials identify this application to the service. If
- none are specified, the client will attempt to ascertain
- the credentials from the environment.
- kwargs (dict): Keyword arguments, which are passed to the
- channel creation.
-
- Returns:
- grpc.Channel: A gRPC channel object.
- """
- return google.api_core.grpc_helpers.create_channel(
- address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs
- )
-
- @property
- def channel(self):
- """The gRPC channel used by the transport.
-
- Returns:
- grpc.Channel: A gRPC channel object.
- """
- return self._channel
-
- @property
- def list_session_entity_types(self):
- """Return the gRPC stub for :meth:`SessionEntityTypesClient.list_session_entity_types`.
-
- Returns the list of all session entity types in the specified session.
-
- This method doesn't work with Google Assistant integration.
- Contact Dialogflow support if you need to use session entities
- with Google Assistant integration.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["session_entity_types_stub"].ListSessionEntityTypes
-
- @property
- def get_session_entity_type(self):
- """Return the gRPC stub for :meth:`SessionEntityTypesClient.get_session_entity_type`.
-
- Retrieves the specified session entity type.
-
- This method doesn't work with Google Assistant integration.
- Contact Dialogflow support if you need to use session entities
- with Google Assistant integration.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["session_entity_types_stub"].GetSessionEntityType
-
- @property
- def create_session_entity_type(self):
- """Return the gRPC stub for :meth:`SessionEntityTypesClient.create_session_entity_type`.
-
- Creates a session entity type.
-
- If the specified session entity type already exists, overrides the session
- entity type.
-
- This method doesn't work with Google Assistant integration.
- Contact Dialogflow support if you need to use session entities
- with Google Assistant integration.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["session_entity_types_stub"].CreateSessionEntityType
-
- @property
- def update_session_entity_type(self):
- """Return the gRPC stub for :meth:`SessionEntityTypesClient.update_session_entity_type`.
-
- Updates the specified session entity type.
-
- This method doesn't work with Google Assistant integration.
- Contact Dialogflow support if you need to use session entities
- with Google Assistant integration.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["session_entity_types_stub"].UpdateSessionEntityType
-
- @property
- def delete_session_entity_type(self):
- """Return the gRPC stub for :meth:`SessionEntityTypesClient.delete_session_entity_type`.
-
- Deletes the specified session entity type.
-
- This method doesn't work with Google Assistant integration.
- Contact Dialogflow support if you need to use session entities
- with Google Assistant integration.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["session_entity_types_stub"].DeleteSessionEntityType
diff --git a/dialogflow_v2/gapic/transports/sessions_grpc_transport.py b/dialogflow_v2/gapic/transports/sessions_grpc_transport.py
deleted file mode 100644
index fa9773ddb..000000000
--- a/dialogflow_v2/gapic/transports/sessions_grpc_transport.py
+++ /dev/null
@@ -1,140 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright 2020 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-import google.api_core.grpc_helpers
-
-from dialogflow_v2.proto import session_pb2_grpc
-
-
-class SessionsGrpcTransport(object):
- """gRPC transport class providing stubs for
- google.cloud.dialogflow.v2 Sessions API.
-
- The transport provides access to the raw gRPC stubs,
- which can be used to take advantage of advanced
- features of gRPC.
- """
-
- # The scopes needed to make gRPC calls to all of the methods defined
- # in this service.
- _OAUTH_SCOPES = (
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/dialogflow",
- )
-
- def __init__(
- self, channel=None, credentials=None, address="dialogflow.googleapis.com:443"
- ):
- """Instantiate the transport class.
-
- Args:
- channel (grpc.Channel): A ``Channel`` instance through
- which to make calls. This argument is mutually exclusive
- with ``credentials``; providing both will raise an exception.
- credentials (google.auth.credentials.Credentials): The
- authorization credentials to attach to requests. These
- credentials identify this application to the service. If none
- are specified, the client will attempt to ascertain the
- credentials from the environment.
- address (str): The address where the service is hosted.
- """
- # If both `channel` and `credentials` are specified, raise an
- # exception (channels come with credentials baked in already).
- if channel is not None and credentials is not None:
- raise ValueError(
- "The `channel` and `credentials` arguments are mutually " "exclusive."
- )
-
- # Create the channel.
- if channel is None:
- channel = self.create_channel(
- address=address,
- credentials=credentials,
- options={
- "grpc.max_send_message_length": -1,
- "grpc.max_receive_message_length": -1,
- }.items(),
- )
-
- self._channel = channel
-
- # gRPC uses objects called "stubs" that are bound to the
- # channel and provide a basic method for each RPC.
- self._stubs = {"sessions_stub": session_pb2_grpc.SessionsStub(channel)}
-
- @classmethod
- def create_channel(
- cls, address="dialogflow.googleapis.com:443", credentials=None, **kwargs
- ):
- """Create and return a gRPC channel object.
-
- Args:
- address (str): The host for the channel to use.
- credentials (~.Credentials): The
- authorization credentials to attach to requests. These
- credentials identify this application to the service. If
- none are specified, the client will attempt to ascertain
- the credentials from the environment.
- kwargs (dict): Keyword arguments, which are passed to the
- channel creation.
-
- Returns:
- grpc.Channel: A gRPC channel object.
- """
- return google.api_core.grpc_helpers.create_channel(
- address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs
- )
-
- @property
- def channel(self):
- """The gRPC channel used by the transport.
-
- Returns:
- grpc.Channel: A gRPC channel object.
- """
- return self._channel
-
- @property
- def detect_intent(self):
- """Return the gRPC stub for :meth:`SessionsClient.detect_intent`.
-
- Processes a natural language query and returns structured, actionable data
- 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.
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["sessions_stub"].DetectIntent
-
- @property
- def streaming_detect_intent(self):
- """Return the gRPC stub for :meth:`SessionsClient.streaming_detect_intent`.
-
- 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).
-
- Returns:
- Callable: A callable which accepts the appropriate
- deserialized request object and returns a
- deserialized response object.
- """
- return self._stubs["sessions_stub"].StreamingDetectIntent
diff --git a/dialogflow_v2/proto/__init__.py b/dialogflow_v2/proto/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/dialogflow_v2/proto/agent_pb2.py b/dialogflow_v2/proto/agent_pb2.py
deleted file mode 100644
index 0fe9c9f82..000000000
--- a/dialogflow_v2/proto/agent_pb2.py
+++ /dev/null
@@ -1,1640 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: google/cloud/dialogflow_v2/proto/agent.proto
-"""Generated protocol buffer code."""
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
-from google.api import client_pb2 as google_dot_api_dot_client__pb2
-from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2
-from google.api import resource_pb2 as google_dot_api_dot_resource__pb2
-from dialogflow_v2.proto import (
- validation_result_pb2 as google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_validation__result__pb2,
-)
-from google.longrunning import (
- operations_pb2 as google_dot_longrunning_dot_operations__pb2,
-)
-from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
-from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
- name="google/cloud/dialogflow_v2/proto/agent.proto",
- package="google.cloud.dialogflow.v2",
- syntax="proto3",
- serialized_options=b"\n\036com.google.cloud.dialogflow.v2B\nAgentProtoP\001ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2",
- create_key=_descriptor._internal_create_key,
- serialized_pb=b'\n,google/cloud/dialogflow_v2/proto/agent.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/dialogflow_v2/proto/validation_result.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto"\xf0\x06\n\x05\x41gent\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12"\n\x15\x64\x65\x66\x61ult_language_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12%\n\x18supported_language_codes\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\navatar_uri\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0e\x65nable_logging\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x12\x44\n\nmatch_mode\x18\t \x01(\x0e\x32+.google.cloud.dialogflow.v2.Agent.MatchModeB\x03\xe0\x41\x01\x12%\n\x18\x63lassification_threshold\x18\n \x01(\x02\x42\x03\xe0\x41\x01\x12\x46\n\x0b\x61pi_version\x18\x0e \x01(\x0e\x32,.google.cloud.dialogflow.v2.Agent.ApiVersionB\x03\xe0\x41\x01\x12\x39\n\x04tier\x18\x0f \x01(\x0e\x32&.google.cloud.dialogflow.v2.Agent.TierB\x03\xe0\x41\x01"V\n\tMatchMode\x12\x1a\n\x16MATCH_MODE_UNSPECIFIED\x10\x00\x12\x15\n\x11MATCH_MODE_HYBRID\x10\x01\x12\x16\n\x12MATCH_MODE_ML_ONLY\x10\x02"l\n\nApiVersion\x12\x1b\n\x17\x41PI_VERSION_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x41PI_VERSION_V1\x10\x01\x12\x12\n\x0e\x41PI_VERSION_V2\x10\x02\x12\x19\n\x15\x41PI_VERSION_V2_BETA_1\x10\x03"^\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\x11\n\rTIER_STANDARD\x10\x01\x12\x13\n\x0fTIER_ENTERPRISE\x10\x02\x12\x18\n\x14TIER_ENTERPRISE_PLUS\x10\x03:>\xea\x41;\n\x1f\x64ialogflow.googleapis.com/Agent\x12\x18projects/{project}/agent"J\n\x0fGetAgentRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64ialogflow.googleapis.com/Agent"~\n\x0fSetAgentRequest\x12\x35\n\x05\x61gent\x18\x01 \x01(\x0b\x32!.google.cloud.dialogflow.v2.AgentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"M\n\x12\x44\x65leteAgentRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64ialogflow.googleapis.com/Agent"z\n\x13SearchAgentsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64ialogflow.googleapis.com/Agent\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x12\n\npage_token\x18\x03 \x01(\t"b\n\x14SearchAgentsResponse\x12\x31\n\x06\x61gents\x18\x01 \x03(\x0b\x32!.google.cloud.dialogflow.v2.Agent\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"L\n\x11TrainAgentRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64ialogflow.googleapis.com/Agent"e\n\x12\x45xportAgentRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64ialogflow.googleapis.com/Agent\x12\x16\n\tagent_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02"L\n\x13\x45xportAgentResponse\x12\x13\n\tagent_uri\x18\x01 \x01(\tH\x00\x12\x17\n\ragent_content\x18\x02 \x01(\x0cH\x00\x42\x07\n\x05\x61gent"\x84\x01\n\x12ImportAgentRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64ialogflow.googleapis.com/Agent\x12\x13\n\tagent_uri\x18\x02 \x01(\tH\x00\x12\x17\n\ragent_content\x18\x03 \x01(\x0cH\x00\x42\x07\n\x05\x61gent"\x85\x01\n\x13RestoreAgentRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64ialogflow.googleapis.com/Agent\x12\x13\n\tagent_uri\x18\x02 \x01(\tH\x00\x12\x17\n\ragent_content\x18\x03 \x01(\x0cH\x00\x42\x07\n\x05\x61gent"q\n\x1aGetValidationResultRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64ialogflow.googleapis.com/Agent\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x32\xc5\r\n\x06\x41gents\x12\x8a\x01\n\x08GetAgent\x12+.google.cloud.dialogflow.v2.GetAgentRequest\x1a!.google.cloud.dialogflow.v2.Agent".\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v2/{parent=projects/*}/agent\xda\x41\x06parent\x12\x96\x01\n\x08SetAgent\x12+.google.cloud.dialogflow.v2.SetAgentRequest\x1a!.google.cloud.dialogflow.v2.Agent":\x82\xd3\xe4\x93\x02,"#/v2/{agent.parent=projects/*}/agent:\x05\x61gent\xda\x41\x05\x61gent\x12\x85\x01\n\x0b\x44\x65leteAgent\x12..google.cloud.dialogflow.v2.DeleteAgentRequest\x1a\x16.google.protobuf.Empty".\x82\xd3\xe4\x93\x02\x1f*\x1d/v2/{parent=projects/*}/agent\xda\x41\x06parent\x12\xa8\x01\n\x0cSearchAgents\x12/.google.cloud.dialogflow.v2.SearchAgentsRequest\x1a\x30.google.cloud.dialogflow.v2.SearchAgentsResponse"5\x82\xd3\xe4\x93\x02&\x12$/v2/{parent=projects/*}/agent:search\xda\x41\x06parent\x12\xc5\x01\n\nTrainAgent\x12-.google.cloud.dialogflow.v2.TrainAgentRequest\x1a\x1d.google.longrunning.Operation"i\x82\xd3\xe4\x93\x02("#/v2/{parent=projects/*}/agent:train:\x01*\xda\x41\x06parent\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x12\xe2\x01\n\x0b\x45xportAgent\x12..google.cloud.dialogflow.v2.ExportAgentRequest\x1a\x1d.google.longrunning.Operation"\x83\x01\x82\xd3\xe4\x93\x02)"$/v2/{parent=projects/*}/agent:export:\x01*\xda\x41\x06parent\xca\x41H\n.google.cloud.dialogflow.v2.ExportAgentResponse\x12\x16google.protobuf.Struct\x12\xbf\x01\n\x0bImportAgent\x12..google.cloud.dialogflow.v2.ImportAgentRequest\x1a\x1d.google.longrunning.Operation"a\x82\xd3\xe4\x93\x02)"$/v2/{parent=projects/*}/agent:import:\x01*\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x12\xc2\x01\n\x0cRestoreAgent\x12/.google.cloud.dialogflow.v2.RestoreAgentRequest\x1a\x1d.google.longrunning.Operation"b\x82\xd3\xe4\x93\x02*"%/v2/{parent=projects/*}/agent:restore:\x01*\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x12\xb3\x01\n\x13GetValidationResult\x12\x36.google.cloud.dialogflow.v2.GetValidationResultRequest\x1a,.google.cloud.dialogflow.v2.ValidationResult"6\x82\xd3\xe4\x93\x02\x30\x12./v2/{parent=projects/*}/agent/validationResult\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\x99\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\nAgentProtoP\x01ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3',
- dependencies=[
- google_dot_api_dot_annotations__pb2.DESCRIPTOR,
- google_dot_api_dot_client__pb2.DESCRIPTOR,
- google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,
- google_dot_api_dot_resource__pb2.DESCRIPTOR,
- google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_validation__result__pb2.DESCRIPTOR,
- google_dot_longrunning_dot_operations__pb2.DESCRIPTOR,
- google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,
- google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR,
- ],
-)
-
-
-_AGENT_MATCHMODE = _descriptor.EnumDescriptor(
- name="MatchMode",
- full_name="google.cloud.dialogflow.v2.Agent.MatchMode",
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name="MATCH_MODE_UNSPECIFIED",
- index=0,
- number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="MATCH_MODE_HYBRID",
- index=1,
- number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="MATCH_MODE_ML_ONLY",
- index=2,
- number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=874,
- serialized_end=960,
-)
-_sym_db.RegisterEnumDescriptor(_AGENT_MATCHMODE)
-
-_AGENT_APIVERSION = _descriptor.EnumDescriptor(
- name="ApiVersion",
- full_name="google.cloud.dialogflow.v2.Agent.ApiVersion",
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name="API_VERSION_UNSPECIFIED",
- index=0,
- number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="API_VERSION_V1",
- index=1,
- number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="API_VERSION_V2",
- index=2,
- number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="API_VERSION_V2_BETA_1",
- index=3,
- number=3,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=962,
- serialized_end=1070,
-)
-_sym_db.RegisterEnumDescriptor(_AGENT_APIVERSION)
-
-_AGENT_TIER = _descriptor.EnumDescriptor(
- name="Tier",
- full_name="google.cloud.dialogflow.v2.Agent.Tier",
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name="TIER_UNSPECIFIED",
- index=0,
- number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="TIER_STANDARD",
- index=1,
- number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="TIER_ENTERPRISE",
- index=2,
- number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="TIER_ENTERPRISE_PLUS",
- index=3,
- number=3,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=1072,
- serialized_end=1166,
-)
-_sym_db.RegisterEnumDescriptor(_AGENT_TIER)
-
-
-_AGENT = _descriptor.Descriptor(
- name="Agent",
- full_name="google.cloud.dialogflow.v2.Agent",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="parent",
- full_name="google.cloud.dialogflow.v2.Agent.parent",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="display_name",
- full_name="google.cloud.dialogflow.v2.Agent.display_name",
- index=1,
- number=2,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="default_language_code",
- full_name="google.cloud.dialogflow.v2.Agent.default_language_code",
- index=2,
- number=3,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="supported_language_codes",
- full_name="google.cloud.dialogflow.v2.Agent.supported_language_codes",
- index=3,
- number=4,
- type=9,
- cpp_type=9,
- label=3,
- has_default_value=False,
- default_value=[],
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="time_zone",
- full_name="google.cloud.dialogflow.v2.Agent.time_zone",
- index=4,
- number=5,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="description",
- full_name="google.cloud.dialogflow.v2.Agent.description",
- index=5,
- number=6,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="avatar_uri",
- full_name="google.cloud.dialogflow.v2.Agent.avatar_uri",
- index=6,
- number=7,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="enable_logging",
- full_name="google.cloud.dialogflow.v2.Agent.enable_logging",
- index=7,
- number=8,
- type=8,
- cpp_type=7,
- label=1,
- has_default_value=False,
- default_value=False,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="match_mode",
- full_name="google.cloud.dialogflow.v2.Agent.match_mode",
- index=8,
- number=9,
- type=14,
- cpp_type=8,
- label=1,
- has_default_value=False,
- default_value=0,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="classification_threshold",
- full_name="google.cloud.dialogflow.v2.Agent.classification_threshold",
- index=9,
- number=10,
- type=2,
- cpp_type=6,
- label=1,
- has_default_value=False,
- default_value=float(0),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="api_version",
- full_name="google.cloud.dialogflow.v2.Agent.api_version",
- index=10,
- number=14,
- type=14,
- cpp_type=8,
- label=1,
- has_default_value=False,
- default_value=0,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="tier",
- full_name="google.cloud.dialogflow.v2.Agent.tier",
- index=11,
- number=15,
- type=14,
- cpp_type=8,
- label=1,
- has_default_value=False,
- default_value=0,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[_AGENT_MATCHMODE, _AGENT_APIVERSION, _AGENT_TIER],
- serialized_options=b"\352A;\n\037dialogflow.googleapis.com/Agent\022\030projects/{project}/agent",
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=350,
- serialized_end=1230,
-)
-
-
-_GETAGENTREQUEST = _descriptor.Descriptor(
- name="GetAgentRequest",
- full_name="google.cloud.dialogflow.v2.GetAgentRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="parent",
- full_name="google.cloud.dialogflow.v2.GetAgentRequest.parent",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002\372A!\022\037dialogflow.googleapis.com/Agent",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- )
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=1232,
- serialized_end=1306,
-)
-
-
-_SETAGENTREQUEST = _descriptor.Descriptor(
- name="SetAgentRequest",
- full_name="google.cloud.dialogflow.v2.SetAgentRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="agent",
- full_name="google.cloud.dialogflow.v2.SetAgentRequest.agent",
- index=0,
- number=1,
- type=11,
- cpp_type=10,
- label=1,
- has_default_value=False,
- default_value=None,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="update_mask",
- full_name="google.cloud.dialogflow.v2.SetAgentRequest.update_mask",
- index=1,
- number=2,
- type=11,
- cpp_type=10,
- label=1,
- has_default_value=False,
- default_value=None,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=1308,
- serialized_end=1434,
-)
-
-
-_DELETEAGENTREQUEST = _descriptor.Descriptor(
- name="DeleteAgentRequest",
- full_name="google.cloud.dialogflow.v2.DeleteAgentRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="parent",
- full_name="google.cloud.dialogflow.v2.DeleteAgentRequest.parent",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002\372A!\022\037dialogflow.googleapis.com/Agent",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- )
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=1436,
- serialized_end=1513,
-)
-
-
-_SEARCHAGENTSREQUEST = _descriptor.Descriptor(
- name="SearchAgentsRequest",
- full_name="google.cloud.dialogflow.v2.SearchAgentsRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="parent",
- full_name="google.cloud.dialogflow.v2.SearchAgentsRequest.parent",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002\372A!\022\037dialogflow.googleapis.com/Agent",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="page_size",
- full_name="google.cloud.dialogflow.v2.SearchAgentsRequest.page_size",
- index=1,
- number=2,
- type=5,
- cpp_type=1,
- label=1,
- has_default_value=False,
- default_value=0,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="page_token",
- full_name="google.cloud.dialogflow.v2.SearchAgentsRequest.page_token",
- index=2,
- number=3,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=1515,
- serialized_end=1637,
-)
-
-
-_SEARCHAGENTSRESPONSE = _descriptor.Descriptor(
- name="SearchAgentsResponse",
- full_name="google.cloud.dialogflow.v2.SearchAgentsResponse",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="agents",
- full_name="google.cloud.dialogflow.v2.SearchAgentsResponse.agents",
- index=0,
- number=1,
- type=11,
- cpp_type=10,
- label=3,
- has_default_value=False,
- default_value=[],
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="next_page_token",
- full_name="google.cloud.dialogflow.v2.SearchAgentsResponse.next_page_token",
- index=1,
- number=2,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=1639,
- serialized_end=1737,
-)
-
-
-_TRAINAGENTREQUEST = _descriptor.Descriptor(
- name="TrainAgentRequest",
- full_name="google.cloud.dialogflow.v2.TrainAgentRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="parent",
- full_name="google.cloud.dialogflow.v2.TrainAgentRequest.parent",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002\372A!\022\037dialogflow.googleapis.com/Agent",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- )
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=1739,
- serialized_end=1815,
-)
-
-
-_EXPORTAGENTREQUEST = _descriptor.Descriptor(
- name="ExportAgentRequest",
- full_name="google.cloud.dialogflow.v2.ExportAgentRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="parent",
- full_name="google.cloud.dialogflow.v2.ExportAgentRequest.parent",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002\372A!\022\037dialogflow.googleapis.com/Agent",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="agent_uri",
- full_name="google.cloud.dialogflow.v2.ExportAgentRequest.agent_uri",
- index=1,
- number=2,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=1817,
- serialized_end=1918,
-)
-
-
-_EXPORTAGENTRESPONSE = _descriptor.Descriptor(
- name="ExportAgentResponse",
- full_name="google.cloud.dialogflow.v2.ExportAgentResponse",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="agent_uri",
- full_name="google.cloud.dialogflow.v2.ExportAgentResponse.agent_uri",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="agent_content",
- full_name="google.cloud.dialogflow.v2.ExportAgentResponse.agent_content",
- index=1,
- number=2,
- type=12,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"",
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[
- _descriptor.OneofDescriptor(
- name="agent",
- full_name="google.cloud.dialogflow.v2.ExportAgentResponse.agent",
- index=0,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[],
- )
- ],
- serialized_start=1920,
- serialized_end=1996,
-)
-
-
-_IMPORTAGENTREQUEST = _descriptor.Descriptor(
- name="ImportAgentRequest",
- full_name="google.cloud.dialogflow.v2.ImportAgentRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="parent",
- full_name="google.cloud.dialogflow.v2.ImportAgentRequest.parent",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002\372A!\022\037dialogflow.googleapis.com/Agent",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="agent_uri",
- full_name="google.cloud.dialogflow.v2.ImportAgentRequest.agent_uri",
- index=1,
- number=2,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="agent_content",
- full_name="google.cloud.dialogflow.v2.ImportAgentRequest.agent_content",
- index=2,
- number=3,
- type=12,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"",
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[
- _descriptor.OneofDescriptor(
- name="agent",
- full_name="google.cloud.dialogflow.v2.ImportAgentRequest.agent",
- index=0,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[],
- )
- ],
- serialized_start=1999,
- serialized_end=2131,
-)
-
-
-_RESTOREAGENTREQUEST = _descriptor.Descriptor(
- name="RestoreAgentRequest",
- full_name="google.cloud.dialogflow.v2.RestoreAgentRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="parent",
- full_name="google.cloud.dialogflow.v2.RestoreAgentRequest.parent",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002\372A!\022\037dialogflow.googleapis.com/Agent",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="agent_uri",
- full_name="google.cloud.dialogflow.v2.RestoreAgentRequest.agent_uri",
- index=1,
- number=2,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="agent_content",
- full_name="google.cloud.dialogflow.v2.RestoreAgentRequest.agent_content",
- index=2,
- number=3,
- type=12,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"",
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[
- _descriptor.OneofDescriptor(
- name="agent",
- full_name="google.cloud.dialogflow.v2.RestoreAgentRequest.agent",
- index=0,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[],
- )
- ],
- serialized_start=2134,
- serialized_end=2267,
-)
-
-
-_GETVALIDATIONRESULTREQUEST = _descriptor.Descriptor(
- name="GetValidationResultRequest",
- full_name="google.cloud.dialogflow.v2.GetValidationResultRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="parent",
- full_name="google.cloud.dialogflow.v2.GetValidationResultRequest.parent",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002\372A!\022\037dialogflow.googleapis.com/Agent",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="language_code",
- full_name="google.cloud.dialogflow.v2.GetValidationResultRequest.language_code",
- index=1,
- number=3,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=2269,
- serialized_end=2382,
-)
-
-_AGENT.fields_by_name["match_mode"].enum_type = _AGENT_MATCHMODE
-_AGENT.fields_by_name["api_version"].enum_type = _AGENT_APIVERSION
-_AGENT.fields_by_name["tier"].enum_type = _AGENT_TIER
-_AGENT_MATCHMODE.containing_type = _AGENT
-_AGENT_APIVERSION.containing_type = _AGENT
-_AGENT_TIER.containing_type = _AGENT
-_SETAGENTREQUEST.fields_by_name["agent"].message_type = _AGENT
-_SETAGENTREQUEST.fields_by_name[
- "update_mask"
-].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK
-_SEARCHAGENTSRESPONSE.fields_by_name["agents"].message_type = _AGENT
-_EXPORTAGENTRESPONSE.oneofs_by_name["agent"].fields.append(
- _EXPORTAGENTRESPONSE.fields_by_name["agent_uri"]
-)
-_EXPORTAGENTRESPONSE.fields_by_name[
- "agent_uri"
-].containing_oneof = _EXPORTAGENTRESPONSE.oneofs_by_name["agent"]
-_EXPORTAGENTRESPONSE.oneofs_by_name["agent"].fields.append(
- _EXPORTAGENTRESPONSE.fields_by_name["agent_content"]
-)
-_EXPORTAGENTRESPONSE.fields_by_name[
- "agent_content"
-].containing_oneof = _EXPORTAGENTRESPONSE.oneofs_by_name["agent"]
-_IMPORTAGENTREQUEST.oneofs_by_name["agent"].fields.append(
- _IMPORTAGENTREQUEST.fields_by_name["agent_uri"]
-)
-_IMPORTAGENTREQUEST.fields_by_name[
- "agent_uri"
-].containing_oneof = _IMPORTAGENTREQUEST.oneofs_by_name["agent"]
-_IMPORTAGENTREQUEST.oneofs_by_name["agent"].fields.append(
- _IMPORTAGENTREQUEST.fields_by_name["agent_content"]
-)
-_IMPORTAGENTREQUEST.fields_by_name[
- "agent_content"
-].containing_oneof = _IMPORTAGENTREQUEST.oneofs_by_name["agent"]
-_RESTOREAGENTREQUEST.oneofs_by_name["agent"].fields.append(
- _RESTOREAGENTREQUEST.fields_by_name["agent_uri"]
-)
-_RESTOREAGENTREQUEST.fields_by_name[
- "agent_uri"
-].containing_oneof = _RESTOREAGENTREQUEST.oneofs_by_name["agent"]
-_RESTOREAGENTREQUEST.oneofs_by_name["agent"].fields.append(
- _RESTOREAGENTREQUEST.fields_by_name["agent_content"]
-)
-_RESTOREAGENTREQUEST.fields_by_name[
- "agent_content"
-].containing_oneof = _RESTOREAGENTREQUEST.oneofs_by_name["agent"]
-DESCRIPTOR.message_types_by_name["Agent"] = _AGENT
-DESCRIPTOR.message_types_by_name["GetAgentRequest"] = _GETAGENTREQUEST
-DESCRIPTOR.message_types_by_name["SetAgentRequest"] = _SETAGENTREQUEST
-DESCRIPTOR.message_types_by_name["DeleteAgentRequest"] = _DELETEAGENTREQUEST
-DESCRIPTOR.message_types_by_name["SearchAgentsRequest"] = _SEARCHAGENTSREQUEST
-DESCRIPTOR.message_types_by_name["SearchAgentsResponse"] = _SEARCHAGENTSRESPONSE
-DESCRIPTOR.message_types_by_name["TrainAgentRequest"] = _TRAINAGENTREQUEST
-DESCRIPTOR.message_types_by_name["ExportAgentRequest"] = _EXPORTAGENTREQUEST
-DESCRIPTOR.message_types_by_name["ExportAgentResponse"] = _EXPORTAGENTRESPONSE
-DESCRIPTOR.message_types_by_name["ImportAgentRequest"] = _IMPORTAGENTREQUEST
-DESCRIPTOR.message_types_by_name["RestoreAgentRequest"] = _RESTOREAGENTREQUEST
-DESCRIPTOR.message_types_by_name[
- "GetValidationResultRequest"
-] = _GETVALIDATIONRESULTREQUEST
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-Agent = _reflection.GeneratedProtocolMessageType(
- "Agent",
- (_message.Message,),
- {
- "DESCRIPTOR": _AGENT,
- "__module__": "google.cloud.dialogflow_v2.proto.agent_pb2",
- "__doc__": """A Dialogflow agent is a virtual agent that handles conversations with
- your end-users. It is a natural language understanding module that
- understands the nuances of human language. Dialogflow translates end-
- user text or audio during a conversation to structured data that your
- apps and services can understand. You design and build a Dialogflow
- agent to handle the types of conversations required for your system.
- For more information about agents, see the `Agent guide
- `__.
-
- Attributes:
- parent:
- Required. The project of this agent. Format:
- ``projects/``.
- display_name:
- Required. The name of this agent.
- default_language_code:
- Required. The default language of the agent as a language tag.
- See `Language Support `__ for a list of the currently supported
- language codes. This field cannot be set by the ``Update``
- method.
- supported_language_codes:
- Optional. The list of all languages supported by this agent
- (except for the ``default_language_code``).
- time_zone:
- Required. The time zone of this agent from the `time zone
- database `__, e.g.,
- America/New_York, Europe/Paris.
- description:
- Optional. The description of this agent. The maximum length is
- 500 characters. If exceeded, the request is rejected.
- avatar_uri:
- Optional. The URI of the agent’s avatar. Avatars are used
- throughout the Dialogflow console and in the self-hosted `Web
- Demo
- `__ integration.
- enable_logging:
- Optional. Determines whether this agent should log
- conversation queries.
- match_mode:
- Optional. Determines how intents are detected from user
- queries.
- classification_threshold:
- Optional. To filter out false positive results and still get
- variety in matched natural language inputs for your agent, you
- can tune the machine learning classification threshold. If the
- returned score value is less than the threshold value, then a
- fallback intent will be triggered or, if there are no fallback
- intents defined, no intent will be triggered. The score values
- range from 0.0 (completely uncertain) to 1.0 (completely
- certain). If set to 0.0, the default of 0.3 is used.
- api_version:
- Optional. API version displayed in Dialogflow console. If not
- specified, V2 API is assumed. Clients are free to query
- different service endpoints for different API versions.
- However, bots connectors and webhook calls will follow the
- specified API version.
- tier:
- Optional. The agent tier. If not specified, TIER_STANDARD is
- assumed.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Agent)
- },
-)
-_sym_db.RegisterMessage(Agent)
-
-GetAgentRequest = _reflection.GeneratedProtocolMessageType(
- "GetAgentRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _GETAGENTREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.agent_pb2",
- "__doc__": """The request message for
- [Agents.GetAgent][google.cloud.dialogflow.v2.Agents.GetAgent].
-
- Attributes:
- parent:
- Required. The project that the agent to fetch is associated
- with. Format: ``projects/``.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.GetAgentRequest)
- },
-)
-_sym_db.RegisterMessage(GetAgentRequest)
-
-SetAgentRequest = _reflection.GeneratedProtocolMessageType(
- "SetAgentRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _SETAGENTREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.agent_pb2",
- "__doc__": """The request message for
- [Agents.SetAgent][google.cloud.dialogflow.v2.Agents.SetAgent].
-
- Attributes:
- agent:
- Required. The agent to update.
- update_mask:
- Optional. The mask to control which fields get updated.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.SetAgentRequest)
- },
-)
-_sym_db.RegisterMessage(SetAgentRequest)
-
-DeleteAgentRequest = _reflection.GeneratedProtocolMessageType(
- "DeleteAgentRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _DELETEAGENTREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.agent_pb2",
- "__doc__": """The request message for
- [Agents.DeleteAgent][google.cloud.dialogflow.v2.Agents.DeleteAgent].
-
- Attributes:
- parent:
- Required. The project that the agent to delete is associated
- with. Format: ``projects/``.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.DeleteAgentRequest)
- },
-)
-_sym_db.RegisterMessage(DeleteAgentRequest)
-
-SearchAgentsRequest = _reflection.GeneratedProtocolMessageType(
- "SearchAgentsRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _SEARCHAGENTSREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.agent_pb2",
- "__doc__": """The request message for
- [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents].
-
- Attributes:
- parent:
- Required. The project to list agents from. Format:
- ``projects/``.
- page_size:
- Optional. The maximum number of items to return in a single
- page. By default 100 and at most 1000.
- page_token:
- The next_page_token value returned from a previous list
- request.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.SearchAgentsRequest)
- },
-)
-_sym_db.RegisterMessage(SearchAgentsRequest)
-
-SearchAgentsResponse = _reflection.GeneratedProtocolMessageType(
- "SearchAgentsResponse",
- (_message.Message,),
- {
- "DESCRIPTOR": _SEARCHAGENTSRESPONSE,
- "__module__": "google.cloud.dialogflow_v2.proto.agent_pb2",
- "__doc__": """The response message for
- [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents].
-
- Attributes:
- agents:
- The list of agents. There will be a maximum number of items
- returned based on the page_size field in the request.
- next_page_token:
- Token to retrieve the next page of results, or empty if there
- are no more results in the list.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.SearchAgentsResponse)
- },
-)
-_sym_db.RegisterMessage(SearchAgentsResponse)
-
-TrainAgentRequest = _reflection.GeneratedProtocolMessageType(
- "TrainAgentRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _TRAINAGENTREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.agent_pb2",
- "__doc__": """The request message for
- [Agents.TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent].
-
- Attributes:
- parent:
- Required. The project that the agent to train is associated
- with. Format: ``projects/``.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.TrainAgentRequest)
- },
-)
-_sym_db.RegisterMessage(TrainAgentRequest)
-
-ExportAgentRequest = _reflection.GeneratedProtocolMessageType(
- "ExportAgentRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _EXPORTAGENTREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.agent_pb2",
- "__doc__": """The request message for
- [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent].
-
- Attributes:
- parent:
- Required. The project that the agent to export is associated
- with. Format: ``projects/``.
- agent_uri:
- Required. The `Google Cloud Storage
- `__ URI to export the
- agent to. The format of this URI must be ``gs:///``. If left unspecified, the serialized
- agent is returned inline.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ExportAgentRequest)
- },
-)
-_sym_db.RegisterMessage(ExportAgentRequest)
-
-ExportAgentResponse = _reflection.GeneratedProtocolMessageType(
- "ExportAgentResponse",
- (_message.Message,),
- {
- "DESCRIPTOR": _EXPORTAGENTRESPONSE,
- "__module__": "google.cloud.dialogflow_v2.proto.agent_pb2",
- "__doc__": """The response message for
- [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent].
-
- Attributes:
- agent:
- The exported agent.
- agent_uri:
- The URI to a file containing the exported agent. This field is
- populated only if ``agent_uri`` is specified in
- ``ExportAgentRequest``.
- agent_content:
- Zip compressed raw byte content for agent.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ExportAgentResponse)
- },
-)
-_sym_db.RegisterMessage(ExportAgentResponse)
-
-ImportAgentRequest = _reflection.GeneratedProtocolMessageType(
- "ImportAgentRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _IMPORTAGENTREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.agent_pb2",
- "__doc__": """The request message for
- [Agents.ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent].
-
- Attributes:
- parent:
- Required. The project that the agent to import is associated
- with. Format: ``projects/``.
- agent:
- Required. The agent to import.
- agent_uri:
- The URI to a Google Cloud Storage file containing the agent to
- import. Note: The URI must start with “gs://”.
- agent_content:
- Zip compressed raw byte content for agent.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ImportAgentRequest)
- },
-)
-_sym_db.RegisterMessage(ImportAgentRequest)
-
-RestoreAgentRequest = _reflection.GeneratedProtocolMessageType(
- "RestoreAgentRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _RESTOREAGENTREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.agent_pb2",
- "__doc__": """The request message for
- [Agents.RestoreAgent][google.cloud.dialogflow.v2.Agents.RestoreAgent].
-
- Attributes:
- parent:
- Required. The project that the agent to restore is associated
- with. Format: ``projects/``.
- agent:
- Required. The agent to restore.
- agent_uri:
- The URI to a Google Cloud Storage file containing the agent to
- restore. Note: The URI must start with “gs://”.
- agent_content:
- Zip compressed raw byte content for agent.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.RestoreAgentRequest)
- },
-)
-_sym_db.RegisterMessage(RestoreAgentRequest)
-
-GetValidationResultRequest = _reflection.GeneratedProtocolMessageType(
- "GetValidationResultRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _GETVALIDATIONRESULTREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.agent_pb2",
- "__doc__": """The request message for [Agents.GetValidationResult][google.cloud.dial
- ogflow.v2.Agents.GetValidationResult].
-
- Attributes:
- parent:
- Required. The project that the agent is associated with.
- Format: ``projects/``.
- language_code:
- Optional. The language for which you want a validation result.
- If not specified, the agent’s default language is used. `Many
- languages `__ are supported. Note: languages must be enabled in
- the agent before they can be used.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.GetValidationResultRequest)
- },
-)
-_sym_db.RegisterMessage(GetValidationResultRequest)
-
-
-DESCRIPTOR._options = None
-_AGENT.fields_by_name["parent"]._options = None
-_AGENT.fields_by_name["display_name"]._options = None
-_AGENT.fields_by_name["default_language_code"]._options = None
-_AGENT.fields_by_name["supported_language_codes"]._options = None
-_AGENT.fields_by_name["time_zone"]._options = None
-_AGENT.fields_by_name["description"]._options = None
-_AGENT.fields_by_name["avatar_uri"]._options = None
-_AGENT.fields_by_name["enable_logging"]._options = None
-_AGENT.fields_by_name["match_mode"]._options = None
-_AGENT.fields_by_name["classification_threshold"]._options = None
-_AGENT.fields_by_name["api_version"]._options = None
-_AGENT.fields_by_name["tier"]._options = None
-_AGENT._options = None
-_GETAGENTREQUEST.fields_by_name["parent"]._options = None
-_SETAGENTREQUEST.fields_by_name["agent"]._options = None
-_SETAGENTREQUEST.fields_by_name["update_mask"]._options = None
-_DELETEAGENTREQUEST.fields_by_name["parent"]._options = None
-_SEARCHAGENTSREQUEST.fields_by_name["parent"]._options = None
-_SEARCHAGENTSREQUEST.fields_by_name["page_size"]._options = None
-_TRAINAGENTREQUEST.fields_by_name["parent"]._options = None
-_EXPORTAGENTREQUEST.fields_by_name["parent"]._options = None
-_EXPORTAGENTREQUEST.fields_by_name["agent_uri"]._options = None
-_IMPORTAGENTREQUEST.fields_by_name["parent"]._options = None
-_RESTOREAGENTREQUEST.fields_by_name["parent"]._options = None
-_GETVALIDATIONRESULTREQUEST.fields_by_name["parent"]._options = None
-_GETVALIDATIONRESULTREQUEST.fields_by_name["language_code"]._options = None
-
-_AGENTS = _descriptor.ServiceDescriptor(
- name="Agents",
- full_name="google.cloud.dialogflow.v2.Agents",
- file=DESCRIPTOR,
- index=0,
- serialized_options=b"\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow",
- create_key=_descriptor._internal_create_key,
- serialized_start=2385,
- serialized_end=4118,
- methods=[
- _descriptor.MethodDescriptor(
- name="GetAgent",
- full_name="google.cloud.dialogflow.v2.Agents.GetAgent",
- index=0,
- containing_service=None,
- input_type=_GETAGENTREQUEST,
- output_type=_AGENT,
- serialized_options=b"\202\323\344\223\002\037\022\035/v2/{parent=projects/*}/agent\332A\006parent",
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name="SetAgent",
- full_name="google.cloud.dialogflow.v2.Agents.SetAgent",
- index=1,
- containing_service=None,
- input_type=_SETAGENTREQUEST,
- output_type=_AGENT,
- serialized_options=b'\202\323\344\223\002,"#/v2/{agent.parent=projects/*}/agent:\005agent\332A\005agent',
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name="DeleteAgent",
- full_name="google.cloud.dialogflow.v2.Agents.DeleteAgent",
- index=2,
- containing_service=None,
- input_type=_DELETEAGENTREQUEST,
- output_type=google_dot_protobuf_dot_empty__pb2._EMPTY,
- serialized_options=b"\202\323\344\223\002\037*\035/v2/{parent=projects/*}/agent\332A\006parent",
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name="SearchAgents",
- full_name="google.cloud.dialogflow.v2.Agents.SearchAgents",
- index=3,
- containing_service=None,
- input_type=_SEARCHAGENTSREQUEST,
- output_type=_SEARCHAGENTSRESPONSE,
- serialized_options=b"\202\323\344\223\002&\022$/v2/{parent=projects/*}/agent:search\332A\006parent",
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name="TrainAgent",
- full_name="google.cloud.dialogflow.v2.Agents.TrainAgent",
- index=4,
- containing_service=None,
- input_type=_TRAINAGENTREQUEST,
- output_type=google_dot_longrunning_dot_operations__pb2._OPERATION,
- serialized_options=b'\202\323\344\223\002("#/v2/{parent=projects/*}/agent:train:\001*\332A\006parent\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct',
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name="ExportAgent",
- full_name="google.cloud.dialogflow.v2.Agents.ExportAgent",
- index=5,
- containing_service=None,
- input_type=_EXPORTAGENTREQUEST,
- output_type=google_dot_longrunning_dot_operations__pb2._OPERATION,
- serialized_options=b'\202\323\344\223\002)"$/v2/{parent=projects/*}/agent:export:\001*\332A\006parent\312AH\n.google.cloud.dialogflow.v2.ExportAgentResponse\022\026google.protobuf.Struct',
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name="ImportAgent",
- full_name="google.cloud.dialogflow.v2.Agents.ImportAgent",
- index=6,
- containing_service=None,
- input_type=_IMPORTAGENTREQUEST,
- output_type=google_dot_longrunning_dot_operations__pb2._OPERATION,
- serialized_options=b'\202\323\344\223\002)"$/v2/{parent=projects/*}/agent:import:\001*\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct',
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name="RestoreAgent",
- full_name="google.cloud.dialogflow.v2.Agents.RestoreAgent",
- index=7,
- containing_service=None,
- input_type=_RESTOREAGENTREQUEST,
- output_type=google_dot_longrunning_dot_operations__pb2._OPERATION,
- serialized_options=b'\202\323\344\223\002*"%/v2/{parent=projects/*}/agent:restore:\001*\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct',
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name="GetValidationResult",
- full_name="google.cloud.dialogflow.v2.Agents.GetValidationResult",
- index=8,
- containing_service=None,
- input_type=_GETVALIDATIONRESULTREQUEST,
- output_type=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_validation__result__pb2._VALIDATIONRESULT,
- serialized_options=b"\202\323\344\223\0020\022./v2/{parent=projects/*}/agent/validationResult",
- create_key=_descriptor._internal_create_key,
- ),
- ],
-)
-_sym_db.RegisterServiceDescriptor(_AGENTS)
-
-DESCRIPTOR.services_by_name["Agents"] = _AGENTS
-
-# @@protoc_insertion_point(module_scope)
diff --git a/dialogflow_v2/proto/agent_pb2_grpc.py b/dialogflow_v2/proto/agent_pb2_grpc.py
deleted file mode 100644
index 7daf4105f..000000000
--- a/dialogflow_v2/proto/agent_pb2_grpc.py
+++ /dev/null
@@ -1,476 +0,0 @@
-# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
-"""Client and server classes corresponding to protobuf-defined services."""
-import grpc
-
-from dialogflow_v2.proto import (
- agent_pb2 as google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2,
-)
-from dialogflow_v2.proto import (
- validation_result_pb2 as google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_validation__result__pb2,
-)
-from google.longrunning import (
- operations_pb2 as google_dot_longrunning_dot_operations__pb2,
-)
-from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
-
-
-class AgentsStub(object):
- """Service for managing [Agents][google.cloud.dialogflow.v2.Agent].
- """
-
- def __init__(self, channel):
- """Constructor.
-
- Args:
- channel: A grpc.Channel.
- """
- self.GetAgent = channel.unary_unary(
- "/google.cloud.dialogflow.v2.Agents/GetAgent",
- request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.GetAgentRequest.SerializeToString,
- response_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.Agent.FromString,
- )
- self.SetAgent = channel.unary_unary(
- "/google.cloud.dialogflow.v2.Agents/SetAgent",
- request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.SetAgentRequest.SerializeToString,
- response_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.Agent.FromString,
- )
- self.DeleteAgent = channel.unary_unary(
- "/google.cloud.dialogflow.v2.Agents/DeleteAgent",
- request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.DeleteAgentRequest.SerializeToString,
- response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
- )
- self.SearchAgents = channel.unary_unary(
- "/google.cloud.dialogflow.v2.Agents/SearchAgents",
- request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.SearchAgentsRequest.SerializeToString,
- response_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.SearchAgentsResponse.FromString,
- )
- self.TrainAgent = channel.unary_unary(
- "/google.cloud.dialogflow.v2.Agents/TrainAgent",
- request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.TrainAgentRequest.SerializeToString,
- response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString,
- )
- self.ExportAgent = channel.unary_unary(
- "/google.cloud.dialogflow.v2.Agents/ExportAgent",
- request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.ExportAgentRequest.SerializeToString,
- response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString,
- )
- self.ImportAgent = channel.unary_unary(
- "/google.cloud.dialogflow.v2.Agents/ImportAgent",
- request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.ImportAgentRequest.SerializeToString,
- response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString,
- )
- self.RestoreAgent = channel.unary_unary(
- "/google.cloud.dialogflow.v2.Agents/RestoreAgent",
- request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.RestoreAgentRequest.SerializeToString,
- response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString,
- )
- self.GetValidationResult = channel.unary_unary(
- "/google.cloud.dialogflow.v2.Agents/GetValidationResult",
- request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.GetValidationResultRequest.SerializeToString,
- response_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_validation__result__pb2.ValidationResult.FromString,
- )
-
-
-class AgentsServicer(object):
- """Service for managing [Agents][google.cloud.dialogflow.v2.Agent].
- """
-
- def GetAgent(self, request, context):
- """Retrieves the specified agent.
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details("Method not implemented!")
- raise NotImplementedError("Method not implemented!")
-
- def SetAgent(self, request, context):
- """Creates/updates the specified agent.
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details("Method not implemented!")
- raise NotImplementedError("Method not implemented!")
-
- def DeleteAgent(self, request, context):
- """Deletes the specified agent.
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details("Method not implemented!")
- raise NotImplementedError("Method not implemented!")
-
- def SearchAgents(self, request, context):
- """Returns the list of agents.
-
- Since there is at most one conversational agent per project, this method is
- useful primarily for listing all agents across projects the caller has
- access to. One can achieve that with a wildcard project collection id "-".
- Refer to [List
- Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details("Method not implemented!")
- raise NotImplementedError("Method not implemented!")
-
- def TrainAgent(self, request, context):
- """Trains the specified agent.
-
- Operation
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details("Method not implemented!")
- raise NotImplementedError("Method not implemented!")
-
- def ExportAgent(self, request, context):
- """Exports the specified agent to a ZIP file.
-
- Operation
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details("Method not implemented!")
- raise NotImplementedError("Method not implemented!")
-
- def ImportAgent(self, request, context):
- """Imports the specified agent from a ZIP file.
-
- Uploads new intents and entity types without deleting the existing ones.
- Intents and entity types with the same name are replaced with the new
- versions from [ImportAgentRequest][google.cloud.dialogflow.v2.ImportAgentRequest]. After the import, the imported draft
- agent will be trained automatically (unless disabled in agent settings).
- However, once the import is done, training may not be completed yet. Please
- call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it returns in order to train
- explicitly.
-
- Operation
- An operation which tracks when importing is complete. It only tracks
- when the draft agent is updated not when it is done training.
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details("Method not implemented!")
- raise NotImplementedError("Method not implemented!")
-
- def RestoreAgent(self, request, context):
- """Restores the specified agent from a ZIP file.
-
- Replaces the current agent version with a new one. All the intents and
- entity types in the older version are deleted. After the restore, the
- restored draft agent will be trained automatically (unless disabled in
- agent settings). However, once the restore is done, training may not be
- completed yet. Please call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it
- returns in order to train explicitly.
-
- Operation
- An operation which tracks when restoring is complete. It only tracks
- when the draft agent is updated not when it is done training.
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details("Method not implemented!")
- raise NotImplementedError("Method not implemented!")
-
- def GetValidationResult(self, request, context):
- """Gets agent validation result. Agent validation is performed during
- training time and is updated automatically when training is completed.
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details("Method not implemented!")
- raise NotImplementedError("Method not implemented!")
-
-
-def add_AgentsServicer_to_server(servicer, server):
- rpc_method_handlers = {
- "GetAgent": grpc.unary_unary_rpc_method_handler(
- servicer.GetAgent,
- request_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.GetAgentRequest.FromString,
- response_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.Agent.SerializeToString,
- ),
- "SetAgent": grpc.unary_unary_rpc_method_handler(
- servicer.SetAgent,
- request_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.SetAgentRequest.FromString,
- response_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.Agent.SerializeToString,
- ),
- "DeleteAgent": grpc.unary_unary_rpc_method_handler(
- servicer.DeleteAgent,
- request_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.DeleteAgentRequest.FromString,
- response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
- ),
- "SearchAgents": grpc.unary_unary_rpc_method_handler(
- servicer.SearchAgents,
- request_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.SearchAgentsRequest.FromString,
- response_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.SearchAgentsResponse.SerializeToString,
- ),
- "TrainAgent": grpc.unary_unary_rpc_method_handler(
- servicer.TrainAgent,
- request_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.TrainAgentRequest.FromString,
- response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString,
- ),
- "ExportAgent": grpc.unary_unary_rpc_method_handler(
- servicer.ExportAgent,
- request_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.ExportAgentRequest.FromString,
- response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString,
- ),
- "ImportAgent": grpc.unary_unary_rpc_method_handler(
- servicer.ImportAgent,
- request_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.ImportAgentRequest.FromString,
- response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString,
- ),
- "RestoreAgent": grpc.unary_unary_rpc_method_handler(
- servicer.RestoreAgent,
- request_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.RestoreAgentRequest.FromString,
- response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString,
- ),
- "GetValidationResult": grpc.unary_unary_rpc_method_handler(
- servicer.GetValidationResult,
- request_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.GetValidationResultRequest.FromString,
- response_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_validation__result__pb2.ValidationResult.SerializeToString,
- ),
- }
- generic_handler = grpc.method_handlers_generic_handler(
- "google.cloud.dialogflow.v2.Agents", rpc_method_handlers
- )
- server.add_generic_rpc_handlers((generic_handler,))
-
-
-# This class is part of an EXPERIMENTAL API.
-class Agents(object):
- """Service for managing [Agents][google.cloud.dialogflow.v2.Agent].
- """
-
- @staticmethod
- def GetAgent(
- request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None,
- ):
- return grpc.experimental.unary_unary(
- request,
- target,
- "/google.cloud.dialogflow.v2.Agents/GetAgent",
- google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.GetAgentRequest.SerializeToString,
- google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.Agent.FromString,
- options,
- channel_credentials,
- call_credentials,
- compression,
- wait_for_ready,
- timeout,
- metadata,
- )
-
- @staticmethod
- def SetAgent(
- request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None,
- ):
- return grpc.experimental.unary_unary(
- request,
- target,
- "/google.cloud.dialogflow.v2.Agents/SetAgent",
- google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.SetAgentRequest.SerializeToString,
- google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.Agent.FromString,
- options,
- channel_credentials,
- call_credentials,
- compression,
- wait_for_ready,
- timeout,
- metadata,
- )
-
- @staticmethod
- def DeleteAgent(
- request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None,
- ):
- return grpc.experimental.unary_unary(
- request,
- target,
- "/google.cloud.dialogflow.v2.Agents/DeleteAgent",
- google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.DeleteAgentRequest.SerializeToString,
- google_dot_protobuf_dot_empty__pb2.Empty.FromString,
- options,
- channel_credentials,
- call_credentials,
- compression,
- wait_for_ready,
- timeout,
- metadata,
- )
-
- @staticmethod
- def SearchAgents(
- request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None,
- ):
- return grpc.experimental.unary_unary(
- request,
- target,
- "/google.cloud.dialogflow.v2.Agents/SearchAgents",
- google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.SearchAgentsRequest.SerializeToString,
- google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.SearchAgentsResponse.FromString,
- options,
- channel_credentials,
- call_credentials,
- compression,
- wait_for_ready,
- timeout,
- metadata,
- )
-
- @staticmethod
- def TrainAgent(
- request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None,
- ):
- return grpc.experimental.unary_unary(
- request,
- target,
- "/google.cloud.dialogflow.v2.Agents/TrainAgent",
- google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.TrainAgentRequest.SerializeToString,
- google_dot_longrunning_dot_operations__pb2.Operation.FromString,
- options,
- channel_credentials,
- call_credentials,
- compression,
- wait_for_ready,
- timeout,
- metadata,
- )
-
- @staticmethod
- def ExportAgent(
- request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None,
- ):
- return grpc.experimental.unary_unary(
- request,
- target,
- "/google.cloud.dialogflow.v2.Agents/ExportAgent",
- google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.ExportAgentRequest.SerializeToString,
- google_dot_longrunning_dot_operations__pb2.Operation.FromString,
- options,
- channel_credentials,
- call_credentials,
- compression,
- wait_for_ready,
- timeout,
- metadata,
- )
-
- @staticmethod
- def ImportAgent(
- request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None,
- ):
- return grpc.experimental.unary_unary(
- request,
- target,
- "/google.cloud.dialogflow.v2.Agents/ImportAgent",
- google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.ImportAgentRequest.SerializeToString,
- google_dot_longrunning_dot_operations__pb2.Operation.FromString,
- options,
- channel_credentials,
- call_credentials,
- compression,
- wait_for_ready,
- timeout,
- metadata,
- )
-
- @staticmethod
- def RestoreAgent(
- request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None,
- ):
- return grpc.experimental.unary_unary(
- request,
- target,
- "/google.cloud.dialogflow.v2.Agents/RestoreAgent",
- google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.RestoreAgentRequest.SerializeToString,
- google_dot_longrunning_dot_operations__pb2.Operation.FromString,
- options,
- channel_credentials,
- call_credentials,
- compression,
- wait_for_ready,
- timeout,
- metadata,
- )
-
- @staticmethod
- def GetValidationResult(
- request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None,
- ):
- return grpc.experimental.unary_unary(
- request,
- target,
- "/google.cloud.dialogflow.v2.Agents/GetValidationResult",
- google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.GetValidationResultRequest.SerializeToString,
- google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_validation__result__pb2.ValidationResult.FromString,
- options,
- channel_credentials,
- call_credentials,
- compression,
- wait_for_ready,
- timeout,
- metadata,
- )
diff --git a/dialogflow_v2/proto/audio_config_pb2.py b/dialogflow_v2/proto/audio_config_pb2.py
deleted file mode 100644
index 4341cd28e..000000000
--- a/dialogflow_v2/proto/audio_config_pb2.py
+++ /dev/null
@@ -1,1163 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: google/cloud/dialogflow_v2/proto/audio_config.proto
-"""Generated protocol buffer code."""
-from google.protobuf.internal import enum_type_wrapper
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2
-from google.api import resource_pb2 as google_dot_api_dot_resource__pb2
-from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2
-from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
- name="google/cloud/dialogflow_v2/proto/audio_config.proto",
- package="google.cloud.dialogflow.v2",
- syntax="proto3",
- serialized_options=b"\n\036com.google.cloud.dialogflow.v2B\020AudioConfigProtoP\001ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2",
- create_key=_descriptor._internal_create_key,
- serialized_pb=b'\n3google/cloud/dialogflow_v2/proto/audio_config.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/api/annotations.proto"/\n\rSpeechContext\x12\x0f\n\x07phrases\x18\x01 \x03(\t\x12\r\n\x05\x62oost\x18\x02 \x01(\x02"\x92\x01\n\x0eSpeechWordInfo\x12\x0c\n\x04word\x18\x03 \x01(\t\x12/\n\x0cstart_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\nend_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\xef\x02\n\x10InputAudioConfig\x12\x41\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32).google.cloud.dialogflow.v2.AudioEncoding\x12\x19\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x12\x15\n\rlanguage_code\x18\x03 \x01(\t\x12\x18\n\x10\x65nable_word_info\x18\r \x01(\x08\x12\x18\n\x0cphrase_hints\x18\x04 \x03(\tB\x02\x18\x01\x12\x42\n\x0fspeech_contexts\x18\x0b \x03(\x0b\x32).google.cloud.dialogflow.v2.SpeechContext\x12\r\n\x05model\x18\x07 \x01(\t\x12\x45\n\rmodel_variant\x18\n \x01(\x0e\x32..google.cloud.dialogflow.v2.SpeechModelVariant\x12\x18\n\x10single_utterance\x18\x08 \x01(\x08"f\n\x14VoiceSelectionParams\x12\x0c\n\x04name\x18\x01 \x01(\t\x12@\n\x0bssml_gender\x18\x02 \x01(\x0e\x32+.google.cloud.dialogflow.v2.SsmlVoiceGender"\xb3\x01\n\x16SynthesizeSpeechConfig\x12\x15\n\rspeaking_rate\x18\x01 \x01(\x01\x12\r\n\x05pitch\x18\x02 \x01(\x01\x12\x16\n\x0evolume_gain_db\x18\x03 \x01(\x01\x12\x1a\n\x12\x65\x66\x66\x65\x63ts_profile_id\x18\x05 \x03(\t\x12?\n\x05voice\x18\x04 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2.VoiceSelectionParams"\xd2\x01\n\x11OutputAudioConfig\x12L\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32/.google.cloud.dialogflow.v2.OutputAudioEncodingB\x03\xe0\x41\x02\x12\x19\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x12T\n\x18synthesize_speech_config\x18\x03 \x01(\x0b\x32\x32.google.cloud.dialogflow.v2.SynthesizeSpeechConfig*\xfb\x01\n\rAudioEncoding\x12\x1e\n\x1a\x41UDIO_ENCODING_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x41UDIO_ENCODING_LINEAR_16\x10\x01\x12\x17\n\x13\x41UDIO_ENCODING_FLAC\x10\x02\x12\x18\n\x14\x41UDIO_ENCODING_MULAW\x10\x03\x12\x16\n\x12\x41UDIO_ENCODING_AMR\x10\x04\x12\x19\n\x15\x41UDIO_ENCODING_AMR_WB\x10\x05\x12\x1b\n\x17\x41UDIO_ENCODING_OGG_OPUS\x10\x06\x12)\n%AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE\x10\x07*v\n\x12SpeechModelVariant\x12$\n SPEECH_MODEL_VARIANT_UNSPECIFIED\x10\x00\x12\x16\n\x12USE_BEST_AVAILABLE\x10\x01\x12\x10\n\x0cUSE_STANDARD\x10\x02\x12\x10\n\x0cUSE_ENHANCED\x10\x03*\x8d\x01\n\x0fSsmlVoiceGender\x12!\n\x1dSSML_VOICE_GENDER_UNSPECIFIED\x10\x00\x12\x1a\n\x16SSML_VOICE_GENDER_MALE\x10\x01\x12\x1c\n\x18SSML_VOICE_GENDER_FEMALE\x10\x02\x12\x1d\n\x19SSML_VOICE_GENDER_NEUTRAL\x10\x03*\xa4\x01\n\x13OutputAudioEncoding\x12%\n!OUTPUT_AUDIO_ENCODING_UNSPECIFIED\x10\x00\x12#\n\x1fOUTPUT_AUDIO_ENCODING_LINEAR_16\x10\x01\x12\x1d\n\x19OUTPUT_AUDIO_ENCODING_MP3\x10\x02\x12"\n\x1eOUTPUT_AUDIO_ENCODING_OGG_OPUS\x10\x03\x42\x9f\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\x10\x41udioConfigProtoP\x01ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3',
- dependencies=[
- google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,
- google_dot_api_dot_resource__pb2.DESCRIPTOR,
- google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,
- google_dot_api_dot_annotations__pb2.DESCRIPTOR,
- ],
-)
-
-_AUDIOENCODING = _descriptor.EnumDescriptor(
- name="AudioEncoding",
- full_name="google.cloud.dialogflow.v2.AudioEncoding",
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name="AUDIO_ENCODING_UNSPECIFIED",
- index=0,
- number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="AUDIO_ENCODING_LINEAR_16",
- index=1,
- number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="AUDIO_ENCODING_FLAC",
- index=2,
- number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="AUDIO_ENCODING_MULAW",
- index=3,
- number=3,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="AUDIO_ENCODING_AMR",
- index=4,
- number=4,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="AUDIO_ENCODING_AMR_WB",
- index=5,
- number=5,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="AUDIO_ENCODING_OGG_OPUS",
- index=6,
- number=6,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE",
- index=7,
- number=7,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=1273,
- serialized_end=1524,
-)
-_sym_db.RegisterEnumDescriptor(_AUDIOENCODING)
-
-AudioEncoding = enum_type_wrapper.EnumTypeWrapper(_AUDIOENCODING)
-_SPEECHMODELVARIANT = _descriptor.EnumDescriptor(
- name="SpeechModelVariant",
- full_name="google.cloud.dialogflow.v2.SpeechModelVariant",
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name="SPEECH_MODEL_VARIANT_UNSPECIFIED",
- index=0,
- number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="USE_BEST_AVAILABLE",
- index=1,
- number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="USE_STANDARD",
- index=2,
- number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="USE_ENHANCED",
- index=3,
- number=3,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=1526,
- serialized_end=1644,
-)
-_sym_db.RegisterEnumDescriptor(_SPEECHMODELVARIANT)
-
-SpeechModelVariant = enum_type_wrapper.EnumTypeWrapper(_SPEECHMODELVARIANT)
-_SSMLVOICEGENDER = _descriptor.EnumDescriptor(
- name="SsmlVoiceGender",
- full_name="google.cloud.dialogflow.v2.SsmlVoiceGender",
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name="SSML_VOICE_GENDER_UNSPECIFIED",
- index=0,
- number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="SSML_VOICE_GENDER_MALE",
- index=1,
- number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="SSML_VOICE_GENDER_FEMALE",
- index=2,
- number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="SSML_VOICE_GENDER_NEUTRAL",
- index=3,
- number=3,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=1647,
- serialized_end=1788,
-)
-_sym_db.RegisterEnumDescriptor(_SSMLVOICEGENDER)
-
-SsmlVoiceGender = enum_type_wrapper.EnumTypeWrapper(_SSMLVOICEGENDER)
-_OUTPUTAUDIOENCODING = _descriptor.EnumDescriptor(
- name="OutputAudioEncoding",
- full_name="google.cloud.dialogflow.v2.OutputAudioEncoding",
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name="OUTPUT_AUDIO_ENCODING_UNSPECIFIED",
- index=0,
- number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="OUTPUT_AUDIO_ENCODING_LINEAR_16",
- index=1,
- number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="OUTPUT_AUDIO_ENCODING_MP3",
- index=2,
- number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="OUTPUT_AUDIO_ENCODING_OGG_OPUS",
- index=3,
- number=3,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=1791,
- serialized_end=1955,
-)
-_sym_db.RegisterEnumDescriptor(_OUTPUTAUDIOENCODING)
-
-OutputAudioEncoding = enum_type_wrapper.EnumTypeWrapper(_OUTPUTAUDIOENCODING)
-AUDIO_ENCODING_UNSPECIFIED = 0
-AUDIO_ENCODING_LINEAR_16 = 1
-AUDIO_ENCODING_FLAC = 2
-AUDIO_ENCODING_MULAW = 3
-AUDIO_ENCODING_AMR = 4
-AUDIO_ENCODING_AMR_WB = 5
-AUDIO_ENCODING_OGG_OPUS = 6
-AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7
-SPEECH_MODEL_VARIANT_UNSPECIFIED = 0
-USE_BEST_AVAILABLE = 1
-USE_STANDARD = 2
-USE_ENHANCED = 3
-SSML_VOICE_GENDER_UNSPECIFIED = 0
-SSML_VOICE_GENDER_MALE = 1
-SSML_VOICE_GENDER_FEMALE = 2
-SSML_VOICE_GENDER_NEUTRAL = 3
-OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0
-OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1
-OUTPUT_AUDIO_ENCODING_MP3 = 2
-OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3
-
-
-_SPEECHCONTEXT = _descriptor.Descriptor(
- name="SpeechContext",
- full_name="google.cloud.dialogflow.v2.SpeechContext",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="phrases",
- full_name="google.cloud.dialogflow.v2.SpeechContext.phrases",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=3,
- has_default_value=False,
- default_value=[],
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="boost",
- full_name="google.cloud.dialogflow.v2.SpeechContext.boost",
- index=1,
- number=2,
- type=2,
- cpp_type=6,
- label=1,
- has_default_value=False,
- default_value=float(0),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=205,
- serialized_end=252,
-)
-
-
-_SPEECHWORDINFO = _descriptor.Descriptor(
- name="SpeechWordInfo",
- full_name="google.cloud.dialogflow.v2.SpeechWordInfo",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="word",
- full_name="google.cloud.dialogflow.v2.SpeechWordInfo.word",
- index=0,
- number=3,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="start_offset",
- full_name="google.cloud.dialogflow.v2.SpeechWordInfo.start_offset",
- index=1,
- number=1,
- type=11,
- cpp_type=10,
- label=1,
- has_default_value=False,
- default_value=None,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="end_offset",
- full_name="google.cloud.dialogflow.v2.SpeechWordInfo.end_offset",
- index=2,
- number=2,
- type=11,
- cpp_type=10,
- label=1,
- has_default_value=False,
- default_value=None,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="confidence",
- full_name="google.cloud.dialogflow.v2.SpeechWordInfo.confidence",
- index=3,
- number=4,
- type=2,
- cpp_type=6,
- label=1,
- has_default_value=False,
- default_value=float(0),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=255,
- serialized_end=401,
-)
-
-
-_INPUTAUDIOCONFIG = _descriptor.Descriptor(
- name="InputAudioConfig",
- full_name="google.cloud.dialogflow.v2.InputAudioConfig",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="audio_encoding",
- full_name="google.cloud.dialogflow.v2.InputAudioConfig.audio_encoding",
- index=0,
- number=1,
- type=14,
- cpp_type=8,
- label=1,
- has_default_value=False,
- default_value=0,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="sample_rate_hertz",
- full_name="google.cloud.dialogflow.v2.InputAudioConfig.sample_rate_hertz",
- index=1,
- number=2,
- type=5,
- cpp_type=1,
- label=1,
- has_default_value=False,
- default_value=0,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="language_code",
- full_name="google.cloud.dialogflow.v2.InputAudioConfig.language_code",
- index=2,
- number=3,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="enable_word_info",
- full_name="google.cloud.dialogflow.v2.InputAudioConfig.enable_word_info",
- index=3,
- number=13,
- type=8,
- cpp_type=7,
- label=1,
- has_default_value=False,
- default_value=False,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="phrase_hints",
- full_name="google.cloud.dialogflow.v2.InputAudioConfig.phrase_hints",
- index=4,
- number=4,
- type=9,
- cpp_type=9,
- label=3,
- has_default_value=False,
- default_value=[],
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\030\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="speech_contexts",
- full_name="google.cloud.dialogflow.v2.InputAudioConfig.speech_contexts",
- index=5,
- number=11,
- type=11,
- cpp_type=10,
- label=3,
- has_default_value=False,
- default_value=[],
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="model",
- full_name="google.cloud.dialogflow.v2.InputAudioConfig.model",
- index=6,
- number=7,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="model_variant",
- full_name="google.cloud.dialogflow.v2.InputAudioConfig.model_variant",
- index=7,
- number=10,
- type=14,
- cpp_type=8,
- label=1,
- has_default_value=False,
- default_value=0,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="single_utterance",
- full_name="google.cloud.dialogflow.v2.InputAudioConfig.single_utterance",
- index=8,
- number=8,
- type=8,
- cpp_type=7,
- label=1,
- has_default_value=False,
- default_value=False,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=404,
- serialized_end=771,
-)
-
-
-_VOICESELECTIONPARAMS = _descriptor.Descriptor(
- name="VoiceSelectionParams",
- full_name="google.cloud.dialogflow.v2.VoiceSelectionParams",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="name",
- full_name="google.cloud.dialogflow.v2.VoiceSelectionParams.name",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="ssml_gender",
- full_name="google.cloud.dialogflow.v2.VoiceSelectionParams.ssml_gender",
- index=1,
- number=2,
- type=14,
- cpp_type=8,
- label=1,
- has_default_value=False,
- default_value=0,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=773,
- serialized_end=875,
-)
-
-
-_SYNTHESIZESPEECHCONFIG = _descriptor.Descriptor(
- name="SynthesizeSpeechConfig",
- full_name="google.cloud.dialogflow.v2.SynthesizeSpeechConfig",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="speaking_rate",
- full_name="google.cloud.dialogflow.v2.SynthesizeSpeechConfig.speaking_rate",
- index=0,
- number=1,
- type=1,
- cpp_type=5,
- label=1,
- has_default_value=False,
- default_value=float(0),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="pitch",
- full_name="google.cloud.dialogflow.v2.SynthesizeSpeechConfig.pitch",
- index=1,
- number=2,
- type=1,
- cpp_type=5,
- label=1,
- has_default_value=False,
- default_value=float(0),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="volume_gain_db",
- full_name="google.cloud.dialogflow.v2.SynthesizeSpeechConfig.volume_gain_db",
- index=2,
- number=3,
- type=1,
- cpp_type=5,
- label=1,
- has_default_value=False,
- default_value=float(0),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="effects_profile_id",
- full_name="google.cloud.dialogflow.v2.SynthesizeSpeechConfig.effects_profile_id",
- index=3,
- number=5,
- type=9,
- cpp_type=9,
- label=3,
- has_default_value=False,
- default_value=[],
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="voice",
- full_name="google.cloud.dialogflow.v2.SynthesizeSpeechConfig.voice",
- index=4,
- number=4,
- type=11,
- cpp_type=10,
- label=1,
- has_default_value=False,
- default_value=None,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=878,
- serialized_end=1057,
-)
-
-
-_OUTPUTAUDIOCONFIG = _descriptor.Descriptor(
- name="OutputAudioConfig",
- full_name="google.cloud.dialogflow.v2.OutputAudioConfig",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="audio_encoding",
- full_name="google.cloud.dialogflow.v2.OutputAudioConfig.audio_encoding",
- index=0,
- number=1,
- type=14,
- cpp_type=8,
- label=1,
- has_default_value=False,
- default_value=0,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="sample_rate_hertz",
- full_name="google.cloud.dialogflow.v2.OutputAudioConfig.sample_rate_hertz",
- index=1,
- number=2,
- type=5,
- cpp_type=1,
- label=1,
- has_default_value=False,
- default_value=0,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="synthesize_speech_config",
- full_name="google.cloud.dialogflow.v2.OutputAudioConfig.synthesize_speech_config",
- index=2,
- number=3,
- type=11,
- cpp_type=10,
- label=1,
- has_default_value=False,
- default_value=None,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=1060,
- serialized_end=1270,
-)
-
-_SPEECHWORDINFO.fields_by_name[
- "start_offset"
-].message_type = google_dot_protobuf_dot_duration__pb2._DURATION
-_SPEECHWORDINFO.fields_by_name[
- "end_offset"
-].message_type = google_dot_protobuf_dot_duration__pb2._DURATION
-_INPUTAUDIOCONFIG.fields_by_name["audio_encoding"].enum_type = _AUDIOENCODING
-_INPUTAUDIOCONFIG.fields_by_name["speech_contexts"].message_type = _SPEECHCONTEXT
-_INPUTAUDIOCONFIG.fields_by_name["model_variant"].enum_type = _SPEECHMODELVARIANT
-_VOICESELECTIONPARAMS.fields_by_name["ssml_gender"].enum_type = _SSMLVOICEGENDER
-_SYNTHESIZESPEECHCONFIG.fields_by_name["voice"].message_type = _VOICESELECTIONPARAMS
-_OUTPUTAUDIOCONFIG.fields_by_name["audio_encoding"].enum_type = _OUTPUTAUDIOENCODING
-_OUTPUTAUDIOCONFIG.fields_by_name[
- "synthesize_speech_config"
-].message_type = _SYNTHESIZESPEECHCONFIG
-DESCRIPTOR.message_types_by_name["SpeechContext"] = _SPEECHCONTEXT
-DESCRIPTOR.message_types_by_name["SpeechWordInfo"] = _SPEECHWORDINFO
-DESCRIPTOR.message_types_by_name["InputAudioConfig"] = _INPUTAUDIOCONFIG
-DESCRIPTOR.message_types_by_name["VoiceSelectionParams"] = _VOICESELECTIONPARAMS
-DESCRIPTOR.message_types_by_name["SynthesizeSpeechConfig"] = _SYNTHESIZESPEECHCONFIG
-DESCRIPTOR.message_types_by_name["OutputAudioConfig"] = _OUTPUTAUDIOCONFIG
-DESCRIPTOR.enum_types_by_name["AudioEncoding"] = _AUDIOENCODING
-DESCRIPTOR.enum_types_by_name["SpeechModelVariant"] = _SPEECHMODELVARIANT
-DESCRIPTOR.enum_types_by_name["SsmlVoiceGender"] = _SSMLVOICEGENDER
-DESCRIPTOR.enum_types_by_name["OutputAudioEncoding"] = _OUTPUTAUDIOENCODING
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-SpeechContext = _reflection.GeneratedProtocolMessageType(
- "SpeechContext",
- (_message.Message,),
- {
- "DESCRIPTOR": _SPEECHCONTEXT,
- "__module__": "google.cloud.dialogflow_v2.proto.audio_config_pb2",
- "__doc__": """Hints for the speech recognizer to help with recognition in a specific
- conversation state.
-
- Attributes:
- phrases:
- Optional. A list of strings containing words and phrases that
- the speech recognizer should recognize with higher likelihood.
- This list can be used to: - improve accuracy for words and
- phrases you expect the user to say, e.g. typical commands
- for your Dialogflow agent - add additional words to the
- speech recognizer vocabulary - … See the `Cloud Speech
- documentation `__ for usage limits.
- boost:
- Optional. Boost for this context compared to other contexts:
- - If the boost is positive, Dialogflow will increase the
- probability that the phrases in this context are recognized
- over similar sounding phrases. - If the boost is
- unspecified or non-positive, Dialogflow will not apply any
- boost. Dialogflow recommends that you use boosts in the range
- (0, 20] and that you find a value that fits your use case with
- binary search.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.SpeechContext)
- },
-)
-_sym_db.RegisterMessage(SpeechContext)
-
-SpeechWordInfo = _reflection.GeneratedProtocolMessageType(
- "SpeechWordInfo",
- (_message.Message,),
- {
- "DESCRIPTOR": _SPEECHWORDINFO,
- "__module__": "google.cloud.dialogflow_v2.proto.audio_config_pb2",
- "__doc__": """Information for a word recognized by the speech recognizer.
-
- Attributes:
- word:
- The word this info is for.
- start_offset:
- Time offset relative to the beginning of the audio that
- corresponds to the start of the spoken word. This is an
- experimental feature and the accuracy of the time offset can
- vary.
- end_offset:
- Time offset relative to the beginning of the audio that
- corresponds to the end of the spoken word. This is an
- experimental feature and the accuracy of the time offset can
- vary.
- confidence:
- The Speech confidence between 0.0 and 1.0 for this word. A
- higher number indicates an estimated greater likelihood that
- the recognized word is correct. The default of 0.0 is a
- sentinel value indicating that confidence was not set. This
- field is not guaranteed to be fully stable over time for the
- same audio input. Users should also not rely on it to always
- be provided.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.SpeechWordInfo)
- },
-)
-_sym_db.RegisterMessage(SpeechWordInfo)
-
-InputAudioConfig = _reflection.GeneratedProtocolMessageType(
- "InputAudioConfig",
- (_message.Message,),
- {
- "DESCRIPTOR": _INPUTAUDIOCONFIG,
- "__module__": "google.cloud.dialogflow_v2.proto.audio_config_pb2",
- "__doc__": """Instructs the speech recognizer how to process the audio content.
-
- Attributes:
- audio_encoding:
- Required. Audio encoding of the audio content to process.
- sample_rate_hertz:
- Required. Sample rate (in Hertz) of the audio content sent in
- the query. Refer to `Cloud Speech API documentation
- `__ for
- more details.
- language_code:
- Required. The language of the supplied audio. Dialogflow does
- not do translations. See `Language Support `__ for a list of
- the currently supported language codes. Note that queries in
- the same session do not necessarily need to specify the same
- language.
- enable_word_info:
- If ``true``, Dialogflow returns
- [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in
- [StreamingRecognitionResult][google.cloud.dialogflow.v2.Stream
- ingRecognitionResult] with information about the recognized
- speech words, e.g. start and end time offsets. If false or
- unspecified, Speech doesn’t return any word-level information.
- phrase_hints:
- A list of strings containing words and phrases that the speech
- recognizer should recognize with higher likelihood. See `the
- Cloud Speech documentation `__ for more details. This
- field is deprecated. Please use `speech_contexts`
- instead. If you specify both `phrase_hints` and
- `speech_contexts`, Dialogflow will treat the
- `phrase_hints` as a single additional `SpeechContext`.
- speech_contexts:
- Context information to assist speech recognition. See `the
- Cloud Speech documentation `__ for more details.
- model:
- Which Speech model to select for the given request. Select the
- model best suited to your domain to get best results. If a
- model is not explicitly specified, then we auto-select a model
- based on the parameters in the InputAudioConfig. If enhanced
- speech model is enabled for the agent and an enhanced version
- of the specified model for the language does not exist, then
- the speech is recognized using the standard version of the
- specified model. Refer to `Cloud Speech API documentation
- `__ for more details.
- model_variant:
- Which variant of the [Speech
- model][google.cloud.dialogflow.v2.InputAudioConfig.model] to
- use.
- single_utterance:
- If ``false`` (default), recognition does not cease until the
- client closes the stream. If ``true``, the recognizer will
- detect a single spoken utterance in input audio. Recognition
- ceases when it detects the audio’s voice has stopped or
- paused. In this case, once a detected intent is received, the
- client should close the stream and start a new request with a
- new stream as needed. Note: This setting is relevant only for
- streaming methods. Note: When specified,
- InputAudioConfig.single_utterance takes precedence over
- StreamingDetectIntentRequest.single_utterance.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.InputAudioConfig)
- },
-)
-_sym_db.RegisterMessage(InputAudioConfig)
-
-VoiceSelectionParams = _reflection.GeneratedProtocolMessageType(
- "VoiceSelectionParams",
- (_message.Message,),
- {
- "DESCRIPTOR": _VOICESELECTIONPARAMS,
- "__module__": "google.cloud.dialogflow_v2.proto.audio_config_pb2",
- "__doc__": """Description of which voice to use for speech synthesis.
-
- Attributes:
- name:
- Optional. The name of the voice. If not set, the service will
- choose a voice based on the other parameters such as
- language_code and [ssml_gender][google.cloud.dialogflow.v2.Voi
- ceSelectionParams.ssml_gender].
- ssml_gender:
- Optional. The preferred gender of the voice. If not set, the
- service will choose a voice based on the other parameters such
- as language_code and
- [name][google.cloud.dialogflow.v2.VoiceSelectionParams.name].
- Note that this is only a preference, not requirement. If a
- voice of the appropriate gender is not available, the
- synthesizer should substitute a voice with a different gender
- rather than failing the request.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.VoiceSelectionParams)
- },
-)
-_sym_db.RegisterMessage(VoiceSelectionParams)
-
-SynthesizeSpeechConfig = _reflection.GeneratedProtocolMessageType(
- "SynthesizeSpeechConfig",
- (_message.Message,),
- {
- "DESCRIPTOR": _SYNTHESIZESPEECHCONFIG,
- "__module__": "google.cloud.dialogflow_v2.proto.audio_config_pb2",
- "__doc__": """Configuration of how speech should be synthesized.
-
- Attributes:
- speaking_rate:
- Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0
- is the normal native speed supported by the specific voice.
- 2.0 is twice as fast, and 0.5 is half as fast. If unset(0.0),
- defaults to the native 1.0 speed. Any other values < 0.25 or >
- 4.0 will return an error.
- pitch:
- Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means
- increase 20 semitones from the original pitch. -20 means
- decrease 20 semitones from the original pitch.
- volume_gain_db:
- Optional. Volume gain (in dB) of the normal native volume
- supported by the specific voice, in the range [-96.0, 16.0].
- If unset, or set to a value of 0.0 (dB), will play at normal
- native signal amplitude. A value of -6.0 (dB) will play at
- approximately half the amplitude of the normal native signal
- amplitude. A value of +6.0 (dB) will play at approximately
- twice the amplitude of the normal native signal amplitude. We
- strongly recommend not to exceed +10 (dB) as there’s usually
- no effective increase in loudness for any value greater than
- that.
- effects_profile_id:
- Optional. An identifier which selects ‘audio effects’ profiles
- that are applied on (post synthesized) text to speech. Effects
- are applied on top of each other in the order they are given.
- voice:
- Optional. The desired voice of the synthesized audio.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.SynthesizeSpeechConfig)
- },
-)
-_sym_db.RegisterMessage(SynthesizeSpeechConfig)
-
-OutputAudioConfig = _reflection.GeneratedProtocolMessageType(
- "OutputAudioConfig",
- (_message.Message,),
- {
- "DESCRIPTOR": _OUTPUTAUDIOCONFIG,
- "__module__": "google.cloud.dialogflow_v2.proto.audio_config_pb2",
- "__doc__": """Instructs the speech synthesizer on how to generate the output audio
- content. If this audio config is supplied in a request, it overrides
- all existing text-to-speech settings applied to the agent.
-
- Attributes:
- audio_encoding:
- Required. Audio encoding of the synthesized audio content.
- sample_rate_hertz:
- The synthesis sample rate (in hertz) for this audio. If not
- provided, then the synthesizer will use the default sample
- rate based on the audio encoding. If this is different from
- the voice’s natural sample rate, then the synthesizer will
- honor this request by converting to the desired sample rate
- (which might result in worse audio quality).
- synthesize_speech_config:
- Configuration of how speech should be synthesized.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.OutputAudioConfig)
- },
-)
-_sym_db.RegisterMessage(OutputAudioConfig)
-
-
-DESCRIPTOR._options = None
-_INPUTAUDIOCONFIG.fields_by_name["phrase_hints"]._options = None
-_OUTPUTAUDIOCONFIG.fields_by_name["audio_encoding"]._options = None
-# @@protoc_insertion_point(module_scope)
diff --git a/dialogflow_v2/proto/audio_config_pb2_grpc.py b/dialogflow_v2/proto/audio_config_pb2_grpc.py
deleted file mode 100644
index 8a9393943..000000000
--- a/dialogflow_v2/proto/audio_config_pb2_grpc.py
+++ /dev/null
@@ -1,3 +0,0 @@
-# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
-"""Client and server classes corresponding to protobuf-defined services."""
-import grpc
diff --git a/dialogflow_v2/proto/context_pb2.py b/dialogflow_v2/proto/context_pb2.py
deleted file mode 100644
index 511270c37..000000000
--- a/dialogflow_v2/proto/context_pb2.py
+++ /dev/null
@@ -1,843 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: google/cloud/dialogflow_v2/proto/context.proto
-"""Generated protocol buffer code."""
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
-from google.api import client_pb2 as google_dot_api_dot_client__pb2
-from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2
-from google.api import resource_pb2 as google_dot_api_dot_resource__pb2
-from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
-from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2
-from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
- name="google/cloud/dialogflow_v2/proto/context.proto",
- package="google.cloud.dialogflow.v2",
- syntax="proto3",
- serialized_options=b"\n\036com.google.cloud.dialogflow.v2B\014ContextProtoP\001ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2",
- create_key=_descriptor._internal_create_key,
- serialized_pb=b'\n.google/cloud/dialogflow_v2/proto/context.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto"\xbd\x02\n\x07\x43ontext\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0elifespan_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x30\n\nparameters\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01:\xcf\x01\xea\x41\xcb\x01\n!dialogflow.googleapis.com/Context\x12>projects/{project}/agent/sessions/{session}/contexts/{context}\x12\x66projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}"\x81\x01\n\x13ListContextsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dialogflow.googleapis.com/Context\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01"f\n\x14ListContextsResponse\x12\x35\n\x08\x63ontexts\x18\x01 \x03(\x0b\x32#.google.cloud.dialogflow.v2.Context\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"L\n\x11GetContextRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dialogflow.googleapis.com/Context"\x8c\x01\n\x14\x43reateContextRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dialogflow.googleapis.com/Context\x12\x39\n\x07\x63ontext\x18\x02 \x01(\x0b\x32#.google.cloud.dialogflow.v2.ContextB\x03\xe0\x41\x02"\x87\x01\n\x14UpdateContextRequest\x12\x39\n\x07\x63ontext\x18\x01 \x01(\x0b\x32#.google.cloud.dialogflow.v2.ContextB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"O\n\x14\x44\x65leteContextRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dialogflow.googleapis.com/Context"U\n\x18\x44\x65leteAllContextsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dialogflow.googleapis.com/Context2\x9a\r\n\x08\x43ontexts\x12\x82\x02\n\x0cListContexts\x12/.google.cloud.dialogflow.v2.ListContextsRequest\x1a\x30.google.cloud.dialogflow.v2.ListContextsResponse"\x8e\x01\x82\xd3\xe4\x93\x02\x7f\x12\x31/v2/{parent=projects/*/agent/sessions/*}/contextsZJ\x12H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts\xda\x41\x06parent\x12\xef\x01\n\nGetContext\x12-.google.cloud.dialogflow.v2.GetContextRequest\x1a#.google.cloud.dialogflow.v2.Context"\x8c\x01\x82\xd3\xe4\x93\x02\x7f\x12\x31/v2/{name=projects/*/agent/sessions/*/contexts/*}ZJ\x12H/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}\xda\x41\x04name\x12\x92\x02\n\rCreateContext\x12\x30.google.cloud.dialogflow.v2.CreateContextRequest\x1a#.google.cloud.dialogflow.v2.Context"\xa9\x01\x82\xd3\xe4\x93\x02\x91\x01"1/v2/{parent=projects/*/agent/sessions/*}/contexts:\x07\x63ontextZS"H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts:\x07\x63ontext\xda\x41\x0eparent,context\x12\xa7\x02\n\rUpdateContext\x12\x30.google.cloud.dialogflow.v2.UpdateContextRequest\x1a#.google.cloud.dialogflow.v2.Context"\xbe\x01\x82\xd3\xe4\x93\x02\xa1\x01\x32\x39/v2/{context.name=projects/*/agent/sessions/*/contexts/*}:\x07\x63ontextZ[2P/v2/{context.name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}:\x07\x63ontext\xda\x41\x13\x63ontext,update_mask\x12\xe8\x01\n\rDeleteContext\x12\x30.google.cloud.dialogflow.v2.DeleteContextRequest\x1a\x16.google.protobuf.Empty"\x8c\x01\x82\xd3\xe4\x93\x02\x7f*1/v2/{name=projects/*/agent/sessions/*/contexts/*}ZJ*H/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}\xda\x41\x04name\x12\xf2\x01\n\x11\x44\x65leteAllContexts\x12\x34.google.cloud.dialogflow.v2.DeleteAllContextsRequest\x1a\x16.google.protobuf.Empty"\x8e\x01\x82\xd3\xe4\x93\x02\x7f*1/v2/{parent=projects/*/agent/sessions/*}/contextsZJ*H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts\xda\x41\x06parent\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\x9b\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\x0c\x43ontextProtoP\x01ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3',
- dependencies=[
- google_dot_api_dot_annotations__pb2.DESCRIPTOR,
- google_dot_api_dot_client__pb2.DESCRIPTOR,
- google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,
- google_dot_api_dot_resource__pb2.DESCRIPTOR,
- google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,
- google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR,
- google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,
- ],
-)
-
-
-_CONTEXT = _descriptor.Descriptor(
- name="Context",
- full_name="google.cloud.dialogflow.v2.Context",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="name",
- full_name="google.cloud.dialogflow.v2.Context.name",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="lifespan_count",
- full_name="google.cloud.dialogflow.v2.Context.lifespan_count",
- index=1,
- number=2,
- type=5,
- cpp_type=1,
- label=1,
- has_default_value=False,
- default_value=0,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="parameters",
- full_name="google.cloud.dialogflow.v2.Context.parameters",
- index=2,
- number=3,
- type=11,
- cpp_type=10,
- label=1,
- has_default_value=False,
- default_value=None,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=b"\352A\313\001\n!dialogflow.googleapis.com/Context\022>projects/{project}/agent/sessions/{session}/contexts/{context}\022fprojects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}",
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=287,
- serialized_end=604,
-)
-
-
-_LISTCONTEXTSREQUEST = _descriptor.Descriptor(
- name="ListContextsRequest",
- full_name="google.cloud.dialogflow.v2.ListContextsRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="parent",
- full_name="google.cloud.dialogflow.v2.ListContextsRequest.parent",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002\372A#\022!dialogflow.googleapis.com/Context",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="page_size",
- full_name="google.cloud.dialogflow.v2.ListContextsRequest.page_size",
- index=1,
- number=2,
- type=5,
- cpp_type=1,
- label=1,
- has_default_value=False,
- default_value=0,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="page_token",
- full_name="google.cloud.dialogflow.v2.ListContextsRequest.page_token",
- index=2,
- number=3,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=607,
- serialized_end=736,
-)
-
-
-_LISTCONTEXTSRESPONSE = _descriptor.Descriptor(
- name="ListContextsResponse",
- full_name="google.cloud.dialogflow.v2.ListContextsResponse",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="contexts",
- full_name="google.cloud.dialogflow.v2.ListContextsResponse.contexts",
- index=0,
- number=1,
- type=11,
- cpp_type=10,
- label=3,
- has_default_value=False,
- default_value=[],
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="next_page_token",
- full_name="google.cloud.dialogflow.v2.ListContextsResponse.next_page_token",
- index=1,
- number=2,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=738,
- serialized_end=840,
-)
-
-
-_GETCONTEXTREQUEST = _descriptor.Descriptor(
- name="GetContextRequest",
- full_name="google.cloud.dialogflow.v2.GetContextRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="name",
- full_name="google.cloud.dialogflow.v2.GetContextRequest.name",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002\372A#\n!dialogflow.googleapis.com/Context",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- )
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=842,
- serialized_end=918,
-)
-
-
-_CREATECONTEXTREQUEST = _descriptor.Descriptor(
- name="CreateContextRequest",
- full_name="google.cloud.dialogflow.v2.CreateContextRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="parent",
- full_name="google.cloud.dialogflow.v2.CreateContextRequest.parent",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002\372A#\022!dialogflow.googleapis.com/Context",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="context",
- full_name="google.cloud.dialogflow.v2.CreateContextRequest.context",
- index=1,
- number=2,
- type=11,
- cpp_type=10,
- label=1,
- has_default_value=False,
- default_value=None,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=921,
- serialized_end=1061,
-)
-
-
-_UPDATECONTEXTREQUEST = _descriptor.Descriptor(
- name="UpdateContextRequest",
- full_name="google.cloud.dialogflow.v2.UpdateContextRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="context",
- full_name="google.cloud.dialogflow.v2.UpdateContextRequest.context",
- index=0,
- number=1,
- type=11,
- cpp_type=10,
- label=1,
- has_default_value=False,
- default_value=None,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="update_mask",
- full_name="google.cloud.dialogflow.v2.UpdateContextRequest.update_mask",
- index=1,
- number=2,
- type=11,
- cpp_type=10,
- label=1,
- has_default_value=False,
- default_value=None,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=1064,
- serialized_end=1199,
-)
-
-
-_DELETECONTEXTREQUEST = _descriptor.Descriptor(
- name="DeleteContextRequest",
- full_name="google.cloud.dialogflow.v2.DeleteContextRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="name",
- full_name="google.cloud.dialogflow.v2.DeleteContextRequest.name",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002\372A#\n!dialogflow.googleapis.com/Context",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- )
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=1201,
- serialized_end=1280,
-)
-
-
-_DELETEALLCONTEXTSREQUEST = _descriptor.Descriptor(
- name="DeleteAllContextsRequest",
- full_name="google.cloud.dialogflow.v2.DeleteAllContextsRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="parent",
- full_name="google.cloud.dialogflow.v2.DeleteAllContextsRequest.parent",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002\372A#\022!dialogflow.googleapis.com/Context",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- )
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=1282,
- serialized_end=1367,
-)
-
-_CONTEXT.fields_by_name[
- "parameters"
-].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
-_LISTCONTEXTSRESPONSE.fields_by_name["contexts"].message_type = _CONTEXT
-_CREATECONTEXTREQUEST.fields_by_name["context"].message_type = _CONTEXT
-_UPDATECONTEXTREQUEST.fields_by_name["context"].message_type = _CONTEXT
-_UPDATECONTEXTREQUEST.fields_by_name[
- "update_mask"
-].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK
-DESCRIPTOR.message_types_by_name["Context"] = _CONTEXT
-DESCRIPTOR.message_types_by_name["ListContextsRequest"] = _LISTCONTEXTSREQUEST
-DESCRIPTOR.message_types_by_name["ListContextsResponse"] = _LISTCONTEXTSRESPONSE
-DESCRIPTOR.message_types_by_name["GetContextRequest"] = _GETCONTEXTREQUEST
-DESCRIPTOR.message_types_by_name["CreateContextRequest"] = _CREATECONTEXTREQUEST
-DESCRIPTOR.message_types_by_name["UpdateContextRequest"] = _UPDATECONTEXTREQUEST
-DESCRIPTOR.message_types_by_name["DeleteContextRequest"] = _DELETECONTEXTREQUEST
-DESCRIPTOR.message_types_by_name["DeleteAllContextsRequest"] = _DELETEALLCONTEXTSREQUEST
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-Context = _reflection.GeneratedProtocolMessageType(
- "Context",
- (_message.Message,),
- {
- "DESCRIPTOR": _CONTEXT,
- "__module__": "google.cloud.dialogflow_v2.proto.context_pb2",
- "__doc__": """Dialogflow contexts are similar to natural language context. If a
- person says to you “they are orange”, you need context in order to
- understand what “they” is referring to. Similarly, for Dialogflow to
- handle an end-user expression like that, it needs to be provided with
- context in order to correctly match an intent. Using contexts, you
- can control the flow of a conversation. You can configure contexts for
- an intent by setting input and output contexts, which are identified
- by string names. When an intent is matched, any configured output
- contexts for that intent become active. While any contexts are active,
- Dialogflow is more likely to match intents that are configured with
- input contexts that correspond to the currently active contexts. For
- more information about context, see the `Contexts guide
- `__.
-
- Attributes:
- name:
- Required. The unique identifier of the context. Format:
- ``projects//agent/sessions//contexts/``, or ``projects//agent/environments//users//sessions//contexts/``. The
- ``Context ID`` is always converted to lowercase, may only
- contain characters in a-zA-Z0-9_-% and may be at most 250
- bytes long. If ``Environment ID`` is not specified, we assume
- default ‘draft’ environment. If ``User ID`` is not specified,
- we assume default ‘-’ user. The following context names are
- reserved for internal use by Dialogflow. You should not use
- these contexts or create contexts with these names: -
- ``__system_counters__`` - ``*_id_dialog_context`` -
- ``*_dialog_params_size``
- lifespan_count:
- Optional. The number of conversational query requests after
- which the context expires. The default is ``0``. If set to
- ``0``, the context expires immediately. Contexts expire
- automatically after 20 minutes if there are no matching
- queries.
- parameters:
- Optional. The collection of parameters associated with this
- context. Depending on your protocol or client library
- language, this is a map, associative array, symbol table,
- dictionary, or JSON object composed of a collection of
- (MapKey, MapValue) pairs: - MapKey type: string - MapKey
- value: parameter name - MapValue type: - If parameter’s
- entity type is a composite entity: map - Else: string or
- number, depending on parameter value type - MapValue value:
- - If parameter’s entity type is a composite entity: map from
- composite entity property names to property values - Else:
- parameter value
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Context)
- },
-)
-_sym_db.RegisterMessage(Context)
-
-ListContextsRequest = _reflection.GeneratedProtocolMessageType(
- "ListContextsRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _LISTCONTEXTSREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.context_pb2",
- "__doc__": """The request message for [Contexts.ListContexts][google.cloud.dialogflo
- w.v2.Contexts.ListContexts].
-
- Attributes:
- parent:
- Required. The session to list all contexts from. Format:
- ``projects//agent/sessions/`` or
- ``projects//agent/environments//users//sessions/``. If ``Environment
- ID`` is not specified, we assume default ‘draft’ environment.
- If ``User ID`` is not specified, we assume default ‘-’ user.
- page_size:
- Optional. The maximum number of items to return in a single
- page. By default 100 and at most 1000.
- page_token:
- Optional. The next_page_token value returned from a previous
- list request.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ListContextsRequest)
- },
-)
-_sym_db.RegisterMessage(ListContextsRequest)
-
-ListContextsResponse = _reflection.GeneratedProtocolMessageType(
- "ListContextsResponse",
- (_message.Message,),
- {
- "DESCRIPTOR": _LISTCONTEXTSRESPONSE,
- "__module__": "google.cloud.dialogflow_v2.proto.context_pb2",
- "__doc__": """The response message for [Contexts.ListContexts][google.cloud.dialogfl
- ow.v2.Contexts.ListContexts].
-
- Attributes:
- contexts:
- The list of contexts. There will be a maximum number of items
- returned based on the page_size field in the request.
- next_page_token:
- Token to retrieve the next page of results, or empty if there
- are no more results in the list.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ListContextsResponse)
- },
-)
-_sym_db.RegisterMessage(ListContextsResponse)
-
-GetContextRequest = _reflection.GeneratedProtocolMessageType(
- "GetContextRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _GETCONTEXTREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.context_pb2",
- "__doc__": """The request message for
- [Contexts.GetContext][google.cloud.dialogflow.v2.Contexts.GetContext].
-
- Attributes:
- name:
- Required. The name of the context. Format: ``projects//agent/sessions//contexts/`` or
- ``projects//agent/environments//users//sessions//contexts/``. If ``Environment ID`` is not specified, we assume
- default ‘draft’ environment. If ``User ID`` is not specified,
- we assume default ‘-’ user.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.GetContextRequest)
- },
-)
-_sym_db.RegisterMessage(GetContextRequest)
-
-CreateContextRequest = _reflection.GeneratedProtocolMessageType(
- "CreateContextRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _CREATECONTEXTREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.context_pb2",
- "__doc__": """The request message for [Contexts.CreateContext][google.cloud.dialogfl
- ow.v2.Contexts.CreateContext].
-
- Attributes:
- parent:
- Required. The session to create a context for. Format:
- ``projects//agent/sessions/`` or
- ``projects//agent/environments//users//sessions/``. If ``Environment
- ID`` is not specified, we assume default ‘draft’ environment.
- If ``User ID`` is not specified, we assume default ‘-’ user.
- context:
- Required. The context to create.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.CreateContextRequest)
- },
-)
-_sym_db.RegisterMessage(CreateContextRequest)
-
-UpdateContextRequest = _reflection.GeneratedProtocolMessageType(
- "UpdateContextRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _UPDATECONTEXTREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.context_pb2",
- "__doc__": """The request message for [Contexts.UpdateContext][google.cloud.dialogfl
- ow.v2.Contexts.UpdateContext].
-
- Attributes:
- context:
- Required. The context to update.
- update_mask:
- Optional. The mask to control which fields get updated.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.UpdateContextRequest)
- },
-)
-_sym_db.RegisterMessage(UpdateContextRequest)
-
-DeleteContextRequest = _reflection.GeneratedProtocolMessageType(
- "DeleteContextRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _DELETECONTEXTREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.context_pb2",
- "__doc__": """The request message for [Contexts.DeleteContext][google.cloud.dialogfl
- ow.v2.Contexts.DeleteContext].
-
- Attributes:
- name:
- Required. The name of the context to delete. Format:
- ``projects//agent/sessions//contexts/`` or ``projects//agent/environments//users//sessions//contexts/``. If
- ``Environment ID`` is not specified, we assume default ‘draft’
- environment. If ``User ID`` is not specified, we assume
- default ‘-’ user.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.DeleteContextRequest)
- },
-)
-_sym_db.RegisterMessage(DeleteContextRequest)
-
-DeleteAllContextsRequest = _reflection.GeneratedProtocolMessageType(
- "DeleteAllContextsRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _DELETEALLCONTEXTSREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.context_pb2",
- "__doc__": """The request message for [Contexts.DeleteAllContexts][google.cloud.dial
- ogflow.v2.Contexts.DeleteAllContexts].
-
- Attributes:
- parent:
- Required. The name of the session to delete all contexts from.
- Format: ``projects//agent/sessions/``
- or ``projects//agent/environments//users//sessions/``. If ``Environment
- ID`` is not specified we assume default ‘draft’ environment.
- If ``User ID`` is not specified, we assume default ‘-’ user.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.DeleteAllContextsRequest)
- },
-)
-_sym_db.RegisterMessage(DeleteAllContextsRequest)
-
-
-DESCRIPTOR._options = None
-_CONTEXT.fields_by_name["name"]._options = None
-_CONTEXT.fields_by_name["lifespan_count"]._options = None
-_CONTEXT.fields_by_name["parameters"]._options = None
-_CONTEXT._options = None
-_LISTCONTEXTSREQUEST.fields_by_name["parent"]._options = None
-_LISTCONTEXTSREQUEST.fields_by_name["page_size"]._options = None
-_LISTCONTEXTSREQUEST.fields_by_name["page_token"]._options = None
-_GETCONTEXTREQUEST.fields_by_name["name"]._options = None
-_CREATECONTEXTREQUEST.fields_by_name["parent"]._options = None
-_CREATECONTEXTREQUEST.fields_by_name["context"]._options = None
-_UPDATECONTEXTREQUEST.fields_by_name["context"]._options = None
-_UPDATECONTEXTREQUEST.fields_by_name["update_mask"]._options = None
-_DELETECONTEXTREQUEST.fields_by_name["name"]._options = None
-_DELETEALLCONTEXTSREQUEST.fields_by_name["parent"]._options = None
-
-_CONTEXTS = _descriptor.ServiceDescriptor(
- name="Contexts",
- full_name="google.cloud.dialogflow.v2.Contexts",
- file=DESCRIPTOR,
- index=0,
- serialized_options=b"\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow",
- create_key=_descriptor._internal_create_key,
- serialized_start=1370,
- serialized_end=3060,
- methods=[
- _descriptor.MethodDescriptor(
- name="ListContexts",
- full_name="google.cloud.dialogflow.v2.Contexts.ListContexts",
- index=0,
- containing_service=None,
- input_type=_LISTCONTEXTSREQUEST,
- output_type=_LISTCONTEXTSRESPONSE,
- serialized_options=b"\202\323\344\223\002\177\0221/v2/{parent=projects/*/agent/sessions/*}/contextsZJ\022H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts\332A\006parent",
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name="GetContext",
- full_name="google.cloud.dialogflow.v2.Contexts.GetContext",
- index=1,
- containing_service=None,
- input_type=_GETCONTEXTREQUEST,
- output_type=_CONTEXT,
- serialized_options=b"\202\323\344\223\002\177\0221/v2/{name=projects/*/agent/sessions/*/contexts/*}ZJ\022H/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}\332A\004name",
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name="CreateContext",
- full_name="google.cloud.dialogflow.v2.Contexts.CreateContext",
- index=2,
- containing_service=None,
- input_type=_CREATECONTEXTREQUEST,
- output_type=_CONTEXT,
- serialized_options=b'\202\323\344\223\002\221\001"1/v2/{parent=projects/*/agent/sessions/*}/contexts:\007contextZS"H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts:\007context\332A\016parent,context',
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name="UpdateContext",
- full_name="google.cloud.dialogflow.v2.Contexts.UpdateContext",
- index=3,
- containing_service=None,
- input_type=_UPDATECONTEXTREQUEST,
- output_type=_CONTEXT,
- serialized_options=b"\202\323\344\223\002\241\00129/v2/{context.name=projects/*/agent/sessions/*/contexts/*}:\007contextZ[2P/v2/{context.name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}:\007context\332A\023context,update_mask",
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name="DeleteContext",
- full_name="google.cloud.dialogflow.v2.Contexts.DeleteContext",
- index=4,
- containing_service=None,
- input_type=_DELETECONTEXTREQUEST,
- output_type=google_dot_protobuf_dot_empty__pb2._EMPTY,
- serialized_options=b"\202\323\344\223\002\177*1/v2/{name=projects/*/agent/sessions/*/contexts/*}ZJ*H/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}\332A\004name",
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.MethodDescriptor(
- name="DeleteAllContexts",
- full_name="google.cloud.dialogflow.v2.Contexts.DeleteAllContexts",
- index=5,
- containing_service=None,
- input_type=_DELETEALLCONTEXTSREQUEST,
- output_type=google_dot_protobuf_dot_empty__pb2._EMPTY,
- serialized_options=b"\202\323\344\223\002\177*1/v2/{parent=projects/*/agent/sessions/*}/contextsZJ*H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts\332A\006parent",
- create_key=_descriptor._internal_create_key,
- ),
- ],
-)
-_sym_db.RegisterServiceDescriptor(_CONTEXTS)
-
-DESCRIPTOR.services_by_name["Contexts"] = _CONTEXTS
-
-# @@protoc_insertion_point(module_scope)
diff --git a/dialogflow_v2/proto/context_pb2_grpc.py b/dialogflow_v2/proto/context_pb2_grpc.py
deleted file mode 100644
index 0e91897f2..000000000
--- a/dialogflow_v2/proto/context_pb2_grpc.py
+++ /dev/null
@@ -1,306 +0,0 @@
-# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
-"""Client and server classes corresponding to protobuf-defined services."""
-import grpc
-
-from dialogflow_v2.proto import (
- context_pb2 as google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2,
-)
-from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
-
-
-class ContextsStub(object):
- """Service for managing [Contexts][google.cloud.dialogflow.v2.Context].
- """
-
- def __init__(self, channel):
- """Constructor.
-
- Args:
- channel: A grpc.Channel.
- """
- self.ListContexts = channel.unary_unary(
- "/google.cloud.dialogflow.v2.Contexts/ListContexts",
- request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.ListContextsRequest.SerializeToString,
- response_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.ListContextsResponse.FromString,
- )
- self.GetContext = channel.unary_unary(
- "/google.cloud.dialogflow.v2.Contexts/GetContext",
- request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.GetContextRequest.SerializeToString,
- response_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.Context.FromString,
- )
- self.CreateContext = channel.unary_unary(
- "/google.cloud.dialogflow.v2.Contexts/CreateContext",
- request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.CreateContextRequest.SerializeToString,
- response_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.Context.FromString,
- )
- self.UpdateContext = channel.unary_unary(
- "/google.cloud.dialogflow.v2.Contexts/UpdateContext",
- request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.UpdateContextRequest.SerializeToString,
- response_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.Context.FromString,
- )
- self.DeleteContext = channel.unary_unary(
- "/google.cloud.dialogflow.v2.Contexts/DeleteContext",
- request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.DeleteContextRequest.SerializeToString,
- response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
- )
- self.DeleteAllContexts = channel.unary_unary(
- "/google.cloud.dialogflow.v2.Contexts/DeleteAllContexts",
- request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.DeleteAllContextsRequest.SerializeToString,
- response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
- )
-
-
-class ContextsServicer(object):
- """Service for managing [Contexts][google.cloud.dialogflow.v2.Context].
- """
-
- def ListContexts(self, request, context):
- """Returns the list of all contexts in the specified session.
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details("Method not implemented!")
- raise NotImplementedError("Method not implemented!")
-
- def GetContext(self, request, context):
- """Retrieves the specified context.
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details("Method not implemented!")
- raise NotImplementedError("Method not implemented!")
-
- def CreateContext(self, request, context):
- """Creates a context.
-
- If the specified context already exists, overrides the context.
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details("Method not implemented!")
- raise NotImplementedError("Method not implemented!")
-
- def UpdateContext(self, request, context):
- """Updates the specified context.
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details("Method not implemented!")
- raise NotImplementedError("Method not implemented!")
-
- def DeleteContext(self, request, context):
- """Deletes the specified context.
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details("Method not implemented!")
- raise NotImplementedError("Method not implemented!")
-
- def DeleteAllContexts(self, request, context):
- """Deletes all active contexts in the specified session.
- """
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details("Method not implemented!")
- raise NotImplementedError("Method not implemented!")
-
-
-def add_ContextsServicer_to_server(servicer, server):
- rpc_method_handlers = {
- "ListContexts": grpc.unary_unary_rpc_method_handler(
- servicer.ListContexts,
- request_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.ListContextsRequest.FromString,
- response_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.ListContextsResponse.SerializeToString,
- ),
- "GetContext": grpc.unary_unary_rpc_method_handler(
- servicer.GetContext,
- request_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.GetContextRequest.FromString,
- response_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.Context.SerializeToString,
- ),
- "CreateContext": grpc.unary_unary_rpc_method_handler(
- servicer.CreateContext,
- request_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.CreateContextRequest.FromString,
- response_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.Context.SerializeToString,
- ),
- "UpdateContext": grpc.unary_unary_rpc_method_handler(
- servicer.UpdateContext,
- request_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.UpdateContextRequest.FromString,
- response_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.Context.SerializeToString,
- ),
- "DeleteContext": grpc.unary_unary_rpc_method_handler(
- servicer.DeleteContext,
- request_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.DeleteContextRequest.FromString,
- response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
- ),
- "DeleteAllContexts": grpc.unary_unary_rpc_method_handler(
- servicer.DeleteAllContexts,
- request_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.DeleteAllContextsRequest.FromString,
- response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
- ),
- }
- generic_handler = grpc.method_handlers_generic_handler(
- "google.cloud.dialogflow.v2.Contexts", rpc_method_handlers
- )
- server.add_generic_rpc_handlers((generic_handler,))
-
-
-# This class is part of an EXPERIMENTAL API.
-class Contexts(object):
- """Service for managing [Contexts][google.cloud.dialogflow.v2.Context].
- """
-
- @staticmethod
- def ListContexts(
- request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None,
- ):
- return grpc.experimental.unary_unary(
- request,
- target,
- "/google.cloud.dialogflow.v2.Contexts/ListContexts",
- google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.ListContextsRequest.SerializeToString,
- google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.ListContextsResponse.FromString,
- options,
- channel_credentials,
- call_credentials,
- compression,
- wait_for_ready,
- timeout,
- metadata,
- )
-
- @staticmethod
- def GetContext(
- request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None,
- ):
- return grpc.experimental.unary_unary(
- request,
- target,
- "/google.cloud.dialogflow.v2.Contexts/GetContext",
- google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.GetContextRequest.SerializeToString,
- google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.Context.FromString,
- options,
- channel_credentials,
- call_credentials,
- compression,
- wait_for_ready,
- timeout,
- metadata,
- )
-
- @staticmethod
- def CreateContext(
- request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None,
- ):
- return grpc.experimental.unary_unary(
- request,
- target,
- "/google.cloud.dialogflow.v2.Contexts/CreateContext",
- google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.CreateContextRequest.SerializeToString,
- google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.Context.FromString,
- options,
- channel_credentials,
- call_credentials,
- compression,
- wait_for_ready,
- timeout,
- metadata,
- )
-
- @staticmethod
- def UpdateContext(
- request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None,
- ):
- return grpc.experimental.unary_unary(
- request,
- target,
- "/google.cloud.dialogflow.v2.Contexts/UpdateContext",
- google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.UpdateContextRequest.SerializeToString,
- google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.Context.FromString,
- options,
- channel_credentials,
- call_credentials,
- compression,
- wait_for_ready,
- timeout,
- metadata,
- )
-
- @staticmethod
- def DeleteContext(
- request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None,
- ):
- return grpc.experimental.unary_unary(
- request,
- target,
- "/google.cloud.dialogflow.v2.Contexts/DeleteContext",
- google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.DeleteContextRequest.SerializeToString,
- google_dot_protobuf_dot_empty__pb2.Empty.FromString,
- options,
- channel_credentials,
- call_credentials,
- compression,
- wait_for_ready,
- timeout,
- metadata,
- )
-
- @staticmethod
- def DeleteAllContexts(
- request,
- target,
- options=(),
- channel_credentials=None,
- call_credentials=None,
- compression=None,
- wait_for_ready=None,
- timeout=None,
- metadata=None,
- ):
- return grpc.experimental.unary_unary(
- request,
- target,
- "/google.cloud.dialogflow.v2.Contexts/DeleteAllContexts",
- google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.DeleteAllContextsRequest.SerializeToString,
- google_dot_protobuf_dot_empty__pb2.Empty.FromString,
- options,
- channel_credentials,
- call_credentials,
- compression,
- wait_for_ready,
- timeout,
- metadata,
- )
diff --git a/dialogflow_v2/proto/entity_type_pb2.py b/dialogflow_v2/proto/entity_type_pb2.py
deleted file mode 100644
index 5c145b9da..000000000
--- a/dialogflow_v2/proto/entity_type_pb2.py
+++ /dev/null
@@ -1,1888 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: google/cloud/dialogflow_v2/proto/entity_type.proto
-"""Generated protocol buffer code."""
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
-from google.api import client_pb2 as google_dot_api_dot_client__pb2
-from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2
-from google.api import resource_pb2 as google_dot_api_dot_resource__pb2
-from google.longrunning import (
- operations_pb2 as google_dot_longrunning_dot_operations__pb2,
-)
-from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
-from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
- name="google/cloud/dialogflow_v2/proto/entity_type.proto",
- package="google.cloud.dialogflow.v2",
- syntax="proto3",
- serialized_options=b"\n\036com.google.cloud.dialogflow.v2B\017EntityTypeProtoP\001ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2",
- create_key=_descriptor._internal_create_key,
- serialized_pb=b'\n2google/cloud/dialogflow_v2/proto/entity_type.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto"\xf8\x04\n\nEntityType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x04kind\x18\x03 \x01(\x0e\x32+.google.cloud.dialogflow.v2.EntityType.KindB\x03\xe0\x41\x02\x12Z\n\x13\x61uto_expansion_mode\x18\x04 \x01(\x0e\x32\x38.google.cloud.dialogflow.v2.EntityType.AutoExpansionModeB\x03\xe0\x41\x01\x12\x44\n\x08\x65ntities\x18\x06 \x03(\x0b\x32-.google.cloud.dialogflow.v2.EntityType.EntityB\x03\xe0\x41\x01\x12$\n\x17\x65nable_fuzzy_extraction\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x33\n\x06\x45ntity\x12\x12\n\x05value\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08synonyms\x18\x02 \x03(\tB\x03\xe0\x41\x02"J\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\x0c\n\x08KIND_MAP\x10\x01\x12\r\n\tKIND_LIST\x10\x02\x12\x0f\n\x0bKIND_REGEXP\x10\x03"Y\n\x11\x41utoExpansionMode\x12#\n\x1f\x41UTO_EXPANSION_MODE_UNSPECIFIED\x10\x00\x12\x1f\n\x1b\x41UTO_EXPANSION_MODE_DEFAULT\x10\x01:]\xea\x41Z\n$dialogflow.googleapis.com/EntityType\x12\x32projects/{project}/agent/entityTypes/{entity_type}"\xa3\x01\n\x16ListEntityTypesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$dialogflow.googleapis.com/EntityType\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01"p\n\x17ListEntityTypesResponse\x12<\n\x0c\x65ntity_types\x18\x01 \x03(\x0b\x32&.google.cloud.dialogflow.v2.EntityType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"n\n\x14GetEntityTypeRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dialogflow.googleapis.com/EntityType\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01"\xb5\x01\n\x17\x43reateEntityTypeRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$dialogflow.googleapis.com/EntityType\x12@\n\x0b\x65ntity_type\x18\x02 \x01(\x0b\x32&.google.cloud.dialogflow.v2.EntityTypeB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01"\xad\x01\n\x17UpdateEntityTypeRequest\x12@\n\x0b\x65ntity_type\x18\x01 \x01(\x0b\x32&.google.cloud.dialogflow.v2.EntityTypeB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"U\n\x17\x44\x65leteEntityTypeRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dialogflow.googleapis.com/EntityType"\xb6\x02\n\x1d\x42\x61tchUpdateEntityTypesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$dialogflow.googleapis.com/EntityType\x12\x1f\n\x15\x65ntity_type_batch_uri\x18\x02 \x01(\tH\x00\x12O\n\x18\x65ntity_type_batch_inline\x18\x03 \x01(\x0b\x32+.google.cloud.dialogflow.v2.EntityTypeBatchH\x00\x12\x1a\n\rlanguage_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x42\x13\n\x11\x65ntity_type_batch"^\n\x1e\x42\x61tchUpdateEntityTypesResponse\x12<\n\x0c\x65ntity_types\x18\x01 \x03(\x0b\x32&.google.cloud.dialogflow.v2.EntityType"}\n\x1d\x42\x61tchDeleteEntityTypesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$dialogflow.googleapis.com/EntityType\x12\x1e\n\x11\x65ntity_type_names\x18\x02 \x03(\tB\x03\xe0\x41\x02"\xbc\x01\n\x1a\x42\x61tchCreateEntitiesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dialogflow.googleapis.com/EntityType\x12\x44\n\x08\x65ntities\x18\x02 \x03(\x0b\x32-.google.cloud.dialogflow.v2.EntityType.EntityB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01"\xf2\x01\n\x1a\x42\x61tchUpdateEntitiesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dialogflow.googleapis.com/EntityType\x12\x44\n\x08\x65ntities\x18\x02 \x03(\x0b\x32-.google.cloud.dialogflow.v2.EntityType.EntityB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"\x92\x01\n\x1a\x42\x61tchDeleteEntitiesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dialogflow.googleapis.com/EntityType\x12\x1a\n\rentity_values\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01"O\n\x0f\x45ntityTypeBatch\x12<\n\x0c\x65ntity_types\x18\x01 \x03(\x0b\x32&.google.cloud.dialogflow.v2.EntityType2\x80\x14\n\x0b\x45ntityTypes\x12\xcd\x01\n\x0fListEntityTypes\x12\x32.google.cloud.dialogflow.v2.ListEntityTypesRequest\x1a\x33.google.cloud.dialogflow.v2.ListEntityTypesResponse"Q\x82\xd3\xe4\x93\x02+\x12)/v2/{parent=projects/*/agent}/entityTypes\xda\x41\x06parent\xda\x41\x14parent,language_code\x12\xb8\x01\n\rGetEntityType\x12\x30.google.cloud.dialogflow.v2.GetEntityTypeRequest\x1a&.google.cloud.dialogflow.v2.EntityType"M\x82\xd3\xe4\x93\x02+\x12)/v2/{name=projects/*/agent/entityTypes/*}\xda\x41\x04name\xda\x41\x12name,language_code\x12\xe7\x01\n\x10\x43reateEntityType\x12\x33.google.cloud.dialogflow.v2.CreateEntityTypeRequest\x1a&.google.cloud.dialogflow.v2.EntityType"v\x82\xd3\xe4\x93\x02\x38")/v2/{parent=projects/*/agent}/entityTypes:\x0b\x65ntity_type\xda\x41\x12parent,entity_type\xda\x41 parent,entity_type,language_code\x12\xe5\x01\n\x10UpdateEntityType\x12\x33.google.cloud.dialogflow.v2.UpdateEntityTypeRequest\x1a&.google.cloud.dialogflow.v2.EntityType"t\x82\xd3\xe4\x93\x02\x44\x32\x35/v2/{entity_type.name=projects/*/agent/entityTypes/*}:\x0b\x65ntity_type\xda\x41\x0b\x65ntity_type\xda\x41\x19\x65ntity_type,language_code\x12\x99\x01\n\x10\x44\x65leteEntityType\x12\x33.google.cloud.dialogflow.v2.DeleteEntityTypeRequest\x1a\x16.google.protobuf.Empty"8\x82\xd3\xe4\x93\x02+*)/v2/{name=projects/*/agent/entityTypes/*}\xda\x41\x04name\x12\x8b\x02\n\x16\x42\x61tchUpdateEntityTypes\x12\x39.google.cloud.dialogflow.v2.BatchUpdateEntityTypesRequest\x1a\x1d.google.longrunning.Operation"\x96\x01\x82\xd3\xe4\x93\x02:"5/v2/{parent=projects/*/agent}/entityTypes:batchUpdate:\x01*\xca\x41S\n9google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse\x12\x16google.protobuf.Struct\x12\x82\x02\n\x16\x42\x61tchDeleteEntityTypes\x12\x39.google.cloud.dialogflow.v2.BatchDeleteEntityTypesRequest\x1a\x1d.google.longrunning.Operation"\x8d\x01\x82\xd3\xe4\x93\x02:"5/v2/{parent=projects/*/agent}/entityTypes:batchDelete:\x01*\xda\x41\x18parent,entity_type_names\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x12\x9e\x02\n\x13\x42\x61tchCreateEntities\x12\x36.google.cloud.dialogflow.v2.BatchCreateEntitiesRequest\x1a\x1d.google.longrunning.Operation"\xaf\x01\x82\xd3\xe4\x93\x02\x45"@/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate:\x01*\xda\x41\x0fparent,entities\xda\x41\x1dparent,entities,language_code\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x12\x9e\x02\n\x13\x42\x61tchUpdateEntities\x12\x36.google.cloud.dialogflow.v2.BatchUpdateEntitiesRequest\x1a\x1d.google.longrunning.Operation"\xaf\x01\x82\xd3\xe4\x93\x02\x45"@/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate:\x01*\xda\x41\x0fparent,entities\xda\x41\x1dparent,entities,language_code\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x12\xa8\x02\n\x13\x42\x61tchDeleteEntities\x12\x36.google.cloud.dialogflow.v2.BatchDeleteEntitiesRequest\x1a\x1d.google.longrunning.Operation"\xb9\x01\x82\xd3\xe4\x93\x02\x45"@/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete:\x01*\xda\x41\x14parent,entity_values\xda\x41"parent,entity_values,language_code\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\x9e\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\x0f\x45ntityTypeProtoP\x01ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3',
- dependencies=[
- google_dot_api_dot_annotations__pb2.DESCRIPTOR,
- google_dot_api_dot_client__pb2.DESCRIPTOR,
- google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,
- google_dot_api_dot_resource__pb2.DESCRIPTOR,
- google_dot_longrunning_dot_operations__pb2.DESCRIPTOR,
- google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,
- google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR,
- ],
-)
-
-
-_ENTITYTYPE_KIND = _descriptor.EnumDescriptor(
- name="Kind",
- full_name="google.cloud.dialogflow.v2.EntityType.Kind",
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name="KIND_UNSPECIFIED",
- index=0,
- number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="KIND_MAP",
- index=1,
- number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="KIND_LIST",
- index=2,
- number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="KIND_REGEXP",
- index=3,
- number=3,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=670,
- serialized_end=744,
-)
-_sym_db.RegisterEnumDescriptor(_ENTITYTYPE_KIND)
-
-_ENTITYTYPE_AUTOEXPANSIONMODE = _descriptor.EnumDescriptor(
- name="AutoExpansionMode",
- full_name="google.cloud.dialogflow.v2.EntityType.AutoExpansionMode",
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name="AUTO_EXPANSION_MODE_UNSPECIFIED",
- index=0,
- number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.EnumValueDescriptor(
- name="AUTO_EXPANSION_MODE_DEFAULT",
- index=1,
- number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=746,
- serialized_end=835,
-)
-_sym_db.RegisterEnumDescriptor(_ENTITYTYPE_AUTOEXPANSIONMODE)
-
-
-_ENTITYTYPE_ENTITY = _descriptor.Descriptor(
- name="Entity",
- full_name="google.cloud.dialogflow.v2.EntityType.Entity",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="value",
- full_name="google.cloud.dialogflow.v2.EntityType.Entity.value",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="synonyms",
- full_name="google.cloud.dialogflow.v2.EntityType.Entity.synonyms",
- index=1,
- number=2,
- type=9,
- cpp_type=9,
- label=3,
- has_default_value=False,
- default_value=[],
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=617,
- serialized_end=668,
-)
-
-_ENTITYTYPE = _descriptor.Descriptor(
- name="EntityType",
- full_name="google.cloud.dialogflow.v2.EntityType",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="name",
- full_name="google.cloud.dialogflow.v2.EntityType.name",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="display_name",
- full_name="google.cloud.dialogflow.v2.EntityType.display_name",
- index=1,
- number=2,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="kind",
- full_name="google.cloud.dialogflow.v2.EntityType.kind",
- index=2,
- number=3,
- type=14,
- cpp_type=8,
- label=1,
- has_default_value=False,
- default_value=0,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="auto_expansion_mode",
- full_name="google.cloud.dialogflow.v2.EntityType.auto_expansion_mode",
- index=3,
- number=4,
- type=14,
- cpp_type=8,
- label=1,
- has_default_value=False,
- default_value=0,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="entities",
- full_name="google.cloud.dialogflow.v2.EntityType.entities",
- index=4,
- number=6,
- type=11,
- cpp_type=10,
- label=3,
- has_default_value=False,
- default_value=[],
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="enable_fuzzy_extraction",
- full_name="google.cloud.dialogflow.v2.EntityType.enable_fuzzy_extraction",
- index=5,
- number=7,
- type=8,
- cpp_type=7,
- label=1,
- has_default_value=False,
- default_value=False,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[_ENTITYTYPE_ENTITY],
- enum_types=[_ENTITYTYPE_KIND, _ENTITYTYPE_AUTOEXPANSIONMODE],
- serialized_options=b"\352AZ\n$dialogflow.googleapis.com/EntityType\0222projects/{project}/agent/entityTypes/{entity_type}",
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=298,
- serialized_end=930,
-)
-
-
-_LISTENTITYTYPESREQUEST = _descriptor.Descriptor(
- name="ListEntityTypesRequest",
- full_name="google.cloud.dialogflow.v2.ListEntityTypesRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="parent",
- full_name="google.cloud.dialogflow.v2.ListEntityTypesRequest.parent",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002\372A&\022$dialogflow.googleapis.com/EntityType",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="language_code",
- full_name="google.cloud.dialogflow.v2.ListEntityTypesRequest.language_code",
- index=1,
- number=2,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="page_size",
- full_name="google.cloud.dialogflow.v2.ListEntityTypesRequest.page_size",
- index=2,
- number=3,
- type=5,
- cpp_type=1,
- label=1,
- has_default_value=False,
- default_value=0,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="page_token",
- full_name="google.cloud.dialogflow.v2.ListEntityTypesRequest.page_token",
- index=3,
- number=4,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=933,
- serialized_end=1096,
-)
-
-
-_LISTENTITYTYPESRESPONSE = _descriptor.Descriptor(
- name="ListEntityTypesResponse",
- full_name="google.cloud.dialogflow.v2.ListEntityTypesResponse",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="entity_types",
- full_name="google.cloud.dialogflow.v2.ListEntityTypesResponse.entity_types",
- index=0,
- number=1,
- type=11,
- cpp_type=10,
- label=3,
- has_default_value=False,
- default_value=[],
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="next_page_token",
- full_name="google.cloud.dialogflow.v2.ListEntityTypesResponse.next_page_token",
- index=1,
- number=2,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=1098,
- serialized_end=1210,
-)
-
-
-_GETENTITYTYPEREQUEST = _descriptor.Descriptor(
- name="GetEntityTypeRequest",
- full_name="google.cloud.dialogflow.v2.GetEntityTypeRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="name",
- full_name="google.cloud.dialogflow.v2.GetEntityTypeRequest.name",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002\372A&\n$dialogflow.googleapis.com/EntityType",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="language_code",
- full_name="google.cloud.dialogflow.v2.GetEntityTypeRequest.language_code",
- index=1,
- number=2,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=1212,
- serialized_end=1322,
-)
-
-
-_CREATEENTITYTYPEREQUEST = _descriptor.Descriptor(
- name="CreateEntityTypeRequest",
- full_name="google.cloud.dialogflow.v2.CreateEntityTypeRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="parent",
- full_name="google.cloud.dialogflow.v2.CreateEntityTypeRequest.parent",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002\372A&\022$dialogflow.googleapis.com/EntityType",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="entity_type",
- full_name="google.cloud.dialogflow.v2.CreateEntityTypeRequest.entity_type",
- index=1,
- number=2,
- type=11,
- cpp_type=10,
- label=1,
- has_default_value=False,
- default_value=None,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="language_code",
- full_name="google.cloud.dialogflow.v2.CreateEntityTypeRequest.language_code",
- index=2,
- number=3,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=1325,
- serialized_end=1506,
-)
-
-
-_UPDATEENTITYTYPEREQUEST = _descriptor.Descriptor(
- name="UpdateEntityTypeRequest",
- full_name="google.cloud.dialogflow.v2.UpdateEntityTypeRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="entity_type",
- full_name="google.cloud.dialogflow.v2.UpdateEntityTypeRequest.entity_type",
- index=0,
- number=1,
- type=11,
- cpp_type=10,
- label=1,
- has_default_value=False,
- default_value=None,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="language_code",
- full_name="google.cloud.dialogflow.v2.UpdateEntityTypeRequest.language_code",
- index=1,
- number=2,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="update_mask",
- full_name="google.cloud.dialogflow.v2.UpdateEntityTypeRequest.update_mask",
- index=2,
- number=3,
- type=11,
- cpp_type=10,
- label=1,
- has_default_value=False,
- default_value=None,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=1509,
- serialized_end=1682,
-)
-
-
-_DELETEENTITYTYPEREQUEST = _descriptor.Descriptor(
- name="DeleteEntityTypeRequest",
- full_name="google.cloud.dialogflow.v2.DeleteEntityTypeRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="name",
- full_name="google.cloud.dialogflow.v2.DeleteEntityTypeRequest.name",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002\372A&\n$dialogflow.googleapis.com/EntityType",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- )
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=1684,
- serialized_end=1769,
-)
-
-
-_BATCHUPDATEENTITYTYPESREQUEST = _descriptor.Descriptor(
- name="BatchUpdateEntityTypesRequest",
- full_name="google.cloud.dialogflow.v2.BatchUpdateEntityTypesRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="parent",
- full_name="google.cloud.dialogflow.v2.BatchUpdateEntityTypesRequest.parent",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002\372A&\022$dialogflow.googleapis.com/EntityType",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="entity_type_batch_uri",
- full_name="google.cloud.dialogflow.v2.BatchUpdateEntityTypesRequest.entity_type_batch_uri",
- index=1,
- number=2,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="entity_type_batch_inline",
- full_name="google.cloud.dialogflow.v2.BatchUpdateEntityTypesRequest.entity_type_batch_inline",
- index=2,
- number=3,
- type=11,
- cpp_type=10,
- label=1,
- has_default_value=False,
- default_value=None,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="language_code",
- full_name="google.cloud.dialogflow.v2.BatchUpdateEntityTypesRequest.language_code",
- index=3,
- number=4,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="update_mask",
- full_name="google.cloud.dialogflow.v2.BatchUpdateEntityTypesRequest.update_mask",
- index=4,
- number=5,
- type=11,
- cpp_type=10,
- label=1,
- has_default_value=False,
- default_value=None,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[
- _descriptor.OneofDescriptor(
- name="entity_type_batch",
- full_name="google.cloud.dialogflow.v2.BatchUpdateEntityTypesRequest.entity_type_batch",
- index=0,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[],
- )
- ],
- serialized_start=1772,
- serialized_end=2082,
-)
-
-
-_BATCHUPDATEENTITYTYPESRESPONSE = _descriptor.Descriptor(
- name="BatchUpdateEntityTypesResponse",
- full_name="google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="entity_types",
- full_name="google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse.entity_types",
- index=0,
- number=1,
- type=11,
- cpp_type=10,
- label=3,
- has_default_value=False,
- default_value=[],
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- )
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=2084,
- serialized_end=2178,
-)
-
-
-_BATCHDELETEENTITYTYPESREQUEST = _descriptor.Descriptor(
- name="BatchDeleteEntityTypesRequest",
- full_name="google.cloud.dialogflow.v2.BatchDeleteEntityTypesRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="parent",
- full_name="google.cloud.dialogflow.v2.BatchDeleteEntityTypesRequest.parent",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002\372A&\022$dialogflow.googleapis.com/EntityType",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="entity_type_names",
- full_name="google.cloud.dialogflow.v2.BatchDeleteEntityTypesRequest.entity_type_names",
- index=1,
- number=2,
- type=9,
- cpp_type=9,
- label=3,
- has_default_value=False,
- default_value=[],
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=2180,
- serialized_end=2305,
-)
-
-
-_BATCHCREATEENTITIESREQUEST = _descriptor.Descriptor(
- name="BatchCreateEntitiesRequest",
- full_name="google.cloud.dialogflow.v2.BatchCreateEntitiesRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="parent",
- full_name="google.cloud.dialogflow.v2.BatchCreateEntitiesRequest.parent",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002\372A&\n$dialogflow.googleapis.com/EntityType",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="entities",
- full_name="google.cloud.dialogflow.v2.BatchCreateEntitiesRequest.entities",
- index=1,
- number=2,
- type=11,
- cpp_type=10,
- label=3,
- has_default_value=False,
- default_value=[],
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="language_code",
- full_name="google.cloud.dialogflow.v2.BatchCreateEntitiesRequest.language_code",
- index=2,
- number=3,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=2308,
- serialized_end=2496,
-)
-
-
-_BATCHUPDATEENTITIESREQUEST = _descriptor.Descriptor(
- name="BatchUpdateEntitiesRequest",
- full_name="google.cloud.dialogflow.v2.BatchUpdateEntitiesRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="parent",
- full_name="google.cloud.dialogflow.v2.BatchUpdateEntitiesRequest.parent",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002\372A&\n$dialogflow.googleapis.com/EntityType",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="entities",
- full_name="google.cloud.dialogflow.v2.BatchUpdateEntitiesRequest.entities",
- index=1,
- number=2,
- type=11,
- cpp_type=10,
- label=3,
- has_default_value=False,
- default_value=[],
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="language_code",
- full_name="google.cloud.dialogflow.v2.BatchUpdateEntitiesRequest.language_code",
- index=2,
- number=3,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="update_mask",
- full_name="google.cloud.dialogflow.v2.BatchUpdateEntitiesRequest.update_mask",
- index=3,
- number=4,
- type=11,
- cpp_type=10,
- label=1,
- has_default_value=False,
- default_value=None,
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=2499,
- serialized_end=2741,
-)
-
-
-_BATCHDELETEENTITIESREQUEST = _descriptor.Descriptor(
- name="BatchDeleteEntitiesRequest",
- full_name="google.cloud.dialogflow.v2.BatchDeleteEntitiesRequest",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="parent",
- full_name="google.cloud.dialogflow.v2.BatchDeleteEntitiesRequest.parent",
- index=0,
- number=1,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002\372A&\n$dialogflow.googleapis.com/EntityType",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="entity_values",
- full_name="google.cloud.dialogflow.v2.BatchDeleteEntitiesRequest.entity_values",
- index=1,
- number=2,
- type=9,
- cpp_type=9,
- label=3,
- has_default_value=False,
- default_value=[],
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\002",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- _descriptor.FieldDescriptor(
- name="language_code",
- full_name="google.cloud.dialogflow.v2.BatchDeleteEntitiesRequest.language_code",
- index=2,
- number=3,
- type=9,
- cpp_type=9,
- label=1,
- has_default_value=False,
- default_value=b"".decode("utf-8"),
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=b"\340A\001",
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- ),
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=2744,
- serialized_end=2890,
-)
-
-
-_ENTITYTYPEBATCH = _descriptor.Descriptor(
- name="EntityTypeBatch",
- full_name="google.cloud.dialogflow.v2.EntityTypeBatch",
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name="entity_types",
- full_name="google.cloud.dialogflow.v2.EntityTypeBatch.entity_types",
- index=0,
- number=1,
- type=11,
- cpp_type=10,
- label=3,
- has_default_value=False,
- default_value=[],
- message_type=None,
- enum_type=None,
- containing_type=None,
- is_extension=False,
- extension_scope=None,
- serialized_options=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- )
- ],
- extensions=[],
- nested_types=[],
- enum_types=[],
- serialized_options=None,
- is_extendable=False,
- syntax="proto3",
- extension_ranges=[],
- oneofs=[],
- serialized_start=2892,
- serialized_end=2971,
-)
-
-_ENTITYTYPE_ENTITY.containing_type = _ENTITYTYPE
-_ENTITYTYPE.fields_by_name["kind"].enum_type = _ENTITYTYPE_KIND
-_ENTITYTYPE.fields_by_name[
- "auto_expansion_mode"
-].enum_type = _ENTITYTYPE_AUTOEXPANSIONMODE
-_ENTITYTYPE.fields_by_name["entities"].message_type = _ENTITYTYPE_ENTITY
-_ENTITYTYPE_KIND.containing_type = _ENTITYTYPE
-_ENTITYTYPE_AUTOEXPANSIONMODE.containing_type = _ENTITYTYPE
-_LISTENTITYTYPESRESPONSE.fields_by_name["entity_types"].message_type = _ENTITYTYPE
-_CREATEENTITYTYPEREQUEST.fields_by_name["entity_type"].message_type = _ENTITYTYPE
-_UPDATEENTITYTYPEREQUEST.fields_by_name["entity_type"].message_type = _ENTITYTYPE
-_UPDATEENTITYTYPEREQUEST.fields_by_name[
- "update_mask"
-].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK
-_BATCHUPDATEENTITYTYPESREQUEST.fields_by_name[
- "entity_type_batch_inline"
-].message_type = _ENTITYTYPEBATCH
-_BATCHUPDATEENTITYTYPESREQUEST.fields_by_name[
- "update_mask"
-].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK
-_BATCHUPDATEENTITYTYPESREQUEST.oneofs_by_name["entity_type_batch"].fields.append(
- _BATCHUPDATEENTITYTYPESREQUEST.fields_by_name["entity_type_batch_uri"]
-)
-_BATCHUPDATEENTITYTYPESREQUEST.fields_by_name[
- "entity_type_batch_uri"
-].containing_oneof = _BATCHUPDATEENTITYTYPESREQUEST.oneofs_by_name["entity_type_batch"]
-_BATCHUPDATEENTITYTYPESREQUEST.oneofs_by_name["entity_type_batch"].fields.append(
- _BATCHUPDATEENTITYTYPESREQUEST.fields_by_name["entity_type_batch_inline"]
-)
-_BATCHUPDATEENTITYTYPESREQUEST.fields_by_name[
- "entity_type_batch_inline"
-].containing_oneof = _BATCHUPDATEENTITYTYPESREQUEST.oneofs_by_name["entity_type_batch"]
-_BATCHUPDATEENTITYTYPESRESPONSE.fields_by_name[
- "entity_types"
-].message_type = _ENTITYTYPE
-_BATCHCREATEENTITIESREQUEST.fields_by_name["entities"].message_type = _ENTITYTYPE_ENTITY
-_BATCHUPDATEENTITIESREQUEST.fields_by_name["entities"].message_type = _ENTITYTYPE_ENTITY
-_BATCHUPDATEENTITIESREQUEST.fields_by_name[
- "update_mask"
-].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK
-_ENTITYTYPEBATCH.fields_by_name["entity_types"].message_type = _ENTITYTYPE
-DESCRIPTOR.message_types_by_name["EntityType"] = _ENTITYTYPE
-DESCRIPTOR.message_types_by_name["ListEntityTypesRequest"] = _LISTENTITYTYPESREQUEST
-DESCRIPTOR.message_types_by_name["ListEntityTypesResponse"] = _LISTENTITYTYPESRESPONSE
-DESCRIPTOR.message_types_by_name["GetEntityTypeRequest"] = _GETENTITYTYPEREQUEST
-DESCRIPTOR.message_types_by_name["CreateEntityTypeRequest"] = _CREATEENTITYTYPEREQUEST
-DESCRIPTOR.message_types_by_name["UpdateEntityTypeRequest"] = _UPDATEENTITYTYPEREQUEST
-DESCRIPTOR.message_types_by_name["DeleteEntityTypeRequest"] = _DELETEENTITYTYPEREQUEST
-DESCRIPTOR.message_types_by_name[
- "BatchUpdateEntityTypesRequest"
-] = _BATCHUPDATEENTITYTYPESREQUEST
-DESCRIPTOR.message_types_by_name[
- "BatchUpdateEntityTypesResponse"
-] = _BATCHUPDATEENTITYTYPESRESPONSE
-DESCRIPTOR.message_types_by_name[
- "BatchDeleteEntityTypesRequest"
-] = _BATCHDELETEENTITYTYPESREQUEST
-DESCRIPTOR.message_types_by_name[
- "BatchCreateEntitiesRequest"
-] = _BATCHCREATEENTITIESREQUEST
-DESCRIPTOR.message_types_by_name[
- "BatchUpdateEntitiesRequest"
-] = _BATCHUPDATEENTITIESREQUEST
-DESCRIPTOR.message_types_by_name[
- "BatchDeleteEntitiesRequest"
-] = _BATCHDELETEENTITIESREQUEST
-DESCRIPTOR.message_types_by_name["EntityTypeBatch"] = _ENTITYTYPEBATCH
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-EntityType = _reflection.GeneratedProtocolMessageType(
- "EntityType",
- (_message.Message,),
- {
- "Entity": _reflection.GeneratedProtocolMessageType(
- "Entity",
- (_message.Message,),
- {
- "DESCRIPTOR": _ENTITYTYPE_ENTITY,
- "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2",
- "__doc__": """An **entity entry** for an associated entity type.
-
- Attributes:
- value:
- Required. The primary value associated with this entity entry.
- For example, if the entity type is *vegetable*, the value
- could be *scallions*. For ``KIND_MAP`` entity types: - A
- reference value to be used in place of synonyms. For
- ``KIND_LIST`` entity types: - A string that can contain
- references to other entity types (with or without aliases).
- synonyms:
- Required. A collection of value synonyms. For example, if the
- entity type is *vegetable*, and ``value`` is *scallions*, a
- synonym could be *green onions*. For ``KIND_LIST`` entity
- types: - This collection must contain exactly one synonym
- equal to ``value``.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.EntityType.Entity)
- },
- ),
- "DESCRIPTOR": _ENTITYTYPE,
- "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2",
- "__doc__": """Each intent parameter has a type, called the entity type, which
- dictates exactly how data from an end-user expression is extracted.
- Dialogflow provides predefined system entities that can match many
- common types of data. For example, there are system entities for
- matching dates, times, colors, email addresses, and so on. You can
- also create your own custom entities for matching custom data. For
- example, you could define a vegetable entity that can match the types
- of vegetables available for purchase with a grocery store agent. For
- more information, see the `Entity guide
- `__.
-
- Attributes:
- name:
- The unique identifier of the entity type. Required for [Entity
- Types.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes
- .UpdateEntityType] and [EntityTypes.BatchUpdateEntityTypes][go
- ogle.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes]
- methods. Format: ``projects//agent/entityTypes/``.
- display_name:
- Required. The name of the entity type.
- kind:
- Required. Indicates the kind of entity type.
- auto_expansion_mode:
- Optional. Indicates whether the entity type can be
- automatically expanded.
- entities:
- Optional. The collection of entity entries associated with the
- entity type.
- enable_fuzzy_extraction:
- Optional. Enables fuzzy entity extraction during
- classification.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.EntityType)
- },
-)
-_sym_db.RegisterMessage(EntityType)
-_sym_db.RegisterMessage(EntityType.Entity)
-
-ListEntityTypesRequest = _reflection.GeneratedProtocolMessageType(
- "ListEntityTypesRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _LISTENTITYTYPESREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2",
- "__doc__": """The request message for [EntityTypes.ListEntityTypes][google.cloud.dia
- logflow.v2.EntityTypes.ListEntityTypes].
-
- Attributes:
- parent:
- Required. The agent to list all entity types from. Format:
- ``projects//agent``.
- language_code:
- Optional. The language used to access language-specific data.
- If not specified, the agent’s default language is used. For
- more information, see `Multilingual intent and entity data
- `__.
- page_size:
- Optional. The maximum number of items to return in a single
- page. By default 100 and at most 1000.
- page_token:
- Optional. The next_page_token value returned from a previous
- list request.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ListEntityTypesRequest)
- },
-)
-_sym_db.RegisterMessage(ListEntityTypesRequest)
-
-ListEntityTypesResponse = _reflection.GeneratedProtocolMessageType(
- "ListEntityTypesResponse",
- (_message.Message,),
- {
- "DESCRIPTOR": _LISTENTITYTYPESRESPONSE,
- "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2",
- "__doc__": """The response message for [EntityTypes.ListEntityTypes][google.cloud.di
- alogflow.v2.EntityTypes.ListEntityTypes].
-
- Attributes:
- entity_types:
- The list of agent entity types. There will be a maximum number
- of items returned based on the page_size field in the request.
- next_page_token:
- Token to retrieve the next page of results, or empty if there
- are no more results in the list.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ListEntityTypesResponse)
- },
-)
-_sym_db.RegisterMessage(ListEntityTypesResponse)
-
-GetEntityTypeRequest = _reflection.GeneratedProtocolMessageType(
- "GetEntityTypeRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _GETENTITYTYPEREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2",
- "__doc__": """The request message for [EntityTypes.GetEntityType][google.cloud.dialo
- gflow.v2.EntityTypes.GetEntityType].
-
- Attributes:
- name:
- Required. The name of the entity type. Format:
- ``projects//agent/entityTypes/``.
- language_code:
- Optional. The language used to access language-specific data.
- If not specified, the agent’s default language is used. For
- more information, see `Multilingual intent and entity data
- `__.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.GetEntityTypeRequest)
- },
-)
-_sym_db.RegisterMessage(GetEntityTypeRequest)
-
-CreateEntityTypeRequest = _reflection.GeneratedProtocolMessageType(
- "CreateEntityTypeRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _CREATEENTITYTYPEREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2",
- "__doc__": """The request message for [EntityTypes.CreateEntityType][google.cloud.di
- alogflow.v2.EntityTypes.CreateEntityType].
-
- Attributes:
- parent:
- Required. The agent to create a entity type for. Format:
- ``projects//agent``.
- entity_type:
- Required. The entity type to create.
- language_code:
- Optional. The language used to access language-specific data.
- If not specified, the agent’s default language is used. For
- more information, see `Multilingual intent and entity data
- `__.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.CreateEntityTypeRequest)
- },
-)
-_sym_db.RegisterMessage(CreateEntityTypeRequest)
-
-UpdateEntityTypeRequest = _reflection.GeneratedProtocolMessageType(
- "UpdateEntityTypeRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _UPDATEENTITYTYPEREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2",
- "__doc__": """The request message for [EntityTypes.UpdateEntityType][google.cloud.di
- alogflow.v2.EntityTypes.UpdateEntityType].
-
- Attributes:
- entity_type:
- Required. The entity type to update.
- language_code:
- Optional. The language used to access language-specific data.
- If not specified, the agent’s default language is used. For
- more information, see `Multilingual intent and entity data
- `__.
- update_mask:
- Optional. The mask to control which fields get updated.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.UpdateEntityTypeRequest)
- },
-)
-_sym_db.RegisterMessage(UpdateEntityTypeRequest)
-
-DeleteEntityTypeRequest = _reflection.GeneratedProtocolMessageType(
- "DeleteEntityTypeRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _DELETEENTITYTYPEREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2",
- "__doc__": """The request message for [EntityTypes.DeleteEntityType][google.cloud.di
- alogflow.v2.EntityTypes.DeleteEntityType].
-
- Attributes:
- name:
- Required. The name of the entity type to delete. Format:
- ``projects//agent/entityTypes/``.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.DeleteEntityTypeRequest)
- },
-)
-_sym_db.RegisterMessage(DeleteEntityTypeRequest)
-
-BatchUpdateEntityTypesRequest = _reflection.GeneratedProtocolMessageType(
- "BatchUpdateEntityTypesRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _BATCHUPDATEENTITYTYPESREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2",
- "__doc__": """The request message for [EntityTypes.BatchUpdateEntityTypes][google.cl
- oud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes].
-
- Attributes:
- parent:
- Required. The name of the agent to update or create entity
- types in. Format: ``projects//agent``.
- entity_type_batch:
- The source of the entity type batch. For each entity type in
- the batch: - If ``name`` is specified, we update an existing
- entity type. - If ``name`` is not specified, we create a new
- entity type.
- entity_type_batch_uri:
- The URI to a Google Cloud Storage file containing entity types
- to update or create. The file format can either be a
- serialized proto (of EntityBatch type) or a JSON object. Note:
- The URI must start with “gs://”.
- entity_type_batch_inline:
- The collection of entity types to update or create.
- language_code:
- Optional. The language used to access language-specific data.
- If not specified, the agent’s default language is used. For
- more information, see `Multilingual intent and entity data
- `__.
- update_mask:
- Optional. The mask to control which fields get updated.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.BatchUpdateEntityTypesRequest)
- },
-)
-_sym_db.RegisterMessage(BatchUpdateEntityTypesRequest)
-
-BatchUpdateEntityTypesResponse = _reflection.GeneratedProtocolMessageType(
- "BatchUpdateEntityTypesResponse",
- (_message.Message,),
- {
- "DESCRIPTOR": _BATCHUPDATEENTITYTYPESRESPONSE,
- "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2",
- "__doc__": """The response message for [EntityTypes.BatchUpdateEntityTypes][google.c
- loud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes].
-
- Attributes:
- entity_types:
- The collection of updated or created entity types.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse)
- },
-)
-_sym_db.RegisterMessage(BatchUpdateEntityTypesResponse)
-
-BatchDeleteEntityTypesRequest = _reflection.GeneratedProtocolMessageType(
- "BatchDeleteEntityTypesRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _BATCHDELETEENTITYTYPESREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2",
- "__doc__": """The request message for [EntityTypes.BatchDeleteEntityTypes][google.cl
- oud.dialogflow.v2.EntityTypes.BatchDeleteEntityTypes].
-
- Attributes:
- parent:
- Required. The name of the agent to delete all entities types
- for. Format: ``projects//agent``.
- entity_type_names:
- Required. The names entity types to delete. All names must
- point to the same agent as ``parent``.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.BatchDeleteEntityTypesRequest)
- },
-)
-_sym_db.RegisterMessage(BatchDeleteEntityTypesRequest)
-
-BatchCreateEntitiesRequest = _reflection.GeneratedProtocolMessageType(
- "BatchCreateEntitiesRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _BATCHCREATEENTITIESREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2",
- "__doc__": """The request message for [EntityTypes.BatchCreateEntities][google.cloud
- .dialogflow.v2.EntityTypes.BatchCreateEntities].
-
- Attributes:
- parent:
- Required. The name of the entity type to create entities in.
- Format: ``projects//agent/entityTypes/``.
- entities:
- Required. The entities to create.
- language_code:
- Optional. The language used to access language-specific data.
- If not specified, the agent’s default language is used. For
- more information, see `Multilingual intent and entity data
- `__.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.BatchCreateEntitiesRequest)
- },
-)
-_sym_db.RegisterMessage(BatchCreateEntitiesRequest)
-
-BatchUpdateEntitiesRequest = _reflection.GeneratedProtocolMessageType(
- "BatchUpdateEntitiesRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _BATCHUPDATEENTITIESREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2",
- "__doc__": """The request message for [EntityTypes.BatchUpdateEntities][google.cloud
- .dialogflow.v2.EntityTypes.BatchUpdateEntities].
-
- Attributes:
- parent:
- Required. The name of the entity type to update or create
- entities in. Format: ``projects//agent/entityTypes/``.
- entities:
- Required. The entities to update or create.
- language_code:
- Optional. The language used to access language-specific data.
- If not specified, the agent’s default language is used. For
- more information, see `Multilingual intent and entity data
- `__.
- update_mask:
- Optional. The mask to control which fields get updated.
- """,
- # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.BatchUpdateEntitiesRequest)
- },
-)
-_sym_db.RegisterMessage(BatchUpdateEntitiesRequest)
-
-BatchDeleteEntitiesRequest = _reflection.GeneratedProtocolMessageType(
- "BatchDeleteEntitiesRequest",
- (_message.Message,),
- {
- "DESCRIPTOR": _BATCHDELETEENTITIESREQUEST,
- "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2",
- "__doc__": """The request message for [EntityTypes.BatchDeleteEntities][google.cloud
- .dialogflow.v2.EntityTypes.BatchDeleteEntities].
-
- Attributes:
- parent:
- Required. The name of the entity type to delete entries for.
- Format: ``projects//agent/entityTypes/