diff --git a/google/cloud/dialogflow_v2/services/agents/client.py b/google/cloud/dialogflow_v2/services/agents/client.py index 1e674a78c..df852f3f8 100644 --- a/google/cloud/dialogflow_v2/services/agents/client.py +++ b/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/google/cloud/dialogflow_v2/services/agents/transports/grpc.py b/google/cloud/dialogflow_v2/services/agents/transports/grpc.py index 6399e1162..3029b8951 100644 --- a/google/cloud/dialogflow_v2/services/agents/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2/services/agents/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2/services/agents/transports/grpc_asyncio.py index 49088f120..ca35e7761 100644 --- a/google/cloud/dialogflow_v2/services/agents/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2/services/answer_records/transports/grpc.py b/google/cloud/dialogflow_v2/services/answer_records/transports/grpc.py index dc68803fb..da060a41d 100644 --- a/google/cloud/dialogflow_v2/services/answer_records/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2/services/answer_records/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2/services/answer_records/transports/grpc_asyncio.py index 2ec5bae7d..66ad5e777 100644 --- a/google/cloud/dialogflow_v2/services/answer_records/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2/services/contexts/transports/grpc.py b/google/cloud/dialogflow_v2/services/contexts/transports/grpc.py index 535da55b2..c7eae0609 100644 --- a/google/cloud/dialogflow_v2/services/contexts/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2/services/contexts/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2/services/contexts/transports/grpc_asyncio.py index 5ad7a2e9b..b59aa6124 100644 --- a/google/cloud/dialogflow_v2/services/contexts/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2/services/conversation_profiles/transports/grpc.py b/google/cloud/dialogflow_v2/services/conversation_profiles/transports/grpc.py index d0644d666..0376a6f74 100644 --- a/google/cloud/dialogflow_v2/services/conversation_profiles/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2/services/conversation_profiles/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2/services/conversation_profiles/transports/grpc_asyncio.py index 9775163f1..a024ed1db 100644 --- a/google/cloud/dialogflow_v2/services/conversation_profiles/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2/services/conversations/transports/grpc.py b/google/cloud/dialogflow_v2/services/conversations/transports/grpc.py index 73d7846ff..89c1f0e05 100644 --- a/google/cloud/dialogflow_v2/services/conversations/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2/services/conversations/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2/services/conversations/transports/grpc_asyncio.py index 5334f1735..51cc2e125 100644 --- a/google/cloud/dialogflow_v2/services/conversations/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2/services/documents/transports/grpc.py b/google/cloud/dialogflow_v2/services/documents/transports/grpc.py index e941184e1..c92335722 100644 --- a/google/cloud/dialogflow_v2/services/documents/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2/services/documents/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2/services/documents/transports/grpc_asyncio.py index 878b8d7b1..1ffc2d5e4 100644 --- a/google/cloud/dialogflow_v2/services/documents/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2/services/entity_types/transports/grpc.py b/google/cloud/dialogflow_v2/services/entity_types/transports/grpc.py index 8d343ee7b..10432a288 100644 --- a/google/cloud/dialogflow_v2/services/entity_types/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2/services/entity_types/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2/services/entity_types/transports/grpc_asyncio.py index 72a37b9d7..28f630db5 100644 --- a/google/cloud/dialogflow_v2/services/entity_types/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2/services/environments/async_client.py b/google/cloud/dialogflow_v2/services/environments/async_client.py index e5bdcf92a..e34bde50f 100644 --- a/google/cloud/dialogflow_v2/services/environments/async_client.py +++ b/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/google/cloud/dialogflow_v2/services/environments/client.py b/google/cloud/dialogflow_v2/services/environments/client.py index c37f87812..b70dea94d 100644 --- a/google/cloud/dialogflow_v2/services/environments/client.py +++ b/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/google/cloud/dialogflow_v2/services/environments/transports/grpc.py b/google/cloud/dialogflow_v2/services/environments/transports/grpc.py index af97de6ef..e49ee9b7f 100644 --- a/google/cloud/dialogflow_v2/services/environments/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2/services/environments/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2/services/environments/transports/grpc_asyncio.py index 5e5222dd6..52f36aec8 100644 --- a/google/cloud/dialogflow_v2/services/environments/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2/services/fulfillments/transports/grpc.py b/google/cloud/dialogflow_v2/services/fulfillments/transports/grpc.py index 210b0229f..5b8742e89 100644 --- a/google/cloud/dialogflow_v2/services/fulfillments/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2/services/fulfillments/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2/services/fulfillments/transports/grpc_asyncio.py index 7f31568cc..e47a61191 100644 --- a/google/cloud/dialogflow_v2/services/fulfillments/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2/services/intents/transports/grpc.py b/google/cloud/dialogflow_v2/services/intents/transports/grpc.py index 8c91a35f8..f58bd813a 100644 --- a/google/cloud/dialogflow_v2/services/intents/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2/services/intents/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2/services/intents/transports/grpc_asyncio.py index ee0a6beb0..9a0d167a0 100644 --- a/google/cloud/dialogflow_v2/services/intents/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2/services/knowledge_bases/transports/grpc.py b/google/cloud/dialogflow_v2/services/knowledge_bases/transports/grpc.py index 1fe66a627..a6f998041 100644 --- a/google/cloud/dialogflow_v2/services/knowledge_bases/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2/services/knowledge_bases/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2/services/knowledge_bases/transports/grpc_asyncio.py index 7f7467e53..6fbff40df 100644 --- a/google/cloud/dialogflow_v2/services/knowledge_bases/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2/services/participants/transports/grpc.py b/google/cloud/dialogflow_v2/services/participants/transports/grpc.py index 576edb553..85e78cebd 100644 --- a/google/cloud/dialogflow_v2/services/participants/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2/services/participants/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2/services/participants/transports/grpc_asyncio.py index fef572f6a..d4d9419ff 100644 --- a/google/cloud/dialogflow_v2/services/participants/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2/services/session_entity_types/transports/grpc.py b/google/cloud/dialogflow_v2/services/session_entity_types/transports/grpc.py index e8cc2a9bb..f9dc5e49c 100644 --- a/google/cloud/dialogflow_v2/services/session_entity_types/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2/services/session_entity_types/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2/services/session_entity_types/transports/grpc_asyncio.py index 5da0b892a..6d560581d 100644 --- a/google/cloud/dialogflow_v2/services/session_entity_types/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2/services/sessions/transports/grpc.py b/google/cloud/dialogflow_v2/services/sessions/transports/grpc.py index 9fb41d147..260a554d5 100644 --- a/google/cloud/dialogflow_v2/services/sessions/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2/services/sessions/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2/services/sessions/transports/grpc_asyncio.py index e93ca51f4..91b54b5df 100644 --- a/google/cloud/dialogflow_v2/services/sessions/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2/services/versions/transports/grpc.py b/google/cloud/dialogflow_v2/services/versions/transports/grpc.py index 835966e68..1370e9685 100644 --- a/google/cloud/dialogflow_v2/services/versions/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2/services/versions/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2/services/versions/transports/grpc_asyncio.py index 58a8463b7..ec189067e 100644 --- a/google/cloud/dialogflow_v2/services/versions/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2/types/environment.py b/google/cloud/dialogflow_v2/types/environment.py index a6fbecad3..1beb7ed50 100644 --- a/google/cloud/dialogflow_v2/types/environment.py +++ b/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/google/cloud/dialogflow_v2/types/intent.py b/google/cloud/dialogflow_v2/types/intent.py index ef1a0b0aa..a71b07449 100644 --- a/google/cloud/dialogflow_v2/types/intent.py +++ b/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/google/cloud/dialogflow_v2/types/session.py b/google/cloud/dialogflow_v2/types/session.py index 752a6fc06..17289a15e 100644 --- a/google/cloud/dialogflow_v2/types/session.py +++ b/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/google/cloud/dialogflow_v2beta1/services/agents/async_client.py b/google/cloud/dialogflow_v2beta1/services/agents/async_client.py index 2be961279..f5f9c4c1a 100644 --- a/google/cloud/dialogflow_v2beta1/services/agents/async_client.py +++ b/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/google/cloud/dialogflow_v2beta1/services/agents/client.py b/google/cloud/dialogflow_v2beta1/services/agents/client.py index 0e51bd1d7..75f65744f 100644 --- a/google/cloud/dialogflow_v2beta1/services/agents/client.py +++ b/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/google/cloud/dialogflow_v2beta1/services/agents/transports/grpc.py b/google/cloud/dialogflow_v2beta1/services/agents/transports/grpc.py index 4012d1592..d880d6e19 100644 --- a/google/cloud/dialogflow_v2beta1/services/agents/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2beta1/services/agents/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2beta1/services/agents/transports/grpc_asyncio.py index acaa40672..9ca6b6f45 100644 --- a/google/cloud/dialogflow_v2beta1/services/agents/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2beta1/services/answer_records/transports/grpc.py b/google/cloud/dialogflow_v2beta1/services/answer_records/transports/grpc.py index 0d82d2233..9859f5501 100644 --- a/google/cloud/dialogflow_v2beta1/services/answer_records/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2beta1/services/answer_records/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2beta1/services/answer_records/transports/grpc_asyncio.py index f86e6ba19..f32b11985 100644 --- a/google/cloud/dialogflow_v2beta1/services/answer_records/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2beta1/services/contexts/transports/grpc.py b/google/cloud/dialogflow_v2beta1/services/contexts/transports/grpc.py index 0afd44e4c..601b5aff1 100644 --- a/google/cloud/dialogflow_v2beta1/services/contexts/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2beta1/services/contexts/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2beta1/services/contexts/transports/grpc_asyncio.py index aa02f6e99..2578a275a 100644 --- a/google/cloud/dialogflow_v2beta1/services/contexts/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2beta1/services/conversation_profiles/async_client.py b/google/cloud/dialogflow_v2beta1/services/conversation_profiles/async_client.py index 53bba6cca..fb09ac4ac 100644 --- a/google/cloud/dialogflow_v2beta1/services/conversation_profiles/async_client.py +++ b/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/google/cloud/dialogflow_v2beta1/services/conversation_profiles/client.py b/google/cloud/dialogflow_v2beta1/services/conversation_profiles/client.py index 6d526f3d4..8b7a3f209 100644 --- a/google/cloud/dialogflow_v2beta1/services/conversation_profiles/client.py +++ b/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/google/cloud/dialogflow_v2beta1/services/conversation_profiles/transports/grpc.py b/google/cloud/dialogflow_v2beta1/services/conversation_profiles/transports/grpc.py index 73e51386e..327ee52b4 100644 --- a/google/cloud/dialogflow_v2beta1/services/conversation_profiles/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2beta1/services/conversation_profiles/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2beta1/services/conversation_profiles/transports/grpc_asyncio.py index f2fba72a7..f904aa452 100644 --- a/google/cloud/dialogflow_v2beta1/services/conversation_profiles/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2beta1/services/documents/transports/grpc.py b/google/cloud/dialogflow_v2beta1/services/documents/transports/grpc.py index b0892dd58..07671affe 100644 --- a/google/cloud/dialogflow_v2beta1/services/documents/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2beta1/services/documents/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2beta1/services/documents/transports/grpc_asyncio.py index a416f3c98..6a336b9d1 100644 --- a/google/cloud/dialogflow_v2beta1/services/documents/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2beta1/services/entity_types/async_client.py b/google/cloud/dialogflow_v2beta1/services/entity_types/async_client.py index b3986524a..5142b3df8 100644 --- a/google/cloud/dialogflow_v2beta1/services/entity_types/async_client.py +++ b/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/google/cloud/dialogflow_v2beta1/services/entity_types/client.py b/google/cloud/dialogflow_v2beta1/services/entity_types/client.py index 34bd06cd0..2db693cca 100644 --- a/google/cloud/dialogflow_v2beta1/services/entity_types/client.py +++ b/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/google/cloud/dialogflow_v2beta1/services/entity_types/transports/grpc.py b/google/cloud/dialogflow_v2beta1/services/entity_types/transports/grpc.py index 4bf387ea3..d5ff8ffe0 100644 --- a/google/cloud/dialogflow_v2beta1/services/entity_types/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2beta1/services/entity_types/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2beta1/services/entity_types/transports/grpc_asyncio.py index dc53ce6fc..5e654392f 100644 --- a/google/cloud/dialogflow_v2beta1/services/entity_types/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2beta1/services/environments/async_client.py b/google/cloud/dialogflow_v2beta1/services/environments/async_client.py index c6e36ef4a..3fd4e5fca 100644 --- a/google/cloud/dialogflow_v2beta1/services/environments/async_client.py +++ b/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/google/cloud/dialogflow_v2beta1/services/environments/client.py b/google/cloud/dialogflow_v2beta1/services/environments/client.py index b0af57c6a..f2975f4e0 100644 --- a/google/cloud/dialogflow_v2beta1/services/environments/client.py +++ b/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/google/cloud/dialogflow_v2beta1/services/environments/transports/grpc.py b/google/cloud/dialogflow_v2beta1/services/environments/transports/grpc.py index 77b0ea9f7..4106b6293 100644 --- a/google/cloud/dialogflow_v2beta1/services/environments/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2beta1/services/environments/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2beta1/services/environments/transports/grpc_asyncio.py index a1b4a1cba..c20ba69c8 100644 --- a/google/cloud/dialogflow_v2beta1/services/environments/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/grpc.py b/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/grpc.py index dd7aa89b5..97f314a33 100644 --- a/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/grpc_asyncio.py index 0989afcf5..1b9cca73a 100644 --- a/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2beta1/services/intents/async_client.py b/google/cloud/dialogflow_v2beta1/services/intents/async_client.py index 8ea2a6bdc..21c61653c 100644 --- a/google/cloud/dialogflow_v2beta1/services/intents/async_client.py +++ b/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/google/cloud/dialogflow_v2beta1/services/intents/client.py b/google/cloud/dialogflow_v2beta1/services/intents/client.py index 1f4c4a952..3d49e0d2e 100644 --- a/google/cloud/dialogflow_v2beta1/services/intents/client.py +++ b/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/google/cloud/dialogflow_v2beta1/services/intents/transports/grpc.py b/google/cloud/dialogflow_v2beta1/services/intents/transports/grpc.py index 7400e5565..3fc2416c7 100644 --- a/google/cloud/dialogflow_v2beta1/services/intents/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2beta1/services/intents/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2beta1/services/intents/transports/grpc_asyncio.py index 8e6855c6d..dcc780589 100644 --- a/google/cloud/dialogflow_v2beta1/services/intents/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2beta1/services/knowledge_bases/transports/grpc.py b/google/cloud/dialogflow_v2beta1/services/knowledge_bases/transports/grpc.py index b5d1cc7c7..57ad0ba53 100644 --- a/google/cloud/dialogflow_v2beta1/services/knowledge_bases/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2beta1/services/knowledge_bases/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2beta1/services/knowledge_bases/transports/grpc_asyncio.py index 0aed45343..1924251bf 100644 --- a/google/cloud/dialogflow_v2beta1/services/knowledge_bases/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2beta1/services/participants/transports/grpc.py b/google/cloud/dialogflow_v2beta1/services/participants/transports/grpc.py index 8b069e5df..3c1fb4929 100644 --- a/google/cloud/dialogflow_v2beta1/services/participants/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2beta1/services/session_entity_types/transports/grpc.py b/google/cloud/dialogflow_v2beta1/services/session_entity_types/transports/grpc.py index 18b09dc80..27b352a86 100644 --- a/google/cloud/dialogflow_v2beta1/services/session_entity_types/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2beta1/services/session_entity_types/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2beta1/services/session_entity_types/transports/grpc_asyncio.py index 8b0a54d09..6a0e5da3a 100644 --- a/google/cloud/dialogflow_v2beta1/services/session_entity_types/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2beta1/services/sessions/transports/grpc.py b/google/cloud/dialogflow_v2beta1/services/sessions/transports/grpc.py index 2033e87e4..c25069ef7 100644 --- a/google/cloud/dialogflow_v2beta1/services/sessions/transports/grpc.py +++ b/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/google/cloud/dialogflow_v2beta1/services/sessions/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2beta1/services/sessions/transports/grpc_asyncio.py index 3f0939e29..de984b393 100644 --- a/google/cloud/dialogflow_v2beta1/services/sessions/transports/grpc_asyncio.py +++ b/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/google/cloud/dialogflow_v2beta1/types/conversation_profile.py b/google/cloud/dialogflow_v2beta1/types/conversation_profile.py index 0e9d1a396..74039c0b8 100644 --- a/google/cloud/dialogflow_v2beta1/types/conversation_profile.py +++ b/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/google/cloud/dialogflow_v2beta1/types/session.py b/google/cloud/dialogflow_v2beta1/types/session.py index f4ac7a1fb..e84afb1e0 100644 --- a/google/cloud/dialogflow_v2beta1/types/session.py +++ b/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/scripts/fixup_dialogflow_v2_keywords.py b/scripts/fixup_dialogflow_v2_keywords.py index 7b0f6b6d0..cc0f68eb9 100644 --- a/scripts/fixup_dialogflow_v2_keywords.py +++ b/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/scripts/fixup_dialogflow_v2beta1_keywords.py b/scripts/fixup_dialogflow_v2beta1_keywords.py index 84d9c30d5..0a8e20f0b 100644 --- a/scripts/fixup_dialogflow_v2beta1_keywords.py +++ b/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/tests/unit/gapic/dialogflow_v2beta1/test_conversation_profiles.py b/tests/unit/gapic/dialogflow_v2beta1/test_conversation_profiles.py index eea647e38..8ba444c94 100644 --- a/tests/unit/gapic/dialogflow_v2beta1/test_conversation_profiles.py +++ b/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/tests/unit/gapic/dialogflow_v2beta1/test_environments.py b/tests/unit/gapic/dialogflow_v2beta1/test_environments.py index a078dcca8..5014e4a71 100644 --- a/tests/unit/gapic/dialogflow_v2beta1/test_environments.py +++ b/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)