@@ -230,6 +230,25 @@ async def list_agents(
230230 r"""Returns the list of all agents in the specified
231231 location.
232232
233+
234+ .. code-block::
235+
236+ from google.cloud import dialogflowcx_v3
237+
238+ def sample_list_agents():
239+ # Create a client
240+ client = dialogflowcx_v3.AgentsClient()
241+
242+ # Initialize request argument(s)
243+ request = dialogflowcx_v3.ListAgentsRequest(
244+ parent="parent_value",
245+ )
246+
247+ # Make the request
248+ page_result = client.list_agents(request=request)
249+ for response in page_result:
250+ print(response)
251+
233252 Args:
234253 request (Union[google.cloud.dialogflowcx_v3.types.ListAgentsRequest, dict]):
235254 The request object. The request message for
@@ -310,6 +329,25 @@ async def get_agent(
310329 ) -> agent .Agent :
311330 r"""Retrieves the specified agent.
312331
332+ .. code-block::
333+
334+ from google.cloud import dialogflowcx_v3
335+
336+ def sample_get_agent():
337+ # Create a client
338+ client = dialogflowcx_v3.AgentsClient()
339+
340+ # Initialize request argument(s)
341+ request = dialogflowcx_v3.GetAgentRequest(
342+ name="name_value",
343+ )
344+
345+ # Make the request
346+ response = client.get_agent(request=request)
347+
348+ # Handle response
349+ print(response)
350+
313351 Args:
314352 request (Union[google.cloud.dialogflowcx_v3.types.GetAgentRequest, dict]):
315353 The request object. The request message for
@@ -398,6 +436,32 @@ async def create_agent(
398436 queries. See the `training
399437 documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
400438
439+
440+ .. code-block::
441+
442+ from google.cloud import dialogflowcx_v3
443+
444+ def sample_create_agent():
445+ # Create a client
446+ client = dialogflowcx_v3.AgentsClient()
447+
448+ # Initialize request argument(s)
449+ agent = dialogflowcx_v3.Agent()
450+ agent.display_name = "display_name_value"
451+ agent.default_language_code = "default_language_code_value"
452+ agent.time_zone = "time_zone_value"
453+
454+ request = dialogflowcx_v3.CreateAgentRequest(
455+ parent="parent_value",
456+ agent=agent,
457+ )
458+
459+ # Make the request
460+ response = client.create_agent(request=request)
461+
462+ # Handle response
463+ print(response)
464+
401465 Args:
402466 request (Union[google.cloud.dialogflowcx_v3.types.CreateAgentRequest, dict]):
403467 The request object. The request message for
@@ -493,6 +557,31 @@ async def update_agent(
493557 queries. See the `training
494558 documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
495559
560+
561+ .. code-block::
562+
563+ from google.cloud import dialogflowcx_v3
564+
565+ def sample_update_agent():
566+ # Create a client
567+ client = dialogflowcx_v3.AgentsClient()
568+
569+ # Initialize request argument(s)
570+ agent = dialogflowcx_v3.Agent()
571+ agent.display_name = "display_name_value"
572+ agent.default_language_code = "default_language_code_value"
573+ agent.time_zone = "time_zone_value"
574+
575+ request = dialogflowcx_v3.UpdateAgentRequest(
576+ agent=agent,
577+ )
578+
579+ # Make the request
580+ response = client.update_agent(request=request)
581+
582+ # Handle response
583+ print(response)
584+
496585 Args:
497586 request (Union[google.cloud.dialogflowcx_v3.types.UpdateAgentRequest, dict]):
498587 The request object. The request message for
@@ -586,6 +675,22 @@ async def delete_agent(
586675 ) -> None :
587676 r"""Deletes the specified agent.
588677
678+ .. code-block::
679+
680+ from google.cloud import dialogflowcx_v3
681+
682+ def sample_delete_agent():
683+ # Create a client
684+ client = dialogflowcx_v3.AgentsClient()
685+
686+ # Initialize request argument(s)
687+ request = dialogflowcx_v3.DeleteAgentRequest(
688+ name="name_value",
689+ )
690+
691+ # Make the request
692+ response = client.delete_agent(request=request)
693+
589694 Args:
590695 request (Union[google.cloud.dialogflowcx_v3.types.DeleteAgentRequest, dict]):
591696 The request object. The request message for
@@ -659,6 +764,28 @@ async def export_agent(
659764 - ``response``:
660765 [ExportAgentResponse][google.cloud.dialogflow.cx.v3.ExportAgentResponse]
661766
767+
768+ .. code-block::
769+
770+ from google.cloud import dialogflowcx_v3
771+
772+ def sample_export_agent():
773+ # Create a client
774+ client = dialogflowcx_v3.AgentsClient()
775+
776+ # Initialize request argument(s)
777+ request = dialogflowcx_v3.ExportAgentRequest(
778+ name="name_value",
779+ )
780+
781+ # Make the request
782+ operation = client.export_agent(request=request)
783+
784+ print("Waiting for operation to complete...")
785+
786+ response = operation.result()
787+ print(response)
788+
662789 Args:
663790 request (Union[google.cloud.dialogflowcx_v3.types.ExportAgentRequest, dict]):
664791 The request object. The request message for
@@ -738,6 +865,29 @@ async def restore_agent(
738865 queries. See the `training
739866 documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
740867
868+
869+ .. code-block::
870+
871+ from google.cloud import dialogflowcx_v3
872+
873+ def sample_restore_agent():
874+ # Create a client
875+ client = dialogflowcx_v3.AgentsClient()
876+
877+ # Initialize request argument(s)
878+ request = dialogflowcx_v3.RestoreAgentRequest(
879+ agent_uri="agent_uri_value",
880+ name="name_value",
881+ )
882+
883+ # Make the request
884+ operation = client.restore_agent(request=request)
885+
886+ print("Waiting for operation to complete...")
887+
888+ response = operation.result()
889+ print(response)
890+
741891 Args:
742892 request (Union[google.cloud.dialogflowcx_v3.types.RestoreAgentRequest, dict]):
743893 The request object. The request message for
@@ -811,6 +961,26 @@ async def validate_agent(
811961 validated. Please call this API after the training is
812962 completed to get the complete validation results.
813963
964+
965+ .. code-block::
966+
967+ from google.cloud import dialogflowcx_v3
968+
969+ def sample_validate_agent():
970+ # Create a client
971+ client = dialogflowcx_v3.AgentsClient()
972+
973+ # Initialize request argument(s)
974+ request = dialogflowcx_v3.ValidateAgentRequest(
975+ name="name_value",
976+ )
977+
978+ # Make the request
979+ response = client.validate_agent(request=request)
980+
981+ # Handle response
982+ print(response)
983+
814984 Args:
815985 request (Union[google.cloud.dialogflowcx_v3.types.ValidateAgentRequest, dict]):
816986 The request object. The request message for
@@ -862,6 +1032,26 @@ async def get_agent_validation_result(
8621032 r"""Gets the latest agent validation result. Agent
8631033 validation is performed when ValidateAgent is called.
8641034
1035+
1036+ .. code-block::
1037+
1038+ from google.cloud import dialogflowcx_v3
1039+
1040+ def sample_get_agent_validation_result():
1041+ # Create a client
1042+ client = dialogflowcx_v3.AgentsClient()
1043+
1044+ # Initialize request argument(s)
1045+ request = dialogflowcx_v3.GetAgentValidationResultRequest(
1046+ name="name_value",
1047+ )
1048+
1049+ # Make the request
1050+ response = client.get_agent_validation_result(request=request)
1051+
1052+ # Handle response
1053+ print(response)
1054+
8651055 Args:
8661056 request (Union[google.cloud.dialogflowcx_v3.types.GetAgentValidationResultRequest, dict]):
8671057 The request object. The request message for
0 commit comments