async def sample_delete_flow(): # Create a client client = dialogflowcx_v3beta1.FlowsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.DeleteFlowRequest(name="name_value", ) # Make the request await client.delete_flow(request=request)
async def sample_get_flow(): # Create a client client = dialogflowcx_v3beta1.FlowsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.GetFlowRequest(name="name_value", ) # Make the request response = await client.get_flow(request=request) # Handle the response print(response)
async def sample_list_flows(): # Create a client client = dialogflowcx_v3beta1.FlowsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ListFlowsRequest(parent="parent_value", ) # Make the request page_result = client.list_flows(request=request) # Handle the response async for response in page_result: print(response)
async def sample_update_flow(): # Create a client client = dialogflowcx_v3beta1.FlowsAsyncClient() # Initialize request argument(s) flow = dialogflowcx_v3beta1.Flow() flow.display_name = "display_name_value" request = dialogflowcx_v3beta1.UpdateFlowRequest(flow=flow, ) # Make the request response = await client.update_flow(request=request) # Handle the response print(response)
async def sample_train_flow(): # Create a client client = dialogflowcx_v3beta1.FlowsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.TrainFlowRequest(name="name_value", ) # Make the request operation = client.train_flow(request=request) print("Waiting for operation to complete...") response = await operation.result() # Handle the response print(response)
async def sample_import_flow(): # Create a client client = dialogflowcx_v3beta1.FlowsAsyncClient() # Initialize request argument(s) request = dialogflowcx_v3beta1.ImportFlowRequest( flow_uri="flow_uri_value", parent="parent_value", ) # Make the request operation = client.import_flow(request=request) print("Waiting for operation to complete...") response = await operation.result() # Handle the response print(response)