From d5d18a6aa788d7f05604236c86d7200c61b53b5b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 10 Aug 2021 18:32:13 +0000 Subject: [PATCH] feat: expose `Locations` service to get/list avaliable locations of Dialogflow products (#364) PiperOrigin-RevId: 389905442 Source-Link: https://github.com/googleapis/googleapis/commit/4c984f3be8e1bd85eb8fe78a2911a83b9785a7ea Source-Link: https://github.com/googleapis/googleapis-gen/commit/ea3337a8198ab8dfb233529fcd53e54fa168b0cd feat: add language code to streaming recognition result feat: add time zone and security settings to conversation profile docs: fix validation result docs docs: update environment docs docs: update agent docs docs: update entity type docs docs: update intent docs --- .../dialogflow_v2/services/agents/client.py | 2 +- .../services/agents/transports/grpc.py | 2 +- .../agents/transports/grpc_asyncio.py | 2 +- .../answer_records/transports/grpc.py | 2 +- .../answer_records/transports/grpc_asyncio.py | 2 +- .../services/contexts/transports/grpc.py | 2 +- .../contexts/transports/grpc_asyncio.py | 2 +- .../conversation_profiles/transports/grpc.py | 2 +- .../transports/grpc_asyncio.py | 2 +- .../services/conversations/transports/grpc.py | 2 +- .../conversations/transports/grpc_asyncio.py | 2 +- .../services/documents/transports/grpc.py | 2 +- .../documents/transports/grpc_asyncio.py | 2 +- .../services/entity_types/transports/grpc.py | 2 +- .../entity_types/transports/grpc_asyncio.py | 2 +- .../services/environments/async_client.py | 19 +- .../services/environments/client.py | 19 +- .../services/environments/transports/grpc.py | 21 +- .../environments/transports/grpc_asyncio.py | 21 +- .../services/fulfillments/transports/grpc.py | 2 +- .../fulfillments/transports/grpc_asyncio.py | 2 +- .../services/intents/transports/grpc.py | 2 +- .../intents/transports/grpc_asyncio.py | 2 +- .../knowledge_bases/transports/grpc.py | 2 +- .../transports/grpc_asyncio.py | 2 +- .../services/participants/transports/grpc.py | 2 +- .../participants/transports/grpc_asyncio.py | 2 +- .../session_entity_types/transports/grpc.py | 2 +- .../transports/grpc_asyncio.py | 2 +- .../services/sessions/transports/grpc.py | 2 +- .../sessions/transports/grpc_asyncio.py | 2 +- .../services/versions/transports/grpc.py | 2 +- .../versions/transports/grpc_asyncio.py | 2 +- .../cloud/dialogflow_v2/types/environment.py | 18 +- .../cloud/dialogflow_v2/types/intent.py | 16 +- .../cloud/dialogflow_v2/types/session.py | 3 + .../services/agents/async_client.py | 26 +-- .../services/agents/client.py | 26 +-- .../services/agents/transports/grpc.py | 28 +-- .../agents/transports/grpc_asyncio.py | 28 +-- .../answer_records/transports/grpc.py | 2 +- .../answer_records/transports/grpc_asyncio.py | 2 +- .../services/contexts/transports/grpc.py | 2 +- .../contexts/transports/grpc_asyncio.py | 2 +- .../conversation_profiles/async_client.py | 6 + .../services/conversation_profiles/client.py | 18 ++ .../conversation_profiles/transports/grpc.py | 2 +- .../transports/grpc_asyncio.py | 2 +- .../services/documents/transports/grpc.py | 2 +- .../documents/transports/grpc_asyncio.py | 2 +- .../services/entity_types/async_client.py | 40 +++- .../services/entity_types/client.py | 40 +++- .../services/entity_types/transports/grpc.py | 40 +++- .../entity_types/transports/grpc_asyncio.py | 42 ++-- .../services/environments/async_client.py | 2 + .../services/environments/client.py | 15 ++ .../services/environments/transports/grpc.py | 2 +- .../environments/transports/grpc_asyncio.py | 2 +- .../services/fulfillments/transports/grpc.py | 2 +- .../fulfillments/transports/grpc_asyncio.py | 2 +- .../services/intents/async_client.py | 26 ++- .../services/intents/client.py | 26 ++- .../services/intents/transports/grpc.py | 26 ++- .../intents/transports/grpc_asyncio.py | 28 ++- .../knowledge_bases/transports/grpc.py | 2 +- .../transports/grpc_asyncio.py | 2 +- .../services/participants/transports/grpc.py | 2 +- .../session_entity_types/transports/grpc.py | 2 +- .../transports/grpc_asyncio.py | 2 +- .../services/sessions/transports/grpc.py | 2 +- .../sessions/transports/grpc_asyncio.py | 2 +- .../types/conversation_profile.py | 21 +- .../cloud/dialogflow_v2beta1/types/session.py | 3 + .../scripts/fixup_dialogflow_v2_keywords.py | 168 ++++++++-------- .../fixup_dialogflow_v2beta1_keywords.py | 180 +++++++++--------- .../test_conversation_profiles.py | 94 ++++++--- .../dialogflow_v2beta1/test_environments.py | 46 +++-- 77 files changed, 712 insertions(+), 430 deletions(-) diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/agents/client.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/agents/client.py index 1e674a78c52a..df852f3f871e 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/agents/client.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/agents/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Dict, Optional, Sequence, Tuple, Type, Union +from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/agents/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/agents/transports/grpc.py index 6399e116281b..3029b895147f 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/agents/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/agents/transports/grpc.py @@ -85,7 +85,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/agents/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/agents/transports/grpc_asyncio.py index 49088f1205c1..ca35e7761212 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/agents/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/agents/transports/grpc_asyncio.py @@ -132,7 +132,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/answer_records/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/answer_records/transports/grpc.py index dc68803fbae3..da060a41d1f8 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/answer_records/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/answer_records/transports/grpc.py @@ -82,7 +82,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/answer_records/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/answer_records/transports/grpc_asyncio.py index 2ec5bae7d0d4..66ad5e777bf0 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/answer_records/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/answer_records/transports/grpc_asyncio.py @@ -129,7 +129,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/contexts/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/contexts/transports/grpc.py index 535da55b2f2a..c7eae0609d3a 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/contexts/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/contexts/transports/grpc.py @@ -82,7 +82,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/contexts/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/contexts/transports/grpc_asyncio.py index 5ad7a2e9b2d4..b59aa61242f0 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/contexts/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/contexts/transports/grpc_asyncio.py @@ -129,7 +129,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/conversation_profiles/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/conversation_profiles/transports/grpc.py index d0644d666e46..0376a6f74174 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/conversation_profiles/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/conversation_profiles/transports/grpc.py @@ -85,7 +85,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/conversation_profiles/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/conversation_profiles/transports/grpc_asyncio.py index 9775163f1589..a024ed1dbc16 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/conversation_profiles/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/conversation_profiles/transports/grpc_asyncio.py @@ -132,7 +132,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/conversations/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/conversations/transports/grpc.py index 73d7846ff9f3..89c1f0e05312 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/conversations/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/conversations/transports/grpc.py @@ -82,7 +82,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/conversations/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/conversations/transports/grpc_asyncio.py index 5334f1735165..51cc2e125341 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/conversations/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/conversations/transports/grpc_asyncio.py @@ -129,7 +129,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/documents/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/documents/transports/grpc.py index e941184e138f..c9233572241a 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/documents/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/documents/transports/grpc.py @@ -84,7 +84,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/documents/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/documents/transports/grpc_asyncio.py index 878b8d7b199e..1ffc2d5e4847 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/documents/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/documents/transports/grpc_asyncio.py @@ -131,7 +131,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/entity_types/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/entity_types/transports/grpc.py index 8d343ee7b3a0..10432a2887ec 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/entity_types/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/entity_types/transports/grpc.py @@ -85,7 +85,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/entity_types/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/entity_types/transports/grpc_asyncio.py index 72a37b9d74c6..28f630db5745 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/entity_types/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/entity_types/transports/grpc_asyncio.py @@ -132,7 +132,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/environments/async_client.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/environments/async_client.py index e5bdcf92ad55..e34bde50f411 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/environments/async_client.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/environments/async_client.py @@ -174,8 +174,8 @@ async def list_environments( timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListEnvironmentsAsyncPager: - r"""Returns the list of all non-draft environments of the - specified agent. + r"""Returns the list of all non-default environments of + the specified agent. Args: request (:class:`google.cloud.dialogflow_v2.types.ListEnvironmentsRequest`): @@ -399,13 +399,14 @@ async def update_environment( environment. When an environment is pointed to a new agent version by setting ``environment.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. You can use - "-" as Environment ID in environment name to update version in - "draft" environment. WARNING: this will negate all recent - changes to draft and can't be undone. You may want to save the - draft to a version before calling this function. + that time, the environment continues serving the previous + version of the agent. After the new agent version is done + loading, the environment is set back to the ``RUNNING`` state. + You can use "-" as Environment ID in environment name to update + an agent version in the default environment. WARNING: this will + negate all recent changes to the draft agent and can't be + undone. You may want to save the draft agent to a version before + calling this method. Args: request (:class:`google.cloud.dialogflow_v2.types.UpdateEnvironmentRequest`): diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/environments/client.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/environments/client.py index c37f87812bf4..b70dea94dd71 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/environments/client.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/environments/client.py @@ -386,8 +386,8 @@ def list_environments( timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListEnvironmentsPager: - r"""Returns the list of all non-draft environments of the - specified agent. + r"""Returns the list of all non-default environments of + the specified agent. Args: request (google.cloud.dialogflow_v2.types.ListEnvironmentsRequest): @@ -613,13 +613,14 @@ def update_environment( environment. When an environment is pointed to a new agent version by setting ``environment.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. You can use - "-" as Environment ID in environment name to update version in - "draft" environment. WARNING: this will negate all recent - changes to draft and can't be undone. You may want to save the - draft to a version before calling this function. + that time, the environment continues serving the previous + version of the agent. After the new agent version is done + loading, the environment is set back to the ``RUNNING`` state. + You can use "-" as Environment ID in environment name to update + an agent version in the default environment. WARNING: this will + negate all recent changes to the draft agent and can't be + undone. You may want to save the draft agent to a version before + calling this method. Args: request (google.cloud.dialogflow_v2.types.UpdateEnvironmentRequest): diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/environments/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/environments/transports/grpc.py index af97de6efaa2..e49ee9b7faae 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/environments/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/environments/transports/grpc.py @@ -82,7 +82,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if @@ -235,8 +235,8 @@ def list_environments( ]: r"""Return a callable for the list environments method over gRPC. - Returns the list of all non-draft environments of the - specified agent. + Returns the list of all non-default environments of + the specified agent. Returns: Callable[[~.ListEnvironmentsRequest], @@ -320,13 +320,14 @@ def update_environment( environment. When an environment is pointed to a new agent version by setting ``environment.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. You can use - "-" as Environment ID in environment name to update version in - "draft" environment. WARNING: this will negate all recent - changes to draft and can't be undone. You may want to save the - draft to a version before calling this function. + that time, the environment continues serving the previous + version of the agent. After the new agent version is done + loading, the environment is set back to the ``RUNNING`` state. + You can use "-" as Environment ID in environment name to update + an agent version in the default environment. WARNING: this will + negate all recent changes to the draft agent and can't be + undone. You may want to save the draft agent to a version before + calling this method. Returns: Callable[[~.UpdateEnvironmentRequest], diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/environments/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/environments/transports/grpc_asyncio.py index 5e5222dd64c8..52f36aec87d2 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/environments/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/environments/transports/grpc_asyncio.py @@ -129,7 +129,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if @@ -239,8 +239,8 @@ def list_environments( ]: r"""Return a callable for the list environments method over gRPC. - Returns the list of all non-draft environments of the - specified agent. + Returns the list of all non-default environments of + the specified agent. Returns: Callable[[~.ListEnvironmentsRequest], @@ -330,13 +330,14 @@ def update_environment( environment. When an environment is pointed to a new agent version by setting ``environment.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. You can use - "-" as Environment ID in environment name to update version in - "draft" environment. WARNING: this will negate all recent - changes to draft and can't be undone. You may want to save the - draft to a version before calling this function. + that time, the environment continues serving the previous + version of the agent. After the new agent version is done + loading, the environment is set back to the ``RUNNING`` state. + You can use "-" as Environment ID in environment name to update + an agent version in the default environment. WARNING: this will + negate all recent changes to the draft agent and can't be + undone. You may want to save the draft agent to a version before + calling this method. Returns: Callable[[~.UpdateEnvironmentRequest], diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/fulfillments/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/fulfillments/transports/grpc.py index 210b0229f502..5b8742e89c1f 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/fulfillments/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/fulfillments/transports/grpc.py @@ -82,7 +82,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/fulfillments/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/fulfillments/transports/grpc_asyncio.py index 7f31568ccce0..e47a61191434 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/fulfillments/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/fulfillments/transports/grpc_asyncio.py @@ -129,7 +129,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/intents/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/intents/transports/grpc.py index 8c91a35f83a0..f58bd813a8b8 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/intents/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/intents/transports/grpc.py @@ -84,7 +84,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/intents/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/intents/transports/grpc_asyncio.py index ee0a6beb0132..9a0d167a0fdd 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/intents/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/intents/transports/grpc_asyncio.py @@ -131,7 +131,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/knowledge_bases/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/knowledge_bases/transports/grpc.py index 1fe66a6272f9..a6f998041ca2 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/knowledge_bases/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/knowledge_bases/transports/grpc.py @@ -83,7 +83,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/knowledge_bases/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/knowledge_bases/transports/grpc_asyncio.py index 7f7467e53014..6fbff40df5a3 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/knowledge_bases/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/knowledge_bases/transports/grpc_asyncio.py @@ -130,7 +130,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/participants/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/participants/transports/grpc.py index 576edb55354f..85e78cebdc69 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/participants/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/participants/transports/grpc.py @@ -82,7 +82,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/participants/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/participants/transports/grpc_asyncio.py index fef572f6a1cc..d4d9419ff3fc 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/participants/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/participants/transports/grpc_asyncio.py @@ -129,7 +129,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/session_entity_types/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/session_entity_types/transports/grpc.py index e8cc2a9bb82d..f9dc5e49ccce 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/session_entity_types/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/session_entity_types/transports/grpc.py @@ -85,7 +85,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/session_entity_types/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/session_entity_types/transports/grpc_asyncio.py index 5da0b892a504..6d560581d31d 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/session_entity_types/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/session_entity_types/transports/grpc_asyncio.py @@ -132,7 +132,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/sessions/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/sessions/transports/grpc.py index 9fb41d147970..260a554d57f8 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/sessions/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/sessions/transports/grpc.py @@ -84,7 +84,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/sessions/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/sessions/transports/grpc_asyncio.py index e93ca51f4cd1..91b54b5df3f6 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/sessions/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/sessions/transports/grpc_asyncio.py @@ -131,7 +131,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/versions/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/versions/transports/grpc.py index 835966e6817e..1370e9685121 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/versions/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/versions/transports/grpc.py @@ -82,7 +82,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/versions/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/versions/transports/grpc_asyncio.py index 58a8463b7166..ec189067ea61 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/versions/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/versions/transports/grpc_asyncio.py @@ -129,7 +129,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/environment.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/environment.py index a6fbecad3589..1beb7ed507db 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/environment.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/environment.py @@ -66,13 +66,15 @@ class Environment(proto.Message): - ``projects//agent/environments/`` - ``projects//locations//agent/environments/`` + + The environment ID for the default environment is ``-``. description (str): Optional. The developer-provided description for this environment. The maximum length is 500 characters. If exceeded, the request is rejected. agent_version (str): - Required. The agent version loaded into this environment. + Optional. The agent version loaded into this environment. Supported formats: - ``projects//agent/versions/`` @@ -217,6 +219,8 @@ class GetEnvironmentRequest(proto.Message): - ``projects//agent/environments/`` - ``projects//locations//agent/environments/`` + + The environment ID for the default environment is ``-``. """ name = proto.Field(proto.STRING, number=1,) @@ -257,10 +261,10 @@ class UpdateEnvironmentRequest(proto.Message): get updated. allow_load_to_draft_and_discard_changes (bool): Optional. This field is used to prevent accidental overwrite - of the draft environment, which is an operation that cannot - be undone. To confirm that the caller desires this + of the default environment, which is an operation that + cannot be undone. To confirm that the caller desires this overwrite, this field must be explicitly set to true when - updating the draft environment (environment ID = ``-``). + updating the default environment (environment ID = ``-``). """ environment = proto.Field(proto.MESSAGE, number=1, message="Environment",) @@ -280,6 +284,8 @@ class DeleteEnvironmentRequest(proto.Message): - ``projects//agent/environments/`` - ``projects//locations//agent/environments/`` + + The environment ID for the default environment is ``-``. """ name = proto.Field(proto.STRING, number=1,) @@ -296,6 +302,8 @@ class GetEnvironmentHistoryRequest(proto.Message): - ``projects//agent/environments/`` - ``projects//locations//agent/environments/`` + + The environment ID for the default environment is ``-``. page_size (int): Optional. The maximum number of items to return in a single page. By default 100 and at @@ -321,6 +329,8 @@ class EnvironmentHistory(proto.Message): - ``projects//agent/environments/`` - ``projects//locations//agent/environments/`` + + The environment ID for the default environment is ``-``. entries (Sequence[google.cloud.dialogflow_v2.types.EnvironmentHistory.Entry]): Output only. The list of agent environments. There will be a maximum number of items returned based on the page_size diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/intent.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/intent.py index ef1a0b0aa7be..a71b07449b41 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/intent.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/intent.py @@ -143,10 +143,10 @@ class Intent(proto.Message): responses will be copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). root_followup_intent_name (str): - Read-only. The unique identifier of the root intent in the - chain of followup intents. It identifies the correct - followup intents chain for this intent. We populate this - field only in the output. + Output only. Read-only. The unique identifier of the root + intent in the chain of followup intents. It identifies the + correct followup intents chain for this intent. We populate + this field only in the output. Format: ``projects//agent/intents/``. parent_followup_intent_name (str): @@ -161,10 +161,10 @@ class Intent(proto.Message): It identifies the parent followup intent. Format: ``projects//agent/intents/``. followup_intent_info (Sequence[google.cloud.dialogflow_v2.types.Intent.FollowupIntentInfo]): - Read-only. Information about all followup - intents that have this intent as a direct or - indirect parent. We populate this field only in - the output. + Output only. Read-only. Information about all + followup intents that have this intent as a + direct or indirect parent. We populate this + field only in the output. """ class WebhookState(proto.Enum): diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/session.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/session.py index 752a6fc06d93..17289a15e45a 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/session.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/session.py @@ -627,6 +627,8 @@ class StreamingRecognitionResult(proto.Message): Time offset of the end of this Speech recognition result relative to the beginning of the audio. Only populated for ``message_type`` = ``TRANSCRIPT``. + language_code (str): + Detected language code for the transcript. """ class MessageType(proto.Enum): @@ -645,6 +647,7 @@ class MessageType(proto.Enum): speech_end_offset = proto.Field( proto.MESSAGE, number=8, message=duration_pb2.Duration, ) + language_code = proto.Field(proto.STRING, number=10,) class TextInput(proto.Message): diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/agents/async_client.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/agents/async_client.py index 2be961279438..f5f9c4c1a75f 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/agents/async_client.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/agents/async_client.py @@ -251,6 +251,10 @@ async def set_agent( ) -> gcd_agent.Agent: r"""Creates/updates the specified agent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Args: request (:class:`google.cloud.dialogflow_v2beta1.types.SetAgentRequest`): The request object. The request message for @@ -482,8 +486,9 @@ async def train_agent( ) -> operation_async.AsyncOperation: r"""Trains the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (:class:`google.cloud.dialogflow_v2beta1.types.TrainAgentRequest`): @@ -578,9 +583,6 @@ async def export_agent( ) -> operation_async.AsyncOperation: r"""Exports the specified agent to a ZIP file. - Operation - Args: request (:class:`google.cloud.dialogflow_v2beta1.types.ExportAgentRequest`): The request object. The request message for @@ -676,10 +678,9 @@ async def import_agent( 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. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (:class:`google.cloud.dialogflow_v2beta1.types.ImportAgentRequest`): @@ -761,10 +762,9 @@ async def restore_agent( 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. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (:class:`google.cloud.dialogflow_v2beta1.types.RestoreAgentRequest`): diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/agents/client.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/agents/client.py index 0e51bd1d7701..75f65744f9dc 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/agents/client.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/agents/client.py @@ -443,6 +443,10 @@ def set_agent( ) -> gcd_agent.Agent: r"""Creates/updates the specified agent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Args: request (google.cloud.dialogflow_v2beta1.types.SetAgentRequest): The request object. The request message for @@ -674,8 +678,9 @@ def train_agent( ) -> operation.Operation: r"""Trains the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (google.cloud.dialogflow_v2beta1.types.TrainAgentRequest): @@ -770,9 +775,6 @@ def export_agent( ) -> operation.Operation: r"""Exports the specified agent to a ZIP file. - Operation - Args: request (google.cloud.dialogflow_v2beta1.types.ExportAgentRequest): The request object. The request message for @@ -868,10 +870,9 @@ def import_agent( 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. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (google.cloud.dialogflow_v2beta1.types.ImportAgentRequest): @@ -954,10 +955,9 @@ def restore_agent( 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. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (google.cloud.dialogflow_v2beta1.types.RestoreAgentRequest): diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/agents/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/agents/transports/grpc.py index 4012d1592cad..d880d6e1941d 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/agents/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/agents/transports/grpc.py @@ -86,7 +86,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if @@ -276,6 +276,10 @@ def set_agent(self) -> Callable[[gcd_agent.SetAgentRequest], gcd_agent.Agent]: Creates/updates the specified agent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Returns: Callable[[~.SetAgentRequest], ~.Agent]: @@ -357,8 +361,9 @@ def train_agent( Trains the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.TrainAgentRequest], @@ -386,9 +391,6 @@ def export_agent( Exports the specified agent to a ZIP file. - Operation - Returns: Callable[[~.ExportAgentRequest], ~.Operation]: @@ -427,10 +429,9 @@ def import_agent( 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. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.ImportAgentRequest], @@ -468,10 +469,9 @@ def restore_agent( 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. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.RestoreAgentRequest], diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/agents/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/agents/transports/grpc_asyncio.py index acaa4067286d..9ca6b6f453ed 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/agents/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/agents/transports/grpc_asyncio.py @@ -133,7 +133,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if @@ -283,6 +283,10 @@ def set_agent( Creates/updates the specified agent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Returns: Callable[[~.SetAgentRequest], Awaitable[~.Agent]]: @@ -366,8 +370,9 @@ def train_agent( Trains the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.TrainAgentRequest], @@ -395,9 +400,6 @@ def export_agent( Exports the specified agent to a ZIP file. - Operation - Returns: Callable[[~.ExportAgentRequest], Awaitable[~.Operation]]: @@ -436,10 +438,9 @@ def import_agent( 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. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.ImportAgentRequest], @@ -477,10 +478,9 @@ def restore_agent( 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. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.RestoreAgentRequest], diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/answer_records/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/answer_records/transports/grpc.py index 0d82d223333b..9859f55014c5 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/answer_records/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/answer_records/transports/grpc.py @@ -82,7 +82,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/answer_records/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/answer_records/transports/grpc_asyncio.py index f86e6ba19024..f32b119850ff 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/answer_records/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/answer_records/transports/grpc_asyncio.py @@ -129,7 +129,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/contexts/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/contexts/transports/grpc.py index 0afd44e4c652..601b5aff125b 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/contexts/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/contexts/transports/grpc.py @@ -83,7 +83,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/contexts/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/contexts/transports/grpc_asyncio.py index aa02f6e99e5c..2578a275a110 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/contexts/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/contexts/transports/grpc_asyncio.py @@ -130,7 +130,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/conversation_profiles/async_client.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/conversation_profiles/async_client.py index 53bba6ccaf3f..fb09ac4acc61 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/conversation_profiles/async_client.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/conversation_profiles/async_client.py @@ -63,6 +63,12 @@ class ConversationProfilesAsyncClient: parse_conversation_profile_path = staticmethod( ConversationProfilesClient.parse_conversation_profile_path ) + cx_security_settings_path = staticmethod( + ConversationProfilesClient.cx_security_settings_path + ) + parse_cx_security_settings_path = staticmethod( + ConversationProfilesClient.parse_cx_security_settings_path + ) document_path = staticmethod(ConversationProfilesClient.document_path) parse_document_path = staticmethod(ConversationProfilesClient.parse_document_path) knowledge_base_path = staticmethod(ConversationProfilesClient.knowledge_base_path) diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/conversation_profiles/client.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/conversation_profiles/client.py index 6d526f3d43ab..8b7a3f20903c 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/conversation_profiles/client.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/conversation_profiles/client.py @@ -210,6 +210,24 @@ def parse_conversation_profile_path(path: str) -> Dict[str, str]: ) return m.groupdict() if m else {} + @staticmethod + def cx_security_settings_path( + project: str, location: str, security_settings: str, + ) -> str: + """Returns a fully-qualified cx_security_settings string.""" + return "projects/{project}/locations/{location}/securitySettings/{security_settings}".format( + project=project, location=location, security_settings=security_settings, + ) + + @staticmethod + def parse_cx_security_settings_path(path: str) -> Dict[str, str]: + """Parses a cx_security_settings path into its component segments.""" + m = re.match( + r"^projects/(?P.+?)/locations/(?P.+?)/securitySettings/(?P.+?)$", + path, + ) + return m.groupdict() if m else {} + @staticmethod def document_path(project: str, knowledge_base: str, document: str,) -> str: """Returns a fully-qualified document string.""" diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/conversation_profiles/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/conversation_profiles/transports/grpc.py index 73e51386eb29..327ee52b4cbb 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/conversation_profiles/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/conversation_profiles/transports/grpc.py @@ -85,7 +85,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/conversation_profiles/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/conversation_profiles/transports/grpc_asyncio.py index f2fba72a7121..f904aa452f2c 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/conversation_profiles/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/conversation_profiles/transports/grpc_asyncio.py @@ -132,7 +132,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/documents/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/documents/transports/grpc.py index b0892dd5843c..07671affec59 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/documents/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/documents/transports/grpc.py @@ -84,7 +84,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/documents/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/documents/transports/grpc_asyncio.py index a416f3c98824..6a336b9d13b0 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/documents/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/documents/transports/grpc_asyncio.py @@ -131,7 +131,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/entity_types/async_client.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/entity_types/async_client.py index b3986524a8b5..5142b3df8406 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/entity_types/async_client.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/entity_types/async_client.py @@ -375,6 +375,10 @@ async def create_entity_type( ) -> gcd_entity_type.EntityType: r"""Creates an entity type in the specified agent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Args: request (:class:`google.cloud.dialogflow_v2beta1.types.CreateEntityTypeRequest`): The request object. The request message for @@ -483,6 +487,10 @@ async def update_entity_type( ) -> gcd_entity_type.EntityType: r"""Updates the specified entity type. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Args: request (:class:`google.cloud.dialogflow_v2beta1.types.UpdateEntityTypeRequest`): The request object. The request message for @@ -588,6 +596,10 @@ async def delete_entity_type( ) -> None: r"""Deletes the specified entity type. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Args: request (:class:`google.cloud.dialogflow_v2beta1.types.DeleteEntityTypeRequest`): The request object. The request message for @@ -653,8 +665,10 @@ async def batch_update_entity_types( metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Updates/Creates multiple entity types in the specified agent. - Operation + + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (:class:`google.cloud.dialogflow_v2beta1.types.BatchUpdateEntityTypesRequest`): @@ -717,8 +731,11 @@ async def batch_delete_entity_types( timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: - r"""Deletes entity types in the specified agent. Operation - + r"""Deletes entity types in the specified agent. + + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (:class:`google.cloud.dialogflow_v2beta1.types.BatchDeleteEntityTypesRequest`): @@ -826,8 +843,9 @@ async def batch_create_entities( ) -> operation_async.AsyncOperation: r"""Creates multiple new entities in the specified entity type. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (:class:`google.cloud.dialogflow_v2beta1.types.BatchCreateEntitiesRequest`): @@ -947,8 +965,9 @@ async def batch_update_entities( type. This method does not affect entities in the entity type that aren't explicitly specified in the request. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (:class:`google.cloud.dialogflow_v2beta1.types.BatchUpdateEntitiesRequest`): @@ -1068,8 +1087,9 @@ async def batch_delete_entities( ) -> operation_async.AsyncOperation: r"""Deletes entities in the specified entity type. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (:class:`google.cloud.dialogflow_v2beta1.types.BatchDeleteEntitiesRequest`): diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/entity_types/client.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/entity_types/client.py index 34bd06cd00ad..2db693ccaf48 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/entity_types/client.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/entity_types/client.py @@ -565,6 +565,10 @@ def create_entity_type( ) -> gcd_entity_type.EntityType: r"""Creates an entity type in the specified agent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Args: request (google.cloud.dialogflow_v2beta1.types.CreateEntityTypeRequest): The request object. The request message for @@ -673,6 +677,10 @@ def update_entity_type( ) -> gcd_entity_type.EntityType: r"""Updates the specified entity type. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Args: request (google.cloud.dialogflow_v2beta1.types.UpdateEntityTypeRequest): The request object. The request message for @@ -778,6 +786,10 @@ def delete_entity_type( ) -> None: r"""Deletes the specified entity type. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Args: request (google.cloud.dialogflow_v2beta1.types.DeleteEntityTypeRequest): The request object. The request message for @@ -843,8 +855,10 @@ def batch_update_entity_types( metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Updates/Creates multiple entity types in the specified agent. - Operation + + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (google.cloud.dialogflow_v2beta1.types.BatchUpdateEntityTypesRequest): @@ -910,8 +924,11 @@ def batch_delete_entity_types( timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: - r"""Deletes entity types in the specified agent. Operation - + r"""Deletes entity types in the specified agent. + + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (google.cloud.dialogflow_v2beta1.types.BatchDeleteEntityTypesRequest): @@ -1021,8 +1038,9 @@ def batch_create_entities( ) -> operation.Operation: r"""Creates multiple new entities in the specified entity type. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (google.cloud.dialogflow_v2beta1.types.BatchCreateEntitiesRequest): @@ -1142,8 +1160,9 @@ def batch_update_entities( type. This method does not affect entities in the entity type that aren't explicitly specified in the request. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (google.cloud.dialogflow_v2beta1.types.BatchUpdateEntitiesRequest): @@ -1263,8 +1282,9 @@ def batch_delete_entities( ) -> operation.Operation: r"""Deletes entities in the specified entity type. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (google.cloud.dialogflow_v2beta1.types.BatchDeleteEntitiesRequest): diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/entity_types/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/entity_types/transports/grpc.py index 4bf387ea3d26..d5ff8ffe09b4 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/entity_types/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/entity_types/transports/grpc.py @@ -310,6 +310,10 @@ def create_entity_type( Creates an entity type in the specified agent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Returns: Callable[[~.CreateEntityTypeRequest], ~.EntityType]: @@ -338,6 +342,10 @@ def update_entity_type( Updates the specified entity type. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Returns: Callable[[~.UpdateEntityTypeRequest], ~.EntityType]: @@ -364,6 +372,10 @@ def delete_entity_type( Deletes the specified entity type. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Returns: Callable[[~.DeleteEntityTypeRequest], ~.Empty]: @@ -391,8 +403,10 @@ def batch_update_entity_types( r"""Return a callable for the batch update entity types method over gRPC. Updates/Creates multiple entity types in the specified agent. - Operation + + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchUpdateEntityTypesRequest], @@ -420,8 +434,11 @@ def batch_delete_entity_types( ]: r"""Return a callable for the batch delete entity types method over gRPC. - Deletes entity types in the specified agent. Operation - + Deletes entity types in the specified agent. + + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchDeleteEntityTypesRequest], @@ -449,8 +466,9 @@ def batch_create_entities( Creates multiple new entities in the specified entity type. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchCreateEntitiesRequest], @@ -480,8 +498,9 @@ def batch_update_entities( type. This method does not affect entities in the entity type that aren't explicitly specified in the request. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchUpdateEntitiesRequest], @@ -509,8 +528,9 @@ def batch_delete_entities( Deletes entities in the specified entity type. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchDeleteEntitiesRequest], diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/entity_types/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/entity_types/transports/grpc_asyncio.py index dc53ce6fcee4..5e654392fe6f 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/entity_types/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/entity_types/transports/grpc_asyncio.py @@ -132,7 +132,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if @@ -318,6 +318,10 @@ def create_entity_type( Creates an entity type in the specified agent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Returns: Callable[[~.CreateEntityTypeRequest], Awaitable[~.EntityType]]: @@ -346,6 +350,10 @@ def update_entity_type( Updates the specified entity type. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Returns: Callable[[~.UpdateEntityTypeRequest], Awaitable[~.EntityType]]: @@ -372,6 +380,10 @@ def delete_entity_type( Deletes the specified entity type. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Returns: Callable[[~.DeleteEntityTypeRequest], Awaitable[~.Empty]]: @@ -399,8 +411,10 @@ def batch_update_entity_types( r"""Return a callable for the batch update entity types method over gRPC. Updates/Creates multiple entity types in the specified agent. - Operation + + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchUpdateEntityTypesRequest], @@ -428,8 +442,11 @@ def batch_delete_entity_types( ]: r"""Return a callable for the batch delete entity types method over gRPC. - Deletes entity types in the specified agent. Operation - + Deletes entity types in the specified agent. + + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchDeleteEntityTypesRequest], @@ -459,8 +476,9 @@ def batch_create_entities( Creates multiple new entities in the specified entity type. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchCreateEntitiesRequest], @@ -492,8 +510,9 @@ def batch_update_entities( type. This method does not affect entities in the entity type that aren't explicitly specified in the request. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchUpdateEntitiesRequest], @@ -523,8 +542,9 @@ def batch_delete_entities( Deletes entities in the specified entity type. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchDeleteEntitiesRequest], diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/environments/async_client.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/environments/async_client.py index c6e36ef4ab37..3fd4e5fcafa8 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/environments/async_client.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/environments/async_client.py @@ -49,6 +49,8 @@ class EnvironmentsAsyncClient: parse_environment_path = staticmethod(EnvironmentsClient.parse_environment_path) fulfillment_path = staticmethod(EnvironmentsClient.fulfillment_path) parse_fulfillment_path = staticmethod(EnvironmentsClient.parse_fulfillment_path) + version_path = staticmethod(EnvironmentsClient.version_path) + parse_version_path = staticmethod(EnvironmentsClient.parse_version_path) common_billing_account_path = staticmethod( EnvironmentsClient.common_billing_account_path ) diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/environments/client.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/environments/client.py index b0af57c6a58c..f2975f4e0aa2 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/environments/client.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/environments/client.py @@ -183,6 +183,21 @@ def parse_fulfillment_path(path: str) -> Dict[str, str]: m = re.match(r"^projects/(?P.+?)/agent/fulfillment$", path) return m.groupdict() if m else {} + @staticmethod + def version_path(project: str, version: str,) -> str: + """Returns a fully-qualified version string.""" + return "projects/{project}/agent/versions/{version}".format( + project=project, version=version, + ) + + @staticmethod + def parse_version_path(path: str) -> Dict[str, str]: + """Parses a version path into its component segments.""" + m = re.match( + r"^projects/(?P.+?)/agent/versions/(?P.+?)$", path + ) + return m.groupdict() if m else {} + @staticmethod def common_billing_account_path(billing_account: str,) -> str: """Returns a fully-qualified billing_account string.""" diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/environments/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/environments/transports/grpc.py index 77b0ea9f7f28..4106b62933d0 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/environments/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/environments/transports/grpc.py @@ -82,7 +82,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/environments/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/environments/transports/grpc_asyncio.py index a1b4a1cbab8b..c20ba69c83a5 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/environments/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/environments/transports/grpc_asyncio.py @@ -129,7 +129,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/grpc.py index dd7aa89b56c5..97f314a33287 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/grpc.py @@ -82,7 +82,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/grpc_asyncio.py index 0989afcf5497..1b9cca73a29f 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/grpc_asyncio.py @@ -129,7 +129,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/intents/async_client.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/intents/async_client.py index 8ea2a6bdcf03..21c61653cb24 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/intents/async_client.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/intents/async_client.py @@ -375,6 +375,10 @@ async def create_intent( ) -> gcd_intent.Intent: r"""Creates an intent in the specified agent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Args: request (:class:`google.cloud.dialogflow_v2beta1.types.CreateIntentRequest`): The request object. The request message for @@ -479,6 +483,10 @@ async def update_intent( ) -> gcd_intent.Intent: r"""Updates the specified intent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Args: request (:class:`google.cloud.dialogflow_v2beta1.types.UpdateIntentRequest`): The request object. The request message for @@ -578,8 +586,12 @@ async def delete_intent( timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), ) -> None: - r"""Deletes the specified intent and its direct or - indirect followup intents. + r"""Deletes the specified intent and its direct or indirect followup + intents. + + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (:class:`google.cloud.dialogflow_v2beta1.types.DeleteIntentRequest`): @@ -653,8 +665,9 @@ async def batch_update_intents( ) -> operation_async.AsyncOperation: r"""Updates/Creates multiple intents in the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (:class:`google.cloud.dialogflow_v2beta1.types.BatchUpdateIntentsRequest`): @@ -765,8 +778,9 @@ async def batch_delete_intents( ) -> operation_async.AsyncOperation: r"""Deletes intents in the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (:class:`google.cloud.dialogflow_v2beta1.types.BatchDeleteIntentsRequest`): diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/intents/client.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/intents/client.py index 1f4c4a9520a6..3d49e0d2ef17 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/intents/client.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/intents/client.py @@ -581,6 +581,10 @@ def create_intent( ) -> gcd_intent.Intent: r"""Creates an intent in the specified agent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Args: request (google.cloud.dialogflow_v2beta1.types.CreateIntentRequest): The request object. The request message for @@ -685,6 +689,10 @@ def update_intent( ) -> gcd_intent.Intent: r"""Updates the specified intent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Args: request (google.cloud.dialogflow_v2beta1.types.UpdateIntentRequest): The request object. The request message for @@ -784,8 +792,12 @@ def delete_intent( timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), ) -> None: - r"""Deletes the specified intent and its direct or - indirect followup intents. + r"""Deletes the specified intent and its direct or indirect followup + intents. + + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (google.cloud.dialogflow_v2beta1.types.DeleteIntentRequest): @@ -859,8 +871,9 @@ def batch_update_intents( ) -> operation.Operation: r"""Updates/Creates multiple intents in the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (google.cloud.dialogflow_v2beta1.types.BatchUpdateIntentsRequest): @@ -971,8 +984,9 @@ def batch_delete_intents( ) -> operation.Operation: r"""Deletes intents in the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (google.cloud.dialogflow_v2beta1.types.BatchDeleteIntentsRequest): diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/intents/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/intents/transports/grpc.py index 7400e5565494..3fc2416c7057 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/intents/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/intents/transports/grpc.py @@ -304,6 +304,10 @@ def create_intent( Creates an intent in the specified agent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Returns: Callable[[~.CreateIntentRequest], ~.Intent]: @@ -330,6 +334,10 @@ def update_intent( Updates the specified intent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Returns: Callable[[~.UpdateIntentRequest], ~.Intent]: @@ -352,8 +360,12 @@ def update_intent( def delete_intent(self) -> Callable[[intent.DeleteIntentRequest], empty_pb2.Empty]: r"""Return a callable for the delete intent method over gRPC. - Deletes the specified intent and its direct or - indirect followup intents. + Deletes the specified intent and its direct or indirect followup + intents. + + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.DeleteIntentRequest], @@ -381,8 +393,9 @@ def batch_update_intents( Updates/Creates multiple intents in the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchUpdateIntentsRequest], @@ -410,8 +423,9 @@ def batch_delete_intents( Deletes intents in the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchDeleteIntentsRequest], diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/intents/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/intents/transports/grpc_asyncio.py index 8e6855c6d6a2..dcc780589415 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/intents/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/intents/transports/grpc_asyncio.py @@ -132,7 +132,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if @@ -311,6 +311,10 @@ def create_intent( Creates an intent in the specified agent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Returns: Callable[[~.CreateIntentRequest], Awaitable[~.Intent]]: @@ -337,6 +341,10 @@ def update_intent( Updates the specified intent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Returns: Callable[[~.UpdateIntentRequest], Awaitable[~.Intent]]: @@ -361,8 +369,12 @@ def delete_intent( ) -> Callable[[intent.DeleteIntentRequest], Awaitable[empty_pb2.Empty]]: r"""Return a callable for the delete intent method over gRPC. - Deletes the specified intent and its direct or - indirect followup intents. + Deletes the specified intent and its direct or indirect followup + intents. + + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.DeleteIntentRequest], @@ -392,8 +404,9 @@ def batch_update_intents( Updates/Creates multiple intents in the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchUpdateIntentsRequest], @@ -423,8 +436,9 @@ def batch_delete_intents( Deletes intents in the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchDeleteIntentsRequest], diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/knowledge_bases/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/knowledge_bases/transports/grpc.py index b5d1cc7c7bb3..57ad0ba53c95 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/knowledge_bases/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/knowledge_bases/transports/grpc.py @@ -83,7 +83,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/knowledge_bases/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/knowledge_bases/transports/grpc_asyncio.py index 0aed45343ad0..1924251bf605 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/knowledge_bases/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/knowledge_bases/transports/grpc_asyncio.py @@ -130,7 +130,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/participants/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/participants/transports/grpc.py index 8b069e5df943..3c1fb4929f90 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/participants/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/participants/transports/grpc.py @@ -82,7 +82,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/session_entity_types/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/session_entity_types/transports/grpc.py index 18b09dc80f32..27b352a86610 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/session_entity_types/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/session_entity_types/transports/grpc.py @@ -85,7 +85,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/session_entity_types/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/session_entity_types/transports/grpc_asyncio.py index 8b0a54d0950e..6a0e5da3a202 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/session_entity_types/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/session_entity_types/transports/grpc_asyncio.py @@ -132,7 +132,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/sessions/transports/grpc.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/sessions/transports/grpc.py index 2033e87e4dfe..c25069ef7900 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/sessions/transports/grpc.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/sessions/transports/grpc.py @@ -84,7 +84,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/sessions/transports/grpc_asyncio.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/sessions/transports/grpc_asyncio.py index 3f0939e297b6..de984b3932a0 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/sessions/transports/grpc_asyncio.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/services/sessions/transports/grpc_asyncio.py @@ -131,7 +131,7 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or application default SSL credentials. + ``client_cert_source`` or applicatin default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/types/conversation_profile.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/types/conversation_profile.py index 0e9d1a396f5e..74039c0b8911 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/types/conversation_profile.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/types/conversation_profile.py @@ -80,10 +80,21 @@ class ConversationProfile(proto.Message): stt_config (google.cloud.dialogflow_v2beta1.types.SpeechToTextConfig): Settings for speech transcription. language_code (str): - Language code for the conversation profile. - If not specified, the language is en-US. - Language at ConversationProfile should be set - for all non en-us languages. + Language code for the conversation profile. If not + specified, the language is en-US. Language at + ConversationProfile should be set for all non en-us + languages. This should be a + `BCP-47 `__ + language tag. Example: "en-US". + time_zone (str): + The time zone of this conversational profile from the `time + zone database `__, e.g., + America/New_York, Europe/Paris. Defaults to + America/New_York. + security_settings (str): + Name of the CX SecuritySettings reference for the agent. + Format: + ``projects//locations//securitySettings/``. """ name = proto.Field(proto.STRING, number=1,) @@ -114,6 +125,8 @@ class ConversationProfile(proto.Message): proto.MESSAGE, number=9, message=audio_config.SpeechToTextConfig, ) language_code = proto.Field(proto.STRING, number=10,) + time_zone = proto.Field(proto.STRING, number=14,) + security_settings = proto.Field(proto.STRING, number=13,) class AutomatedAgentConfig(proto.Message): diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/types/session.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/types/session.py index f4ac7a1fba29..e84afb1e0410 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/types/session.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/types/session.py @@ -772,6 +772,8 @@ class StreamingRecognitionResult(proto.Message): Time offset of the end of this Speech recognition result relative to the beginning of the audio. Only populated for ``message_type`` = ``TRANSCRIPT``. + language_code (str): + Detected language code for the transcript. dtmf_digits (google.cloud.dialogflow_v2beta1.types.TelephonyDtmfEvents): DTMF digits. Populated if and only if ``message_type`` = ``DTMF_DIGITS``. @@ -796,6 +798,7 @@ class MessageType(proto.Enum): speech_end_offset = proto.Field( proto.MESSAGE, number=8, message=duration_pb2.Duration, ) + language_code = proto.Field(proto.STRING, number=10,) dtmf_digits = proto.Field( proto.MESSAGE, number=5, message=gcd_audio_config.TelephonyDtmfEvents, ) diff --git a/packages/google-cloud-dialogflow/scripts/fixup_dialogflow_v2_keywords.py b/packages/google-cloud-dialogflow/scripts/fixup_dialogflow_v2_keywords.py index 7b0f6b6d0cb9..cc0f68eb9092 100644 --- a/packages/google-cloud-dialogflow/scripts/fixup_dialogflow_v2_keywords.py +++ b/packages/google-cloud-dialogflow/scripts/fixup_dialogflow_v2_keywords.py @@ -39,88 +39,88 @@ def partition( class dialogflowCallTransformer(cst.CSTTransformer): CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - 'analyze_content': ('participant', 'text_input', 'event_input', 'reply_audio_config', 'query_params', 'request_id', ), - 'batch_create_entities': ('parent', 'entities', 'language_code', ), - 'batch_delete_entities': ('parent', 'entity_values', 'language_code', ), - 'batch_delete_entity_types': ('parent', 'entity_type_names', ), - 'batch_delete_intents': ('parent', 'intents', ), - 'batch_update_entities': ('parent', 'entities', 'language_code', 'update_mask', ), - 'batch_update_entity_types': ('parent', 'entity_type_batch_uri', 'entity_type_batch_inline', 'language_code', 'update_mask', ), - 'batch_update_intents': ('parent', 'intent_batch_uri', 'intent_batch_inline', 'language_code', 'update_mask', 'intent_view', ), - 'complete_conversation': ('name', ), - 'create_context': ('parent', 'context', ), - 'create_conversation': ('parent', 'conversation', 'conversation_id', ), - 'create_conversation_profile': ('parent', 'conversation_profile', ), - 'create_document': ('parent', 'document', ), - 'create_entity_type': ('parent', 'entity_type', 'language_code', ), - 'create_environment': ('parent', 'environment', 'environment_id', ), - 'create_intent': ('parent', 'intent', 'language_code', 'intent_view', ), - 'create_knowledge_base': ('parent', 'knowledge_base', ), - 'create_participant': ('parent', 'participant', ), - 'create_session_entity_type': ('parent', 'session_entity_type', ), - 'create_version': ('parent', 'version', ), - 'delete_agent': ('parent', ), - 'delete_all_contexts': ('parent', ), - 'delete_context': ('name', ), - 'delete_conversation_profile': ('name', ), - 'delete_document': ('name', ), - 'delete_entity_type': ('name', ), - 'delete_environment': ('name', ), - 'delete_intent': ('name', ), - 'delete_knowledge_base': ('name', 'force', ), - 'delete_session_entity_type': ('name', ), - 'delete_version': ('name', ), - 'detect_intent': ('session', 'query_input', 'query_params', 'output_audio_config', 'output_audio_config_mask', 'input_audio', ), - 'export_agent': ('parent', 'agent_uri', ), - 'get_agent': ('parent', ), - 'get_context': ('name', ), - 'get_conversation': ('name', ), - 'get_conversation_profile': ('name', ), - 'get_document': ('name', ), - 'get_entity_type': ('name', 'language_code', ), - 'get_environment': ('name', ), - 'get_environment_history': ('parent', 'page_size', 'page_token', ), - 'get_fulfillment': ('name', ), - 'get_intent': ('name', 'language_code', 'intent_view', ), - 'get_knowledge_base': ('name', ), - 'get_participant': ('name', ), - 'get_session_entity_type': ('name', ), - 'get_validation_result': ('parent', 'language_code', ), - 'get_version': ('name', ), - 'import_agent': ('parent', 'agent_uri', 'agent_content', ), - 'list_answer_records': ('parent', 'filter', 'page_size', 'page_token', ), - 'list_contexts': ('parent', 'page_size', 'page_token', ), - 'list_conversation_profiles': ('parent', 'page_size', 'page_token', ), - 'list_conversations': ('parent', 'page_size', 'page_token', 'filter', ), - 'list_documents': ('parent', 'page_size', 'page_token', ), - 'list_entity_types': ('parent', 'language_code', 'page_size', 'page_token', ), - 'list_environments': ('parent', 'page_size', 'page_token', ), - 'list_intents': ('parent', 'language_code', 'intent_view', 'page_size', 'page_token', ), - 'list_knowledge_bases': ('parent', 'page_size', 'page_token', ), - 'list_messages': ('parent', 'filter', 'page_size', 'page_token', ), - 'list_participants': ('parent', 'page_size', 'page_token', ), - 'list_session_entity_types': ('parent', 'page_size', 'page_token', ), - 'list_versions': ('parent', 'page_size', 'page_token', ), - 'reload_document': ('name', 'content_uri', ), - 'restore_agent': ('parent', 'agent_uri', 'agent_content', ), - 'search_agents': ('parent', 'page_size', 'page_token', ), - 'set_agent': ('agent', 'update_mask', ), - 'streaming_detect_intent': ('session', 'query_input', 'query_params', 'single_utterance', 'output_audio_config', 'output_audio_config_mask', 'input_audio', ), - 'suggest_articles': ('parent', 'latest_message', 'context_size', ), - 'suggest_faq_answers': ('parent', 'latest_message', 'context_size', ), - 'train_agent': ('parent', ), - 'update_answer_record': ('answer_record', 'update_mask', ), - 'update_context': ('context', 'update_mask', ), - 'update_conversation_profile': ('conversation_profile', 'update_mask', ), - 'update_document': ('document', 'update_mask', ), - 'update_entity_type': ('entity_type', 'language_code', 'update_mask', ), - 'update_environment': ('environment', 'update_mask', 'allow_load_to_draft_and_discard_changes', ), - 'update_fulfillment': ('fulfillment', 'update_mask', ), - 'update_intent': ('intent', 'language_code', 'update_mask', 'intent_view', ), - 'update_knowledge_base': ('knowledge_base', 'update_mask', ), - 'update_participant': ('participant', 'update_mask', ), - 'update_session_entity_type': ('session_entity_type', 'update_mask', ), - 'update_version': ('version', 'update_mask', ), + 'analyze_content': ('participant', 'text_input', 'event_input', 'reply_audio_config', 'query_params', 'request_id', ), + 'batch_create_entities': ('parent', 'entities', 'language_code', ), + 'batch_delete_entities': ('parent', 'entity_values', 'language_code', ), + 'batch_delete_entity_types': ('parent', 'entity_type_names', ), + 'batch_delete_intents': ('parent', 'intents', ), + 'batch_update_entities': ('parent', 'entities', 'language_code', 'update_mask', ), + 'batch_update_entity_types': ('parent', 'entity_type_batch_uri', 'entity_type_batch_inline', 'language_code', 'update_mask', ), + 'batch_update_intents': ('parent', 'intent_batch_uri', 'intent_batch_inline', 'language_code', 'update_mask', 'intent_view', ), + 'complete_conversation': ('name', ), + 'create_context': ('parent', 'context', ), + 'create_conversation': ('parent', 'conversation', 'conversation_id', ), + 'create_conversation_profile': ('parent', 'conversation_profile', ), + 'create_document': ('parent', 'document', ), + 'create_entity_type': ('parent', 'entity_type', 'language_code', ), + 'create_environment': ('parent', 'environment', 'environment_id', ), + 'create_intent': ('parent', 'intent', 'language_code', 'intent_view', ), + 'create_knowledge_base': ('parent', 'knowledge_base', ), + 'create_participant': ('parent', 'participant', ), + 'create_session_entity_type': ('parent', 'session_entity_type', ), + 'create_version': ('parent', 'version', ), + 'delete_agent': ('parent', ), + 'delete_all_contexts': ('parent', ), + 'delete_context': ('name', ), + 'delete_conversation_profile': ('name', ), + 'delete_document': ('name', ), + 'delete_entity_type': ('name', ), + 'delete_environment': ('name', ), + 'delete_intent': ('name', ), + 'delete_knowledge_base': ('name', 'force', ), + 'delete_session_entity_type': ('name', ), + 'delete_version': ('name', ), + 'detect_intent': ('session', 'query_input', 'query_params', 'output_audio_config', 'output_audio_config_mask', 'input_audio', ), + 'export_agent': ('parent', 'agent_uri', ), + 'get_agent': ('parent', ), + 'get_context': ('name', ), + 'get_conversation': ('name', ), + 'get_conversation_profile': ('name', ), + 'get_document': ('name', ), + 'get_entity_type': ('name', 'language_code', ), + 'get_environment': ('name', ), + 'get_environment_history': ('parent', 'page_size', 'page_token', ), + 'get_fulfillment': ('name', ), + 'get_intent': ('name', 'language_code', 'intent_view', ), + 'get_knowledge_base': ('name', ), + 'get_participant': ('name', ), + 'get_session_entity_type': ('name', ), + 'get_validation_result': ('parent', 'language_code', ), + 'get_version': ('name', ), + 'import_agent': ('parent', 'agent_uri', 'agent_content', ), + 'list_answer_records': ('parent', 'filter', 'page_size', 'page_token', ), + 'list_contexts': ('parent', 'page_size', 'page_token', ), + 'list_conversation_profiles': ('parent', 'page_size', 'page_token', ), + 'list_conversations': ('parent', 'page_size', 'page_token', 'filter', ), + 'list_documents': ('parent', 'page_size', 'page_token', ), + 'list_entity_types': ('parent', 'language_code', 'page_size', 'page_token', ), + 'list_environments': ('parent', 'page_size', 'page_token', ), + 'list_intents': ('parent', 'language_code', 'intent_view', 'page_size', 'page_token', ), + 'list_knowledge_bases': ('parent', 'page_size', 'page_token', ), + 'list_messages': ('parent', 'filter', 'page_size', 'page_token', ), + 'list_participants': ('parent', 'page_size', 'page_token', ), + 'list_session_entity_types': ('parent', 'page_size', 'page_token', ), + 'list_versions': ('parent', 'page_size', 'page_token', ), + 'reload_document': ('name', 'content_uri', ), + 'restore_agent': ('parent', 'agent_uri', 'agent_content', ), + 'search_agents': ('parent', 'page_size', 'page_token', ), + 'set_agent': ('agent', 'update_mask', ), + 'streaming_detect_intent': ('session', 'query_input', 'query_params', 'single_utterance', 'output_audio_config', 'output_audio_config_mask', 'input_audio', ), + 'suggest_articles': ('parent', 'latest_message', 'context_size', ), + 'suggest_faq_answers': ('parent', 'latest_message', 'context_size', ), + 'train_agent': ('parent', ), + 'update_answer_record': ('answer_record', 'update_mask', ), + 'update_context': ('context', 'update_mask', ), + 'update_conversation_profile': ('conversation_profile', 'update_mask', ), + 'update_document': ('document', 'update_mask', ), + 'update_entity_type': ('entity_type', 'language_code', 'update_mask', ), + 'update_environment': ('environment', 'update_mask', 'allow_load_to_draft_and_discard_changes', ), + 'update_fulfillment': ('fulfillment', 'update_mask', ), + 'update_intent': ('intent', 'language_code', 'update_mask', 'intent_view', ), + 'update_knowledge_base': ('knowledge_base', 'update_mask', ), + 'update_participant': ('participant', 'update_mask', ), + 'update_session_entity_type': ('session_entity_type', 'update_mask', ), + 'update_version': ('version', 'update_mask', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: @@ -139,7 +139,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: return updated kwargs, ctrl_kwargs = partition( - lambda a: a.keyword.value not in self.CTRL_PARAMS, + lambda a: not a.keyword.value in self.CTRL_PARAMS, kwargs ) @@ -151,7 +151,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: value=cst.Dict([ cst.DictElement( cst.SimpleString("'{}'".format(name)), - cst.Element(value=arg.value) +cst.Element(value=arg.value) ) # Note: the args + kwargs looks silly, but keep in mind that # the control parameters had to be stripped out, and that diff --git a/packages/google-cloud-dialogflow/scripts/fixup_dialogflow_v2beta1_keywords.py b/packages/google-cloud-dialogflow/scripts/fixup_dialogflow_v2beta1_keywords.py index 84d9c30d5d36..0a8e20f0bb31 100644 --- a/packages/google-cloud-dialogflow/scripts/fixup_dialogflow_v2beta1_keywords.py +++ b/packages/google-cloud-dialogflow/scripts/fixup_dialogflow_v2beta1_keywords.py @@ -39,94 +39,94 @@ def partition( class dialogflowCallTransformer(cst.CSTTransformer): CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - 'analyze_content': ('participant', 'text_input', 'event_input', 'reply_audio_config', 'query_params', 'message_send_time', 'request_id', ), - 'batch_create_entities': ('parent', 'entities', 'language_code', ), - 'batch_create_messages': ('parent', 'requests', ), - 'batch_delete_entities': ('parent', 'entity_values', 'language_code', ), - 'batch_delete_entity_types': ('parent', 'entity_type_names', ), - 'batch_delete_intents': ('parent', 'intents', ), - 'batch_update_entities': ('parent', 'entities', 'language_code', 'update_mask', ), - 'batch_update_entity_types': ('parent', 'entity_type_batch_uri', 'entity_type_batch_inline', 'language_code', 'update_mask', ), - 'batch_update_intents': ('parent', 'intent_batch_uri', 'intent_batch_inline', 'language_code', 'update_mask', 'intent_view', ), - 'compile_suggestion': ('parent', 'latest_message', 'context_size', ), - 'complete_conversation': ('name', ), - 'create_context': ('parent', 'context', ), - 'create_conversation': ('parent', 'conversation', 'conversation_id', ), - 'create_conversation_profile': ('parent', 'conversation_profile', ), - 'create_document': ('parent', 'document', 'import_gcs_custom_metadata', ), - 'create_entity_type': ('parent', 'entity_type', 'language_code', ), - 'create_environment': ('parent', 'environment', 'environment_id', ), - 'create_intent': ('parent', 'intent', 'language_code', 'intent_view', ), - 'create_knowledge_base': ('parent', 'knowledge_base', ), - 'create_participant': ('parent', 'participant', ), - 'create_session_entity_type': ('parent', 'session_entity_type', ), - 'create_version': ('parent', 'version', ), - 'delete_agent': ('parent', ), - 'delete_all_contexts': ('parent', ), - 'delete_context': ('name', ), - 'delete_conversation_profile': ('name', ), - 'delete_document': ('name', ), - 'delete_entity_type': ('name', ), - 'delete_environment': ('name', ), - 'delete_intent': ('name', ), - 'delete_knowledge_base': ('name', 'force', ), - 'delete_session_entity_type': ('name', ), - 'delete_version': ('name', ), - 'detect_intent': ('session', 'query_input', 'query_params', 'output_audio_config', 'output_audio_config_mask', 'input_audio', ), - 'export_agent': ('parent', 'agent_uri', ), - 'get_agent': ('parent', ), - 'get_answer_record': ('name', ), - 'get_context': ('name', ), - 'get_conversation': ('name', ), - 'get_conversation_profile': ('name', ), - 'get_document': ('name', ), - 'get_entity_type': ('name', 'language_code', ), - 'get_environment': ('name', ), - 'get_environment_history': ('parent', 'page_size', 'page_token', ), - 'get_fulfillment': ('name', ), - 'get_intent': ('name', 'language_code', 'intent_view', ), - 'get_knowledge_base': ('name', ), - 'get_participant': ('name', ), - 'get_session_entity_type': ('name', ), - 'get_validation_result': ('parent', 'language_code', ), - 'get_version': ('name', ), - 'import_agent': ('parent', 'agent_uri', 'agent_content', ), - 'import_documents': ('parent', 'document_template', 'gcs_source', 'import_gcs_custom_metadata', ), - 'list_answer_records': ('parent', 'page_size', 'page_token', ), - 'list_contexts': ('parent', 'page_size', 'page_token', ), - 'list_conversation_profiles': ('parent', 'page_size', 'page_token', ), - 'list_conversations': ('parent', 'page_size', 'page_token', 'filter', ), - 'list_documents': ('parent', 'page_size', 'page_token', 'filter', ), - 'list_entity_types': ('parent', 'language_code', 'page_size', 'page_token', ), - 'list_environments': ('parent', 'page_size', 'page_token', ), - 'list_intents': ('parent', 'language_code', 'intent_view', 'page_size', 'page_token', ), - 'list_knowledge_bases': ('parent', 'page_size', 'page_token', 'filter', ), - 'list_messages': ('parent', 'filter', 'page_size', 'page_token', ), - 'list_participants': ('parent', 'page_size', 'page_token', ), - 'list_session_entity_types': ('parent', 'page_size', 'page_token', ), - 'list_suggestions': ('parent', 'page_size', 'page_token', 'filter', ), - 'list_versions': ('parent', 'page_size', 'page_token', ), - 'reload_document': ('name', 'gcs_source', 'import_gcs_custom_metadata', ), - 'restore_agent': ('parent', 'agent_uri', 'agent_content', ), - 'search_agents': ('parent', 'page_size', 'page_token', ), - 'set_agent': ('agent', 'update_mask', ), - 'streaming_detect_intent': ('session', 'query_input', 'query_params', 'single_utterance', 'output_audio_config', 'output_audio_config_mask', 'input_audio', ), - 'suggest_articles': ('parent', 'latest_message', 'context_size', ), - 'suggest_faq_answers': ('parent', 'latest_message', 'context_size', ), - 'suggest_smart_replies': ('parent', 'current_text_input', 'latest_message', 'context_size', ), - 'train_agent': ('parent', ), - 'update_answer_record': ('answer_record', 'update_mask', ), - 'update_context': ('context', 'update_mask', ), - 'update_conversation_profile': ('conversation_profile', 'update_mask', ), - 'update_document': ('document', 'update_mask', ), - 'update_entity_type': ('entity_type', 'language_code', 'update_mask', ), - 'update_environment': ('environment', 'update_mask', 'allow_load_to_draft_and_discard_changes', ), - 'update_fulfillment': ('fulfillment', 'update_mask', ), - 'update_intent': ('intent', 'language_code', 'update_mask', 'intent_view', ), - 'update_knowledge_base': ('knowledge_base', 'update_mask', ), - 'update_participant': ('participant', 'update_mask', ), - 'update_session_entity_type': ('session_entity_type', 'update_mask', ), - 'update_version': ('version', 'update_mask', ), + 'analyze_content': ('participant', 'text_input', 'event_input', 'reply_audio_config', 'query_params', 'message_send_time', 'request_id', ), + 'batch_create_entities': ('parent', 'entities', 'language_code', ), + 'batch_create_messages': ('parent', 'requests', ), + 'batch_delete_entities': ('parent', 'entity_values', 'language_code', ), + 'batch_delete_entity_types': ('parent', 'entity_type_names', ), + 'batch_delete_intents': ('parent', 'intents', ), + 'batch_update_entities': ('parent', 'entities', 'language_code', 'update_mask', ), + 'batch_update_entity_types': ('parent', 'entity_type_batch_uri', 'entity_type_batch_inline', 'language_code', 'update_mask', ), + 'batch_update_intents': ('parent', 'intent_batch_uri', 'intent_batch_inline', 'language_code', 'update_mask', 'intent_view', ), + 'compile_suggestion': ('parent', 'latest_message', 'context_size', ), + 'complete_conversation': ('name', ), + 'create_context': ('parent', 'context', ), + 'create_conversation': ('parent', 'conversation', 'conversation_id', ), + 'create_conversation_profile': ('parent', 'conversation_profile', ), + 'create_document': ('parent', 'document', 'import_gcs_custom_metadata', ), + 'create_entity_type': ('parent', 'entity_type', 'language_code', ), + 'create_environment': ('parent', 'environment', 'environment_id', ), + 'create_intent': ('parent', 'intent', 'language_code', 'intent_view', ), + 'create_knowledge_base': ('parent', 'knowledge_base', ), + 'create_participant': ('parent', 'participant', ), + 'create_session_entity_type': ('parent', 'session_entity_type', ), + 'create_version': ('parent', 'version', ), + 'delete_agent': ('parent', ), + 'delete_all_contexts': ('parent', ), + 'delete_context': ('name', ), + 'delete_conversation_profile': ('name', ), + 'delete_document': ('name', ), + 'delete_entity_type': ('name', ), + 'delete_environment': ('name', ), + 'delete_intent': ('name', ), + 'delete_knowledge_base': ('name', 'force', ), + 'delete_session_entity_type': ('name', ), + 'delete_version': ('name', ), + 'detect_intent': ('session', 'query_input', 'query_params', 'output_audio_config', 'output_audio_config_mask', 'input_audio', ), + 'export_agent': ('parent', 'agent_uri', ), + 'get_agent': ('parent', ), + 'get_answer_record': ('name', ), + 'get_context': ('name', ), + 'get_conversation': ('name', ), + 'get_conversation_profile': ('name', ), + 'get_document': ('name', ), + 'get_entity_type': ('name', 'language_code', ), + 'get_environment': ('name', ), + 'get_environment_history': ('parent', 'page_size', 'page_token', ), + 'get_fulfillment': ('name', ), + 'get_intent': ('name', 'language_code', 'intent_view', ), + 'get_knowledge_base': ('name', ), + 'get_participant': ('name', ), + 'get_session_entity_type': ('name', ), + 'get_validation_result': ('parent', 'language_code', ), + 'get_version': ('name', ), + 'import_agent': ('parent', 'agent_uri', 'agent_content', ), + 'import_documents': ('parent', 'document_template', 'gcs_source', 'import_gcs_custom_metadata', ), + 'list_answer_records': ('parent', 'page_size', 'page_token', ), + 'list_contexts': ('parent', 'page_size', 'page_token', ), + 'list_conversation_profiles': ('parent', 'page_size', 'page_token', ), + 'list_conversations': ('parent', 'page_size', 'page_token', 'filter', ), + 'list_documents': ('parent', 'page_size', 'page_token', 'filter', ), + 'list_entity_types': ('parent', 'language_code', 'page_size', 'page_token', ), + 'list_environments': ('parent', 'page_size', 'page_token', ), + 'list_intents': ('parent', 'language_code', 'intent_view', 'page_size', 'page_token', ), + 'list_knowledge_bases': ('parent', 'page_size', 'page_token', 'filter', ), + 'list_messages': ('parent', 'filter', 'page_size', 'page_token', ), + 'list_participants': ('parent', 'page_size', 'page_token', ), + 'list_session_entity_types': ('parent', 'page_size', 'page_token', ), + 'list_suggestions': ('parent', 'page_size', 'page_token', 'filter', ), + 'list_versions': ('parent', 'page_size', 'page_token', ), + 'reload_document': ('name', 'gcs_source', 'import_gcs_custom_metadata', ), + 'restore_agent': ('parent', 'agent_uri', 'agent_content', ), + 'search_agents': ('parent', 'page_size', 'page_token', ), + 'set_agent': ('agent', 'update_mask', ), + 'streaming_detect_intent': ('session', 'query_input', 'query_params', 'single_utterance', 'output_audio_config', 'output_audio_config_mask', 'input_audio', ), + 'suggest_articles': ('parent', 'latest_message', 'context_size', ), + 'suggest_faq_answers': ('parent', 'latest_message', 'context_size', ), + 'suggest_smart_replies': ('parent', 'current_text_input', 'latest_message', 'context_size', ), + 'train_agent': ('parent', ), + 'update_answer_record': ('answer_record', 'update_mask', ), + 'update_context': ('context', 'update_mask', ), + 'update_conversation_profile': ('conversation_profile', 'update_mask', ), + 'update_document': ('document', 'update_mask', ), + 'update_entity_type': ('entity_type', 'language_code', 'update_mask', ), + 'update_environment': ('environment', 'update_mask', 'allow_load_to_draft_and_discard_changes', ), + 'update_fulfillment': ('fulfillment', 'update_mask', ), + 'update_intent': ('intent', 'language_code', 'update_mask', 'intent_view', ), + 'update_knowledge_base': ('knowledge_base', 'update_mask', ), + 'update_participant': ('participant', 'update_mask', ), + 'update_session_entity_type': ('session_entity_type', 'update_mask', ), + 'update_version': ('version', 'update_mask', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: @@ -145,7 +145,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: return updated kwargs, ctrl_kwargs = partition( - lambda a: a.keyword.value not in self.CTRL_PARAMS, + lambda a: not a.keyword.value in self.CTRL_PARAMS, kwargs ) @@ -157,7 +157,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: value=cst.Dict([ cst.DictElement( cst.SimpleString("'{}'".format(name)), - cst.Element(value=arg.value) +cst.Element(value=arg.value) ) # Note: the args + kwargs looks silly, but keep in mind that # the control parameters had to be stripped out, and that diff --git a/packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2beta1/test_conversation_profiles.py b/packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2beta1/test_conversation_profiles.py index eea647e38f6b..8ba444c942c3 100644 --- a/packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2beta1/test_conversation_profiles.py +++ b/packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2beta1/test_conversation_profiles.py @@ -961,6 +961,8 @@ def test_get_conversation_profile( name="name_value", display_name="display_name_value", language_code="language_code_value", + time_zone="time_zone_value", + security_settings="security_settings_value", ) response = client.get_conversation_profile(request) @@ -974,6 +976,8 @@ def test_get_conversation_profile( assert response.name == "name_value" assert response.display_name == "display_name_value" assert response.language_code == "language_code_value" + assert response.time_zone == "time_zone_value" + assert response.security_settings == "security_settings_value" def test_get_conversation_profile_from_dict(): @@ -1020,6 +1024,8 @@ async def test_get_conversation_profile_async( name="name_value", display_name="display_name_value", language_code="language_code_value", + time_zone="time_zone_value", + security_settings="security_settings_value", ) ) response = await client.get_conversation_profile(request) @@ -1034,6 +1040,8 @@ async def test_get_conversation_profile_async( assert response.name == "name_value" assert response.display_name == "display_name_value" assert response.language_code == "language_code_value" + assert response.time_zone == "time_zone_value" + assert response.security_settings == "security_settings_value" @pytest.mark.asyncio @@ -1197,6 +1205,8 @@ def test_create_conversation_profile( name="name_value", display_name="display_name_value", language_code="language_code_value", + time_zone="time_zone_value", + security_settings="security_settings_value", ) response = client.create_conversation_profile(request) @@ -1210,6 +1220,8 @@ def test_create_conversation_profile( assert response.name == "name_value" assert response.display_name == "display_name_value" assert response.language_code == "language_code_value" + assert response.time_zone == "time_zone_value" + assert response.security_settings == "security_settings_value" def test_create_conversation_profile_from_dict(): @@ -1256,6 +1268,8 @@ async def test_create_conversation_profile_async( name="name_value", display_name="display_name_value", language_code="language_code_value", + time_zone="time_zone_value", + security_settings="security_settings_value", ) ) response = await client.create_conversation_profile(request) @@ -1270,6 +1284,8 @@ async def test_create_conversation_profile_async( assert response.name == "name_value" assert response.display_name == "display_name_value" assert response.language_code == "language_code_value" + assert response.time_zone == "time_zone_value" + assert response.security_settings == "security_settings_value" @pytest.mark.asyncio @@ -1461,6 +1477,8 @@ def test_update_conversation_profile( name="name_value", display_name="display_name_value", language_code="language_code_value", + time_zone="time_zone_value", + security_settings="security_settings_value", ) response = client.update_conversation_profile(request) @@ -1474,6 +1492,8 @@ def test_update_conversation_profile( assert response.name == "name_value" assert response.display_name == "display_name_value" assert response.language_code == "language_code_value" + assert response.time_zone == "time_zone_value" + assert response.security_settings == "security_settings_value" def test_update_conversation_profile_from_dict(): @@ -1520,6 +1540,8 @@ async def test_update_conversation_profile_async( name="name_value", display_name="display_name_value", language_code="language_code_value", + time_zone="time_zone_value", + security_settings="security_settings_value", ) ) response = await client.update_conversation_profile(request) @@ -1534,6 +1556,8 @@ async def test_update_conversation_profile_async( assert response.name == "name_value" assert response.display_name == "display_name_value" assert response.language_code == "language_code_value" + assert response.time_zone == "time_zone_value" + assert response.security_settings == "security_settings_value" @pytest.mark.asyncio @@ -2469,10 +2493,36 @@ def test_parse_conversation_profile_path(): assert expected == actual -def test_document_path(): +def test_cx_security_settings_path(): project = "squid" - knowledge_base = "clam" - document = "whelk" + location = "clam" + security_settings = "whelk" + expected = "projects/{project}/locations/{location}/securitySettings/{security_settings}".format( + project=project, location=location, security_settings=security_settings, + ) + actual = ConversationProfilesClient.cx_security_settings_path( + project, location, security_settings + ) + assert expected == actual + + +def test_parse_cx_security_settings_path(): + expected = { + "project": "octopus", + "location": "oyster", + "security_settings": "nudibranch", + } + path = ConversationProfilesClient.cx_security_settings_path(**expected) + + # Check that the path construction is reversible. + actual = ConversationProfilesClient.parse_cx_security_settings_path(path) + assert expected == actual + + +def test_document_path(): + project = "cuttlefish" + knowledge_base = "mussel" + document = "winkle" expected = "projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}".format( project=project, knowledge_base=knowledge_base, document=document, ) @@ -2482,9 +2532,9 @@ def test_document_path(): def test_parse_document_path(): expected = { - "project": "octopus", - "knowledge_base": "oyster", - "document": "nudibranch", + "project": "nautilus", + "knowledge_base": "scallop", + "document": "abalone", } path = ConversationProfilesClient.document_path(**expected) @@ -2494,8 +2544,8 @@ def test_parse_document_path(): def test_knowledge_base_path(): - project = "cuttlefish" - knowledge_base = "mussel" + project = "squid" + knowledge_base = "clam" expected = "projects/{project}/knowledgeBases/{knowledge_base}".format( project=project, knowledge_base=knowledge_base, ) @@ -2505,8 +2555,8 @@ def test_knowledge_base_path(): def test_parse_knowledge_base_path(): expected = { - "project": "winkle", - "knowledge_base": "nautilus", + "project": "whelk", + "knowledge_base": "octopus", } path = ConversationProfilesClient.knowledge_base_path(**expected) @@ -2516,7 +2566,7 @@ def test_parse_knowledge_base_path(): def test_common_billing_account_path(): - billing_account = "scallop" + billing_account = "oyster" expected = "billingAccounts/{billing_account}".format( billing_account=billing_account, ) @@ -2526,7 +2576,7 @@ def test_common_billing_account_path(): def test_parse_common_billing_account_path(): expected = { - "billing_account": "abalone", + "billing_account": "nudibranch", } path = ConversationProfilesClient.common_billing_account_path(**expected) @@ -2536,7 +2586,7 @@ def test_parse_common_billing_account_path(): def test_common_folder_path(): - folder = "squid" + folder = "cuttlefish" expected = "folders/{folder}".format(folder=folder,) actual = ConversationProfilesClient.common_folder_path(folder) assert expected == actual @@ -2544,7 +2594,7 @@ def test_common_folder_path(): def test_parse_common_folder_path(): expected = { - "folder": "clam", + "folder": "mussel", } path = ConversationProfilesClient.common_folder_path(**expected) @@ -2554,7 +2604,7 @@ def test_parse_common_folder_path(): def test_common_organization_path(): - organization = "whelk" + organization = "winkle" expected = "organizations/{organization}".format(organization=organization,) actual = ConversationProfilesClient.common_organization_path(organization) assert expected == actual @@ -2562,7 +2612,7 @@ def test_common_organization_path(): def test_parse_common_organization_path(): expected = { - "organization": "octopus", + "organization": "nautilus", } path = ConversationProfilesClient.common_organization_path(**expected) @@ -2572,7 +2622,7 @@ def test_parse_common_organization_path(): def test_common_project_path(): - project = "oyster" + project = "scallop" expected = "projects/{project}".format(project=project,) actual = ConversationProfilesClient.common_project_path(project) assert expected == actual @@ -2580,7 +2630,7 @@ def test_common_project_path(): def test_parse_common_project_path(): expected = { - "project": "nudibranch", + "project": "abalone", } path = ConversationProfilesClient.common_project_path(**expected) @@ -2590,8 +2640,8 @@ def test_parse_common_project_path(): def test_common_location_path(): - project = "cuttlefish" - location = "mussel" + project = "squid" + location = "clam" expected = "projects/{project}/locations/{location}".format( project=project, location=location, ) @@ -2601,8 +2651,8 @@ def test_common_location_path(): def test_parse_common_location_path(): expected = { - "project": "winkle", - "location": "nautilus", + "project": "whelk", + "location": "octopus", } path = ConversationProfilesClient.common_location_path(**expected) diff --git a/packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2beta1/test_environments.py b/packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2beta1/test_environments.py index a078dcca8143..5014e4a710c2 100644 --- a/packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2beta1/test_environments.py +++ b/packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2beta1/test_environments.py @@ -2273,8 +2273,30 @@ def test_parse_fulfillment_path(): assert expected == actual +def test_version_path(): + project = "cuttlefish" + version = "mussel" + expected = "projects/{project}/agent/versions/{version}".format( + project=project, version=version, + ) + actual = EnvironmentsClient.version_path(project, version) + assert expected == actual + + +def test_parse_version_path(): + expected = { + "project": "winkle", + "version": "nautilus", + } + path = EnvironmentsClient.version_path(**expected) + + # Check that the path construction is reversible. + actual = EnvironmentsClient.parse_version_path(path) + assert expected == actual + + def test_common_billing_account_path(): - billing_account = "cuttlefish" + billing_account = "scallop" expected = "billingAccounts/{billing_account}".format( billing_account=billing_account, ) @@ -2284,7 +2306,7 @@ def test_common_billing_account_path(): def test_parse_common_billing_account_path(): expected = { - "billing_account": "mussel", + "billing_account": "abalone", } path = EnvironmentsClient.common_billing_account_path(**expected) @@ -2294,7 +2316,7 @@ def test_parse_common_billing_account_path(): def test_common_folder_path(): - folder = "winkle" + folder = "squid" expected = "folders/{folder}".format(folder=folder,) actual = EnvironmentsClient.common_folder_path(folder) assert expected == actual @@ -2302,7 +2324,7 @@ def test_common_folder_path(): def test_parse_common_folder_path(): expected = { - "folder": "nautilus", + "folder": "clam", } path = EnvironmentsClient.common_folder_path(**expected) @@ -2312,7 +2334,7 @@ def test_parse_common_folder_path(): def test_common_organization_path(): - organization = "scallop" + organization = "whelk" expected = "organizations/{organization}".format(organization=organization,) actual = EnvironmentsClient.common_organization_path(organization) assert expected == actual @@ -2320,7 +2342,7 @@ def test_common_organization_path(): def test_parse_common_organization_path(): expected = { - "organization": "abalone", + "organization": "octopus", } path = EnvironmentsClient.common_organization_path(**expected) @@ -2330,7 +2352,7 @@ def test_parse_common_organization_path(): def test_common_project_path(): - project = "squid" + project = "oyster" expected = "projects/{project}".format(project=project,) actual = EnvironmentsClient.common_project_path(project) assert expected == actual @@ -2338,7 +2360,7 @@ def test_common_project_path(): def test_parse_common_project_path(): expected = { - "project": "clam", + "project": "nudibranch", } path = EnvironmentsClient.common_project_path(**expected) @@ -2348,8 +2370,8 @@ def test_parse_common_project_path(): def test_common_location_path(): - project = "whelk" - location = "octopus" + project = "cuttlefish" + location = "mussel" expected = "projects/{project}/locations/{location}".format( project=project, location=location, ) @@ -2359,8 +2381,8 @@ def test_common_location_path(): def test_parse_common_location_path(): expected = { - "project": "oyster", - "location": "nudibranch", + "project": "winkle", + "location": "nautilus", } path = EnvironmentsClient.common_location_path(**expected)