async def sample_delete_entity_type(): # Create a client client = dialogflow_v2beta1.EntityTypesAsyncClient() # Initialize request argument(s) request = dialogflow_v2beta1.DeleteEntityTypeRequest(name="name_value", ) # Make the request await client.delete_entity_type(request=request)
async def sample_get_entity_type(): # Create a client client = dialogflow_v2beta1.EntityTypesAsyncClient() # Initialize request argument(s) request = dialogflow_v2beta1.GetEntityTypeRequest(name="name_value", ) # Make the request response = await client.get_entity_type(request=request) # Handle the response print(response)
async def sample_list_entity_types(): # Create a client client = dialogflow_v2beta1.EntityTypesAsyncClient() # Initialize request argument(s) request = dialogflow_v2beta1.ListEntityTypesRequest( parent="parent_value", ) # Make the request page_result = client.list_entity_types(request=request) # Handle the response async for response in page_result: print(response)
async def sample_update_entity_type(): # Create a client client = dialogflow_v2beta1.EntityTypesAsyncClient() # Initialize request argument(s) entity_type = dialogflow_v2beta1.EntityType() entity_type.display_name = "display_name_value" entity_type.kind = "KIND_REGEXP" request = dialogflow_v2beta1.UpdateEntityTypeRequest( entity_type=entity_type, ) # Make the request response = await client.update_entity_type(request=request) # Handle the response print(response)
async def sample_batch_delete_entity_types(): # Create a client client = dialogflow_v2beta1.EntityTypesAsyncClient() # Initialize request argument(s) request = dialogflow_v2beta1.BatchDeleteEntityTypesRequest( parent="parent_value", entity_type_names=['entity_type_names_value_1', 'entity_type_names_value_2'], ) # Make the request operation = client.batch_delete_entity_types(request=request) print("Waiting for operation to complete...") response = await operation.result() # Handle the response print(response)
async def sample_batch_update_entities(): # Create a client client = dialogflow_v2beta1.EntityTypesAsyncClient() # Initialize request argument(s) entities = dialogflow_v2beta1.Entity() entities.value = "value_value" request = dialogflow_v2beta1.BatchUpdateEntitiesRequest( parent="parent_value", entities=entities, ) # Make the request operation = client.batch_update_entities(request=request) print("Waiting for operation to complete...") response = await operation.result() # Handle the response print(response)