diff --git a/google/cloud/dialogflow_v2/services/agents/async_client.py b/google/cloud/dialogflow_v2/services/agents/async_client.py index 08fb842af..6991f78e4 100644 --- a/google/cloud/dialogflow_v2/services/agents/async_client.py +++ b/google/cloud/dialogflow_v2/services/agents/async_client.py @@ -248,6 +248,10 @@ async def set_agent( ) -> gcd_agent.Agent: r"""Creates/updates the specified agent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Args: request (:class:`google.cloud.dialogflow_v2.types.SetAgentRequest`): The request object. The request message for @@ -478,8 +482,9 @@ async def train_agent( ) -> operation_async.AsyncOperation: r"""Trains the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (:class:`google.cloud.dialogflow_v2.types.TrainAgentRequest`): @@ -573,9 +578,6 @@ async def export_agent( ) -> operation_async.AsyncOperation: r"""Exports the specified agent to a ZIP file. - Operation - Args: request (:class:`google.cloud.dialogflow_v2.types.ExportAgentRequest`): The request object. The request message for @@ -669,10 +671,13 @@ async def import_agent( and wait for the operation it returns in order to train explicitly. - Operation An operation - which tracks when importing is complete. It only tracks when the - draft agent is updated not when it is done training. + An operation which tracks when importing is complete. It only + tracks when the draft agent is updated not when it is done + training. + + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (:class:`google.cloud.dialogflow_v2.types.ImportAgentRequest`): @@ -753,10 +758,13 @@ async def restore_agent( and wait for the operation it returns in order to train explicitly. - Operation An operation - which tracks when restoring is complete. It only tracks when the - draft agent is updated not when it is done training. + An operation which tracks when restoring is complete. It only + tracks when the draft agent is updated not when it is done + training. + + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (:class:`google.cloud.dialogflow_v2.types.RestoreAgentRequest`): diff --git a/google/cloud/dialogflow_v2/services/agents/client.py b/google/cloud/dialogflow_v2/services/agents/client.py index d591e425d..04f32ce38 100644 --- a/google/cloud/dialogflow_v2/services/agents/client.py +++ b/google/cloud/dialogflow_v2/services/agents/client.py @@ -436,6 +436,10 @@ def set_agent( ) -> gcd_agent.Agent: r"""Creates/updates the specified agent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Args: request (google.cloud.dialogflow_v2.types.SetAgentRequest): The request object. The request message for @@ -666,8 +670,9 @@ def train_agent( ) -> operation.Operation: r"""Trains the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (google.cloud.dialogflow_v2.types.TrainAgentRequest): @@ -761,9 +766,6 @@ def export_agent( ) -> operation.Operation: r"""Exports the specified agent to a ZIP file. - Operation - Args: request (google.cloud.dialogflow_v2.types.ExportAgentRequest): The request object. The request message for @@ -857,10 +859,13 @@ def import_agent( and wait for the operation it returns in order to train explicitly. - Operation An operation - which tracks when importing is complete. It only tracks when the - draft agent is updated not when it is done training. + An operation which tracks when importing is complete. It only + tracks when the draft agent is updated not when it is done + training. + + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (google.cloud.dialogflow_v2.types.ImportAgentRequest): @@ -942,10 +947,13 @@ def restore_agent( and wait for the operation it returns in order to train explicitly. - Operation An operation - which tracks when restoring is complete. It only tracks when the - draft agent is updated not when it is done training. + An operation which tracks when restoring is complete. It only + tracks when the draft agent is updated not when it is done + training. + + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (google.cloud.dialogflow_v2.types.RestoreAgentRequest): diff --git a/google/cloud/dialogflow_v2/services/agents/transports/grpc.py b/google/cloud/dialogflow_v2/services/agents/transports/grpc.py index 281cb014b..b0a615050 100644 --- a/google/cloud/dialogflow_v2/services/agents/transports/grpc.py +++ b/google/cloud/dialogflow_v2/services/agents/transports/grpc.py @@ -271,6 +271,10 @@ def set_agent(self) -> Callable[[gcd_agent.SetAgentRequest], gcd_agent.Agent]: Creates/updates the specified agent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Returns: Callable[[~.SetAgentRequest], ~.Agent]: @@ -353,8 +357,9 @@ def train_agent( Trains the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.TrainAgentRequest], @@ -382,9 +387,6 @@ def export_agent( Exports the specified agent to a ZIP file. - Operation - Returns: Callable[[~.ExportAgentRequest], ~.Operation]: @@ -422,10 +424,13 @@ def import_agent( and wait for the operation it returns in order to train explicitly. - Operation An operation - which tracks when importing is complete. It only tracks when the - draft agent is updated not when it is done training. + An operation which tracks when importing is complete. It only + tracks when the draft agent is updated not when it is done + training. + + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.ImportAgentRequest], @@ -462,10 +467,13 @@ def restore_agent( and wait for the operation it returns in order to train explicitly. - Operation An operation - which tracks when restoring is complete. It only tracks when the - draft agent is updated not when it is done training. + An operation which tracks when restoring is complete. It only + tracks when the draft agent is updated not when it is done + training. + + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.RestoreAgentRequest], diff --git a/google/cloud/dialogflow_v2/services/agents/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2/services/agents/transports/grpc_asyncio.py index 9fb73d4fb..25f36598f 100644 --- a/google/cloud/dialogflow_v2/services/agents/transports/grpc_asyncio.py +++ b/google/cloud/dialogflow_v2/services/agents/transports/grpc_asyncio.py @@ -278,6 +278,10 @@ def set_agent( Creates/updates the specified agent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Returns: Callable[[~.SetAgentRequest], Awaitable[~.Agent]]: @@ -362,8 +366,9 @@ def train_agent( Trains the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.TrainAgentRequest], @@ -391,9 +396,6 @@ def export_agent( Exports the specified agent to a ZIP file. - Operation - Returns: Callable[[~.ExportAgentRequest], Awaitable[~.Operation]]: @@ -431,10 +433,13 @@ def import_agent( and wait for the operation it returns in order to train explicitly. - Operation An operation - which tracks when importing is complete. It only tracks when the - draft agent is updated not when it is done training. + An operation which tracks when importing is complete. It only + tracks when the draft agent is updated not when it is done + training. + + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.ImportAgentRequest], @@ -471,10 +476,13 @@ def restore_agent( and wait for the operation it returns in order to train explicitly. - Operation An operation - which tracks when restoring is complete. It only tracks when the - draft agent is updated not when it is done training. + An operation which tracks when restoring is complete. It only + tracks when the draft agent is updated not when it is done + training. + + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.RestoreAgentRequest], diff --git a/google/cloud/dialogflow_v2/services/entity_types/async_client.py b/google/cloud/dialogflow_v2/services/entity_types/async_client.py index 7f9e934cc..42f3f2e60 100644 --- a/google/cloud/dialogflow_v2/services/entity_types/async_client.py +++ b/google/cloud/dialogflow_v2/services/entity_types/async_client.py @@ -368,6 +368,10 @@ async def create_entity_type( ) -> gcd_entity_type.EntityType: r"""Creates an entity type in the specified agent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Args: request (:class:`google.cloud.dialogflow_v2.types.CreateEntityTypeRequest`): The request object. The request message for @@ -472,6 +476,10 @@ async def update_entity_type( ) -> gcd_entity_type.EntityType: r"""Updates the specified entity type. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Args: request (:class:`google.cloud.dialogflow_v2.types.UpdateEntityTypeRequest`): The request object. The request message for @@ -568,6 +576,10 @@ async def delete_entity_type( ) -> None: r"""Deletes the specified entity type. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Args: request (:class:`google.cloud.dialogflow_v2.types.DeleteEntityTypeRequest`): The request object. The request message for @@ -631,8 +643,9 @@ async def batch_update_entity_types( ) -> operation_async.AsyncOperation: r"""Updates/Creates multiple entity types in the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (:class:`google.cloud.dialogflow_v2.types.BatchUpdateEntityTypesRequest`): @@ -697,8 +710,9 @@ async def batch_delete_entity_types( ) -> operation_async.AsyncOperation: r"""Deletes entity types in the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (:class:`google.cloud.dialogflow_v2.types.BatchDeleteEntityTypesRequest`): @@ -803,8 +817,9 @@ async def batch_create_entities( ) -> operation_async.AsyncOperation: r"""Creates multiple new entities in the specified entity type. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (:class:`google.cloud.dialogflow_v2.types.BatchCreateEntitiesRequest`): @@ -922,8 +937,9 @@ async def batch_update_entities( type. This method does not affect entities in the entity type that aren't explicitly specified in the request. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (:class:`google.cloud.dialogflow_v2.types.BatchUpdateEntitiesRequest`): @@ -1041,8 +1057,9 @@ async def batch_delete_entities( ) -> operation_async.AsyncOperation: r"""Deletes entities in the specified entity type. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (:class:`google.cloud.dialogflow_v2.types.BatchDeleteEntitiesRequest`): diff --git a/google/cloud/dialogflow_v2/services/entity_types/client.py b/google/cloud/dialogflow_v2/services/entity_types/client.py index 4eaf70536..3027aa3b1 100644 --- a/google/cloud/dialogflow_v2/services/entity_types/client.py +++ b/google/cloud/dialogflow_v2/services/entity_types/client.py @@ -554,6 +554,10 @@ def create_entity_type( ) -> gcd_entity_type.EntityType: r"""Creates an entity type in the specified agent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Args: request (google.cloud.dialogflow_v2.types.CreateEntityTypeRequest): The request object. The request message for @@ -658,6 +662,10 @@ def update_entity_type( ) -> gcd_entity_type.EntityType: r"""Updates the specified entity type. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Args: request (google.cloud.dialogflow_v2.types.UpdateEntityTypeRequest): The request object. The request message for @@ -754,6 +762,10 @@ def delete_entity_type( ) -> None: r"""Deletes the specified entity type. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Args: request (google.cloud.dialogflow_v2.types.DeleteEntityTypeRequest): The request object. The request message for @@ -817,8 +829,9 @@ def batch_update_entity_types( ) -> operation.Operation: r"""Updates/Creates multiple entity types in the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (google.cloud.dialogflow_v2.types.BatchUpdateEntityTypesRequest): @@ -886,8 +899,9 @@ def batch_delete_entity_types( ) -> operation.Operation: r"""Deletes entity types in the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (google.cloud.dialogflow_v2.types.BatchDeleteEntityTypesRequest): @@ -994,8 +1008,9 @@ def batch_create_entities( ) -> operation.Operation: r"""Creates multiple new entities in the specified entity type. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (google.cloud.dialogflow_v2.types.BatchCreateEntitiesRequest): @@ -1113,8 +1128,9 @@ def batch_update_entities( type. This method does not affect entities in the entity type that aren't explicitly specified in the request. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (google.cloud.dialogflow_v2.types.BatchUpdateEntitiesRequest): @@ -1232,8 +1248,9 @@ def batch_delete_entities( ) -> operation.Operation: r"""Deletes entities in the specified entity type. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (google.cloud.dialogflow_v2.types.BatchDeleteEntitiesRequest): 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 c486c108d..9f9a99a42 100644 --- a/google/cloud/dialogflow_v2/services/entity_types/transports/grpc.py +++ b/google/cloud/dialogflow_v2/services/entity_types/transports/grpc.py @@ -306,6 +306,10 @@ def create_entity_type( Creates an entity type in the specified agent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Returns: Callable[[~.CreateEntityTypeRequest], ~.EntityType]: @@ -334,6 +338,10 @@ def update_entity_type( Updates the specified entity type. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Returns: Callable[[~.UpdateEntityTypeRequest], ~.EntityType]: @@ -360,6 +368,10 @@ def delete_entity_type( Deletes the specified entity type. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Returns: Callable[[~.DeleteEntityTypeRequest], ~.Empty]: @@ -388,8 +400,9 @@ def batch_update_entity_types( Updates/Creates multiple entity types in the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchUpdateEntityTypesRequest], @@ -419,8 +432,9 @@ def batch_delete_entity_types( Deletes entity types in the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchDeleteEntityTypesRequest], @@ -448,8 +462,9 @@ def batch_create_entities( Creates multiple new entities in the specified entity type. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchCreateEntitiesRequest], @@ -479,8 +494,9 @@ def batch_update_entities( type. This method does not affect entities in the entity type that aren't explicitly specified in the request. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchUpdateEntitiesRequest], @@ -508,8 +524,9 @@ def batch_delete_entities( Deletes entities in the specified entity type. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchDeleteEntitiesRequest], diff --git a/google/cloud/dialogflow_v2/services/entity_types/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2/services/entity_types/transports/grpc_asyncio.py index 35b60cea1..2086ed18f 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 @@ -314,6 +314,10 @@ def create_entity_type( Creates an entity type in the specified agent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Returns: Callable[[~.CreateEntityTypeRequest], Awaitable[~.EntityType]]: @@ -342,6 +346,10 @@ def update_entity_type( Updates the specified entity type. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Returns: Callable[[~.UpdateEntityTypeRequest], Awaitable[~.EntityType]]: @@ -368,6 +376,10 @@ def delete_entity_type( Deletes the specified entity type. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Returns: Callable[[~.DeleteEntityTypeRequest], Awaitable[~.Empty]]: @@ -396,8 +408,9 @@ def batch_update_entity_types( Updates/Creates multiple entity types in the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchUpdateEntityTypesRequest], @@ -427,8 +440,9 @@ def batch_delete_entity_types( Deletes entity types in the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchDeleteEntityTypesRequest], @@ -458,8 +472,9 @@ def batch_create_entities( Creates multiple new entities in the specified entity type. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchCreateEntitiesRequest], @@ -491,8 +506,9 @@ def batch_update_entities( type. This method does not affect entities in the entity type that aren't explicitly specified in the request. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchUpdateEntitiesRequest], @@ -522,8 +538,9 @@ def batch_delete_entities( Deletes entities in the specified entity type. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchDeleteEntitiesRequest], diff --git a/google/cloud/dialogflow_v2/services/environments/async_client.py b/google/cloud/dialogflow_v2/services/environments/async_client.py index 0c7a9d8de..e5bdcf92a 100644 --- a/google/cloud/dialogflow_v2/services/environments/async_client.py +++ b/google/cloud/dialogflow_v2/services/environments/async_client.py @@ -49,6 +49,8 @@ class EnvironmentsAsyncClient: parse_environment_path = staticmethod(EnvironmentsClient.parse_environment_path) fulfillment_path = staticmethod(EnvironmentsClient.fulfillment_path) parse_fulfillment_path = staticmethod(EnvironmentsClient.parse_fulfillment_path) + version_path = staticmethod(EnvironmentsClient.version_path) + parse_version_path = staticmethod(EnvironmentsClient.parse_version_path) common_billing_account_path = staticmethod( EnvironmentsClient.common_billing_account_path ) diff --git a/google/cloud/dialogflow_v2/services/environments/client.py b/google/cloud/dialogflow_v2/services/environments/client.py index 705c558f3..bc0ecbe51 100644 --- a/google/cloud/dialogflow_v2/services/environments/client.py +++ b/google/cloud/dialogflow_v2/services/environments/client.py @@ -183,6 +183,21 @@ def parse_fulfillment_path(path: str) -> Dict[str, str]: m = re.match(r"^projects/(?P.+?)/agent/fulfillment$", path) return m.groupdict() if m else {} + @staticmethod + def version_path(project: str, version: str,) -> str: + """Returns a fully-qualified version string.""" + return "projects/{project}/agent/versions/{version}".format( + project=project, version=version, + ) + + @staticmethod + def parse_version_path(path: str) -> Dict[str, str]: + """Parses a version path into its component segments.""" + m = re.match( + r"^projects/(?P.+?)/agent/versions/(?P.+?)$", path + ) + return m.groupdict() if m else {} + @staticmethod def common_billing_account_path(billing_account: str,) -> str: """Returns a fully-qualified billing_account string.""" diff --git a/google/cloud/dialogflow_v2/services/intents/async_client.py b/google/cloud/dialogflow_v2/services/intents/async_client.py index e4667feac..9f75c3f06 100644 --- a/google/cloud/dialogflow_v2/services/intents/async_client.py +++ b/google/cloud/dialogflow_v2/services/intents/async_client.py @@ -371,6 +371,10 @@ async def create_intent( ) -> gcd_intent.Intent: r"""Creates an intent in the specified agent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Args: request (:class:`google.cloud.dialogflow_v2.types.CreateIntentRequest`): The request object. The request message for @@ -472,6 +476,10 @@ async def update_intent( ) -> gcd_intent.Intent: r"""Updates the specified intent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Args: request (:class:`google.cloud.dialogflow_v2.types.UpdateIntentRequest`): The request object. The request message for @@ -571,8 +579,12 @@ async def delete_intent( timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), ) -> None: - r"""Deletes the specified intent and its direct or - indirect followup intents. + r"""Deletes the specified intent and its direct or indirect followup + intents. + + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (:class:`google.cloud.dialogflow_v2.types.DeleteIntentRequest`): @@ -642,8 +654,9 @@ async def batch_update_intents( ) -> operation_async.AsyncOperation: r"""Updates/Creates multiple intents in the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (:class:`google.cloud.dialogflow_v2.types.BatchUpdateIntentsRequest`): @@ -750,8 +763,9 @@ async def batch_delete_intents( ) -> operation_async.AsyncOperation: r"""Deletes intents in the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (:class:`google.cloud.dialogflow_v2.types.BatchDeleteIntentsRequest`): diff --git a/google/cloud/dialogflow_v2/services/intents/client.py b/google/cloud/dialogflow_v2/services/intents/client.py index 996568e67..0610f196c 100644 --- a/google/cloud/dialogflow_v2/services/intents/client.py +++ b/google/cloud/dialogflow_v2/services/intents/client.py @@ -573,6 +573,10 @@ def create_intent( ) -> gcd_intent.Intent: r"""Creates an intent in the specified agent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Args: request (google.cloud.dialogflow_v2.types.CreateIntentRequest): The request object. The request message for @@ -674,6 +678,10 @@ def update_intent( ) -> gcd_intent.Intent: r"""Updates the specified intent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Args: request (google.cloud.dialogflow_v2.types.UpdateIntentRequest): The request object. The request message for @@ -773,8 +781,12 @@ def delete_intent( timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), ) -> None: - r"""Deletes the specified intent and its direct or - indirect followup intents. + r"""Deletes the specified intent and its direct or indirect followup + intents. + + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (google.cloud.dialogflow_v2.types.DeleteIntentRequest): @@ -844,8 +856,9 @@ def batch_update_intents( ) -> operation.Operation: r"""Updates/Creates multiple intents in the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (google.cloud.dialogflow_v2.types.BatchUpdateIntentsRequest): @@ -952,8 +965,9 @@ def batch_delete_intents( ) -> operation.Operation: r"""Deletes intents in the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Args: request (google.cloud.dialogflow_v2.types.BatchDeleteIntentsRequest): diff --git a/google/cloud/dialogflow_v2/services/intents/transports/grpc.py b/google/cloud/dialogflow_v2/services/intents/transports/grpc.py index ce1c9d409..830a962e9 100644 --- a/google/cloud/dialogflow_v2/services/intents/transports/grpc.py +++ b/google/cloud/dialogflow_v2/services/intents/transports/grpc.py @@ -299,6 +299,10 @@ def create_intent( Creates an intent in the specified agent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Returns: Callable[[~.CreateIntentRequest], ~.Intent]: @@ -325,6 +329,10 @@ def update_intent( Updates the specified intent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Returns: Callable[[~.UpdateIntentRequest], ~.Intent]: @@ -347,8 +355,12 @@ def update_intent( def delete_intent(self) -> Callable[[intent.DeleteIntentRequest], empty_pb2.Empty]: r"""Return a callable for the delete intent method over gRPC. - Deletes the specified intent and its direct or - indirect followup intents. + Deletes the specified intent and its direct or indirect followup + intents. + + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.DeleteIntentRequest], @@ -376,8 +388,9 @@ def batch_update_intents( Updates/Creates multiple intents in the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchUpdateIntentsRequest], @@ -405,8 +418,9 @@ def batch_delete_intents( Deletes intents in the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchDeleteIntentsRequest], diff --git a/google/cloud/dialogflow_v2/services/intents/transports/grpc_asyncio.py b/google/cloud/dialogflow_v2/services/intents/transports/grpc_asyncio.py index 35838fa40..b5d40fb06 100644 --- a/google/cloud/dialogflow_v2/services/intents/transports/grpc_asyncio.py +++ b/google/cloud/dialogflow_v2/services/intents/transports/grpc_asyncio.py @@ -306,6 +306,10 @@ def create_intent( Creates an intent in the specified agent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Returns: Callable[[~.CreateIntentRequest], Awaitable[~.Intent]]: @@ -332,6 +336,10 @@ def update_intent( Updates the specified intent. + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. + Returns: Callable[[~.UpdateIntentRequest], Awaitable[~.Intent]]: @@ -356,8 +364,12 @@ def delete_intent( ) -> Callable[[intent.DeleteIntentRequest], Awaitable[empty_pb2.Empty]]: r"""Return a callable for the delete intent method over gRPC. - Deletes the specified intent and its direct or - indirect followup intents. + Deletes the specified intent and its direct or indirect followup + intents. + + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.DeleteIntentRequest], @@ -387,8 +399,9 @@ def batch_update_intents( Updates/Creates multiple intents in the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchUpdateIntentsRequest], @@ -418,8 +431,9 @@ def batch_delete_intents( Deletes intents in the specified agent. - Operation + Note: You should always train an agent prior to sending it + queries. See the `training + documentation `__. Returns: Callable[[~.BatchDeleteIntentsRequest], diff --git a/google/cloud/dialogflow_v2/types/environment.py b/google/cloud/dialogflow_v2/types/environment.py index 204524dc7..a6fbecad3 100644 --- a/google/cloud/dialogflow_v2/types/environment.py +++ b/google/cloud/dialogflow_v2/types/environment.py @@ -72,7 +72,7 @@ class Environment(proto.Message): characters. If exceeded, the request is rejected. agent_version (str): - Optional. The agent version loaded into this environment. + Required. The agent version loaded into this environment. Supported formats: - ``projects//agent/versions/`` diff --git a/tests/unit/gapic/dialogflow_v2/test_environments.py b/tests/unit/gapic/dialogflow_v2/test_environments.py index 685e71673..c70b9b042 100644 --- a/tests/unit/gapic/dialogflow_v2/test_environments.py +++ b/tests/unit/gapic/dialogflow_v2/test_environments.py @@ -2334,8 +2334,30 @@ def test_parse_fulfillment_path(): assert expected == actual +def test_version_path(): + project = "cuttlefish" + version = "mussel" + expected = "projects/{project}/agent/versions/{version}".format( + project=project, version=version, + ) + actual = EnvironmentsClient.version_path(project, version) + assert expected == actual + + +def test_parse_version_path(): + expected = { + "project": "winkle", + "version": "nautilus", + } + path = EnvironmentsClient.version_path(**expected) + + # Check that the path construction is reversible. + actual = EnvironmentsClient.parse_version_path(path) + assert expected == actual + + def test_common_billing_account_path(): - billing_account = "cuttlefish" + billing_account = "scallop" expected = "billingAccounts/{billing_account}".format( billing_account=billing_account, ) @@ -2345,7 +2367,7 @@ def test_common_billing_account_path(): def test_parse_common_billing_account_path(): expected = { - "billing_account": "mussel", + "billing_account": "abalone", } path = EnvironmentsClient.common_billing_account_path(**expected) @@ -2355,7 +2377,7 @@ def test_parse_common_billing_account_path(): def test_common_folder_path(): - folder = "winkle" + folder = "squid" expected = "folders/{folder}".format(folder=folder,) actual = EnvironmentsClient.common_folder_path(folder) assert expected == actual @@ -2363,7 +2385,7 @@ def test_common_folder_path(): def test_parse_common_folder_path(): expected = { - "folder": "nautilus", + "folder": "clam", } path = EnvironmentsClient.common_folder_path(**expected) @@ -2373,7 +2395,7 @@ def test_parse_common_folder_path(): def test_common_organization_path(): - organization = "scallop" + organization = "whelk" expected = "organizations/{organization}".format(organization=organization,) actual = EnvironmentsClient.common_organization_path(organization) assert expected == actual @@ -2381,7 +2403,7 @@ def test_common_organization_path(): def test_parse_common_organization_path(): expected = { - "organization": "abalone", + "organization": "octopus", } path = EnvironmentsClient.common_organization_path(**expected) @@ -2391,7 +2413,7 @@ def test_parse_common_organization_path(): def test_common_project_path(): - project = "squid" + project = "oyster" expected = "projects/{project}".format(project=project,) actual = EnvironmentsClient.common_project_path(project) assert expected == actual @@ -2399,7 +2421,7 @@ def test_common_project_path(): def test_parse_common_project_path(): expected = { - "project": "clam", + "project": "nudibranch", } path = EnvironmentsClient.common_project_path(**expected) @@ -2409,8 +2431,8 @@ def test_parse_common_project_path(): def test_common_location_path(): - project = "whelk" - location = "octopus" + project = "cuttlefish" + location = "mussel" expected = "projects/{project}/locations/{location}".format( project=project, location=location, ) @@ -2420,8 +2442,8 @@ def test_common_location_path(): def test_parse_common_location_path(): expected = { - "project": "oyster", - "location": "nudibranch", + "project": "winkle", + "location": "nautilus", } path = EnvironmentsClient.common_location_path(**expected)