From dd2b2fd345e91fa3da1290f6896ac6b521c2eb7b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 31 Aug 2021 21:38:51 +0000 Subject: [PATCH] docs(v3beta1): clarified LRO types (#161) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 394033461 Source-Link: https://github.com/googleapis/googleapis/commit/aa15f328736501d01fac1d599655c392b5b12a3c Source-Link: https://github.com/googleapis/googleapis-gen/commit/09f16b4e96c14341c51bb78fc39ff35bb4ab4766 docs(v3beta1): fixed incorrect update mask descriptions --- .../services/agents/async_client.py | 11 ++++++++++- .../dialogflowcx_v3beta1/services/agents/client.py | 11 ++++++++++- .../services/agents/transports/grpc.py | 11 ++++++++++- .../services/agents/transports/grpc_asyncio.py | 11 ++++++++++- .../services/flows/async_client.py | 6 +++--- .../dialogflowcx_v3beta1/services/flows/client.py | 6 +++--- .../services/test_cases/async_client.py | 10 +++++++++- .../services/test_cases/client.py | 10 +++++++++- .../services/test_cases/transports/grpc.py | 10 +++++++++- .../services/test_cases/transports/grpc_asyncio.py | 10 +++++++++- google/cloud/dialogflowcx_v3beta1/types/flow.py | 5 +++-- google/cloud/dialogflowcx_v3beta1/types/test_case.py | 5 +++-- 12 files changed, 88 insertions(+), 18 deletions(-) diff --git a/google/cloud/dialogflowcx_v3beta1/services/agents/async_client.py b/google/cloud/dialogflowcx_v3beta1/services/agents/async_client.py index 4c832ba8..a927c973 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/agents/async_client.py +++ b/google/cloud/dialogflowcx_v3beta1/services/agents/async_client.py @@ -608,7 +608,16 @@ async def export_agent( timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: - r"""Exports the specified agent to a binary file. + r"""Exports the specified agent to a binary file. This method is a + `long-running + operation `__. + The returned ``Operation`` type has the following + method-specific fields: + + - ``metadata``: An empty `Struct + message `__ + - ``response``: + [ExportAgentResponse][google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse] Args: request (:class:`google.cloud.dialogflowcx_v3beta1.types.ExportAgentRequest`): diff --git a/google/cloud/dialogflowcx_v3beta1/services/agents/client.py b/google/cloud/dialogflowcx_v3beta1/services/agents/client.py index f406d861..875b108c 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/agents/client.py +++ b/google/cloud/dialogflowcx_v3beta1/services/agents/client.py @@ -873,7 +873,16 @@ def export_agent( timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: - r"""Exports the specified agent to a binary file. + r"""Exports the specified agent to a binary file. This method is a + `long-running + operation `__. + The returned ``Operation`` type has the following + method-specific fields: + + - ``metadata``: An empty `Struct + message `__ + - ``response``: + [ExportAgentResponse][google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse] Args: request (google.cloud.dialogflowcx_v3beta1.types.ExportAgentRequest): diff --git a/google/cloud/dialogflowcx_v3beta1/services/agents/transports/grpc.py b/google/cloud/dialogflowcx_v3beta1/services/agents/transports/grpc.py index 39c6d1b9..58994846 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/agents/transports/grpc.py +++ b/google/cloud/dialogflowcx_v3beta1/services/agents/transports/grpc.py @@ -386,7 +386,16 @@ def export_agent( ) -> Callable[[agent.ExportAgentRequest], operations_pb2.Operation]: r"""Return a callable for the export agent method over gRPC. - Exports the specified agent to a binary file. + Exports the specified agent to a binary file. This method is a + `long-running + operation `__. + The returned ``Operation`` type has the following + method-specific fields: + + - ``metadata``: An empty `Struct + message `__ + - ``response``: + [ExportAgentResponse][google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse] Returns: Callable[[~.ExportAgentRequest], diff --git a/google/cloud/dialogflowcx_v3beta1/services/agents/transports/grpc_asyncio.py b/google/cloud/dialogflowcx_v3beta1/services/agents/transports/grpc_asyncio.py index 195663d9..d9f562df 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/agents/transports/grpc_asyncio.py +++ b/google/cloud/dialogflowcx_v3beta1/services/agents/transports/grpc_asyncio.py @@ -393,7 +393,16 @@ def export_agent( ) -> Callable[[agent.ExportAgentRequest], Awaitable[operations_pb2.Operation]]: r"""Return a callable for the export agent method over gRPC. - Exports the specified agent to a binary file. + Exports the specified agent to a binary file. This method is a + `long-running + operation `__. + The returned ``Operation`` type has the following + method-specific fields: + + - ``metadata``: An empty `Struct + message `__ + - ``response``: + [ExportAgentResponse][google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse] Returns: Callable[[~.ExportAgentRequest], diff --git a/google/cloud/dialogflowcx_v3beta1/services/flows/async_client.py b/google/cloud/dialogflowcx_v3beta1/services/flows/async_client.py index 36aa1327..eed8cb70 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/flows/async_client.py +++ b/google/cloud/dialogflowcx_v3beta1/services/flows/async_client.py @@ -542,9 +542,9 @@ async def update_flow( on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): - Required. The mask to control which fields get updated. - If ``update_mask`` is not specified, an error will be - returned. + The mask to control which fields get + updated. If the mask is not present, all + fields will be updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/google/cloud/dialogflowcx_v3beta1/services/flows/client.py b/google/cloud/dialogflowcx_v3beta1/services/flows/client.py index b4c05ed8..aa2690b0 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/flows/client.py +++ b/google/cloud/dialogflowcx_v3beta1/services/flows/client.py @@ -815,9 +815,9 @@ def update_flow( on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Required. The mask to control which fields get updated. - If ``update_mask`` is not specified, an error will be - returned. + The mask to control which fields get + updated. If the mask is not present, all + fields will be updated. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/google/cloud/dialogflowcx_v3beta1/services/test_cases/async_client.py b/google/cloud/dialogflowcx_v3beta1/services/test_cases/async_client.py index a67d01ce..01d98a12 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/test_cases/async_client.py +++ b/google/cloud/dialogflowcx_v3beta1/services/test_cases/async_client.py @@ -568,7 +568,15 @@ async def run_test_case( timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: - r"""Kicks off a test case run. + r"""Kicks off a test case run. This method is a `long-running + operation `__. + The returned ``Operation`` type has the following + method-specific fields: + + - ``metadata``: + [RunTestCaseMetadata][google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata] + - ``response``: + [RunTestCaseResponse][google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse] Args: request (:class:`google.cloud.dialogflowcx_v3beta1.types.RunTestCaseRequest`): diff --git a/google/cloud/dialogflowcx_v3beta1/services/test_cases/client.py b/google/cloud/dialogflowcx_v3beta1/services/test_cases/client.py index 37fe6b75..e76084ab 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/test_cases/client.py +++ b/google/cloud/dialogflowcx_v3beta1/services/test_cases/client.py @@ -899,7 +899,15 @@ def run_test_case( timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: - r"""Kicks off a test case run. + r"""Kicks off a test case run. This method is a `long-running + operation `__. + The returned ``Operation`` type has the following + method-specific fields: + + - ``metadata``: + [RunTestCaseMetadata][google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata] + - ``response``: + [RunTestCaseResponse][google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse] Args: request (google.cloud.dialogflowcx_v3beta1.types.RunTestCaseRequest): diff --git a/google/cloud/dialogflowcx_v3beta1/services/test_cases/transports/grpc.py b/google/cloud/dialogflowcx_v3beta1/services/test_cases/transports/grpc.py index 6bbaa6e9..aeeeab80 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/test_cases/transports/grpc.py +++ b/google/cloud/dialogflowcx_v3beta1/services/test_cases/transports/grpc.py @@ -382,7 +382,15 @@ def run_test_case( ) -> Callable[[test_case.RunTestCaseRequest], operations_pb2.Operation]: r"""Return a callable for the run test case method over gRPC. - Kicks off a test case run. + Kicks off a test case run. This method is a `long-running + operation `__. + The returned ``Operation`` type has the following + method-specific fields: + + - ``metadata``: + [RunTestCaseMetadata][google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata] + - ``response``: + [RunTestCaseResponse][google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse] Returns: Callable[[~.RunTestCaseRequest], diff --git a/google/cloud/dialogflowcx_v3beta1/services/test_cases/transports/grpc_asyncio.py b/google/cloud/dialogflowcx_v3beta1/services/test_cases/transports/grpc_asyncio.py index a07ff2f2..0a2c2c52 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/test_cases/transports/grpc_asyncio.py +++ b/google/cloud/dialogflowcx_v3beta1/services/test_cases/transports/grpc_asyncio.py @@ -393,7 +393,15 @@ def run_test_case( ) -> Callable[[test_case.RunTestCaseRequest], Awaitable[operations_pb2.Operation]]: r"""Return a callable for the run test case method over gRPC. - Kicks off a test case run. + Kicks off a test case run. This method is a `long-running + operation `__. + The returned ``Operation`` type has the following + method-specific fields: + + - ``metadata``: + [RunTestCaseMetadata][google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata] + - ``response``: + [RunTestCaseResponse][google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse] Returns: Callable[[~.RunTestCaseRequest], diff --git a/google/cloud/dialogflowcx_v3beta1/types/flow.py b/google/cloud/dialogflowcx_v3beta1/types/flow.py index 4e46dcfb..74a7a464 100644 --- a/google/cloud/dialogflowcx_v3beta1/types/flow.py +++ b/google/cloud/dialogflowcx_v3beta1/types/flow.py @@ -322,8 +322,9 @@ class UpdateFlowRequest(proto.Message): flow (google.cloud.dialogflowcx_v3beta1.types.Flow): Required. The flow to update. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Required. The mask to control which fields get updated. If - ``update_mask`` is not specified, an error will be returned. + The mask to control which fields get updated. + If the mask is not present, all fields will be + updated. language_code (str): The language of the following fields in ``flow``: diff --git a/google/cloud/dialogflowcx_v3beta1/types/test_case.py b/google/cloud/dialogflowcx_v3beta1/types/test_case.py index d3c4f950..6ae129db 100644 --- a/google/cloud/dialogflowcx_v3beta1/types/test_case.py +++ b/google/cloud/dialogflowcx_v3beta1/types/test_case.py @@ -224,7 +224,8 @@ class VirtualAgentOutput(proto.Message): diagnostic_info (google.protobuf.struct_pb2.Struct): Required. Input only. The diagnostic [info][Session.DetectIntentResponse.QueryResult.diagnostic_info] - output for the turn. + output for the turn. Required to calculate the testing + coverage. triggered_intent (google.cloud.dialogflowcx_v3beta1.types.Intent): The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that triggered the response. Only name and displayName will be @@ -666,7 +667,7 @@ class RunTestCaseResponse(proto.Message): class RunTestCaseMetadata(proto.Message): r"""Metadata returned for the [TestCases.RunTestCase][google.cloud.dialogflow.cx.v3beta1.TestCases.RunTestCase] - long running operation. + long running operation. This message currently has no fields. """