async def sample_delete_agent(): # Create a client client = dialogflowcx_v3beta1.AgentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.DeleteAgentRequest(name="name_value", ) # Make the request await client.delete_agent(request=request)
async def sample_list_agents(): # Create a client client = dialogflowcx_v3beta1.AgentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ListAgentsRequest(parent="parent_value", ) # Make the request page_result = client.list_agents(request=request) # Handle the response async for response in page_result: print(response)
async def sample_get_agent(): # Create a client client = dialogflowcx_v3beta1.AgentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.GetAgentRequest( name="name_value", ) # Make the request response = await client.get_agent(request=request) # Handle the response print(response)
async def sample_export_agent(): # Create a client client = dialogflowcx_v3beta1.AgentsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ExportAgentRequest(name="name_value", ) # Make the request operation = client.export_agent(request=request) print("Waiting for operation to complete...") response = await operation.result() # Handle the response print(response)
async def sample_update_agent(): # Create a client client = dialogflowcx_v3beta1.AgentsAsyncClient() # Initialize request argument(s) agent = dialogflowcx_v3beta1.Agent() agent.display_name = "display_name_value" agent.default_language_code = "default_language_code_value" agent.time_zone = "time_zone_value" request = dialogflowcx_v3beta1.UpdateAgentRequest(agent=agent, ) # Make the request response = await client.update_agent(request=request) # Handle the response print(response)