Skip to content

Commit 03cb6f3

Browse files
docs: clarified some LRO types (#387)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 394490143 Source-Link: googleapis/googleapis@e3c419f Source-Link: googleapis/googleapis-gen@c73fc0d
1 parent 8da5bd6 commit 03cb6f3

File tree

32 files changed

+1268
-92
lines changed

32 files changed

+1268
-92
lines changed

packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/agents/async_client.py

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,16 @@ async def train_agent(
482482
) -> operation_async.AsyncOperation:
483483
r"""Trains the specified agent.
484484
485+
This method is a `long-running
486+
operation <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>`__.
487+
The returned ``Operation`` type has the following
488+
method-specific fields:
489+
490+
- ``metadata``: An empty `Struct
491+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct>`__
492+
- ``response``: An `Empty
493+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty>`__
494+
485495
Note: You should always train an agent prior to sending it
486496
queries. See the `training
487497
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
@@ -578,6 +588,16 @@ async def export_agent(
578588
) -> operation_async.AsyncOperation:
579589
r"""Exports the specified agent to a ZIP file.
580590
591+
This method is a `long-running
592+
operation <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>`__.
593+
The returned ``Operation`` type has the following
594+
method-specific fields:
595+
596+
- ``metadata``: An empty `Struct
597+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct>`__
598+
- ``response``:
599+
[ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]
600+
581601
Args:
582602
request (:class:`google.cloud.dialogflow_v2.types.ExportAgentRequest`):
583603
The request object. The request message for
@@ -671,9 +691,18 @@ async def import_agent(
671691
and wait for the operation it returns in order to train
672692
explicitly.
673693
674-
An operation which tracks when importing is complete. It only
675-
tracks when the draft agent is updated not when it is done
676-
training.
694+
This method is a `long-running
695+
operation <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>`__.
696+
The returned ``Operation`` type has the following
697+
method-specific fields:
698+
699+
- ``metadata``: An empty `Struct
700+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct>`__
701+
- ``response``: An `Empty
702+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty>`__
703+
704+
The operation only tracks when importing is complete, not when
705+
it is done training.
677706
678707
Note: You should always train an agent prior to sending it
679708
queries. See the `training
@@ -758,9 +787,18 @@ async def restore_agent(
758787
and wait for the operation it returns in order to train
759788
explicitly.
760789
761-
An operation which tracks when restoring is complete. It only
762-
tracks when the draft agent is updated not when it is done
763-
training.
790+
This method is a `long-running
791+
operation <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>`__.
792+
The returned ``Operation`` type has the following
793+
method-specific fields:
794+
795+
- ``metadata``: An empty `Struct
796+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct>`__
797+
- ``response``: An `Empty
798+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty>`__
799+
800+
The operation only tracks when restoring is complete, not when
801+
it is done training.
764802
765803
Note: You should always train an agent prior to sending it
766804
queries. See the `training

packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/agents/client.py

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,16 @@ def train_agent(
674674
) -> operation.Operation:
675675
r"""Trains the specified agent.
676676
677+
This method is a `long-running
678+
operation <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>`__.
679+
The returned ``Operation`` type has the following
680+
method-specific fields:
681+
682+
- ``metadata``: An empty `Struct
683+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct>`__
684+
- ``response``: An `Empty
685+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty>`__
686+
677687
Note: You should always train an agent prior to sending it
678688
queries. See the `training
679689
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
@@ -770,6 +780,16 @@ def export_agent(
770780
) -> operation.Operation:
771781
r"""Exports the specified agent to a ZIP file.
772782
783+
This method is a `long-running
784+
operation <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>`__.
785+
The returned ``Operation`` type has the following
786+
method-specific fields:
787+
788+
- ``metadata``: An empty `Struct
789+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct>`__
790+
- ``response``:
791+
[ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]
792+
773793
Args:
774794
request (google.cloud.dialogflow_v2.types.ExportAgentRequest):
775795
The request object. The request message for
@@ -863,9 +883,18 @@ def import_agent(
863883
and wait for the operation it returns in order to train
864884
explicitly.
865885
866-
An operation which tracks when importing is complete. It only
867-
tracks when the draft agent is updated not when it is done
868-
training.
886+
This method is a `long-running
887+
operation <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>`__.
888+
The returned ``Operation`` type has the following
889+
method-specific fields:
890+
891+
- ``metadata``: An empty `Struct
892+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct>`__
893+
- ``response``: An `Empty
894+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty>`__
895+
896+
The operation only tracks when importing is complete, not when
897+
it is done training.
869898
870899
Note: You should always train an agent prior to sending it
871900
queries. See the `training
@@ -951,9 +980,18 @@ def restore_agent(
951980
and wait for the operation it returns in order to train
952981
explicitly.
953982
954-
An operation which tracks when restoring is complete. It only
955-
tracks when the draft agent is updated not when it is done
956-
training.
983+
This method is a `long-running
984+
operation <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>`__.
985+
The returned ``Operation`` type has the following
986+
method-specific fields:
987+
988+
- ``metadata``: An empty `Struct
989+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct>`__
990+
- ``response``: An `Empty
991+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty>`__
992+
993+
The operation only tracks when restoring is complete, not when
994+
it is done training.
957995
958996
Note: You should always train an agent prior to sending it
959997
queries. See the `training

packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/agents/transports/grpc.py

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,16 @@ def train_agent(
361361
362362
Trains the specified agent.
363363
364+
This method is a `long-running
365+
operation <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>`__.
366+
The returned ``Operation`` type has the following
367+
method-specific fields:
368+
369+
- ``metadata``: An empty `Struct
370+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct>`__
371+
- ``response``: An `Empty
372+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty>`__
373+
364374
Note: You should always train an agent prior to sending it
365375
queries. See the `training
366376
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
@@ -391,6 +401,16 @@ def export_agent(
391401
392402
Exports the specified agent to a ZIP file.
393403
404+
This method is a `long-running
405+
operation <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>`__.
406+
The returned ``Operation`` type has the following
407+
method-specific fields:
408+
409+
- ``metadata``: An empty `Struct
410+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct>`__
411+
- ``response``:
412+
[ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]
413+
394414
Returns:
395415
Callable[[~.ExportAgentRequest],
396416
~.Operation]:
@@ -428,9 +448,18 @@ def import_agent(
428448
and wait for the operation it returns in order to train
429449
explicitly.
430450
431-
An operation which tracks when importing is complete. It only
432-
tracks when the draft agent is updated not when it is done
433-
training.
451+
This method is a `long-running
452+
operation <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>`__.
453+
The returned ``Operation`` type has the following
454+
method-specific fields:
455+
456+
- ``metadata``: An empty `Struct
457+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct>`__
458+
- ``response``: An `Empty
459+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty>`__
460+
461+
The operation only tracks when importing is complete, not when
462+
it is done training.
434463
435464
Note: You should always train an agent prior to sending it
436465
queries. See the `training
@@ -471,9 +500,18 @@ def restore_agent(
471500
and wait for the operation it returns in order to train
472501
explicitly.
473502
474-
An operation which tracks when restoring is complete. It only
475-
tracks when the draft agent is updated not when it is done
476-
training.
503+
This method is a `long-running
504+
operation <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>`__.
505+
The returned ``Operation`` type has the following
506+
method-specific fields:
507+
508+
- ``metadata``: An empty `Struct
509+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct>`__
510+
- ``response``: An `Empty
511+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty>`__
512+
513+
The operation only tracks when restoring is complete, not when
514+
it is done training.
477515
478516
Note: You should always train an agent prior to sending it
479517
queries. See the `training

packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/agents/transports/grpc_asyncio.py

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,16 @@ def train_agent(
370370
371371
Trains the specified agent.
372372
373+
This method is a `long-running
374+
operation <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>`__.
375+
The returned ``Operation`` type has the following
376+
method-specific fields:
377+
378+
- ``metadata``: An empty `Struct
379+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct>`__
380+
- ``response``: An `Empty
381+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty>`__
382+
373383
Note: You should always train an agent prior to sending it
374384
queries. See the `training
375385
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
@@ -400,6 +410,16 @@ def export_agent(
400410
401411
Exports the specified agent to a ZIP file.
402412
413+
This method is a `long-running
414+
operation <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>`__.
415+
The returned ``Operation`` type has the following
416+
method-specific fields:
417+
418+
- ``metadata``: An empty `Struct
419+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct>`__
420+
- ``response``:
421+
[ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]
422+
403423
Returns:
404424
Callable[[~.ExportAgentRequest],
405425
Awaitable[~.Operation]]:
@@ -437,9 +457,18 @@ def import_agent(
437457
and wait for the operation it returns in order to train
438458
explicitly.
439459
440-
An operation which tracks when importing is complete. It only
441-
tracks when the draft agent is updated not when it is done
442-
training.
460+
This method is a `long-running
461+
operation <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>`__.
462+
The returned ``Operation`` type has the following
463+
method-specific fields:
464+
465+
- ``metadata``: An empty `Struct
466+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct>`__
467+
- ``response``: An `Empty
468+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty>`__
469+
470+
The operation only tracks when importing is complete, not when
471+
it is done training.
443472
444473
Note: You should always train an agent prior to sending it
445474
queries. See the `training
@@ -480,9 +509,18 @@ def restore_agent(
480509
and wait for the operation it returns in order to train
481510
explicitly.
482511
483-
An operation which tracks when restoring is complete. It only
484-
tracks when the draft agent is updated not when it is done
485-
training.
512+
This method is a `long-running
513+
operation <https://cloud.google.com/dialogflow/es/docs/how/long-running-operations>`__.
514+
The returned ``Operation`` type has the following
515+
method-specific fields:
516+
517+
- ``metadata``: An empty `Struct
518+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct>`__
519+
- ``response``: An `Empty
520+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty>`__
521+
522+
The operation only tracks when restoring is complete, not when
523+
it is done training.
486524
487525
Note: You should always train an agent prior to sending it
488526
queries. See the `training

packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/services/documents/async_client.py

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,14 @@ async def create_document(
334334
) -> operation_async.AsyncOperation:
335335
r"""Creates a new document.
336336
337-
Operation <response:
338-
[Document][google.cloud.dialogflow.v2.Document], metadata:
339-
[KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]>
337+
This method is a `long-running
338+
operation <https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation>`__.
339+
The returned ``Operation`` type has the following
340+
method-specific fields:
341+
342+
- ``metadata``:
343+
[KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
344+
- ``response``: [Document][google.cloud.dialogflow.v2.Document]
340345
341346
Args:
342347
request (:class:`google.cloud.dialogflow_v2.types.CreateDocumentRequest`):
@@ -436,9 +441,15 @@ async def delete_document(
436441
) -> operation_async.AsyncOperation:
437442
r"""Deletes the specified document.
438443
439-
Operation <response:
440-
[google.protobuf.Empty][google.protobuf.Empty], metadata:
441-
[KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]>
444+
This method is a `long-running
445+
operation <https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation>`__.
446+
The returned ``Operation`` type has the following
447+
method-specific fields:
448+
449+
- ``metadata``:
450+
[KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
451+
- ``response``: An `Empty
452+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty>`__
442453
443454
Args:
444455
request (:class:`google.cloud.dialogflow_v2.types.DeleteDocumentRequest`):
@@ -533,9 +544,14 @@ async def update_document(
533544
) -> operation_async.AsyncOperation:
534545
r"""Updates the specified document.
535546
536-
Operation <response:
537-
[Document][google.cloud.dialogflow.v2.Document], metadata:
538-
[KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]>
547+
This method is a `long-running
548+
operation <https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation>`__.
549+
The returned ``Operation`` type has the following
550+
method-specific fields:
551+
552+
- ``metadata``:
553+
[KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
554+
- ``response``: [Document][google.cloud.dialogflow.v2.Document]
539555
540556
Args:
541557
request (:class:`google.cloud.dialogflow_v2.types.UpdateDocumentRequest`):
@@ -642,13 +658,18 @@ async def reload_document(
642658
document has not changed, there still may be side effects
643659
because of internal implementation changes.
644660
661+
This method is a `long-running
662+
operation <https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation>`__.
663+
The returned ``Operation`` type has the following
664+
method-specific fields:
665+
666+
- ``metadata``:
667+
[KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
668+
- ``response``: [Document][google.cloud.dialogflow.v2.Document]
669+
645670
Note: The ``projects.agent.knowledgeBases.documents`` resource
646671
is deprecated; only use ``projects.knowledgeBases.documents``.
647672
648-
Operation <response:
649-
[Document][google.cloud.dialogflow.v2.Document], metadata:
650-
[KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]>
651-
652673
Args:
653674
request (:class:`google.cloud.dialogflow_v2.types.ReloadDocumentRequest`):
654675
The request object. Request message for

0 commit comments

Comments
 (0)