From 12b4f6050d0b5f741f106798643bef6ebbbe1e28 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 24 Sep 2021 16:14:09 +0000 Subject: [PATCH] chore: use gapic-generator-python 0.51.2 (#398) - [ ] Regenerate this pull request now. fix: add 'dict' annotation type to 'request' Committer: @busunkim96 PiperOrigin-RevId: 398509016 Source-Link: https://github.com/googleapis/googleapis/commit/b224dfa52642a733ea64849d4e06d15c274bc08f Source-Link: https://github.com/googleapis/googleapis-gen/commit/63a1db7a38d74b9639592f521ed1daaf7299ad9a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjNhMWRiN2EzOGQ3NGI5NjM5NTkyZjUyMWVkMWRhYWY3Mjk5YWQ5YSJ9 --- .../dialogflow_v2/services/agents/client.py | 38 ++-- .../services/agents/transports/base.py | 2 +- .../services/agents/transports/grpc.py | 6 +- .../agents/transports/grpc_asyncio.py | 6 +- .../services/answer_records/client.py | 10 +- .../answer_records/transports/base.py | 2 +- .../answer_records/transports/grpc.py | 6 +- .../answer_records/transports/grpc_asyncio.py | 6 +- .../dialogflow_v2/services/contexts/client.py | 26 +-- .../services/contexts/transports/base.py | 2 +- .../services/contexts/transports/grpc.py | 6 +- .../contexts/transports/grpc_asyncio.py | 6 +- .../services/conversation_profiles/client.py | 30 +-- .../conversation_profiles/transports/base.py | 2 +- .../conversation_profiles/transports/grpc.py | 6 +- .../transports/grpc_asyncio.py | 6 +- .../services/conversations/client.py | 22 +-- .../services/conversations/transports/base.py | 2 +- .../services/conversations/transports/grpc.py | 6 +- .../conversations/transports/grpc_asyncio.py | 6 +- .../services/documents/client.py | 26 +-- .../services/documents/transports/base.py | 2 +- .../services/documents/transports/grpc.py | 6 +- .../documents/transports/grpc_asyncio.py | 6 +- .../services/entity_types/client.py | 42 ++--- .../services/entity_types/transports/base.py | 2 +- .../services/entity_types/transports/grpc.py | 6 +- .../entity_types/transports/grpc_asyncio.py | 6 +- .../services/environments/client.py | 26 +-- .../services/environments/transports/base.py | 2 +- .../services/environments/transports/grpc.py | 6 +- .../environments/transports/grpc_asyncio.py | 6 +- .../services/fulfillments/client.py | 10 +- .../services/fulfillments/transports/base.py | 2 +- .../services/fulfillments/transports/grpc.py | 6 +- .../fulfillments/transports/grpc_asyncio.py | 6 +- .../dialogflow_v2/services/intents/client.py | 30 +-- .../services/intents/transports/base.py | 2 +- .../services/intents/transports/grpc.py | 6 +- .../intents/transports/grpc_asyncio.py | 6 +- .../services/knowledge_bases/client.py | 22 +-- .../knowledge_bases/transports/base.py | 2 +- .../knowledge_bases/transports/grpc.py | 6 +- .../transports/grpc_asyncio.py | 6 +- .../services/participants/client.py | 30 +-- .../services/participants/transports/base.py | 2 +- .../services/participants/transports/grpc.py | 6 +- .../participants/transports/grpc_asyncio.py | 6 +- .../services/session_entity_types/client.py | 26 +-- .../session_entity_types/transports/base.py | 2 +- .../session_entity_types/transports/grpc.py | 6 +- .../transports/grpc_asyncio.py | 6 +- .../dialogflow_v2/services/sessions/client.py | 16 +- .../services/sessions/transports/base.py | 2 +- .../services/sessions/transports/grpc.py | 6 +- .../sessions/transports/grpc_asyncio.py | 6 +- .../dialogflow_v2/services/versions/client.py | 22 +-- .../services/versions/transports/base.py | 2 +- .../services/versions/transports/grpc.py | 6 +- .../versions/transports/grpc_asyncio.py | 6 +- .../services/agents/client.py | 38 ++-- .../services/agents/transports/base.py | 2 +- .../services/agents/transports/grpc.py | 6 +- .../agents/transports/grpc_asyncio.py | 6 +- .../services/answer_records/client.py | 14 +- .../answer_records/transports/base.py | 2 +- .../answer_records/transports/grpc.py | 6 +- .../answer_records/transports/grpc_asyncio.py | 6 +- .../services/contexts/client.py | 26 +-- .../services/contexts/transports/base.py | 2 +- .../services/contexts/transports/grpc.py | 6 +- .../contexts/transports/grpc_asyncio.py | 6 +- .../services/conversation_profiles/client.py | 30 +-- .../conversation_profiles/transports/base.py | 2 +- .../conversation_profiles/transports/grpc.py | 6 +- .../transports/grpc_asyncio.py | 6 +- .../services/conversations/client.py | 26 +-- .../services/conversations/transports/base.py | 2 +- .../services/conversations/transports/grpc.py | 6 +- .../conversations/transports/grpc_asyncio.py | 6 +- .../services/documents/client.py | 30 +-- .../services/documents/transports/base.py | 2 +- .../services/documents/transports/grpc.py | 6 +- .../documents/transports/grpc_asyncio.py | 6 +- .../services/entity_types/client.py | 42 ++--- .../services/entity_types/transports/base.py | 2 +- .../services/entity_types/transports/grpc.py | 6 +- .../entity_types/transports/grpc_asyncio.py | 6 +- .../services/environments/client.py | 26 +-- .../services/environments/transports/base.py | 2 +- .../services/environments/transports/grpc.py | 6 +- .../environments/transports/grpc_asyncio.py | 6 +- .../services/fulfillments/client.py | 10 +- .../services/fulfillments/transports/base.py | 2 +- .../services/fulfillments/transports/grpc.py | 6 +- .../fulfillments/transports/grpc_asyncio.py | 6 +- .../services/intents/client.py | 30 +-- .../services/intents/transports/base.py | 2 +- .../services/intents/transports/grpc.py | 6 +- .../intents/transports/grpc_asyncio.py | 6 +- .../services/knowledge_bases/client.py | 22 +-- .../knowledge_bases/transports/base.py | 2 +- .../knowledge_bases/transports/grpc.py | 6 +- .../transports/grpc_asyncio.py | 6 +- .../services/participants/client.py | 42 ++--- .../services/participants/transports/base.py | 2 +- .../services/participants/transports/grpc.py | 6 +- .../participants/transports/grpc_asyncio.py | 6 +- .../services/session_entity_types/client.py | 26 +-- .../session_entity_types/transports/base.py | 2 +- .../session_entity_types/transports/grpc.py | 6 +- .../transports/grpc_asyncio.py | 6 +- .../services/sessions/client.py | 16 +- .../services/sessions/transports/base.py | 2 +- .../services/sessions/transports/grpc.py | 6 +- .../sessions/transports/grpc_asyncio.py | 6 +- .../services/versions/client.py | 22 +-- .../services/versions/transports/base.py | 2 +- .../services/versions/transports/grpc.py | 6 +- .../versions/transports/grpc_asyncio.py | 6 +- scripts/fixup_dialogflow_v2_keywords.py | 166 ++++++++-------- scripts/fixup_dialogflow_v2beta1_keywords.py | 178 +++++++++--------- tests/unit/gapic/dialogflow_v2/test_agents.py | 24 ++- .../gapic/dialogflow_v2beta1/test_agents.py | 24 ++- 124 files changed, 804 insertions(+), 784 deletions(-) diff --git a/google/cloud/dialogflow_v2/services/agents/client.py b/google/cloud/dialogflow_v2/services/agents/client.py index 7daa6a8ff..d032f7d09 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 Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -351,7 +351,7 @@ def __init__( def get_agent( self, - request: agent.GetAgentRequest = None, + request: Union[agent.GetAgentRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -361,7 +361,7 @@ def get_agent( r"""Retrieves the specified agent. Args: - request (google.cloud.dialogflow_v2.types.GetAgentRequest): + request (Union[google.cloud.dialogflow_v2.types.GetAgentRequest, dict]): The request object. The request message for [Agents.GetAgent][google.cloud.dialogflow.v2.Agents.GetAgent]. parent (str): @@ -431,7 +431,7 @@ def get_agent( def set_agent( self, - request: gcd_agent.SetAgentRequest = None, + request: Union[gcd_agent.SetAgentRequest, dict] = None, *, agent: gcd_agent.Agent = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -445,7 +445,7 @@ def set_agent( documentation `__. Args: - request (google.cloud.dialogflow_v2.types.SetAgentRequest): + request (Union[google.cloud.dialogflow_v2.types.SetAgentRequest, dict]): The request object. The request message for [Agents.SetAgent][google.cloud.dialogflow.v2.Agents.SetAgent]. agent (google.cloud.dialogflow_v2.types.Agent): @@ -515,7 +515,7 @@ def set_agent( def delete_agent( self, - request: agent.DeleteAgentRequest = None, + request: Union[agent.DeleteAgentRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -525,7 +525,7 @@ def delete_agent( r"""Deletes the specified agent. Args: - request (google.cloud.dialogflow_v2.types.DeleteAgentRequest): + request (Union[google.cloud.dialogflow_v2.types.DeleteAgentRequest, dict]): The request object. The request message for [Agents.DeleteAgent][google.cloud.dialogflow.v2.Agents.DeleteAgent]. parent (str): @@ -579,7 +579,7 @@ def delete_agent( def search_agents( self, - request: agent.SearchAgentsRequest = None, + request: Union[agent.SearchAgentsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -595,7 +595,7 @@ def search_agents( Sub-Collections `__. Args: - request (google.cloud.dialogflow_v2.types.SearchAgentsRequest): + request (Union[google.cloud.dialogflow_v2.types.SearchAgentsRequest, dict]): The request object. The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents]. parent (str): @@ -665,7 +665,7 @@ def search_agents( def train_agent( self, - request: agent.TrainAgentRequest = None, + request: Union[agent.TrainAgentRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -689,7 +689,7 @@ def train_agent( documentation `__. Args: - request (google.cloud.dialogflow_v2.types.TrainAgentRequest): + request (Union[google.cloud.dialogflow_v2.types.TrainAgentRequest, dict]): The request object. The request message for [Agents.TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent]. parent (str): @@ -771,7 +771,7 @@ def train_agent( def export_agent( self, - request: agent.ExportAgentRequest = None, + request: Union[agent.ExportAgentRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -791,7 +791,7 @@ def export_agent( [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse] Args: - request (google.cloud.dialogflow_v2.types.ExportAgentRequest): + request (Union[google.cloud.dialogflow_v2.types.ExportAgentRequest, dict]): The request object. The request message for [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent]. parent (str): @@ -864,7 +864,7 @@ def export_agent( def import_agent( self, - request: agent.ImportAgentRequest = None, + request: Union[agent.ImportAgentRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -901,7 +901,7 @@ def import_agent( documentation `__. Args: - request (google.cloud.dialogflow_v2.types.ImportAgentRequest): + request (Union[google.cloud.dialogflow_v2.types.ImportAgentRequest, dict]): The request object. The request message for [Agents.ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent]. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -963,7 +963,7 @@ def import_agent( def restore_agent( self, - request: agent.RestoreAgentRequest = None, + request: Union[agent.RestoreAgentRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -998,7 +998,7 @@ def restore_agent( documentation `__. Args: - request (google.cloud.dialogflow_v2.types.RestoreAgentRequest): + request (Union[google.cloud.dialogflow_v2.types.RestoreAgentRequest, dict]): The request object. The request message for [Agents.RestoreAgent][google.cloud.dialogflow.v2.Agents.RestoreAgent]. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -1060,7 +1060,7 @@ def restore_agent( def get_validation_result( self, - request: agent.GetValidationResultRequest = None, + request: Union[agent.GetValidationResultRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -1071,7 +1071,7 @@ def get_validation_result( automatically when training is completed. Args: - request (google.cloud.dialogflow_v2.types.GetValidationResultRequest): + request (Union[google.cloud.dialogflow_v2.types.GetValidationResultRequest, dict]): The request object. The request message for [Agents.GetValidationResult][google.cloud.dialogflow.v2.Agents.GetValidationResult]. retry (google.api_core.retry.Retry): Designation of what errors, if any, diff --git a/google/cloud/dialogflow_v2/services/agents/transports/base.py b/google/cloud/dialogflow_v2/services/agents/transports/base.py index 16f2e3d9d..ee669cb6c 100644 --- a/google/cloud/dialogflow_v2/services/agents/transports/base.py +++ b/google/cloud/dialogflow_v2/services/agents/transports/base.py @@ -125,7 +125,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/dialogflow_v2/services/agents/transports/grpc.py b/google/cloud/dialogflow_v2/services/agents/transports/grpc.py index ae2f3fff5..58268d24e 100644 --- a/google/cloud/dialogflow_v2/services/agents/transports/grpc.py +++ b/google/cloud/dialogflow_v2/services/agents/transports/grpc.py @@ -85,16 +85,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 a8d59018b..a3cb0e2f3 100644 --- a/google/cloud/dialogflow_v2/services/agents/transports/grpc_asyncio.py +++ b/google/cloud/dialogflow_v2/services/agents/transports/grpc_asyncio.py @@ -132,16 +132,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2/services/answer_records/client.py b/google/cloud/dialogflow_v2/services/answer_records/client.py index e81435e1e..b14ffed51 100644 --- a/google/cloud/dialogflow_v2/services/answer_records/client.py +++ b/google/cloud/dialogflow_v2/services/answer_records/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -353,7 +353,7 @@ def __init__( def list_answer_records( self, - request: answer_record.ListAnswerRecordsRequest = None, + request: Union[answer_record.ListAnswerRecordsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -364,7 +364,7 @@ def list_answer_records( specified project in reverse chronological order. Args: - request (google.cloud.dialogflow_v2.types.ListAnswerRecordsRequest): + request (Union[google.cloud.dialogflow_v2.types.ListAnswerRecordsRequest, dict]): The request object. Request message for [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2.AnswerRecords.ListAnswerRecords]. parent (str): @@ -435,7 +435,7 @@ def list_answer_records( def update_answer_record( self, - request: gcd_answer_record.UpdateAnswerRecordRequest = None, + request: Union[gcd_answer_record.UpdateAnswerRecordRequest, dict] = None, *, answer_record: gcd_answer_record.AnswerRecord = None, update_mask: field_mask_pb2.FieldMask = None, @@ -446,7 +446,7 @@ def update_answer_record( r"""Updates the specified answer record. Args: - request (google.cloud.dialogflow_v2.types.UpdateAnswerRecordRequest): + request (Union[google.cloud.dialogflow_v2.types.UpdateAnswerRecordRequest, dict]): The request object. Request message for [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord]. answer_record (google.cloud.dialogflow_v2.types.AnswerRecord): diff --git a/google/cloud/dialogflow_v2/services/answer_records/transports/base.py b/google/cloud/dialogflow_v2/services/answer_records/transports/base.py index 8a770fd73..07847fcac 100644 --- a/google/cloud/dialogflow_v2/services/answer_records/transports/base.py +++ b/google/cloud/dialogflow_v2/services/answer_records/transports/base.py @@ -121,7 +121,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) 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 da060a41d..9d91e029b 100644 --- a/google/cloud/dialogflow_v2/services/answer_records/transports/grpc.py +++ b/google/cloud/dialogflow_v2/services/answer_records/transports/grpc.py @@ -82,16 +82,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 66ad5e777..eb6474085 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,16 +129,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2/services/contexts/client.py b/google/cloud/dialogflow_v2/services/contexts/client.py index 992329d01..16f08d9eb 100644 --- a/google/cloud/dialogflow_v2/services/contexts/client.py +++ b/google/cloud/dialogflow_v2/services/contexts/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -353,7 +353,7 @@ def __init__( def list_contexts( self, - request: context.ListContextsRequest = None, + request: Union[context.ListContextsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -364,7 +364,7 @@ def list_contexts( session. Args: - request (google.cloud.dialogflow_v2.types.ListContextsRequest): + request (Union[google.cloud.dialogflow_v2.types.ListContextsRequest, dict]): The request object. The request message for [Contexts.ListContexts][google.cloud.dialogflow.v2.Contexts.ListContexts]. parent (str): @@ -438,7 +438,7 @@ def list_contexts( def get_context( self, - request: context.GetContextRequest = None, + request: Union[context.GetContextRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -448,7 +448,7 @@ def get_context( r"""Retrieves the specified context. Args: - request (google.cloud.dialogflow_v2.types.GetContextRequest): + request (Union[google.cloud.dialogflow_v2.types.GetContextRequest, dict]): The request object. The request message for [Contexts.GetContext][google.cloud.dialogflow.v2.Contexts.GetContext]. name (str): @@ -531,7 +531,7 @@ def get_context( def create_context( self, - request: gcd_context.CreateContextRequest = None, + request: Union[gcd_context.CreateContextRequest, dict] = None, *, parent: str = None, context: gcd_context.Context = None, @@ -544,7 +544,7 @@ def create_context( context. Args: - request (google.cloud.dialogflow_v2.types.CreateContextRequest): + request (Union[google.cloud.dialogflow_v2.types.CreateContextRequest, dict]): The request object. The request message for [Contexts.CreateContext][google.cloud.dialogflow.v2.Contexts.CreateContext]. parent (str): @@ -633,7 +633,7 @@ def create_context( def update_context( self, - request: gcd_context.UpdateContextRequest = None, + request: Union[gcd_context.UpdateContextRequest, dict] = None, *, context: gcd_context.Context = None, update_mask: field_mask_pb2.FieldMask = None, @@ -644,7 +644,7 @@ def update_context( r"""Updates the specified context. Args: - request (google.cloud.dialogflow_v2.types.UpdateContextRequest): + request (Union[google.cloud.dialogflow_v2.types.UpdateContextRequest, dict]): The request object. The request message for [Contexts.UpdateContext][google.cloud.dialogflow.v2.Contexts.UpdateContext]. context (google.cloud.dialogflow_v2.types.Context): @@ -731,7 +731,7 @@ def update_context( def delete_context( self, - request: context.DeleteContextRequest = None, + request: Union[context.DeleteContextRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -741,7 +741,7 @@ def delete_context( r"""Deletes the specified context. Args: - request (google.cloud.dialogflow_v2.types.DeleteContextRequest): + request (Union[google.cloud.dialogflow_v2.types.DeleteContextRequest, dict]): The request object. The request message for [Contexts.DeleteContext][google.cloud.dialogflow.v2.Contexts.DeleteContext]. name (str): @@ -800,7 +800,7 @@ def delete_context( def delete_all_contexts( self, - request: context.DeleteAllContextsRequest = None, + request: Union[context.DeleteAllContextsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -810,7 +810,7 @@ def delete_all_contexts( r"""Deletes all active contexts in the specified session. Args: - request (google.cloud.dialogflow_v2.types.DeleteAllContextsRequest): + request (Union[google.cloud.dialogflow_v2.types.DeleteAllContextsRequest, dict]): The request object. The request message for [Contexts.DeleteAllContexts][google.cloud.dialogflow.v2.Contexts.DeleteAllContexts]. parent (str): diff --git a/google/cloud/dialogflow_v2/services/contexts/transports/base.py b/google/cloud/dialogflow_v2/services/contexts/transports/base.py index 404789289..79ea93826 100644 --- a/google/cloud/dialogflow_v2/services/contexts/transports/base.py +++ b/google/cloud/dialogflow_v2/services/contexts/transports/base.py @@ -122,7 +122,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/dialogflow_v2/services/contexts/transports/grpc.py b/google/cloud/dialogflow_v2/services/contexts/transports/grpc.py index c7eae0609..60fd684c6 100644 --- a/google/cloud/dialogflow_v2/services/contexts/transports/grpc.py +++ b/google/cloud/dialogflow_v2/services/contexts/transports/grpc.py @@ -82,16 +82,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 b59aa6124..0c956b74a 100644 --- a/google/cloud/dialogflow_v2/services/contexts/transports/grpc_asyncio.py +++ b/google/cloud/dialogflow_v2/services/contexts/transports/grpc_asyncio.py @@ -129,16 +129,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2/services/conversation_profiles/client.py b/google/cloud/dialogflow_v2/services/conversation_profiles/client.py index 52d61c7fc..91e39a7d5 100644 --- a/google/cloud/dialogflow_v2/services/conversation_profiles/client.py +++ b/google/cloud/dialogflow_v2/services/conversation_profiles/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -422,7 +422,9 @@ def __init__( def list_conversation_profiles( self, - request: conversation_profile.ListConversationProfilesRequest = None, + request: Union[ + conversation_profile.ListConversationProfilesRequest, dict + ] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -433,7 +435,7 @@ def list_conversation_profiles( specified project. Args: - request (google.cloud.dialogflow_v2.types.ListConversationProfilesRequest): + request (Union[google.cloud.dialogflow_v2.types.ListConversationProfilesRequest, dict]): The request object. The request message for [ConversationProfiles.ListConversationProfiles][google.cloud.dialogflow.v2.ConversationProfiles.ListConversationProfiles]. parent (str): @@ -508,7 +510,7 @@ def list_conversation_profiles( def get_conversation_profile( self, - request: conversation_profile.GetConversationProfileRequest = None, + request: Union[conversation_profile.GetConversationProfileRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -518,7 +520,7 @@ def get_conversation_profile( r"""Retrieves the specified conversation profile. Args: - request (google.cloud.dialogflow_v2.types.GetConversationProfileRequest): + request (Union[google.cloud.dialogflow_v2.types.GetConversationProfileRequest, dict]): The request object. The request message for [ConversationProfiles.GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile]. name (str): @@ -580,7 +582,9 @@ def get_conversation_profile( def create_conversation_profile( self, - request: gcd_conversation_profile.CreateConversationProfileRequest = None, + request: Union[ + gcd_conversation_profile.CreateConversationProfileRequest, dict + ] = None, *, parent: str = None, conversation_profile: gcd_conversation_profile.ConversationProfile = None, @@ -597,7 +601,7 @@ def create_conversation_profile( API. Args: - request (google.cloud.dialogflow_v2.types.CreateConversationProfileRequest): + request (Union[google.cloud.dialogflow_v2.types.CreateConversationProfileRequest, dict]): The request object. The request message for [ConversationProfiles.CreateConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.CreateConversationProfile]. parent (str): @@ -672,7 +676,9 @@ def create_conversation_profile( def update_conversation_profile( self, - request: gcd_conversation_profile.UpdateConversationProfileRequest = None, + request: Union[ + gcd_conversation_profile.UpdateConversationProfileRequest, dict + ] = None, *, conversation_profile: gcd_conversation_profile.ConversationProfile = None, update_mask: field_mask_pb2.FieldMask = None, @@ -689,7 +695,7 @@ def update_conversation_profile( API. Args: - request (google.cloud.dialogflow_v2.types.UpdateConversationProfileRequest): + request (Union[google.cloud.dialogflow_v2.types.UpdateConversationProfileRequest, dict]): The request object. The request message for [ConversationProfiles.UpdateConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.UpdateConversationProfile]. conversation_profile (google.cloud.dialogflow_v2.types.ConversationProfile): @@ -765,7 +771,9 @@ def update_conversation_profile( def delete_conversation_profile( self, - request: conversation_profile.DeleteConversationProfileRequest = None, + request: Union[ + conversation_profile.DeleteConversationProfileRequest, dict + ] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -775,7 +783,7 @@ def delete_conversation_profile( r"""Deletes the specified conversation profile. Args: - request (google.cloud.dialogflow_v2.types.DeleteConversationProfileRequest): + request (Union[google.cloud.dialogflow_v2.types.DeleteConversationProfileRequest, dict]): The request object. The request message for [ConversationProfiles.DeleteConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.DeleteConversationProfile]. This operation fails if the conversation profile is diff --git a/google/cloud/dialogflow_v2/services/conversation_profiles/transports/base.py b/google/cloud/dialogflow_v2/services/conversation_profiles/transports/base.py index e7d7092a0..a06996a74 100644 --- a/google/cloud/dialogflow_v2/services/conversation_profiles/transports/base.py +++ b/google/cloud/dialogflow_v2/services/conversation_profiles/transports/base.py @@ -124,7 +124,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) 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 0376a6f74..8df0f1baa 100644 --- a/google/cloud/dialogflow_v2/services/conversation_profiles/transports/grpc.py +++ b/google/cloud/dialogflow_v2/services/conversation_profiles/transports/grpc.py @@ -85,16 +85,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 a024ed1db..1a207529f 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,16 +132,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2/services/conversations/client.py b/google/cloud/dialogflow_v2/services/conversations/client.py index 1f402b831..3233e5909 100644 --- a/google/cloud/dialogflow_v2/services/conversations/client.py +++ b/google/cloud/dialogflow_v2/services/conversations/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -386,7 +386,7 @@ def __init__( def create_conversation( self, - request: gcd_conversation.CreateConversationRequest = None, + request: Union[gcd_conversation.CreateConversationRequest, dict] = None, *, parent: str = None, conversation: gcd_conversation.Conversation = None, @@ -417,7 +417,7 @@ def create_conversation( is triggered, conversation will transfer to Assist Stage. Args: - request (google.cloud.dialogflow_v2.types.CreateConversationRequest): + request (Union[google.cloud.dialogflow_v2.types.CreateConversationRequest, dict]): The request object. The request message for [Conversations.CreateConversation][google.cloud.dialogflow.v2.Conversations.CreateConversation]. parent (str): @@ -491,7 +491,7 @@ def create_conversation( def list_conversations( self, - request: conversation.ListConversationsRequest = None, + request: Union[conversation.ListConversationsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -502,7 +502,7 @@ def list_conversations( specified project. Args: - request (google.cloud.dialogflow_v2.types.ListConversationsRequest): + request (Union[google.cloud.dialogflow_v2.types.ListConversationsRequest, dict]): The request object. The request message for [Conversations.ListConversations][google.cloud.dialogflow.v2.Conversations.ListConversations]. parent (str): @@ -573,7 +573,7 @@ def list_conversations( def get_conversation( self, - request: conversation.GetConversationRequest = None, + request: Union[conversation.GetConversationRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -583,7 +583,7 @@ def get_conversation( r"""Retrieves the specific conversation. Args: - request (google.cloud.dialogflow_v2.types.GetConversationRequest): + request (Union[google.cloud.dialogflow_v2.types.GetConversationRequest, dict]): The request object. The request message for [Conversations.GetConversation][google.cloud.dialogflow.v2.Conversations.GetConversation]. name (str): @@ -649,7 +649,7 @@ def get_conversation( def complete_conversation( self, - request: conversation.CompleteConversationRequest = None, + request: Union[conversation.CompleteConversationRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -661,7 +661,7 @@ def complete_conversation( days. Args: - request (google.cloud.dialogflow_v2.types.CompleteConversationRequest): + request (Union[google.cloud.dialogflow_v2.types.CompleteConversationRequest, dict]): The request object. The request message for [Conversations.CompleteConversation][google.cloud.dialogflow.v2.Conversations.CompleteConversation]. name (str): @@ -728,7 +728,7 @@ def complete_conversation( def list_messages( self, - request: conversation.ListMessagesRequest = None, + request: Union[conversation.ListMessagesRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -742,7 +742,7 @@ def list_messages( and empty page_token. Args: - request (google.cloud.dialogflow_v2.types.ListMessagesRequest): + request (Union[google.cloud.dialogflow_v2.types.ListMessagesRequest, dict]): The request object. The request message for [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages]. parent (str): diff --git a/google/cloud/dialogflow_v2/services/conversations/transports/base.py b/google/cloud/dialogflow_v2/services/conversations/transports/base.py index 88b455bf5..960e154f0 100644 --- a/google/cloud/dialogflow_v2/services/conversations/transports/base.py +++ b/google/cloud/dialogflow_v2/services/conversations/transports/base.py @@ -121,7 +121,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/dialogflow_v2/services/conversations/transports/grpc.py b/google/cloud/dialogflow_v2/services/conversations/transports/grpc.py index 89c1f0e05..35f8c4d3a 100644 --- a/google/cloud/dialogflow_v2/services/conversations/transports/grpc.py +++ b/google/cloud/dialogflow_v2/services/conversations/transports/grpc.py @@ -82,16 +82,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 51cc2e125..abdd8ba01 100644 --- a/google/cloud/dialogflow_v2/services/conversations/transports/grpc_asyncio.py +++ b/google/cloud/dialogflow_v2/services/conversations/transports/grpc_asyncio.py @@ -129,16 +129,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2/services/documents/client.py b/google/cloud/dialogflow_v2/services/documents/client.py index 3476f2f7f..c6f07bed5 100644 --- a/google/cloud/dialogflow_v2/services/documents/client.py +++ b/google/cloud/dialogflow_v2/services/documents/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -357,7 +357,7 @@ def __init__( def list_documents( self, - request: document.ListDocumentsRequest = None, + request: Union[document.ListDocumentsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -368,7 +368,7 @@ def list_documents( base. Args: - request (google.cloud.dialogflow_v2.types.ListDocumentsRequest): + request (Union[google.cloud.dialogflow_v2.types.ListDocumentsRequest, dict]): The request object. Request message for [Documents.ListDocuments][google.cloud.dialogflow.v2.Documents.ListDocuments]. parent (str): @@ -439,7 +439,7 @@ def list_documents( def get_document( self, - request: document.GetDocumentRequest = None, + request: Union[document.GetDocumentRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -449,7 +449,7 @@ def get_document( r"""Retrieves the specified document. Args: - request (google.cloud.dialogflow_v2.types.GetDocumentRequest): + request (Union[google.cloud.dialogflow_v2.types.GetDocumentRequest, dict]): The request object. Request message for [Documents.GetDocument][google.cloud.dialogflow.v2.Documents.GetDocument]. name (str): @@ -517,7 +517,7 @@ def get_document( def create_document( self, - request: gcd_document.CreateDocumentRequest = None, + request: Union[gcd_document.CreateDocumentRequest, dict] = None, *, parent: str = None, document: gcd_document.Document = None, @@ -537,7 +537,7 @@ def create_document( - ``response``: [Document][google.cloud.dialogflow.v2.Document] Args: - request (google.cloud.dialogflow_v2.types.CreateDocumentRequest): + request (Union[google.cloud.dialogflow_v2.types.CreateDocumentRequest, dict]): The request object. Request message for [Documents.CreateDocument][google.cloud.dialogflow.v2.Documents.CreateDocument]. parent (str): @@ -625,7 +625,7 @@ def create_document( def delete_document( self, - request: document.DeleteDocumentRequest = None, + request: Union[document.DeleteDocumentRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -645,7 +645,7 @@ def delete_document( message `__ Args: - request (google.cloud.dialogflow_v2.types.DeleteDocumentRequest): + request (Union[google.cloud.dialogflow_v2.types.DeleteDocumentRequest, dict]): The request object. Request message for [Documents.DeleteDocument][google.cloud.dialogflow.v2.Documents.DeleteDocument]. name (str): @@ -727,7 +727,7 @@ def delete_document( def update_document( self, - request: gcd_document.UpdateDocumentRequest = None, + request: Union[gcd_document.UpdateDocumentRequest, dict] = None, *, document: gcd_document.Document = None, update_mask: field_mask_pb2.FieldMask = None, @@ -747,7 +747,7 @@ def update_document( - ``response``: [Document][google.cloud.dialogflow.v2.Document] Args: - request (google.cloud.dialogflow_v2.types.UpdateDocumentRequest): + request (Union[google.cloud.dialogflow_v2.types.UpdateDocumentRequest, dict]): The request object. Request message for [Documents.UpdateDocument][google.cloud.dialogflow.v2.Documents.UpdateDocument]. document (google.cloud.dialogflow_v2.types.Document): @@ -837,7 +837,7 @@ def update_document( def reload_document( self, - request: document.ReloadDocumentRequest = None, + request: Union[document.ReloadDocumentRequest, dict] = None, *, name: str = None, content_uri: str = None, @@ -864,7 +864,7 @@ def reload_document( is deprecated; only use ``projects.knowledgeBases.documents``. Args: - request (google.cloud.dialogflow_v2.types.ReloadDocumentRequest): + request (Union[google.cloud.dialogflow_v2.types.ReloadDocumentRequest, dict]): The request object. Request message for [Documents.ReloadDocument][google.cloud.dialogflow.v2.Documents.ReloadDocument]. name (str): diff --git a/google/cloud/dialogflow_v2/services/documents/transports/base.py b/google/cloud/dialogflow_v2/services/documents/transports/base.py index a4be4ded6..37cc6d0fd 100644 --- a/google/cloud/dialogflow_v2/services/documents/transports/base.py +++ b/google/cloud/dialogflow_v2/services/documents/transports/base.py @@ -123,7 +123,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/dialogflow_v2/services/documents/transports/grpc.py b/google/cloud/dialogflow_v2/services/documents/transports/grpc.py index 45e865f87..7fb63a137 100644 --- a/google/cloud/dialogflow_v2/services/documents/transports/grpc.py +++ b/google/cloud/dialogflow_v2/services/documents/transports/grpc.py @@ -84,16 +84,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 7300d06af..e712a9f6d 100644 --- a/google/cloud/dialogflow_v2/services/documents/transports/grpc_asyncio.py +++ b/google/cloud/dialogflow_v2/services/documents/transports/grpc_asyncio.py @@ -131,16 +131,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2/services/entity_types/client.py b/google/cloud/dialogflow_v2/services/entity_types/client.py index ec063c017..6ef51e7f6 100644 --- a/google/cloud/dialogflow_v2/services/entity_types/client.py +++ b/google/cloud/dialogflow_v2/services/entity_types/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -356,7 +356,7 @@ def __init__( def list_entity_types( self, - request: entity_type.ListEntityTypesRequest = None, + request: Union[entity_type.ListEntityTypesRequest, dict] = None, *, parent: str = None, language_code: str = None, @@ -368,7 +368,7 @@ def list_entity_types( agent. Args: - request (google.cloud.dialogflow_v2.types.ListEntityTypesRequest): + request (Union[google.cloud.dialogflow_v2.types.ListEntityTypesRequest, dict]): The request object. The request message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2.EntityTypes.ListEntityTypes]. parent (str): @@ -450,7 +450,7 @@ def list_entity_types( def get_entity_type( self, - request: entity_type.GetEntityTypeRequest = None, + request: Union[entity_type.GetEntityTypeRequest, dict] = None, *, name: str = None, language_code: str = None, @@ -461,7 +461,7 @@ def get_entity_type( r"""Retrieves the specified entity type. Args: - request (google.cloud.dialogflow_v2.types.GetEntityTypeRequest): + request (Union[google.cloud.dialogflow_v2.types.GetEntityTypeRequest, dict]): The request object. The request message for [EntityTypes.GetEntityType][google.cloud.dialogflow.v2.EntityTypes.GetEntityType]. name (str): @@ -547,7 +547,7 @@ def get_entity_type( def create_entity_type( self, - request: gcd_entity_type.CreateEntityTypeRequest = None, + request: Union[gcd_entity_type.CreateEntityTypeRequest, dict] = None, *, parent: str = None, entity_type: gcd_entity_type.EntityType = None, @@ -563,7 +563,7 @@ def create_entity_type( documentation `__. Args: - request (google.cloud.dialogflow_v2.types.CreateEntityTypeRequest): + request (Union[google.cloud.dialogflow_v2.types.CreateEntityTypeRequest, dict]): The request object. The request message for [EntityTypes.CreateEntityType][google.cloud.dialogflow.v2.EntityTypes.CreateEntityType]. parent (str): @@ -656,7 +656,7 @@ def create_entity_type( def update_entity_type( self, - request: gcd_entity_type.UpdateEntityTypeRequest = None, + request: Union[gcd_entity_type.UpdateEntityTypeRequest, dict] = None, *, entity_type: gcd_entity_type.EntityType = None, language_code: str = None, @@ -671,7 +671,7 @@ def update_entity_type( documentation `__. Args: - request (google.cloud.dialogflow_v2.types.UpdateEntityTypeRequest): + request (Union[google.cloud.dialogflow_v2.types.UpdateEntityTypeRequest, dict]): The request object. The request message for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType]. entity_type (google.cloud.dialogflow_v2.types.EntityType): @@ -757,7 +757,7 @@ def update_entity_type( def delete_entity_type( self, - request: entity_type.DeleteEntityTypeRequest = None, + request: Union[entity_type.DeleteEntityTypeRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -771,7 +771,7 @@ def delete_entity_type( documentation `__. Args: - request (google.cloud.dialogflow_v2.types.DeleteEntityTypeRequest): + request (Union[google.cloud.dialogflow_v2.types.DeleteEntityTypeRequest, dict]): The request object. The request message for [EntityTypes.DeleteEntityType][google.cloud.dialogflow.v2.EntityTypes.DeleteEntityType]. name (str): @@ -825,7 +825,7 @@ def delete_entity_type( def batch_update_entity_types( self, - request: entity_type.BatchUpdateEntityTypesRequest = None, + request: Union[entity_type.BatchUpdateEntityTypesRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -848,7 +848,7 @@ def batch_update_entity_types( documentation `__. Args: - request (google.cloud.dialogflow_v2.types.BatchUpdateEntityTypesRequest): + request (Union[google.cloud.dialogflow_v2.types.BatchUpdateEntityTypesRequest, dict]): The request object. The request message for [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes]. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -903,7 +903,7 @@ def batch_update_entity_types( def batch_delete_entity_types( self, - request: entity_type.BatchDeleteEntityTypesRequest = None, + request: Union[entity_type.BatchDeleteEntityTypesRequest, dict] = None, *, parent: str = None, entity_type_names: Sequence[str] = None, @@ -928,7 +928,7 @@ def batch_delete_entity_types( documentation `__. Args: - request (google.cloud.dialogflow_v2.types.BatchDeleteEntityTypesRequest): + request (Union[google.cloud.dialogflow_v2.types.BatchDeleteEntityTypesRequest, dict]): The request object. The request message for [EntityTypes.BatchDeleteEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntityTypes]. parent (str): @@ -1021,7 +1021,7 @@ def batch_delete_entity_types( def batch_create_entities( self, - request: entity_type.BatchCreateEntitiesRequest = None, + request: Union[entity_type.BatchCreateEntitiesRequest, dict] = None, *, parent: str = None, entities: Sequence[entity_type.EntityType.Entity] = None, @@ -1047,7 +1047,7 @@ def batch_create_entities( documentation `__. Args: - request (google.cloud.dialogflow_v2.types.BatchCreateEntitiesRequest): + request (Union[google.cloud.dialogflow_v2.types.BatchCreateEntitiesRequest, dict]): The request object. The request message for [EntityTypes.BatchCreateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchCreateEntities]. parent (str): @@ -1149,7 +1149,7 @@ def batch_create_entities( def batch_update_entities( self, - request: entity_type.BatchUpdateEntitiesRequest = None, + request: Union[entity_type.BatchUpdateEntitiesRequest, dict] = None, *, parent: str = None, entities: Sequence[entity_type.EntityType.Entity] = None, @@ -1177,7 +1177,7 @@ def batch_update_entities( documentation `__. Args: - request (google.cloud.dialogflow_v2.types.BatchUpdateEntitiesRequest): + request (Union[google.cloud.dialogflow_v2.types.BatchUpdateEntitiesRequest, dict]): The request object. The request message for [EntityTypes.BatchUpdateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntities]. parent (str): @@ -1281,7 +1281,7 @@ def batch_update_entities( def batch_delete_entities( self, - request: entity_type.BatchDeleteEntitiesRequest = None, + request: Union[entity_type.BatchDeleteEntitiesRequest, dict] = None, *, parent: str = None, entity_values: Sequence[str] = None, @@ -1307,7 +1307,7 @@ def batch_delete_entities( documentation `__. Args: - request (google.cloud.dialogflow_v2.types.BatchDeleteEntitiesRequest): + request (Union[google.cloud.dialogflow_v2.types.BatchDeleteEntitiesRequest, dict]): The request object. The request message for [EntityTypes.BatchDeleteEntities][google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntities]. parent (str): diff --git a/google/cloud/dialogflow_v2/services/entity_types/transports/base.py b/google/cloud/dialogflow_v2/services/entity_types/transports/base.py index 195f90e19..4b79a0b2a 100644 --- a/google/cloud/dialogflow_v2/services/entity_types/transports/base.py +++ b/google/cloud/dialogflow_v2/services/entity_types/transports/base.py @@ -124,7 +124,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) 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 2a1ecabbc..5eaafd97e 100644 --- a/google/cloud/dialogflow_v2/services/entity_types/transports/grpc.py +++ b/google/cloud/dialogflow_v2/services/entity_types/transports/grpc.py @@ -85,16 +85,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 7c8024396..49a22ee82 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,16 +132,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2/services/environments/client.py b/google/cloud/dialogflow_v2/services/environments/client.py index b70dea94d..7d9d1c2c0 100644 --- a/google/cloud/dialogflow_v2/services/environments/client.py +++ b/google/cloud/dialogflow_v2/services/environments/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -379,7 +379,7 @@ def __init__( def list_environments( self, - request: environment.ListEnvironmentsRequest = None, + request: Union[environment.ListEnvironmentsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -390,7 +390,7 @@ def list_environments( the specified agent. Args: - request (google.cloud.dialogflow_v2.types.ListEnvironmentsRequest): + request (Union[google.cloud.dialogflow_v2.types.ListEnvironmentsRequest, dict]): The request object. The request message for [Environments.ListEnvironments][google.cloud.dialogflow.v2.Environments.ListEnvironments]. parent (str): @@ -463,7 +463,7 @@ def list_environments( def get_environment( self, - request: environment.GetEnvironmentRequest = None, + request: Union[environment.GetEnvironmentRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -472,7 +472,7 @@ def get_environment( r"""Retrieves the specified agent environment. Args: - request (google.cloud.dialogflow_v2.types.GetEnvironmentRequest): + request (Union[google.cloud.dialogflow_v2.types.GetEnvironmentRequest, dict]): The request object. The request message for [Environments.GetEnvironment][google.cloud.dialogflow.v2.Environments.GetEnvironment]. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -532,7 +532,7 @@ def get_environment( def create_environment( self, - request: environment.CreateEnvironmentRequest = None, + request: Union[environment.CreateEnvironmentRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -541,7 +541,7 @@ def create_environment( r"""Creates an agent environment. Args: - request (google.cloud.dialogflow_v2.types.CreateEnvironmentRequest): + request (Union[google.cloud.dialogflow_v2.types.CreateEnvironmentRequest, dict]): The request object. The request message for [Environments.CreateEnvironment][google.cloud.dialogflow.v2.Environments.CreateEnvironment]. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -601,7 +601,7 @@ def create_environment( def update_environment( self, - request: environment.UpdateEnvironmentRequest = None, + request: Union[environment.UpdateEnvironmentRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -623,7 +623,7 @@ def update_environment( calling this method. Args: - request (google.cloud.dialogflow_v2.types.UpdateEnvironmentRequest): + request (Union[google.cloud.dialogflow_v2.types.UpdateEnvironmentRequest, dict]): The request object. The request message for [Environments.UpdateEnvironment][google.cloud.dialogflow.v2.Environments.UpdateEnvironment]. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -685,7 +685,7 @@ def update_environment( def delete_environment( self, - request: environment.DeleteEnvironmentRequest = None, + request: Union[environment.DeleteEnvironmentRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -694,7 +694,7 @@ def delete_environment( r"""Deletes the specified agent environment. Args: - request (google.cloud.dialogflow_v2.types.DeleteEnvironmentRequest): + request (Union[google.cloud.dialogflow_v2.types.DeleteEnvironmentRequest, dict]): The request object. The request message for [Environments.DeleteEnvironment][google.cloud.dialogflow.v2.Environments.DeleteEnvironment]. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -728,7 +728,7 @@ def delete_environment( def get_environment_history( self, - request: environment.GetEnvironmentHistoryRequest = None, + request: Union[environment.GetEnvironmentHistoryRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -737,7 +737,7 @@ def get_environment_history( r"""Gets the history of the specified environment. Args: - request (google.cloud.dialogflow_v2.types.GetEnvironmentHistoryRequest): + request (Union[google.cloud.dialogflow_v2.types.GetEnvironmentHistoryRequest, dict]): The request object. The request message for [Environments.GetEnvironmentHistory][google.cloud.dialogflow.v2.Environments.GetEnvironmentHistory]. retry (google.api_core.retry.Retry): Designation of what errors, if any, diff --git a/google/cloud/dialogflow_v2/services/environments/transports/base.py b/google/cloud/dialogflow_v2/services/environments/transports/base.py index 06bff6188..82aa2d233 100644 --- a/google/cloud/dialogflow_v2/services/environments/transports/base.py +++ b/google/cloud/dialogflow_v2/services/environments/transports/base.py @@ -121,7 +121,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/dialogflow_v2/services/environments/transports/grpc.py b/google/cloud/dialogflow_v2/services/environments/transports/grpc.py index e49ee9b7f..df74ed8f8 100644 --- a/google/cloud/dialogflow_v2/services/environments/transports/grpc.py +++ b/google/cloud/dialogflow_v2/services/environments/transports/grpc.py @@ -82,16 +82,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 52f36aec8..a96252330 100644 --- a/google/cloud/dialogflow_v2/services/environments/transports/grpc_asyncio.py +++ b/google/cloud/dialogflow_v2/services/environments/transports/grpc_asyncio.py @@ -129,16 +129,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2/services/fulfillments/client.py b/google/cloud/dialogflow_v2/services/fulfillments/client.py index 50ed3277d..fca89942b 100644 --- a/google/cloud/dialogflow_v2/services/fulfillments/client.py +++ b/google/cloud/dialogflow_v2/services/fulfillments/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -348,7 +348,7 @@ def __init__( def get_fulfillment( self, - request: fulfillment.GetFulfillmentRequest = None, + request: Union[fulfillment.GetFulfillmentRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -358,7 +358,7 @@ def get_fulfillment( r"""Retrieves the fulfillment. Args: - request (google.cloud.dialogflow_v2.types.GetFulfillmentRequest): + request (Union[google.cloud.dialogflow_v2.types.GetFulfillmentRequest, dict]): The request object. The request message for [Fulfillments.GetFulfillment][google.cloud.dialogflow.v2.Fulfillments.GetFulfillment]. name (str): @@ -429,7 +429,7 @@ def get_fulfillment( def update_fulfillment( self, - request: gcd_fulfillment.UpdateFulfillmentRequest = None, + request: Union[gcd_fulfillment.UpdateFulfillmentRequest, dict] = None, *, fulfillment: gcd_fulfillment.Fulfillment = None, update_mask: field_mask_pb2.FieldMask = None, @@ -440,7 +440,7 @@ def update_fulfillment( r"""Updates the fulfillment. Args: - request (google.cloud.dialogflow_v2.types.UpdateFulfillmentRequest): + request (Union[google.cloud.dialogflow_v2.types.UpdateFulfillmentRequest, dict]): The request object. The request message for [Fulfillments.UpdateFulfillment][google.cloud.dialogflow.v2.Fulfillments.UpdateFulfillment]. fulfillment (google.cloud.dialogflow_v2.types.Fulfillment): diff --git a/google/cloud/dialogflow_v2/services/fulfillments/transports/base.py b/google/cloud/dialogflow_v2/services/fulfillments/transports/base.py index 5d2d836bc..21f130998 100644 --- a/google/cloud/dialogflow_v2/services/fulfillments/transports/base.py +++ b/google/cloud/dialogflow_v2/services/fulfillments/transports/base.py @@ -121,7 +121,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/dialogflow_v2/services/fulfillments/transports/grpc.py b/google/cloud/dialogflow_v2/services/fulfillments/transports/grpc.py index 5b8742e89..f4954a8a4 100644 --- a/google/cloud/dialogflow_v2/services/fulfillments/transports/grpc.py +++ b/google/cloud/dialogflow_v2/services/fulfillments/transports/grpc.py @@ -82,16 +82,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 e47a61191..867a98788 100644 --- a/google/cloud/dialogflow_v2/services/fulfillments/transports/grpc_asyncio.py +++ b/google/cloud/dialogflow_v2/services/fulfillments/transports/grpc_asyncio.py @@ -129,16 +129,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2/services/intents/client.py b/google/cloud/dialogflow_v2/services/intents/client.py index 861cb24cc..f6afa3b9a 100644 --- a/google/cloud/dialogflow_v2/services/intents/client.py +++ b/google/cloud/dialogflow_v2/services/intents/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -370,7 +370,7 @@ def __init__( def list_intents( self, - request: intent.ListIntentsRequest = None, + request: Union[intent.ListIntentsRequest, dict] = None, *, parent: str = None, language_code: str = None, @@ -382,7 +382,7 @@ def list_intents( agent. Args: - request (google.cloud.dialogflow_v2.types.ListIntentsRequest): + request (Union[google.cloud.dialogflow_v2.types.ListIntentsRequest, dict]): The request object. The request message for [Intents.ListIntents][google.cloud.dialogflow.v2.Intents.ListIntents]. parent (str): @@ -473,7 +473,7 @@ def list_intents( def get_intent( self, - request: intent.GetIntentRequest = None, + request: Union[intent.GetIntentRequest, dict] = None, *, name: str = None, language_code: str = None, @@ -484,7 +484,7 @@ def get_intent( r"""Retrieves the specified intent. Args: - request (google.cloud.dialogflow_v2.types.GetIntentRequest): + request (Union[google.cloud.dialogflow_v2.types.GetIntentRequest, dict]): The request object. The request message for [Intents.GetIntent][google.cloud.dialogflow.v2.Intents.GetIntent]. name (str): @@ -566,7 +566,7 @@ def get_intent( def create_intent( self, - request: gcd_intent.CreateIntentRequest = None, + request: Union[gcd_intent.CreateIntentRequest, dict] = None, *, parent: str = None, intent: gcd_intent.Intent = None, @@ -582,7 +582,7 @@ def create_intent( documentation `__. Args: - request (google.cloud.dialogflow_v2.types.CreateIntentRequest): + request (Union[google.cloud.dialogflow_v2.types.CreateIntentRequest, dict]): The request object. The request message for [Intents.CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent]. parent (str): @@ -671,7 +671,7 @@ def create_intent( def update_intent( self, - request: gcd_intent.UpdateIntentRequest = None, + request: Union[gcd_intent.UpdateIntentRequest, dict] = None, *, intent: gcd_intent.Intent = None, language_code: str = None, @@ -687,7 +687,7 @@ def update_intent( documentation `__. Args: - request (google.cloud.dialogflow_v2.types.UpdateIntentRequest): + request (Union[google.cloud.dialogflow_v2.types.UpdateIntentRequest, dict]): The request object. The request message for [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent]. intent (google.cloud.dialogflow_v2.types.Intent): @@ -778,7 +778,7 @@ def update_intent( def delete_intent( self, - request: intent.DeleteIntentRequest = None, + request: Union[intent.DeleteIntentRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -793,7 +793,7 @@ def delete_intent( documentation `__. Args: - request (google.cloud.dialogflow_v2.types.DeleteIntentRequest): + request (Union[google.cloud.dialogflow_v2.types.DeleteIntentRequest, dict]): The request object. The request message for [Intents.DeleteIntent][google.cloud.dialogflow.v2.Intents.DeleteIntent]. name (str): @@ -849,7 +849,7 @@ def delete_intent( def batch_update_intents( self, - request: intent.BatchUpdateIntentsRequest = None, + request: Union[intent.BatchUpdateIntentsRequest, dict] = None, *, parent: str = None, intent_batch_uri: str = None, @@ -875,7 +875,7 @@ def batch_update_intents( documentation `__. Args: - request (google.cloud.dialogflow_v2.types.BatchUpdateIntentsRequest): + request (Union[google.cloud.dialogflow_v2.types.BatchUpdateIntentsRequest, dict]): The request object. parent (str): Required. The name of the agent to update or create @@ -969,7 +969,7 @@ def batch_update_intents( def batch_delete_intents( self, - request: intent.BatchDeleteIntentsRequest = None, + request: Union[intent.BatchDeleteIntentsRequest, dict] = None, *, parent: str = None, intents: Sequence[intent.Intent] = None, @@ -994,7 +994,7 @@ def batch_delete_intents( documentation `__. Args: - request (google.cloud.dialogflow_v2.types.BatchDeleteIntentsRequest): + request (Union[google.cloud.dialogflow_v2.types.BatchDeleteIntentsRequest, dict]): The request object. The request message for [Intents.BatchDeleteIntents][google.cloud.dialogflow.v2.Intents.BatchDeleteIntents]. parent (str): diff --git a/google/cloud/dialogflow_v2/services/intents/transports/base.py b/google/cloud/dialogflow_v2/services/intents/transports/base.py index 0d82e7b51..f2d539e30 100644 --- a/google/cloud/dialogflow_v2/services/intents/transports/base.py +++ b/google/cloud/dialogflow_v2/services/intents/transports/base.py @@ -124,7 +124,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/dialogflow_v2/services/intents/transports/grpc.py b/google/cloud/dialogflow_v2/services/intents/transports/grpc.py index 89624d701..d33ae9476 100644 --- a/google/cloud/dialogflow_v2/services/intents/transports/grpc.py +++ b/google/cloud/dialogflow_v2/services/intents/transports/grpc.py @@ -84,16 +84,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 d609d8ee6..8d2c49c47 100644 --- a/google/cloud/dialogflow_v2/services/intents/transports/grpc_asyncio.py +++ b/google/cloud/dialogflow_v2/services/intents/transports/grpc_asyncio.py @@ -131,16 +131,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2/services/knowledge_bases/client.py b/google/cloud/dialogflow_v2/services/knowledge_bases/client.py index 81b0927df..3b5b0f0dd 100644 --- a/google/cloud/dialogflow_v2/services/knowledge_bases/client.py +++ b/google/cloud/dialogflow_v2/services/knowledge_bases/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -355,7 +355,7 @@ def __init__( def list_knowledge_bases( self, - request: knowledge_base.ListKnowledgeBasesRequest = None, + request: Union[knowledge_base.ListKnowledgeBasesRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -366,7 +366,7 @@ def list_knowledge_bases( specified agent. Args: - request (google.cloud.dialogflow_v2.types.ListKnowledgeBasesRequest): + request (Union[google.cloud.dialogflow_v2.types.ListKnowledgeBasesRequest, dict]): The request object. Request message for [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2.KnowledgeBases.ListKnowledgeBases]. parent (str): @@ -437,7 +437,7 @@ def list_knowledge_bases( def get_knowledge_base( self, - request: knowledge_base.GetKnowledgeBaseRequest = None, + request: Union[knowledge_base.GetKnowledgeBaseRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -447,7 +447,7 @@ def get_knowledge_base( r"""Retrieves the specified knowledge base. Args: - request (google.cloud.dialogflow_v2.types.GetKnowledgeBaseRequest): + request (Union[google.cloud.dialogflow_v2.types.GetKnowledgeBaseRequest, dict]): The request object. Request message for [KnowledgeBases.GetKnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBases.GetKnowledgeBase]. name (str): @@ -519,7 +519,7 @@ def get_knowledge_base( def create_knowledge_base( self, - request: gcd_knowledge_base.CreateKnowledgeBaseRequest = None, + request: Union[gcd_knowledge_base.CreateKnowledgeBaseRequest, dict] = None, *, parent: str = None, knowledge_base: gcd_knowledge_base.KnowledgeBase = None, @@ -530,7 +530,7 @@ def create_knowledge_base( r"""Creates a knowledge base. Args: - request (google.cloud.dialogflow_v2.types.CreateKnowledgeBaseRequest): + request (Union[google.cloud.dialogflow_v2.types.CreateKnowledgeBaseRequest, dict]): The request object. Request message for [KnowledgeBases.CreateKnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBases.CreateKnowledgeBase]. parent (str): @@ -611,7 +611,7 @@ def create_knowledge_base( def delete_knowledge_base( self, - request: knowledge_base.DeleteKnowledgeBaseRequest = None, + request: Union[knowledge_base.DeleteKnowledgeBaseRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -621,7 +621,7 @@ def delete_knowledge_base( r"""Deletes the specified knowledge base. Args: - request (google.cloud.dialogflow_v2.types.DeleteKnowledgeBaseRequest): + request (Union[google.cloud.dialogflow_v2.types.DeleteKnowledgeBaseRequest, dict]): The request object. Request message for [KnowledgeBases.DeleteKnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBases.DeleteKnowledgeBase]. name (str): @@ -676,7 +676,7 @@ def delete_knowledge_base( def update_knowledge_base( self, - request: gcd_knowledge_base.UpdateKnowledgeBaseRequest = None, + request: Union[gcd_knowledge_base.UpdateKnowledgeBaseRequest, dict] = None, *, knowledge_base: gcd_knowledge_base.KnowledgeBase = None, update_mask: field_mask_pb2.FieldMask = None, @@ -687,7 +687,7 @@ def update_knowledge_base( r"""Updates the specified knowledge base. Args: - request (google.cloud.dialogflow_v2.types.UpdateKnowledgeBaseRequest): + request (Union[google.cloud.dialogflow_v2.types.UpdateKnowledgeBaseRequest, dict]): The request object. Request message for [KnowledgeBases.UpdateKnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBases.UpdateKnowledgeBase]. knowledge_base (google.cloud.dialogflow_v2.types.KnowledgeBase): diff --git a/google/cloud/dialogflow_v2/services/knowledge_bases/transports/base.py b/google/cloud/dialogflow_v2/services/knowledge_bases/transports/base.py index da3836f56..8387997bc 100644 --- a/google/cloud/dialogflow_v2/services/knowledge_bases/transports/base.py +++ b/google/cloud/dialogflow_v2/services/knowledge_bases/transports/base.py @@ -122,7 +122,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) 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 a6f998041..0a4abd200 100644 --- a/google/cloud/dialogflow_v2/services/knowledge_bases/transports/grpc.py +++ b/google/cloud/dialogflow_v2/services/knowledge_bases/transports/grpc.py @@ -83,16 +83,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 6fbff40df..b07a712f2 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,16 +130,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2/services/participants/client.py b/google/cloud/dialogflow_v2/services/participants/client.py index d0bb3377d..03d020e5e 100644 --- a/google/cloud/dialogflow_v2/services/participants/client.py +++ b/google/cloud/dialogflow_v2/services/participants/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -416,7 +416,7 @@ def __init__( def create_participant( self, - request: gcd_participant.CreateParticipantRequest = None, + request: Union[gcd_participant.CreateParticipantRequest, dict] = None, *, parent: str = None, participant: gcd_participant.Participant = None, @@ -427,7 +427,7 @@ def create_participant( r"""Creates a new participant in a conversation. Args: - request (google.cloud.dialogflow_v2.types.CreateParticipantRequest): + request (Union[google.cloud.dialogflow_v2.types.CreateParticipantRequest, dict]): The request object. The request message for [Participants.CreateParticipant][google.cloud.dialogflow.v2.Participants.CreateParticipant]. parent (str): @@ -496,7 +496,7 @@ def create_participant( def get_participant( self, - request: participant.GetParticipantRequest = None, + request: Union[participant.GetParticipantRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -506,7 +506,7 @@ def get_participant( r"""Retrieves a conversation participant. Args: - request (google.cloud.dialogflow_v2.types.GetParticipantRequest): + request (Union[google.cloud.dialogflow_v2.types.GetParticipantRequest, dict]): The request object. The request message for [Participants.GetParticipant][google.cloud.dialogflow.v2.Participants.GetParticipant]. name (str): @@ -567,7 +567,7 @@ def get_participant( def list_participants( self, - request: participant.ListParticipantsRequest = None, + request: Union[participant.ListParticipantsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -578,7 +578,7 @@ def list_participants( conversation. Args: - request (google.cloud.dialogflow_v2.types.ListParticipantsRequest): + request (Union[google.cloud.dialogflow_v2.types.ListParticipantsRequest, dict]): The request object. The request message for [Participants.ListParticipants][google.cloud.dialogflow.v2.Participants.ListParticipants]. parent (str): @@ -649,7 +649,7 @@ def list_participants( def update_participant( self, - request: gcd_participant.UpdateParticipantRequest = None, + request: Union[gcd_participant.UpdateParticipantRequest, dict] = None, *, participant: gcd_participant.Participant = None, update_mask: field_mask_pb2.FieldMask = None, @@ -660,7 +660,7 @@ def update_participant( r"""Updates the specified participant. Args: - request (google.cloud.dialogflow_v2.types.UpdateParticipantRequest): + request (Union[google.cloud.dialogflow_v2.types.UpdateParticipantRequest, dict]): The request object. The request message for [Participants.UpdateParticipant][google.cloud.dialogflow.v2.Participants.UpdateParticipant]. participant (google.cloud.dialogflow_v2.types.Participant): @@ -730,7 +730,7 @@ def update_participant( def analyze_content( self, - request: gcd_participant.AnalyzeContentRequest = None, + request: Union[gcd_participant.AnalyzeContentRequest, dict] = None, *, participant: str = None, text_input: session.TextInput = None, @@ -747,7 +747,7 @@ def analyze_content( environments `__. Args: - request (google.cloud.dialogflow_v2.types.AnalyzeContentRequest): + request (Union[google.cloud.dialogflow_v2.types.AnalyzeContentRequest, dict]): The request object. The request message for [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent]. participant (str): @@ -827,7 +827,7 @@ def analyze_content( def suggest_articles( self, - request: participant.SuggestArticlesRequest = None, + request: Union[participant.SuggestArticlesRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -838,7 +838,7 @@ def suggest_articles( specific historical messages. Args: - request (google.cloud.dialogflow_v2.types.SuggestArticlesRequest): + request (Union[google.cloud.dialogflow_v2.types.SuggestArticlesRequest, dict]): The request object. The request message for [Participants.SuggestArticles][google.cloud.dialogflow.v2.Participants.SuggestArticles]. parent (str): @@ -900,7 +900,7 @@ def suggest_articles( def suggest_faq_answers( self, - request: participant.SuggestFaqAnswersRequest = None, + request: Union[participant.SuggestFaqAnswersRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -911,7 +911,7 @@ def suggest_faq_answers( specific historical messages. Args: - request (google.cloud.dialogflow_v2.types.SuggestFaqAnswersRequest): + request (Union[google.cloud.dialogflow_v2.types.SuggestFaqAnswersRequest, dict]): The request object. The request message for [Participants.SuggestFaqAnswers][google.cloud.dialogflow.v2.Participants.SuggestFaqAnswers]. parent (str): diff --git a/google/cloud/dialogflow_v2/services/participants/transports/base.py b/google/cloud/dialogflow_v2/services/participants/transports/base.py index 5f6b6182b..b31b19626 100644 --- a/google/cloud/dialogflow_v2/services/participants/transports/base.py +++ b/google/cloud/dialogflow_v2/services/participants/transports/base.py @@ -121,7 +121,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/dialogflow_v2/services/participants/transports/grpc.py b/google/cloud/dialogflow_v2/services/participants/transports/grpc.py index 85e78cebd..ab59e81b5 100644 --- a/google/cloud/dialogflow_v2/services/participants/transports/grpc.py +++ b/google/cloud/dialogflow_v2/services/participants/transports/grpc.py @@ -82,16 +82,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 d4d9419ff..3b5bbf9f0 100644 --- a/google/cloud/dialogflow_v2/services/participants/transports/grpc_asyncio.py +++ b/google/cloud/dialogflow_v2/services/participants/transports/grpc_asyncio.py @@ -129,16 +129,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2/services/session_entity_types/client.py b/google/cloud/dialogflow_v2/services/session_entity_types/client.py index 0dac12b54..03194d780 100644 --- a/google/cloud/dialogflow_v2/services/session_entity_types/client.py +++ b/google/cloud/dialogflow_v2/services/session_entity_types/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -361,7 +361,7 @@ def __init__( def list_session_entity_types( self, - request: session_entity_type.ListSessionEntityTypesRequest = None, + request: Union[session_entity_type.ListSessionEntityTypesRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -375,7 +375,7 @@ def list_session_entity_types( use session entities with Google Assistant integration. Args: - request (google.cloud.dialogflow_v2.types.ListSessionEntityTypesRequest): + request (Union[google.cloud.dialogflow_v2.types.ListSessionEntityTypesRequest, dict]): The request object. The request message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes]. parent (str): @@ -452,7 +452,7 @@ def list_session_entity_types( def get_session_entity_type( self, - request: session_entity_type.GetSessionEntityTypeRequest = None, + request: Union[session_entity_type.GetSessionEntityTypeRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -465,7 +465,7 @@ def get_session_entity_type( use session entities with Google Assistant integration. Args: - request (google.cloud.dialogflow_v2.types.GetSessionEntityTypeRequest): + request (Union[google.cloud.dialogflow_v2.types.GetSessionEntityTypeRequest, dict]): The request object. The request message for [SessionEntityTypes.GetSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.GetSessionEntityType]. name (str): @@ -539,7 +539,9 @@ def get_session_entity_type( def create_session_entity_type( self, - request: gcd_session_entity_type.CreateSessionEntityTypeRequest = None, + request: Union[ + gcd_session_entity_type.CreateSessionEntityTypeRequest, dict + ] = None, *, parent: str = None, session_entity_type: gcd_session_entity_type.SessionEntityType = None, @@ -556,7 +558,7 @@ def create_session_entity_type( use session entities with Google Assistant integration. Args: - request (google.cloud.dialogflow_v2.types.CreateSessionEntityTypeRequest): + request (Union[google.cloud.dialogflow_v2.types.CreateSessionEntityTypeRequest, dict]): The request object. The request message for [SessionEntityTypes.CreateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.CreateSessionEntityType]. parent (str): @@ -643,7 +645,9 @@ def create_session_entity_type( def update_session_entity_type( self, - request: gcd_session_entity_type.UpdateSessionEntityTypeRequest = None, + request: Union[ + gcd_session_entity_type.UpdateSessionEntityTypeRequest, dict + ] = None, *, session_entity_type: gcd_session_entity_type.SessionEntityType = None, update_mask: field_mask_pb2.FieldMask = None, @@ -657,7 +661,7 @@ def update_session_entity_type( use session entities with Google Assistant integration. Args: - request (google.cloud.dialogflow_v2.types.UpdateSessionEntityTypeRequest): + request (Union[google.cloud.dialogflow_v2.types.UpdateSessionEntityTypeRequest, dict]): The request object. The request message for [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.UpdateSessionEntityType]. session_entity_type (google.cloud.dialogflow_v2.types.SessionEntityType): @@ -741,7 +745,7 @@ def update_session_entity_type( def delete_session_entity_type( self, - request: session_entity_type.DeleteSessionEntityTypeRequest = None, + request: Union[session_entity_type.DeleteSessionEntityTypeRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -754,7 +758,7 @@ def delete_session_entity_type( use session entities with Google Assistant integration. Args: - request (google.cloud.dialogflow_v2.types.DeleteSessionEntityTypeRequest): + request (Union[google.cloud.dialogflow_v2.types.DeleteSessionEntityTypeRequest, dict]): The request object. The request message for [SessionEntityTypes.DeleteSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.DeleteSessionEntityType]. name (str): diff --git a/google/cloud/dialogflow_v2/services/session_entity_types/transports/base.py b/google/cloud/dialogflow_v2/services/session_entity_types/transports/base.py index 9c6e7d492..538b8bc25 100644 --- a/google/cloud/dialogflow_v2/services/session_entity_types/transports/base.py +++ b/google/cloud/dialogflow_v2/services/session_entity_types/transports/base.py @@ -124,7 +124,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) 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 f9dc5e49c..52f38cd97 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,16 +85,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 6d560581d..d67638595 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,16 +132,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2/services/sessions/client.py b/google/cloud/dialogflow_v2/services/sessions/client.py index e9a31ffb4..23cba476e 100644 --- a/google/cloud/dialogflow_v2/services/sessions/client.py +++ b/google/cloud/dialogflow_v2/services/sessions/client.py @@ -17,17 +17,7 @@ from distutils import util import os import re -from typing import ( - Callable, - Dict, - Optional, - Iterable, - Iterator, - Sequence, - Tuple, - Type, - Union, -) +from typing import Dict, Optional, Iterable, Iterator, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -410,7 +400,7 @@ def __init__( def detect_intent( self, - request: gcd_session.DetectIntentRequest = None, + request: Union[gcd_session.DetectIntentRequest, dict] = None, *, session: str = None, query_input: gcd_session.QueryInput = None, @@ -428,7 +418,7 @@ def detect_intent( environments `__. Args: - request (google.cloud.dialogflow_v2.types.DetectIntentRequest): + request (Union[google.cloud.dialogflow_v2.types.DetectIntentRequest, dict]): The request object. The request to detect user's intent. session (str): Required. The name of the session this query is sent to. diff --git a/google/cloud/dialogflow_v2/services/sessions/transports/base.py b/google/cloud/dialogflow_v2/services/sessions/transports/base.py index 73875a234..8f7a7a2ea 100644 --- a/google/cloud/dialogflow_v2/services/sessions/transports/base.py +++ b/google/cloud/dialogflow_v2/services/sessions/transports/base.py @@ -121,7 +121,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/dialogflow_v2/services/sessions/transports/grpc.py b/google/cloud/dialogflow_v2/services/sessions/transports/grpc.py index 260a554d5..0f496e5a7 100644 --- a/google/cloud/dialogflow_v2/services/sessions/transports/grpc.py +++ b/google/cloud/dialogflow_v2/services/sessions/transports/grpc.py @@ -84,16 +84,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 91b54b5df..e230d4965 100644 --- a/google/cloud/dialogflow_v2/services/sessions/transports/grpc_asyncio.py +++ b/google/cloud/dialogflow_v2/services/sessions/transports/grpc_asyncio.py @@ -131,16 +131,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2/services/versions/client.py b/google/cloud/dialogflow_v2/services/versions/client.py index 1928b64f9..ca4b4c264 100644 --- a/google/cloud/dialogflow_v2/services/versions/client.py +++ b/google/cloud/dialogflow_v2/services/versions/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -352,7 +352,7 @@ def __init__( def list_versions( self, - request: version.ListVersionsRequest = None, + request: Union[version.ListVersionsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -363,7 +363,7 @@ def list_versions( agent. Args: - request (google.cloud.dialogflow_v2.types.ListVersionsRequest): + request (Union[google.cloud.dialogflow_v2.types.ListVersionsRequest, dict]): The request object. The request message for [Versions.ListVersions][google.cloud.dialogflow.v2.Versions.ListVersions]. parent (str): @@ -436,7 +436,7 @@ def list_versions( def get_version( self, - request: version.GetVersionRequest = None, + request: Union[version.GetVersionRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -446,7 +446,7 @@ def get_version( r"""Retrieves the specified agent version. Args: - request (google.cloud.dialogflow_v2.types.GetVersionRequest): + request (Union[google.cloud.dialogflow_v2.types.GetVersionRequest, dict]): The request object. The request message for [Versions.GetVersion][google.cloud.dialogflow.v2.Versions.GetVersion]. name (str): @@ -528,7 +528,7 @@ def get_version( def create_version( self, - request: gcd_version.CreateVersionRequest = None, + request: Union[gcd_version.CreateVersionRequest, dict] = None, *, parent: str = None, version: gcd_version.Version = None, @@ -541,7 +541,7 @@ def create_version( "default" environment. Args: - request (google.cloud.dialogflow_v2.types.CreateVersionRequest): + request (Union[google.cloud.dialogflow_v2.types.CreateVersionRequest, dict]): The request object. The request message for [Versions.CreateVersion][google.cloud.dialogflow.v2.Versions.CreateVersion]. parent (str): @@ -631,7 +631,7 @@ def create_version( def update_version( self, - request: gcd_version.UpdateVersionRequest = None, + request: Union[gcd_version.UpdateVersionRequest, dict] = None, *, version: gcd_version.Version = None, update_mask: field_mask_pb2.FieldMask = None, @@ -646,7 +646,7 @@ def update_version( version resource. Args: - request (google.cloud.dialogflow_v2.types.UpdateVersionRequest): + request (Union[google.cloud.dialogflow_v2.types.UpdateVersionRequest, dict]): The request object. The request message for [Versions.UpdateVersion][google.cloud.dialogflow.v2.Versions.UpdateVersion]. version (google.cloud.dialogflow_v2.types.Version): @@ -739,7 +739,7 @@ def update_version( def delete_version( self, - request: version.DeleteVersionRequest = None, + request: Union[version.DeleteVersionRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -749,7 +749,7 @@ def delete_version( r"""Delete the specified agent version. Args: - request (google.cloud.dialogflow_v2.types.DeleteVersionRequest): + request (Union[google.cloud.dialogflow_v2.types.DeleteVersionRequest, dict]): The request object. The request message for [Versions.DeleteVersion][google.cloud.dialogflow.v2.Versions.DeleteVersion]. name (str): diff --git a/google/cloud/dialogflow_v2/services/versions/transports/base.py b/google/cloud/dialogflow_v2/services/versions/transports/base.py index c9425be5b..94464d5cd 100644 --- a/google/cloud/dialogflow_v2/services/versions/transports/base.py +++ b/google/cloud/dialogflow_v2/services/versions/transports/base.py @@ -122,7 +122,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/dialogflow_v2/services/versions/transports/grpc.py b/google/cloud/dialogflow_v2/services/versions/transports/grpc.py index 1370e9685..4163e690b 100644 --- a/google/cloud/dialogflow_v2/services/versions/transports/grpc.py +++ b/google/cloud/dialogflow_v2/services/versions/transports/grpc.py @@ -82,16 +82,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 ec189067e..9618017e5 100644 --- a/google/cloud/dialogflow_v2/services/versions/transports/grpc_asyncio.py +++ b/google/cloud/dialogflow_v2/services/versions/transports/grpc_asyncio.py @@ -129,16 +129,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2beta1/services/agents/client.py b/google/cloud/dialogflow_v2beta1/services/agents/client.py index 51bbbcb55..d0f5f44a6 100644 --- a/google/cloud/dialogflow_v2beta1/services/agents/client.py +++ b/google/cloud/dialogflow_v2beta1/services/agents/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -353,7 +353,7 @@ def __init__( def get_agent( self, - request: agent.GetAgentRequest = None, + request: Union[agent.GetAgentRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -363,7 +363,7 @@ def get_agent( r"""Retrieves the specified agent. Args: - request (google.cloud.dialogflow_v2beta1.types.GetAgentRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.GetAgentRequest, dict]): The request object. The request message for [Agents.GetAgent][google.cloud.dialogflow.v2beta1.Agents.GetAgent]. parent (str): @@ -434,7 +434,7 @@ def get_agent( def set_agent( self, - request: gcd_agent.SetAgentRequest = None, + request: Union[gcd_agent.SetAgentRequest, dict] = None, *, agent: gcd_agent.Agent = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -448,7 +448,7 @@ def set_agent( documentation `__. Args: - request (google.cloud.dialogflow_v2beta1.types.SetAgentRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.SetAgentRequest, dict]): The request object. The request message for [Agents.SetAgent][google.cloud.dialogflow.v2beta1.Agents.SetAgent]. agent (google.cloud.dialogflow_v2beta1.types.Agent): @@ -518,7 +518,7 @@ def set_agent( def delete_agent( self, - request: agent.DeleteAgentRequest = None, + request: Union[agent.DeleteAgentRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -528,7 +528,7 @@ def delete_agent( r"""Deletes the specified agent. Args: - request (google.cloud.dialogflow_v2beta1.types.DeleteAgentRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.DeleteAgentRequest, dict]): The request object. The request message for [Agents.DeleteAgent][google.cloud.dialogflow.v2beta1.Agents.DeleteAgent]. parent (str): @@ -583,7 +583,7 @@ def delete_agent( def search_agents( self, - request: agent.SearchAgentsRequest = None, + request: Union[agent.SearchAgentsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -598,7 +598,7 @@ def search_agents( Sub-Collections `__. Args: - request (google.cloud.dialogflow_v2beta1.types.SearchAgentsRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.SearchAgentsRequest, dict]): The request object. The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2beta1.Agents.SearchAgents]. parent (str): @@ -669,7 +669,7 @@ def search_agents( def train_agent( self, - request: agent.TrainAgentRequest = None, + request: Union[agent.TrainAgentRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -693,7 +693,7 @@ def train_agent( documentation `__. Args: - request (google.cloud.dialogflow_v2beta1.types.TrainAgentRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.TrainAgentRequest, dict]): The request object. The request message for [Agents.TrainAgent][google.cloud.dialogflow.v2beta1.Agents.TrainAgent]. parent (str): @@ -776,7 +776,7 @@ def train_agent( def export_agent( self, - request: agent.ExportAgentRequest = None, + request: Union[agent.ExportAgentRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -796,7 +796,7 @@ def export_agent( [ExportAgentResponse][google.cloud.dialogflow.v2beta1.ExportAgentResponse] Args: - request (google.cloud.dialogflow_v2beta1.types.ExportAgentRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.ExportAgentRequest, dict]): The request object. The request message for [Agents.ExportAgent][google.cloud.dialogflow.v2beta1.Agents.ExportAgent]. parent (str): @@ -870,7 +870,7 @@ def export_agent( def import_agent( self, - request: agent.ImportAgentRequest = None, + request: Union[agent.ImportAgentRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -908,7 +908,7 @@ def import_agent( documentation `__. Args: - request (google.cloud.dialogflow_v2beta1.types.ImportAgentRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.ImportAgentRequest, dict]): The request object. The request message for [Agents.ImportAgent][google.cloud.dialogflow.v2beta1.Agents.ImportAgent]. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -970,7 +970,7 @@ def import_agent( def restore_agent( self, - request: agent.RestoreAgentRequest = None, + request: Union[agent.RestoreAgentRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -1006,7 +1006,7 @@ def restore_agent( documentation `__. Args: - request (google.cloud.dialogflow_v2beta1.types.RestoreAgentRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.RestoreAgentRequest, dict]): The request object. The request message for [Agents.RestoreAgent][google.cloud.dialogflow.v2beta1.Agents.RestoreAgent]. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -1068,7 +1068,7 @@ def restore_agent( def get_validation_result( self, - request: agent.GetValidationResultRequest = None, + request: Union[agent.GetValidationResultRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -1079,7 +1079,7 @@ def get_validation_result( automatically when training is completed. Args: - request (google.cloud.dialogflow_v2beta1.types.GetValidationResultRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.GetValidationResultRequest, dict]): The request object. The request message for [Agents.GetValidationResult][google.cloud.dialogflow.v2beta1.Agents.GetValidationResult]. retry (google.api_core.retry.Retry): Designation of what errors, if any, diff --git a/google/cloud/dialogflow_v2beta1/services/agents/transports/base.py b/google/cloud/dialogflow_v2beta1/services/agents/transports/base.py index 7eacaa37c..698507989 100644 --- a/google/cloud/dialogflow_v2beta1/services/agents/transports/base.py +++ b/google/cloud/dialogflow_v2beta1/services/agents/transports/base.py @@ -125,7 +125,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/dialogflow_v2beta1/services/agents/transports/grpc.py b/google/cloud/dialogflow_v2beta1/services/agents/transports/grpc.py index 4543c2da7..98f4eb5e9 100644 --- a/google/cloud/dialogflow_v2beta1/services/agents/transports/grpc.py +++ b/google/cloud/dialogflow_v2beta1/services/agents/transports/grpc.py @@ -86,16 +86,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 54c2ff3b9..4a88d1d43 100644 --- a/google/cloud/dialogflow_v2beta1/services/agents/transports/grpc_asyncio.py +++ b/google/cloud/dialogflow_v2beta1/services/agents/transports/grpc_asyncio.py @@ -133,16 +133,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2beta1/services/answer_records/client.py b/google/cloud/dialogflow_v2beta1/services/answer_records/client.py index f4f4a0a23..3eb74fb44 100644 --- a/google/cloud/dialogflow_v2beta1/services/answer_records/client.py +++ b/google/cloud/dialogflow_v2beta1/services/answer_records/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources import warnings @@ -354,7 +354,7 @@ def __init__( def get_answer_record( self, - request: answer_record.GetAnswerRecordRequest = None, + request: Union[answer_record.GetAnswerRecordRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -364,7 +364,7 @@ def get_answer_record( Retrieves a specific answer record. Args: - request (google.cloud.dialogflow_v2beta1.types.GetAnswerRecordRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.GetAnswerRecordRequest, dict]): The request object. Request message for [AnswerRecords.GetAnswerRecord][google.cloud.dialogflow.v2beta1.AnswerRecords.GetAnswerRecord]. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -440,7 +440,7 @@ def get_answer_record( def list_answer_records( self, - request: answer_record.ListAnswerRecordsRequest = None, + request: Union[answer_record.ListAnswerRecordsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -451,7 +451,7 @@ def list_answer_records( specified project in reverse chronological order. Args: - request (google.cloud.dialogflow_v2beta1.types.ListAnswerRecordsRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.ListAnswerRecordsRequest, dict]): The request object. Request message for [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2beta1.AnswerRecords.ListAnswerRecords]. parent (str): @@ -522,7 +522,7 @@ def list_answer_records( def update_answer_record( self, - request: gcd_answer_record.UpdateAnswerRecordRequest = None, + request: Union[gcd_answer_record.UpdateAnswerRecordRequest, dict] = None, *, answer_record: gcd_answer_record.AnswerRecord = None, update_mask: field_mask_pb2.FieldMask = None, @@ -533,7 +533,7 @@ def update_answer_record( r"""Updates the specified answer record. Args: - request (google.cloud.dialogflow_v2beta1.types.UpdateAnswerRecordRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.UpdateAnswerRecordRequest, dict]): The request object. Request message for [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2beta1.AnswerRecords.UpdateAnswerRecord]. answer_record (google.cloud.dialogflow_v2beta1.types.AnswerRecord): diff --git a/google/cloud/dialogflow_v2beta1/services/answer_records/transports/base.py b/google/cloud/dialogflow_v2beta1/services/answer_records/transports/base.py index c37b37b83..be768eb7a 100644 --- a/google/cloud/dialogflow_v2beta1/services/answer_records/transports/base.py +++ b/google/cloud/dialogflow_v2beta1/services/answer_records/transports/base.py @@ -121,7 +121,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) 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 9859f5501..f4fd6f955 100644 --- a/google/cloud/dialogflow_v2beta1/services/answer_records/transports/grpc.py +++ b/google/cloud/dialogflow_v2beta1/services/answer_records/transports/grpc.py @@ -82,16 +82,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 f32b11985..8a5dbf1b4 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,16 +129,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2beta1/services/contexts/client.py b/google/cloud/dialogflow_v2beta1/services/contexts/client.py index 17fee4359..1c91533eb 100644 --- a/google/cloud/dialogflow_v2beta1/services/contexts/client.py +++ b/google/cloud/dialogflow_v2beta1/services/contexts/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -355,7 +355,7 @@ def __init__( def list_contexts( self, - request: context.ListContextsRequest = None, + request: Union[context.ListContextsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -366,7 +366,7 @@ def list_contexts( session. Args: - request (google.cloud.dialogflow_v2beta1.types.ListContextsRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.ListContextsRequest, dict]): The request object. The request message for [Contexts.ListContexts][google.cloud.dialogflow.v2beta1.Contexts.ListContexts]. parent (str): @@ -446,7 +446,7 @@ def list_contexts( def get_context( self, - request: context.GetContextRequest = None, + request: Union[context.GetContextRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -456,7 +456,7 @@ def get_context( r"""Retrieves the specified context. Args: - request (google.cloud.dialogflow_v2beta1.types.GetContextRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.GetContextRequest, dict]): The request object. The request message for [Contexts.GetContext][google.cloud.dialogflow.v2beta1.Contexts.GetContext]. name (str): @@ -543,7 +543,7 @@ def get_context( def create_context( self, - request: gcd_context.CreateContextRequest = None, + request: Union[gcd_context.CreateContextRequest, dict] = None, *, parent: str = None, context: gcd_context.Context = None, @@ -556,7 +556,7 @@ def create_context( context. Args: - request (google.cloud.dialogflow_v2beta1.types.CreateContextRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.CreateContextRequest, dict]): The request object. The request message for [Contexts.CreateContext][google.cloud.dialogflow.v2beta1.Contexts.CreateContext]. parent (str): @@ -651,7 +651,7 @@ def create_context( def update_context( self, - request: gcd_context.UpdateContextRequest = None, + request: Union[gcd_context.UpdateContextRequest, dict] = None, *, context: gcd_context.Context = None, update_mask: field_mask_pb2.FieldMask = None, @@ -662,7 +662,7 @@ def update_context( r"""Updates the specified context. Args: - request (google.cloud.dialogflow_v2beta1.types.UpdateContextRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.UpdateContextRequest, dict]): The request object. The request message for [Contexts.UpdateContext][google.cloud.dialogflow.v2beta1.Contexts.UpdateContext]. context (google.cloud.dialogflow_v2beta1.types.Context): @@ -749,7 +749,7 @@ def update_context( def delete_context( self, - request: context.DeleteContextRequest = None, + request: Union[context.DeleteContextRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -759,7 +759,7 @@ def delete_context( r"""Deletes the specified context. Args: - request (google.cloud.dialogflow_v2beta1.types.DeleteContextRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.DeleteContextRequest, dict]): The request object. The request message for [Contexts.DeleteContext][google.cloud.dialogflow.v2beta1.Contexts.DeleteContext]. name (str): @@ -823,7 +823,7 @@ def delete_context( def delete_all_contexts( self, - request: context.DeleteAllContextsRequest = None, + request: Union[context.DeleteAllContextsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -833,7 +833,7 @@ def delete_all_contexts( r"""Deletes all active contexts in the specified session. Args: - request (google.cloud.dialogflow_v2beta1.types.DeleteAllContextsRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.DeleteAllContextsRequest, dict]): The request object. The request message for [Contexts.DeleteAllContexts][google.cloud.dialogflow.v2beta1.Contexts.DeleteAllContexts]. parent (str): diff --git a/google/cloud/dialogflow_v2beta1/services/contexts/transports/base.py b/google/cloud/dialogflow_v2beta1/services/contexts/transports/base.py index cc8e2a292..49b7a23b0 100644 --- a/google/cloud/dialogflow_v2beta1/services/contexts/transports/base.py +++ b/google/cloud/dialogflow_v2beta1/services/contexts/transports/base.py @@ -122,7 +122,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/dialogflow_v2beta1/services/contexts/transports/grpc.py b/google/cloud/dialogflow_v2beta1/services/contexts/transports/grpc.py index 601b5aff1..e9956be43 100644 --- a/google/cloud/dialogflow_v2beta1/services/contexts/transports/grpc.py +++ b/google/cloud/dialogflow_v2beta1/services/contexts/transports/grpc.py @@ -83,16 +83,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 2578a275a..8f205b5bf 100644 --- a/google/cloud/dialogflow_v2beta1/services/contexts/transports/grpc_asyncio.py +++ b/google/cloud/dialogflow_v2beta1/services/contexts/transports/grpc_asyncio.py @@ -130,16 +130,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2beta1/services/conversation_profiles/client.py b/google/cloud/dialogflow_v2beta1/services/conversation_profiles/client.py index 8b7a3f209..86262a0af 100644 --- a/google/cloud/dialogflow_v2beta1/services/conversation_profiles/client.py +++ b/google/cloud/dialogflow_v2beta1/services/conversation_profiles/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -440,7 +440,9 @@ def __init__( def list_conversation_profiles( self, - request: conversation_profile.ListConversationProfilesRequest = None, + request: Union[ + conversation_profile.ListConversationProfilesRequest, dict + ] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -451,7 +453,7 @@ def list_conversation_profiles( specified project. Args: - request (google.cloud.dialogflow_v2beta1.types.ListConversationProfilesRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.ListConversationProfilesRequest, dict]): The request object. The request message for [ConversationProfiles.ListConversationProfiles][google.cloud.dialogflow.v2beta1.ConversationProfiles.ListConversationProfiles]. parent (str): @@ -526,7 +528,7 @@ def list_conversation_profiles( def get_conversation_profile( self, - request: conversation_profile.GetConversationProfileRequest = None, + request: Union[conversation_profile.GetConversationProfileRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -536,7 +538,7 @@ def get_conversation_profile( r"""Retrieves the specified conversation profile. Args: - request (google.cloud.dialogflow_v2beta1.types.GetConversationProfileRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.GetConversationProfileRequest, dict]): The request object. The request message for [ConversationProfiles.GetConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfiles.GetConversationProfile]. name (str): @@ -598,7 +600,9 @@ def get_conversation_profile( def create_conversation_profile( self, - request: gcd_conversation_profile.CreateConversationProfileRequest = None, + request: Union[ + gcd_conversation_profile.CreateConversationProfileRequest, dict + ] = None, *, parent: str = None, conversation_profile: gcd_conversation_profile.ConversationProfile = None, @@ -615,7 +619,7 @@ def create_conversation_profile( API. Args: - request (google.cloud.dialogflow_v2beta1.types.CreateConversationProfileRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.CreateConversationProfileRequest, dict]): The request object. The request message for [ConversationProfiles.CreateConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfiles.CreateConversationProfile]. parent (str): @@ -690,7 +694,9 @@ def create_conversation_profile( def update_conversation_profile( self, - request: gcd_conversation_profile.UpdateConversationProfileRequest = None, + request: Union[ + gcd_conversation_profile.UpdateConversationProfileRequest, dict + ] = None, *, conversation_profile: gcd_conversation_profile.ConversationProfile = None, update_mask: field_mask_pb2.FieldMask = None, @@ -707,7 +713,7 @@ def update_conversation_profile( API. Args: - request (google.cloud.dialogflow_v2beta1.types.UpdateConversationProfileRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.UpdateConversationProfileRequest, dict]): The request object. The request message for [ConversationProfiles.UpdateConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfiles.UpdateConversationProfile]. conversation_profile (google.cloud.dialogflow_v2beta1.types.ConversationProfile): @@ -783,7 +789,9 @@ def update_conversation_profile( def delete_conversation_profile( self, - request: conversation_profile.DeleteConversationProfileRequest = None, + request: Union[ + conversation_profile.DeleteConversationProfileRequest, dict + ] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -793,7 +801,7 @@ def delete_conversation_profile( r"""Deletes the specified conversation profile. Args: - request (google.cloud.dialogflow_v2beta1.types.DeleteConversationProfileRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.DeleteConversationProfileRequest, dict]): The request object. The request message for [ConversationProfiles.DeleteConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfiles.DeleteConversationProfile]. This operation fails if the conversation profile is diff --git a/google/cloud/dialogflow_v2beta1/services/conversation_profiles/transports/base.py b/google/cloud/dialogflow_v2beta1/services/conversation_profiles/transports/base.py index 9ad63bb26..9451cf98d 100644 --- a/google/cloud/dialogflow_v2beta1/services/conversation_profiles/transports/base.py +++ b/google/cloud/dialogflow_v2beta1/services/conversation_profiles/transports/base.py @@ -124,7 +124,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) 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 327ee52b4..18fc3858d 100644 --- a/google/cloud/dialogflow_v2beta1/services/conversation_profiles/transports/grpc.py +++ b/google/cloud/dialogflow_v2beta1/services/conversation_profiles/transports/grpc.py @@ -85,16 +85,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 f904aa452..c8971022f 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,16 +132,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2beta1/services/conversations/client.py b/google/cloud/dialogflow_v2beta1/services/conversations/client.py index aad4c5a2a..9ae7303eb 100644 --- a/google/cloud/dialogflow_v2beta1/services/conversations/client.py +++ b/google/cloud/dialogflow_v2beta1/services/conversations/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -386,7 +386,7 @@ def __init__( def create_conversation( self, - request: gcd_conversation.CreateConversationRequest = None, + request: Union[gcd_conversation.CreateConversationRequest, dict] = None, *, parent: str = None, conversation: gcd_conversation.Conversation = None, @@ -417,7 +417,7 @@ def create_conversation( is triggered, conversation will transfer to Assist Stage. Args: - request (google.cloud.dialogflow_v2beta1.types.CreateConversationRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.CreateConversationRequest, dict]): The request object. The request message for [Conversations.CreateConversation][google.cloud.dialogflow.v2beta1.Conversations.CreateConversation]. parent (str): @@ -491,7 +491,7 @@ def create_conversation( def list_conversations( self, - request: conversation.ListConversationsRequest = None, + request: Union[conversation.ListConversationsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -502,7 +502,7 @@ def list_conversations( specified project. Args: - request (google.cloud.dialogflow_v2beta1.types.ListConversationsRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.ListConversationsRequest, dict]): The request object. The request message for [Conversations.ListConversations][google.cloud.dialogflow.v2beta1.Conversations.ListConversations]. parent (str): @@ -573,7 +573,7 @@ def list_conversations( def get_conversation( self, - request: conversation.GetConversationRequest = None, + request: Union[conversation.GetConversationRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -583,7 +583,7 @@ def get_conversation( r"""Retrieves the specific conversation. Args: - request (google.cloud.dialogflow_v2beta1.types.GetConversationRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.GetConversationRequest, dict]): The request object. The request message for [Conversations.GetConversation][google.cloud.dialogflow.v2beta1.Conversations.GetConversation]. name (str): @@ -649,7 +649,7 @@ def get_conversation( def complete_conversation( self, - request: conversation.CompleteConversationRequest = None, + request: Union[conversation.CompleteConversationRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -661,7 +661,7 @@ def complete_conversation( days. Args: - request (google.cloud.dialogflow_v2beta1.types.CompleteConversationRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.CompleteConversationRequest, dict]): The request object. The request message for [Conversations.CompleteConversation][google.cloud.dialogflow.v2beta1.Conversations.CompleteConversation]. name (str): @@ -728,7 +728,7 @@ def complete_conversation( def batch_create_messages( self, - request: conversation.BatchCreateMessagesRequest = None, + request: Union[conversation.BatchCreateMessagesRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -740,7 +740,7 @@ def batch_create_messages( conversation. Args: - request (google.cloud.dialogflow_v2beta1.types.BatchCreateMessagesRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.BatchCreateMessagesRequest, dict]): The request object. The request message for [Conversations.BatchCreateMessagesRequest][]. parent (str): @@ -802,7 +802,7 @@ def batch_create_messages( def list_messages( self, - request: conversation.ListMessagesRequest = None, + request: Union[conversation.ListMessagesRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -816,7 +816,7 @@ def list_messages( and empty page_token. Args: - request (google.cloud.dialogflow_v2beta1.types.ListMessagesRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.ListMessagesRequest, dict]): The request object. The request message for [Conversations.ListMessages][google.cloud.dialogflow.v2beta1.Conversations.ListMessages]. parent (str): diff --git a/google/cloud/dialogflow_v2beta1/services/conversations/transports/base.py b/google/cloud/dialogflow_v2beta1/services/conversations/transports/base.py index 9a1145889..ce4b549fb 100644 --- a/google/cloud/dialogflow_v2beta1/services/conversations/transports/base.py +++ b/google/cloud/dialogflow_v2beta1/services/conversations/transports/base.py @@ -121,7 +121,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/dialogflow_v2beta1/services/conversations/transports/grpc.py b/google/cloud/dialogflow_v2beta1/services/conversations/transports/grpc.py index bcedc6247..3b00aff3b 100644 --- a/google/cloud/dialogflow_v2beta1/services/conversations/transports/grpc.py +++ b/google/cloud/dialogflow_v2beta1/services/conversations/transports/grpc.py @@ -82,16 +82,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2beta1/services/conversations/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2beta1/services/conversations/transports/grpc_asyncio.py index 5e982ce2a..d20fee018 100644 --- a/google/cloud/dialogflow_v2beta1/services/conversations/transports/grpc_asyncio.py +++ b/google/cloud/dialogflow_v2beta1/services/conversations/transports/grpc_asyncio.py @@ -129,16 +129,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2beta1/services/documents/client.py b/google/cloud/dialogflow_v2beta1/services/documents/client.py index e4058b3f7..ef24cbc5d 100644 --- a/google/cloud/dialogflow_v2beta1/services/documents/client.py +++ b/google/cloud/dialogflow_v2beta1/services/documents/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -358,7 +358,7 @@ def __init__( def list_documents( self, - request: document.ListDocumentsRequest = None, + request: Union[document.ListDocumentsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -371,7 +371,7 @@ def list_documents( is deprecated; only use ``projects.knowledgeBases.documents``. Args: - request (google.cloud.dialogflow_v2beta1.types.ListDocumentsRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.ListDocumentsRequest, dict]): The request object. Request message for [Documents.ListDocuments][google.cloud.dialogflow.v2beta1.Documents.ListDocuments]. parent (str): @@ -442,7 +442,7 @@ def list_documents( def get_document( self, - request: document.GetDocumentRequest = None, + request: Union[document.GetDocumentRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -455,7 +455,7 @@ def get_document( is deprecated; only use ``projects.knowledgeBases.documents``. Args: - request (google.cloud.dialogflow_v2beta1.types.GetDocumentRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.GetDocumentRequest, dict]): The request object. Request message for [Documents.GetDocument][google.cloud.dialogflow.v2beta1.Documents.GetDocument]. name (str): @@ -523,7 +523,7 @@ def get_document( def create_document( self, - request: gcd_document.CreateDocumentRequest = None, + request: Union[gcd_document.CreateDocumentRequest, dict] = None, *, parent: str = None, document: gcd_document.Document = None, @@ -547,7 +547,7 @@ def create_document( is deprecated; only use ``projects.knowledgeBases.documents``. Args: - request (google.cloud.dialogflow_v2beta1.types.CreateDocumentRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.CreateDocumentRequest, dict]): The request object. Request message for [Documents.CreateDocument][google.cloud.dialogflow.v2beta1.Documents.CreateDocument]. parent (str): @@ -635,7 +635,7 @@ def create_document( def import_documents( self, - request: document.ImportDocumentsRequest = None, + request: Union[document.ImportDocumentsRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -656,7 +656,7 @@ def import_documents( [ImportDocumentsResponse][google.cloud.dialogflow.v2beta1.ImportDocumentsResponse] Args: - request (google.cloud.dialogflow_v2beta1.types.ImportDocumentsRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.ImportDocumentsRequest, dict]): The request object. Request message for [Documents.ImportDocuments][google.cloud.dialogflow.v2beta1.Documents.ImportDocuments]. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -709,7 +709,7 @@ def import_documents( def delete_document( self, - request: document.DeleteDocumentRequest = None, + request: Union[document.DeleteDocumentRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -732,7 +732,7 @@ def delete_document( is deprecated; only use ``projects.knowledgeBases.documents``. Args: - request (google.cloud.dialogflow_v2beta1.types.DeleteDocumentRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.DeleteDocumentRequest, dict]): The request object. Request message for [Documents.DeleteDocument][google.cloud.dialogflow.v2beta1.Documents.DeleteDocument]. name (str): @@ -814,7 +814,7 @@ def delete_document( def update_document( self, - request: gcd_document.UpdateDocumentRequest = None, + request: Union[gcd_document.UpdateDocumentRequest, dict] = None, *, document: gcd_document.Document = None, update_mask: field_mask_pb2.FieldMask = None, @@ -838,7 +838,7 @@ def update_document( is deprecated; only use ``projects.knowledgeBases.documents``. Args: - request (google.cloud.dialogflow_v2beta1.types.UpdateDocumentRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.UpdateDocumentRequest, dict]): The request object. Request message for [Documents.UpdateDocument][google.cloud.dialogflow.v2beta1.Documents.UpdateDocument]. document (google.cloud.dialogflow_v2beta1.types.Document): @@ -928,7 +928,7 @@ def update_document( def reload_document( self, - request: document.ReloadDocumentRequest = None, + request: Union[document.ReloadDocumentRequest, dict] = None, *, name: str = None, gcs_source: gcs.GcsSource = None, @@ -960,7 +960,7 @@ def reload_document( is deprecated; only use ``projects.knowledgeBases.documents``. Args: - request (google.cloud.dialogflow_v2beta1.types.ReloadDocumentRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.ReloadDocumentRequest, dict]): The request object. Request message for [Documents.ReloadDocument][google.cloud.dialogflow.v2beta1.Documents.ReloadDocument]. name (str): diff --git a/google/cloud/dialogflow_v2beta1/services/documents/transports/base.py b/google/cloud/dialogflow_v2beta1/services/documents/transports/base.py index 7fadbc158..cfb3e2e03 100644 --- a/google/cloud/dialogflow_v2beta1/services/documents/transports/base.py +++ b/google/cloud/dialogflow_v2beta1/services/documents/transports/base.py @@ -123,7 +123,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/dialogflow_v2beta1/services/documents/transports/grpc.py b/google/cloud/dialogflow_v2beta1/services/documents/transports/grpc.py index eb0218fe9..a959ca976 100644 --- a/google/cloud/dialogflow_v2beta1/services/documents/transports/grpc.py +++ b/google/cloud/dialogflow_v2beta1/services/documents/transports/grpc.py @@ -84,16 +84,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 f62bfe680..8584dbc22 100644 --- a/google/cloud/dialogflow_v2beta1/services/documents/transports/grpc_asyncio.py +++ b/google/cloud/dialogflow_v2beta1/services/documents/transports/grpc_asyncio.py @@ -131,16 +131,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2beta1/services/entity_types/client.py b/google/cloud/dialogflow_v2beta1/services/entity_types/client.py index 0cfc745f2..988c878fb 100644 --- a/google/cloud/dialogflow_v2beta1/services/entity_types/client.py +++ b/google/cloud/dialogflow_v2beta1/services/entity_types/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -357,7 +357,7 @@ def __init__( def list_entity_types( self, - request: entity_type.ListEntityTypesRequest = None, + request: Union[entity_type.ListEntityTypesRequest, dict] = None, *, parent: str = None, language_code: str = None, @@ -369,7 +369,7 @@ def list_entity_types( agent. Args: - request (google.cloud.dialogflow_v2beta1.types.ListEntityTypesRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.ListEntityTypesRequest, dict]): The request object. The request message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.ListEntityTypes]. parent (str): @@ -454,7 +454,7 @@ def list_entity_types( def get_entity_type( self, - request: entity_type.GetEntityTypeRequest = None, + request: Union[entity_type.GetEntityTypeRequest, dict] = None, *, name: str = None, language_code: str = None, @@ -465,7 +465,7 @@ def get_entity_type( r"""Retrieves the specified entity type. Args: - request (google.cloud.dialogflow_v2beta1.types.GetEntityTypeRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.GetEntityTypeRequest, dict]): The request object. The request message for [EntityTypes.GetEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.GetEntityType]. name (str): @@ -554,7 +554,7 @@ def get_entity_type( def create_entity_type( self, - request: gcd_entity_type.CreateEntityTypeRequest = None, + request: Union[gcd_entity_type.CreateEntityTypeRequest, dict] = None, *, parent: str = None, entity_type: gcd_entity_type.EntityType = None, @@ -570,7 +570,7 @@ def create_entity_type( documentation `__. Args: - request (google.cloud.dialogflow_v2beta1.types.CreateEntityTypeRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.CreateEntityTypeRequest, dict]): The request object. The request message for [EntityTypes.CreateEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.CreateEntityType]. parent (str): @@ -666,7 +666,7 @@ def create_entity_type( def update_entity_type( self, - request: gcd_entity_type.UpdateEntityTypeRequest = None, + request: Union[gcd_entity_type.UpdateEntityTypeRequest, dict] = None, *, entity_type: gcd_entity_type.EntityType = None, language_code: str = None, @@ -682,7 +682,7 @@ def update_entity_type( documentation `__. Args: - request (google.cloud.dialogflow_v2beta1.types.UpdateEntityTypeRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.UpdateEntityTypeRequest, dict]): The request object. The request message for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.UpdateEntityType]. entity_type (google.cloud.dialogflow_v2beta1.types.EntityType): @@ -777,7 +777,7 @@ def update_entity_type( def delete_entity_type( self, - request: entity_type.DeleteEntityTypeRequest = None, + request: Union[entity_type.DeleteEntityTypeRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -791,7 +791,7 @@ def delete_entity_type( documentation `__. Args: - request (google.cloud.dialogflow_v2beta1.types.DeleteEntityTypeRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.DeleteEntityTypeRequest, dict]): The request object. The request message for [EntityTypes.DeleteEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.DeleteEntityType]. name (str): @@ -848,7 +848,7 @@ def delete_entity_type( def batch_update_entity_types( self, - request: entity_type.BatchUpdateEntityTypesRequest = None, + request: Union[entity_type.BatchUpdateEntityTypesRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -871,7 +871,7 @@ def batch_update_entity_types( documentation `__. Args: - request (google.cloud.dialogflow_v2beta1.types.BatchUpdateEntityTypesRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.BatchUpdateEntityTypesRequest, dict]): The request object. The request message for [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes]. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -926,7 +926,7 @@ def batch_update_entity_types( def batch_delete_entity_types( self, - request: entity_type.BatchDeleteEntityTypesRequest = None, + request: Union[entity_type.BatchDeleteEntityTypesRequest, dict] = None, *, parent: str = None, entity_type_names: Sequence[str] = None, @@ -951,7 +951,7 @@ def batch_delete_entity_types( documentation `__. Args: - request (google.cloud.dialogflow_v2beta1.types.BatchDeleteEntityTypesRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.BatchDeleteEntityTypesRequest, dict]): The request object. The request message for [EntityTypes.BatchDeleteEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntityTypes]. parent (str): @@ -1047,7 +1047,7 @@ def batch_delete_entity_types( def batch_create_entities( self, - request: entity_type.BatchCreateEntitiesRequest = None, + request: Union[entity_type.BatchCreateEntitiesRequest, dict] = None, *, parent: str = None, entities: Sequence[entity_type.EntityType.Entity] = None, @@ -1073,7 +1073,7 @@ def batch_create_entities( documentation `__. Args: - request (google.cloud.dialogflow_v2beta1.types.BatchCreateEntitiesRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.BatchCreateEntitiesRequest, dict]): The request object. The request message for [EntityTypes.BatchCreateEntities][google.cloud.dialogflow.v2beta1.EntityTypes.BatchCreateEntities]. parent (str): @@ -1177,7 +1177,7 @@ def batch_create_entities( def batch_update_entities( self, - request: entity_type.BatchUpdateEntitiesRequest = None, + request: Union[entity_type.BatchUpdateEntitiesRequest, dict] = None, *, parent: str = None, entities: Sequence[entity_type.EntityType.Entity] = None, @@ -1205,7 +1205,7 @@ def batch_update_entities( message `__ Args: - request (google.cloud.dialogflow_v2beta1.types.BatchUpdateEntitiesRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.BatchUpdateEntitiesRequest, dict]): The request object. The request message for [EntityTypes.BatchUpdateEntities][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntities]. parent (str): @@ -1311,7 +1311,7 @@ def batch_update_entities( def batch_delete_entities( self, - request: entity_type.BatchDeleteEntitiesRequest = None, + request: Union[entity_type.BatchDeleteEntitiesRequest, dict] = None, *, parent: str = None, entity_values: Sequence[str] = None, @@ -1337,7 +1337,7 @@ def batch_delete_entities( documentation `__. Args: - request (google.cloud.dialogflow_v2beta1.types.BatchDeleteEntitiesRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.BatchDeleteEntitiesRequest, dict]): The request object. The request message for [EntityTypes.BatchDeleteEntities][google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntities]. parent (str): diff --git a/google/cloud/dialogflow_v2beta1/services/entity_types/transports/base.py b/google/cloud/dialogflow_v2beta1/services/entity_types/transports/base.py index 6326d6430..8a18dff81 100644 --- a/google/cloud/dialogflow_v2beta1/services/entity_types/transports/base.py +++ b/google/cloud/dialogflow_v2beta1/services/entity_types/transports/base.py @@ -124,7 +124,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) 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 31e019c74..d665a461e 100644 --- a/google/cloud/dialogflow_v2beta1/services/entity_types/transports/grpc.py +++ b/google/cloud/dialogflow_v2beta1/services/entity_types/transports/grpc.py @@ -85,16 +85,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 5796ec3c7..474ffef0d 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,16 +132,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2beta1/services/environments/client.py b/google/cloud/dialogflow_v2beta1/services/environments/client.py index f2975f4e0..eb45bdf34 100644 --- a/google/cloud/dialogflow_v2beta1/services/environments/client.py +++ b/google/cloud/dialogflow_v2beta1/services/environments/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -379,7 +379,7 @@ def __init__( def list_environments( self, - request: environment.ListEnvironmentsRequest = None, + request: Union[environment.ListEnvironmentsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -390,7 +390,7 @@ def list_environments( specified agent. Args: - request (google.cloud.dialogflow_v2beta1.types.ListEnvironmentsRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.ListEnvironmentsRequest, dict]): The request object. The request message for [Environments.ListEnvironments][google.cloud.dialogflow.v2beta1.Environments.ListEnvironments]. parent (str): @@ -463,7 +463,7 @@ def list_environments( def get_environment( self, - request: environment.GetEnvironmentRequest = None, + request: Union[environment.GetEnvironmentRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -472,7 +472,7 @@ def get_environment( r"""Retrieves the specified agent environment. Args: - request (google.cloud.dialogflow_v2beta1.types.GetEnvironmentRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.GetEnvironmentRequest, dict]): The request object. The request message for [Environments.GetEnvironment][google.cloud.dialogflow.v2beta1.Environments.GetEnvironment]. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -532,7 +532,7 @@ def get_environment( def create_environment( self, - request: environment.CreateEnvironmentRequest = None, + request: Union[environment.CreateEnvironmentRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -541,7 +541,7 @@ def create_environment( r"""Creates an agent environment. Args: - request (google.cloud.dialogflow_v2beta1.types.CreateEnvironmentRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.CreateEnvironmentRequest, dict]): The request object. The request message for [Environments.CreateEnvironment][google.cloud.dialogflow.v2beta1.Environments.CreateEnvironment]. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -601,7 +601,7 @@ def create_environment( def update_environment( self, - request: environment.UpdateEnvironmentRequest = None, + request: Union[environment.UpdateEnvironmentRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -622,7 +622,7 @@ def update_environment( draft to a version before calling this function. Args: - request (google.cloud.dialogflow_v2beta1.types.UpdateEnvironmentRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.UpdateEnvironmentRequest, dict]): The request object. The request message for [Environments.UpdateEnvironment][google.cloud.dialogflow.v2beta1.Environments.UpdateEnvironment]. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -684,7 +684,7 @@ def update_environment( def delete_environment( self, - request: environment.DeleteEnvironmentRequest = None, + request: Union[environment.DeleteEnvironmentRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -693,7 +693,7 @@ def delete_environment( r"""Deletes the specified agent environment. Args: - request (google.cloud.dialogflow_v2beta1.types.DeleteEnvironmentRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.DeleteEnvironmentRequest, dict]): The request object. The request message for [Environments.DeleteEnvironment][google.cloud.dialogflow.v2beta1.Environments.DeleteEnvironment]. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -727,7 +727,7 @@ def delete_environment( def get_environment_history( self, - request: environment.GetEnvironmentHistoryRequest = None, + request: Union[environment.GetEnvironmentHistoryRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -736,7 +736,7 @@ def get_environment_history( r"""Gets the history of the specified environment. Args: - request (google.cloud.dialogflow_v2beta1.types.GetEnvironmentHistoryRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.GetEnvironmentHistoryRequest, dict]): The request object. The request message for [Environments.GetEnvironmentHistory][google.cloud.dialogflow.v2beta1.Environments.GetEnvironmentHistory]. retry (google.api_core.retry.Retry): Designation of what errors, if any, diff --git a/google/cloud/dialogflow_v2beta1/services/environments/transports/base.py b/google/cloud/dialogflow_v2beta1/services/environments/transports/base.py index 44a97e193..66ef0e6d8 100644 --- a/google/cloud/dialogflow_v2beta1/services/environments/transports/base.py +++ b/google/cloud/dialogflow_v2beta1/services/environments/transports/base.py @@ -121,7 +121,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/dialogflow_v2beta1/services/environments/transports/grpc.py b/google/cloud/dialogflow_v2beta1/services/environments/transports/grpc.py index 4106b6293..1ba07220f 100644 --- a/google/cloud/dialogflow_v2beta1/services/environments/transports/grpc.py +++ b/google/cloud/dialogflow_v2beta1/services/environments/transports/grpc.py @@ -82,16 +82,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 c20ba69c8..dc3628da1 100644 --- a/google/cloud/dialogflow_v2beta1/services/environments/transports/grpc_asyncio.py +++ b/google/cloud/dialogflow_v2beta1/services/environments/transports/grpc_asyncio.py @@ -129,16 +129,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2beta1/services/fulfillments/client.py b/google/cloud/dialogflow_v2beta1/services/fulfillments/client.py index 6f0561261..b072db119 100644 --- a/google/cloud/dialogflow_v2beta1/services/fulfillments/client.py +++ b/google/cloud/dialogflow_v2beta1/services/fulfillments/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -348,7 +348,7 @@ def __init__( def get_fulfillment( self, - request: fulfillment.GetFulfillmentRequest = None, + request: Union[fulfillment.GetFulfillmentRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -358,7 +358,7 @@ def get_fulfillment( r"""Retrieves the fulfillment. Args: - request (google.cloud.dialogflow_v2beta1.types.GetFulfillmentRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.GetFulfillmentRequest, dict]): The request object. The request message for [Fulfillments.GetFulfillment][google.cloud.dialogflow.v2beta1.Fulfillments.GetFulfillment]. name (str): @@ -432,7 +432,7 @@ def get_fulfillment( def update_fulfillment( self, - request: gcd_fulfillment.UpdateFulfillmentRequest = None, + request: Union[gcd_fulfillment.UpdateFulfillmentRequest, dict] = None, *, fulfillment: gcd_fulfillment.Fulfillment = None, update_mask: field_mask_pb2.FieldMask = None, @@ -443,7 +443,7 @@ def update_fulfillment( r"""Updates the fulfillment. Args: - request (google.cloud.dialogflow_v2beta1.types.UpdateFulfillmentRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.UpdateFulfillmentRequest, dict]): The request object. The request message for [Fulfillments.UpdateFulfillment][google.cloud.dialogflow.v2beta1.Fulfillments.UpdateFulfillment]. fulfillment (google.cloud.dialogflow_v2beta1.types.Fulfillment): diff --git a/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/base.py b/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/base.py index e6d41e249..82e05d968 100644 --- a/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/base.py +++ b/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/base.py @@ -121,7 +121,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/grpc.py b/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/grpc.py index 97f314a33..85627dc90 100644 --- a/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/grpc.py +++ b/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/grpc.py @@ -82,16 +82,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 1b9cca73a..191446b41 100644 --- a/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/grpc_asyncio.py +++ b/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/grpc_asyncio.py @@ -129,16 +129,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2beta1/services/intents/client.py b/google/cloud/dialogflow_v2beta1/services/intents/client.py index d376d6877..ecc368fbe 100644 --- a/google/cloud/dialogflow_v2beta1/services/intents/client.py +++ b/google/cloud/dialogflow_v2beta1/services/intents/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -372,7 +372,7 @@ def __init__( def list_intents( self, - request: intent.ListIntentsRequest = None, + request: Union[intent.ListIntentsRequest, dict] = None, *, parent: str = None, language_code: str = None, @@ -384,7 +384,7 @@ def list_intents( agent. Args: - request (google.cloud.dialogflow_v2beta1.types.ListIntentsRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.ListIntentsRequest, dict]): The request object. The request message for [Intents.ListIntents][google.cloud.dialogflow.v2beta1.Intents.ListIntents]. parent (str): @@ -475,7 +475,7 @@ def list_intents( def get_intent( self, - request: intent.GetIntentRequest = None, + request: Union[intent.GetIntentRequest, dict] = None, *, name: str = None, language_code: str = None, @@ -486,7 +486,7 @@ def get_intent( r"""Retrieves the specified intent. Args: - request (google.cloud.dialogflow_v2beta1.types.GetIntentRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.GetIntentRequest, dict]): The request object. The request message for [Intents.GetIntent][google.cloud.dialogflow.v2beta1.Intents.GetIntent]. name (str): @@ -570,7 +570,7 @@ def get_intent( def create_intent( self, - request: gcd_intent.CreateIntentRequest = None, + request: Union[gcd_intent.CreateIntentRequest, dict] = None, *, parent: str = None, intent: gcd_intent.Intent = None, @@ -586,7 +586,7 @@ def create_intent( documentation `__. Args: - request (google.cloud.dialogflow_v2beta1.types.CreateIntentRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.CreateIntentRequest, dict]): The request object. The request message for [Intents.CreateIntent][google.cloud.dialogflow.v2beta1.Intents.CreateIntent]. parent (str): @@ -678,7 +678,7 @@ def create_intent( def update_intent( self, - request: gcd_intent.UpdateIntentRequest = None, + request: Union[gcd_intent.UpdateIntentRequest, dict] = None, *, intent: gcd_intent.Intent = None, update_mask: field_mask_pb2.FieldMask = None, @@ -694,7 +694,7 @@ def update_intent( documentation `__. Args: - request (google.cloud.dialogflow_v2beta1.types.UpdateIntentRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.UpdateIntentRequest, dict]): The request object. The request message for [Intents.UpdateIntent][google.cloud.dialogflow.v2beta1.Intents.UpdateIntent]. intent (google.cloud.dialogflow_v2beta1.types.Intent): @@ -785,7 +785,7 @@ def update_intent( def delete_intent( self, - request: intent.DeleteIntentRequest = None, + request: Union[intent.DeleteIntentRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -800,7 +800,7 @@ def delete_intent( documentation `__. Args: - request (google.cloud.dialogflow_v2beta1.types.DeleteIntentRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.DeleteIntentRequest, dict]): The request object. The request message for [Intents.DeleteIntent][google.cloud.dialogflow.v2beta1.Intents.DeleteIntent]. name (str): @@ -860,7 +860,7 @@ def delete_intent( def batch_update_intents( self, - request: intent.BatchUpdateIntentsRequest = None, + request: Union[intent.BatchUpdateIntentsRequest, dict] = None, *, parent: str = None, intent_batch_uri: str = None, @@ -886,7 +886,7 @@ def batch_update_intents( documentation `__. Args: - request (google.cloud.dialogflow_v2beta1.types.BatchUpdateIntentsRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.BatchUpdateIntentsRequest, dict]): The request object. The request message for [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents]. parent (str): @@ -984,7 +984,7 @@ def batch_update_intents( def batch_delete_intents( self, - request: intent.BatchDeleteIntentsRequest = None, + request: Union[intent.BatchDeleteIntentsRequest, dict] = None, *, parent: str = None, intents: Sequence[intent.Intent] = None, @@ -1009,7 +1009,7 @@ def batch_delete_intents( documentation `__. Args: - request (google.cloud.dialogflow_v2beta1.types.BatchDeleteIntentsRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.BatchDeleteIntentsRequest, dict]): The request object. The request message for [Intents.BatchDeleteIntents][google.cloud.dialogflow.v2beta1.Intents.BatchDeleteIntents]. parent (str): diff --git a/google/cloud/dialogflow_v2beta1/services/intents/transports/base.py b/google/cloud/dialogflow_v2beta1/services/intents/transports/base.py index eb7f544e7..51326baa7 100644 --- a/google/cloud/dialogflow_v2beta1/services/intents/transports/base.py +++ b/google/cloud/dialogflow_v2beta1/services/intents/transports/base.py @@ -124,7 +124,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/dialogflow_v2beta1/services/intents/transports/grpc.py b/google/cloud/dialogflow_v2beta1/services/intents/transports/grpc.py index 9e5615006..4daeef6f6 100644 --- a/google/cloud/dialogflow_v2beta1/services/intents/transports/grpc.py +++ b/google/cloud/dialogflow_v2beta1/services/intents/transports/grpc.py @@ -85,16 +85,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 228075d62..8eb39795c 100644 --- a/google/cloud/dialogflow_v2beta1/services/intents/transports/grpc_asyncio.py +++ b/google/cloud/dialogflow_v2beta1/services/intents/transports/grpc_asyncio.py @@ -132,16 +132,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2beta1/services/knowledge_bases/client.py b/google/cloud/dialogflow_v2beta1/services/knowledge_bases/client.py index 07488241e..c6ba32c12 100644 --- a/google/cloud/dialogflow_v2beta1/services/knowledge_bases/client.py +++ b/google/cloud/dialogflow_v2beta1/services/knowledge_bases/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -355,7 +355,7 @@ def __init__( def list_knowledge_bases( self, - request: knowledge_base.ListKnowledgeBasesRequest = None, + request: Union[knowledge_base.ListKnowledgeBasesRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -368,7 +368,7 @@ def list_knowledge_bases( deprecated; only use ``projects.knowledgeBases``. Args: - request (google.cloud.dialogflow_v2beta1.types.ListKnowledgeBasesRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.ListKnowledgeBasesRequest, dict]): The request object. Request message for [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2beta1.KnowledgeBases.ListKnowledgeBases]. parent (str): @@ -439,7 +439,7 @@ def list_knowledge_bases( def get_knowledge_base( self, - request: knowledge_base.GetKnowledgeBaseRequest = None, + request: Union[knowledge_base.GetKnowledgeBaseRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -452,7 +452,7 @@ def get_knowledge_base( deprecated; only use ``projects.knowledgeBases``. Args: - request (google.cloud.dialogflow_v2beta1.types.GetKnowledgeBaseRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.GetKnowledgeBaseRequest, dict]): The request object. Request message for [KnowledgeBases.GetKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.GetKnowledgeBase]. name (str): @@ -524,7 +524,7 @@ def get_knowledge_base( def create_knowledge_base( self, - request: gcd_knowledge_base.CreateKnowledgeBaseRequest = None, + request: Union[gcd_knowledge_base.CreateKnowledgeBaseRequest, dict] = None, *, parent: str = None, knowledge_base: gcd_knowledge_base.KnowledgeBase = None, @@ -538,7 +538,7 @@ def create_knowledge_base( deprecated; only use ``projects.knowledgeBases``. Args: - request (google.cloud.dialogflow_v2beta1.types.CreateKnowledgeBaseRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.CreateKnowledgeBaseRequest, dict]): The request object. Request message for [KnowledgeBases.CreateKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.CreateKnowledgeBase]. parent (str): @@ -619,7 +619,7 @@ def create_knowledge_base( def delete_knowledge_base( self, - request: knowledge_base.DeleteKnowledgeBaseRequest = None, + request: Union[knowledge_base.DeleteKnowledgeBaseRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -632,7 +632,7 @@ def delete_knowledge_base( deprecated; only use ``projects.knowledgeBases``. Args: - request (google.cloud.dialogflow_v2beta1.types.DeleteKnowledgeBaseRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.DeleteKnowledgeBaseRequest, dict]): The request object. Request message for [KnowledgeBases.DeleteKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.DeleteKnowledgeBase]. name (str): @@ -687,7 +687,7 @@ def delete_knowledge_base( def update_knowledge_base( self, - request: gcd_knowledge_base.UpdateKnowledgeBaseRequest = None, + request: Union[gcd_knowledge_base.UpdateKnowledgeBaseRequest, dict] = None, *, knowledge_base: gcd_knowledge_base.KnowledgeBase = None, update_mask: field_mask_pb2.FieldMask = None, @@ -701,7 +701,7 @@ def update_knowledge_base( deprecated; only use ``projects.knowledgeBases``. Args: - request (google.cloud.dialogflow_v2beta1.types.UpdateKnowledgeBaseRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.UpdateKnowledgeBaseRequest, dict]): The request object. Request message for [KnowledgeBases.UpdateKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.UpdateKnowledgeBase]. knowledge_base (google.cloud.dialogflow_v2beta1.types.KnowledgeBase): diff --git a/google/cloud/dialogflow_v2beta1/services/knowledge_bases/transports/base.py b/google/cloud/dialogflow_v2beta1/services/knowledge_bases/transports/base.py index 838165e46..77e56056b 100644 --- a/google/cloud/dialogflow_v2beta1/services/knowledge_bases/transports/base.py +++ b/google/cloud/dialogflow_v2beta1/services/knowledge_bases/transports/base.py @@ -122,7 +122,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) 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 57ad0ba53..e9186816d 100644 --- a/google/cloud/dialogflow_v2beta1/services/knowledge_bases/transports/grpc.py +++ b/google/cloud/dialogflow_v2beta1/services/knowledge_bases/transports/grpc.py @@ -83,16 +83,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 1924251bf..3541a6952 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,16 +130,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2beta1/services/participants/client.py b/google/cloud/dialogflow_v2beta1/services/participants/client.py index 18ceeee6a..1e53bb3ed 100644 --- a/google/cloud/dialogflow_v2beta1/services/participants/client.py +++ b/google/cloud/dialogflow_v2beta1/services/participants/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources import warnings @@ -433,7 +433,7 @@ def __init__( def create_participant( self, - request: gcd_participant.CreateParticipantRequest = None, + request: Union[gcd_participant.CreateParticipantRequest, dict] = None, *, parent: str = None, participant: gcd_participant.Participant = None, @@ -444,7 +444,7 @@ def create_participant( r"""Creates a new participant in a conversation. Args: - request (google.cloud.dialogflow_v2beta1.types.CreateParticipantRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.CreateParticipantRequest, dict]): The request object. The request message for [Participants.CreateParticipant][google.cloud.dialogflow.v2beta1.Participants.CreateParticipant]. parent (str): @@ -513,7 +513,7 @@ def create_participant( def get_participant( self, - request: participant.GetParticipantRequest = None, + request: Union[participant.GetParticipantRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -523,7 +523,7 @@ def get_participant( r"""Retrieves a conversation participant. Args: - request (google.cloud.dialogflow_v2beta1.types.GetParticipantRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.GetParticipantRequest, dict]): The request object. The request message for [Participants.GetParticipant][google.cloud.dialogflow.v2beta1.Participants.GetParticipant]. name (str): @@ -584,7 +584,7 @@ def get_participant( def list_participants( self, - request: participant.ListParticipantsRequest = None, + request: Union[participant.ListParticipantsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -595,7 +595,7 @@ def list_participants( conversation. Args: - request (google.cloud.dialogflow_v2beta1.types.ListParticipantsRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.ListParticipantsRequest, dict]): The request object. The request message for [Participants.ListParticipants][google.cloud.dialogflow.v2beta1.Participants.ListParticipants]. parent (str): @@ -666,7 +666,7 @@ def list_participants( def update_participant( self, - request: gcd_participant.UpdateParticipantRequest = None, + request: Union[gcd_participant.UpdateParticipantRequest, dict] = None, *, participant: gcd_participant.Participant = None, update_mask: field_mask_pb2.FieldMask = None, @@ -677,7 +677,7 @@ def update_participant( r"""Updates the specified participant. Args: - request (google.cloud.dialogflow_v2beta1.types.UpdateParticipantRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.UpdateParticipantRequest, dict]): The request object. The request message for [Participants.UpdateParticipant][google.cloud.dialogflow.v2beta1.Participants.UpdateParticipant]. participant (google.cloud.dialogflow_v2beta1.types.Participant): @@ -747,7 +747,7 @@ def update_participant( def analyze_content( self, - request: gcd_participant.AnalyzeContentRequest = None, + request: Union[gcd_participant.AnalyzeContentRequest, dict] = None, *, participant: str = None, text_input: session.TextInput = None, @@ -764,7 +764,7 @@ def analyze_content( environments `__. Args: - request (google.cloud.dialogflow_v2beta1.types.AnalyzeContentRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.AnalyzeContentRequest, dict]): The request object. The request message for [Participants.AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent]. participant (str): @@ -844,7 +844,7 @@ def analyze_content( def suggest_articles( self, - request: participant.SuggestArticlesRequest = None, + request: Union[participant.SuggestArticlesRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -862,7 +862,7 @@ def suggest_articles( conversation context in the real time. Args: - request (google.cloud.dialogflow_v2beta1.types.SuggestArticlesRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.SuggestArticlesRequest, dict]): The request object. The request message for [Participants.SuggestArticles][google.cloud.dialogflow.v2beta1.Participants.SuggestArticles]. parent (str): @@ -924,7 +924,7 @@ def suggest_articles( def suggest_faq_answers( self, - request: participant.SuggestFaqAnswersRequest = None, + request: Union[participant.SuggestFaqAnswersRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -935,7 +935,7 @@ def suggest_faq_answers( specific historical messages. Args: - request (google.cloud.dialogflow_v2beta1.types.SuggestFaqAnswersRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.SuggestFaqAnswersRequest, dict]): The request object. The request message for [Participants.SuggestFaqAnswers][google.cloud.dialogflow.v2beta1.Participants.SuggestFaqAnswers]. parent (str): @@ -997,7 +997,7 @@ def suggest_faq_answers( def suggest_smart_replies( self, - request: participant.SuggestSmartRepliesRequest = None, + request: Union[participant.SuggestSmartRepliesRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1008,7 +1008,7 @@ def suggest_smart_replies( specific historical messages. Args: - request (google.cloud.dialogflow_v2beta1.types.SuggestSmartRepliesRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.SuggestSmartRepliesRequest, dict]): The request object. The request message for [Participants.SuggestSmartReplies][google.cloud.dialogflow.v2beta1.Participants.SuggestSmartReplies]. parent (str): @@ -1070,7 +1070,7 @@ def suggest_smart_replies( def list_suggestions( self, - request: participant.ListSuggestionsRequest = None, + request: Union[participant.ListSuggestionsRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -1098,7 +1098,7 @@ def list_suggestions( and empty page_token. Args: - request (google.cloud.dialogflow_v2beta1.types.ListSuggestionsRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.ListSuggestionsRequest, dict]): The request object. The request message for [Participants.ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions]. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -1152,7 +1152,7 @@ def list_suggestions( def compile_suggestion( self, - request: participant.CompileSuggestionRequest = None, + request: Union[participant.CompileSuggestionRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -1175,7 +1175,7 @@ def compile_suggestion( conversation context in the real time. Args: - request (google.cloud.dialogflow_v2beta1.types.CompileSuggestionRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.CompileSuggestionRequest, dict]): The request object. The request message for [Participants.CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion]. retry (google.api_core.retry.Retry): Designation of what errors, if any, diff --git a/google/cloud/dialogflow_v2beta1/services/participants/transports/base.py b/google/cloud/dialogflow_v2beta1/services/participants/transports/base.py index d9a7fc366..012be1e4e 100644 --- a/google/cloud/dialogflow_v2beta1/services/participants/transports/base.py +++ b/google/cloud/dialogflow_v2beta1/services/participants/transports/base.py @@ -121,7 +121,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/dialogflow_v2beta1/services/participants/transports/grpc.py b/google/cloud/dialogflow_v2beta1/services/participants/transports/grpc.py index 3c1fb4929..7ea56fbc2 100644 --- a/google/cloud/dialogflow_v2beta1/services/participants/transports/grpc.py +++ b/google/cloud/dialogflow_v2beta1/services/participants/transports/grpc.py @@ -82,16 +82,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2beta1/services/participants/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2beta1/services/participants/transports/grpc_asyncio.py index 94481365b..a284d77c1 100644 --- a/google/cloud/dialogflow_v2beta1/services/participants/transports/grpc_asyncio.py +++ b/google/cloud/dialogflow_v2beta1/services/participants/transports/grpc_asyncio.py @@ -129,16 +129,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2beta1/services/session_entity_types/client.py b/google/cloud/dialogflow_v2beta1/services/session_entity_types/client.py index 8aff59342..e898ecd4f 100644 --- a/google/cloud/dialogflow_v2beta1/services/session_entity_types/client.py +++ b/google/cloud/dialogflow_v2beta1/services/session_entity_types/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -361,7 +361,7 @@ def __init__( def list_session_entity_types( self, - request: session_entity_type.ListSessionEntityTypesRequest = None, + request: Union[session_entity_type.ListSessionEntityTypesRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -375,7 +375,7 @@ def list_session_entity_types( use session entities with Google Assistant integration. Args: - request (google.cloud.dialogflow_v2beta1.types.ListSessionEntityTypesRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.ListSessionEntityTypesRequest, dict]): The request object. The request message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2beta1.SessionEntityTypes.ListSessionEntityTypes]. parent (str): @@ -457,7 +457,7 @@ def list_session_entity_types( def get_session_entity_type( self, - request: session_entity_type.GetSessionEntityTypeRequest = None, + request: Union[session_entity_type.GetSessionEntityTypeRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -470,7 +470,7 @@ def get_session_entity_type( use session entities with Google Assistant integration. Args: - request (google.cloud.dialogflow_v2beta1.types.GetSessionEntityTypeRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.GetSessionEntityTypeRequest, dict]): The request object. The request message for [SessionEntityTypes.GetSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.GetSessionEntityType]. name (str): @@ -549,7 +549,9 @@ def get_session_entity_type( def create_session_entity_type( self, - request: gcd_session_entity_type.CreateSessionEntityTypeRequest = None, + request: Union[ + gcd_session_entity_type.CreateSessionEntityTypeRequest, dict + ] = None, *, parent: str = None, session_entity_type: gcd_session_entity_type.SessionEntityType = None, @@ -566,7 +568,7 @@ def create_session_entity_type( use session entities with Google Assistant integration. Args: - request (google.cloud.dialogflow_v2beta1.types.CreateSessionEntityTypeRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.CreateSessionEntityTypeRequest, dict]): The request object. The request message for [SessionEntityTypes.CreateSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.CreateSessionEntityType]. parent (str): @@ -658,7 +660,9 @@ def create_session_entity_type( def update_session_entity_type( self, - request: gcd_session_entity_type.UpdateSessionEntityTypeRequest = None, + request: Union[ + gcd_session_entity_type.UpdateSessionEntityTypeRequest, dict + ] = None, *, session_entity_type: gcd_session_entity_type.SessionEntityType = None, update_mask: field_mask_pb2.FieldMask = None, @@ -672,7 +676,7 @@ def update_session_entity_type( use session entities with Google Assistant integration. Args: - request (google.cloud.dialogflow_v2beta1.types.UpdateSessionEntityTypeRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.UpdateSessionEntityTypeRequest, dict]): The request object. The request message for [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.UpdateSessionEntityType]. session_entity_type (google.cloud.dialogflow_v2beta1.types.SessionEntityType): @@ -756,7 +760,7 @@ def update_session_entity_type( def delete_session_entity_type( self, - request: session_entity_type.DeleteSessionEntityTypeRequest = None, + request: Union[session_entity_type.DeleteSessionEntityTypeRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -769,7 +773,7 @@ def delete_session_entity_type( use session entities with Google Assistant integration. Args: - request (google.cloud.dialogflow_v2beta1.types.DeleteSessionEntityTypeRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.DeleteSessionEntityTypeRequest, dict]): The request object. The request message for [SessionEntityTypes.DeleteSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.DeleteSessionEntityType]. name (str): diff --git a/google/cloud/dialogflow_v2beta1/services/session_entity_types/transports/base.py b/google/cloud/dialogflow_v2beta1/services/session_entity_types/transports/base.py index 40887b4ac..7f17aaf12 100644 --- a/google/cloud/dialogflow_v2beta1/services/session_entity_types/transports/base.py +++ b/google/cloud/dialogflow_v2beta1/services/session_entity_types/transports/base.py @@ -124,7 +124,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) 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 27b352a86..af6fb4de9 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,16 +85,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 6a0e5da3a..ff6bb820b 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,16 +132,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2beta1/services/sessions/client.py b/google/cloud/dialogflow_v2beta1/services/sessions/client.py index 320c3babc..f27f16997 100644 --- a/google/cloud/dialogflow_v2beta1/services/sessions/client.py +++ b/google/cloud/dialogflow_v2beta1/services/sessions/client.py @@ -17,17 +17,7 @@ from distutils import util import os import re -from typing import ( - Callable, - Dict, - Optional, - Iterable, - Iterator, - Sequence, - Tuple, - Type, - Union, -) +from typing import Dict, Optional, Iterable, Iterator, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -426,7 +416,7 @@ def __init__( def detect_intent( self, - request: gcd_session.DetectIntentRequest = None, + request: Union[gcd_session.DetectIntentRequest, dict] = None, *, session: str = None, query_input: gcd_session.QueryInput = None, @@ -444,7 +434,7 @@ def detect_intent( environments `__. Args: - request (google.cloud.dialogflow_v2beta1.types.DetectIntentRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.DetectIntentRequest, dict]): The request object. The request to detect user's intent. session (str): Required. The name of the session this query is sent to. diff --git a/google/cloud/dialogflow_v2beta1/services/sessions/transports/base.py b/google/cloud/dialogflow_v2beta1/services/sessions/transports/base.py index 26ea3ea00..eeee66bd9 100644 --- a/google/cloud/dialogflow_v2beta1/services/sessions/transports/base.py +++ b/google/cloud/dialogflow_v2beta1/services/sessions/transports/base.py @@ -121,7 +121,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/dialogflow_v2beta1/services/sessions/transports/grpc.py b/google/cloud/dialogflow_v2beta1/services/sessions/transports/grpc.py index c25069ef7..e0abc222d 100644 --- a/google/cloud/dialogflow_v2beta1/services/sessions/transports/grpc.py +++ b/google/cloud/dialogflow_v2beta1/services/sessions/transports/grpc.py @@ -84,16 +84,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. 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 de984b393..82f0f1e1b 100644 --- a/google/cloud/dialogflow_v2beta1/services/sessions/transports/grpc_asyncio.py +++ b/google/cloud/dialogflow_v2beta1/services/sessions/transports/grpc_asyncio.py @@ -131,16 +131,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2beta1/services/versions/client.py b/google/cloud/dialogflow_v2beta1/services/versions/client.py index 018a89815..40b0118cc 100644 --- a/google/cloud/dialogflow_v2beta1/services/versions/client.py +++ b/google/cloud/dialogflow_v2beta1/services/versions/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -354,7 +354,7 @@ def __init__( def list_versions( self, - request: version.ListVersionsRequest = None, + request: Union[version.ListVersionsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -365,7 +365,7 @@ def list_versions( agent. Args: - request (google.cloud.dialogflow_v2beta1.types.ListVersionsRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.ListVersionsRequest, dict]): The request object. The request message for [Versions.ListVersions][google.cloud.dialogflow.v2beta1.Versions.ListVersions]. parent (str): @@ -438,7 +438,7 @@ def list_versions( def get_version( self, - request: version.GetVersionRequest = None, + request: Union[version.GetVersionRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -448,7 +448,7 @@ def get_version( r"""Retrieves the specified agent version. Args: - request (google.cloud.dialogflow_v2beta1.types.GetVersionRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.GetVersionRequest, dict]): The request object. The request message for [Versions.GetVersion][google.cloud.dialogflow.v2beta1.Versions.GetVersion]. name (str): @@ -530,7 +530,7 @@ def get_version( def create_version( self, - request: gcd_version.CreateVersionRequest = None, + request: Union[gcd_version.CreateVersionRequest, dict] = None, *, parent: str = None, version: gcd_version.Version = None, @@ -543,7 +543,7 @@ def create_version( "default" environment. Args: - request (google.cloud.dialogflow_v2beta1.types.CreateVersionRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.CreateVersionRequest, dict]): The request object. The request message for [Versions.CreateVersion][google.cloud.dialogflow.v2beta1.Versions.CreateVersion]. parent (str): @@ -633,7 +633,7 @@ def create_version( def update_version( self, - request: gcd_version.UpdateVersionRequest = None, + request: Union[gcd_version.UpdateVersionRequest, dict] = None, *, version: gcd_version.Version = None, update_mask: field_mask_pb2.FieldMask = None, @@ -648,7 +648,7 @@ def update_version( version resource. Args: - request (google.cloud.dialogflow_v2beta1.types.UpdateVersionRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.UpdateVersionRequest, dict]): The request object. The request message for [Versions.UpdateVersion][google.cloud.dialogflow.v2beta1.Versions.UpdateVersion]. version (google.cloud.dialogflow_v2beta1.types.Version): @@ -741,7 +741,7 @@ def update_version( def delete_version( self, - request: version.DeleteVersionRequest = None, + request: Union[version.DeleteVersionRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -751,7 +751,7 @@ def delete_version( r"""Delete the specified agent version. Args: - request (google.cloud.dialogflow_v2beta1.types.DeleteVersionRequest): + request (Union[google.cloud.dialogflow_v2beta1.types.DeleteVersionRequest, dict]): The request object. The request message for [Versions.DeleteVersion][google.cloud.dialogflow.v2beta1.Versions.DeleteVersion]. name (str): diff --git a/google/cloud/dialogflow_v2beta1/services/versions/transports/base.py b/google/cloud/dialogflow_v2beta1/services/versions/transports/base.py index 191e0b620..5997854da 100644 --- a/google/cloud/dialogflow_v2beta1/services/versions/transports/base.py +++ b/google/cloud/dialogflow_v2beta1/services/versions/transports/base.py @@ -122,7 +122,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/dialogflow_v2beta1/services/versions/transports/grpc.py b/google/cloud/dialogflow_v2beta1/services/versions/transports/grpc.py index 8f6607b5c..b63e8c128 100644 --- a/google/cloud/dialogflow_v2beta1/services/versions/transports/grpc.py +++ b/google/cloud/dialogflow_v2beta1/services/versions/transports/grpc.py @@ -83,16 +83,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dialogflow_v2beta1/services/versions/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2beta1/services/versions/transports/grpc_asyncio.py index c3738595b..27e7a8e5f 100644 --- a/google/cloud/dialogflow_v2beta1/services/versions/transports/grpc_asyncio.py +++ b/google/cloud/dialogflow_v2beta1/services/versions/transports/grpc_asyncio.py @@ -130,16 +130,16 @@ 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 applicatin default SSL credentials. + ``client_cert_source`` or application 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 ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/scripts/fixup_dialogflow_v2_keywords.py b/scripts/fixup_dialogflow_v2_keywords.py index cc0f68eb9..499bd93a7 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: not a.keyword.value in self.CTRL_PARAMS, + lambda a: a.keyword.value not in self.CTRL_PARAMS, kwargs ) diff --git a/scripts/fixup_dialogflow_v2beta1_keywords.py b/scripts/fixup_dialogflow_v2beta1_keywords.py index 0a8e20f0b..dc332e8f5 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: not a.keyword.value in self.CTRL_PARAMS, + lambda a: a.keyword.value not in self.CTRL_PARAMS, kwargs ) diff --git a/tests/unit/gapic/dialogflow_v2/test_agents.py b/tests/unit/gapic/dialogflow_v2/test_agents.py index 4b4aac70e..fa1c841dd 100644 --- a/tests/unit/gapic/dialogflow_v2/test_agents.py +++ b/tests/unit/gapic/dialogflow_v2/test_agents.py @@ -488,7 +488,7 @@ def test_get_agent(transport: str = "grpc", request_type=agent.GetAgentRequest): avatar_uri="avatar_uri_value", enable_logging=True, match_mode=agent.Agent.MatchMode.MATCH_MODE_HYBRID, - classification_threshold=0.2552, + classification_threshold=0.25520000000000004, api_version=agent.Agent.ApiVersion.API_VERSION_V1, tier=agent.Agent.Tier.TIER_STANDARD, ) @@ -510,7 +510,9 @@ def test_get_agent(transport: str = "grpc", request_type=agent.GetAgentRequest): assert response.avatar_uri == "avatar_uri_value" assert response.enable_logging is True assert response.match_mode == agent.Agent.MatchMode.MATCH_MODE_HYBRID - assert math.isclose(response.classification_threshold, 0.2552, rel_tol=1e-6) + assert math.isclose( + response.classification_threshold, 0.25520000000000004, rel_tol=1e-6 + ) assert response.api_version == agent.Agent.ApiVersion.API_VERSION_V1 assert response.tier == agent.Agent.Tier.TIER_STANDARD @@ -560,7 +562,7 @@ async def test_get_agent_async( avatar_uri="avatar_uri_value", enable_logging=True, match_mode=agent.Agent.MatchMode.MATCH_MODE_HYBRID, - classification_threshold=0.2552, + classification_threshold=0.25520000000000004, api_version=agent.Agent.ApiVersion.API_VERSION_V1, tier=agent.Agent.Tier.TIER_STANDARD, ) @@ -583,7 +585,9 @@ async def test_get_agent_async( assert response.avatar_uri == "avatar_uri_value" assert response.enable_logging is True assert response.match_mode == agent.Agent.MatchMode.MATCH_MODE_HYBRID - assert math.isclose(response.classification_threshold, 0.2552, rel_tol=1e-6) + assert math.isclose( + response.classification_threshold, 0.25520000000000004, rel_tol=1e-6 + ) assert response.api_version == agent.Agent.ApiVersion.API_VERSION_V1 assert response.tier == agent.Agent.Tier.TIER_STANDARD @@ -726,7 +730,7 @@ def test_set_agent(transport: str = "grpc", request_type=gcd_agent.SetAgentReque avatar_uri="avatar_uri_value", enable_logging=True, match_mode=gcd_agent.Agent.MatchMode.MATCH_MODE_HYBRID, - classification_threshold=0.2552, + classification_threshold=0.25520000000000004, api_version=gcd_agent.Agent.ApiVersion.API_VERSION_V1, tier=gcd_agent.Agent.Tier.TIER_STANDARD, ) @@ -748,7 +752,9 @@ def test_set_agent(transport: str = "grpc", request_type=gcd_agent.SetAgentReque assert response.avatar_uri == "avatar_uri_value" assert response.enable_logging is True assert response.match_mode == gcd_agent.Agent.MatchMode.MATCH_MODE_HYBRID - assert math.isclose(response.classification_threshold, 0.2552, rel_tol=1e-6) + assert math.isclose( + response.classification_threshold, 0.25520000000000004, rel_tol=1e-6 + ) assert response.api_version == gcd_agent.Agent.ApiVersion.API_VERSION_V1 assert response.tier == gcd_agent.Agent.Tier.TIER_STANDARD @@ -798,7 +804,7 @@ async def test_set_agent_async( avatar_uri="avatar_uri_value", enable_logging=True, match_mode=gcd_agent.Agent.MatchMode.MATCH_MODE_HYBRID, - classification_threshold=0.2552, + classification_threshold=0.25520000000000004, api_version=gcd_agent.Agent.ApiVersion.API_VERSION_V1, tier=gcd_agent.Agent.Tier.TIER_STANDARD, ) @@ -821,7 +827,9 @@ async def test_set_agent_async( assert response.avatar_uri == "avatar_uri_value" assert response.enable_logging is True assert response.match_mode == gcd_agent.Agent.MatchMode.MATCH_MODE_HYBRID - assert math.isclose(response.classification_threshold, 0.2552, rel_tol=1e-6) + assert math.isclose( + response.classification_threshold, 0.25520000000000004, rel_tol=1e-6 + ) assert response.api_version == gcd_agent.Agent.ApiVersion.API_VERSION_V1 assert response.tier == gcd_agent.Agent.Tier.TIER_STANDARD diff --git a/tests/unit/gapic/dialogflow_v2beta1/test_agents.py b/tests/unit/gapic/dialogflow_v2beta1/test_agents.py index 7321f89ff..499c1a598 100644 --- a/tests/unit/gapic/dialogflow_v2beta1/test_agents.py +++ b/tests/unit/gapic/dialogflow_v2beta1/test_agents.py @@ -488,7 +488,7 @@ def test_get_agent(transport: str = "grpc", request_type=agent.GetAgentRequest): avatar_uri="avatar_uri_value", enable_logging=True, match_mode=agent.Agent.MatchMode.MATCH_MODE_HYBRID, - classification_threshold=0.2552, + classification_threshold=0.25520000000000004, api_version=agent.Agent.ApiVersion.API_VERSION_V1, tier=agent.Agent.Tier.TIER_STANDARD, ) @@ -510,7 +510,9 @@ def test_get_agent(transport: str = "grpc", request_type=agent.GetAgentRequest): assert response.avatar_uri == "avatar_uri_value" assert response.enable_logging is True assert response.match_mode == agent.Agent.MatchMode.MATCH_MODE_HYBRID - assert math.isclose(response.classification_threshold, 0.2552, rel_tol=1e-6) + assert math.isclose( + response.classification_threshold, 0.25520000000000004, rel_tol=1e-6 + ) assert response.api_version == agent.Agent.ApiVersion.API_VERSION_V1 assert response.tier == agent.Agent.Tier.TIER_STANDARD @@ -560,7 +562,7 @@ async def test_get_agent_async( avatar_uri="avatar_uri_value", enable_logging=True, match_mode=agent.Agent.MatchMode.MATCH_MODE_HYBRID, - classification_threshold=0.2552, + classification_threshold=0.25520000000000004, api_version=agent.Agent.ApiVersion.API_VERSION_V1, tier=agent.Agent.Tier.TIER_STANDARD, ) @@ -583,7 +585,9 @@ async def test_get_agent_async( assert response.avatar_uri == "avatar_uri_value" assert response.enable_logging is True assert response.match_mode == agent.Agent.MatchMode.MATCH_MODE_HYBRID - assert math.isclose(response.classification_threshold, 0.2552, rel_tol=1e-6) + assert math.isclose( + response.classification_threshold, 0.25520000000000004, rel_tol=1e-6 + ) assert response.api_version == agent.Agent.ApiVersion.API_VERSION_V1 assert response.tier == agent.Agent.Tier.TIER_STANDARD @@ -726,7 +730,7 @@ def test_set_agent(transport: str = "grpc", request_type=gcd_agent.SetAgentReque avatar_uri="avatar_uri_value", enable_logging=True, match_mode=gcd_agent.Agent.MatchMode.MATCH_MODE_HYBRID, - classification_threshold=0.2552, + classification_threshold=0.25520000000000004, api_version=gcd_agent.Agent.ApiVersion.API_VERSION_V1, tier=gcd_agent.Agent.Tier.TIER_STANDARD, ) @@ -748,7 +752,9 @@ def test_set_agent(transport: str = "grpc", request_type=gcd_agent.SetAgentReque assert response.avatar_uri == "avatar_uri_value" assert response.enable_logging is True assert response.match_mode == gcd_agent.Agent.MatchMode.MATCH_MODE_HYBRID - assert math.isclose(response.classification_threshold, 0.2552, rel_tol=1e-6) + assert math.isclose( + response.classification_threshold, 0.25520000000000004, rel_tol=1e-6 + ) assert response.api_version == gcd_agent.Agent.ApiVersion.API_VERSION_V1 assert response.tier == gcd_agent.Agent.Tier.TIER_STANDARD @@ -798,7 +804,7 @@ async def test_set_agent_async( avatar_uri="avatar_uri_value", enable_logging=True, match_mode=gcd_agent.Agent.MatchMode.MATCH_MODE_HYBRID, - classification_threshold=0.2552, + classification_threshold=0.25520000000000004, api_version=gcd_agent.Agent.ApiVersion.API_VERSION_V1, tier=gcd_agent.Agent.Tier.TIER_STANDARD, ) @@ -821,7 +827,9 @@ async def test_set_agent_async( assert response.avatar_uri == "avatar_uri_value" assert response.enable_logging is True assert response.match_mode == gcd_agent.Agent.MatchMode.MATCH_MODE_HYBRID - assert math.isclose(response.classification_threshold, 0.2552, rel_tol=1e-6) + assert math.isclose( + response.classification_threshold, 0.25520000000000004, rel_tol=1e-6 + ) assert response.api_version == gcd_agent.Agent.ApiVersion.API_VERSION_V1 assert response.tier == gcd_agent.Agent.Tier.TIER_STANDARD