def sample_delete_context(): # Create a client client = dialogflow_v2.ContextsClient() # Initialize request argument(s) request = dialogflow_v2.DeleteContextRequest(name="name_value", ) # Make the request client.delete_context(request=request)
def sample_delete_all_contexts(): # Create a client client = dialogflow_v2.ContextsClient() # Initialize request argument(s) request = dialogflow_v2.DeleteAllContextsRequest(parent="parent_value", ) # Make the request client.delete_all_contexts(request=request)
def sample_get_context(): # Create a client client = dialogflow_v2.ContextsClient() # Initialize request argument(s) request = dialogflow_v2.GetContextRequest(name="name_value", ) # Make the request response = client.get_context(request=request) # Handle the response print(response)
def sample_list_contexts(): # Create a client client = dialogflow_v2.ContextsClient() # Initialize request argument(s) request = dialogflow_v2.ListContextsRequest(parent="parent_value", ) # Make the request page_result = client.list_contexts(request=request) # Handle the response for response in page_result: print(response)
def sample_update_context(): # Create a client client = dialogflow_v2.ContextsClient() # Initialize request argument(s) context = dialogflow_v2.Context() context.name = "name_value" request = dialogflow_v2.UpdateContextRequest( context=context, ) # Make the request response = client.update_context(request=request) # Handle the response print(response)