Esempio n. 1
0
async def sample_delete_entity_type():
    # Create a client
    client = dialogflow_v2.EntityTypesAsyncClient()

    # Initialize request argument(s)
    request = dialogflow_v2.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_v2.EntityTypesAsyncClient()

    # Initialize request argument(s)
    request = dialogflow_v2.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_v2.EntityTypesAsyncClient()

    # Initialize request argument(s)
    request = dialogflow_v2.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)
Esempio n. 4
0
async def sample_update_entity_type():
    # Create a client
    client = dialogflow_v2.EntityTypesAsyncClient()

    # Initialize request argument(s)
    entity_type = dialogflow_v2.EntityType()
    entity_type.display_name = "display_name_value"
    entity_type.kind = "KIND_REGEXP"

    request = dialogflow_v2.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_entities():
    # Create a client
    client = dialogflow_v2.EntityTypesAsyncClient()

    # Initialize request argument(s)
    request = dialogflow_v2.BatchDeleteEntitiesRequest(
        parent="parent_value",
        entity_values=['entity_values_value_1', 'entity_values_value_2'],
    )

    # Make the request
    operation = client.batch_delete_entities(request=request)

    print("Waiting for operation to complete...")

    response = await operation.result()

    # Handle the response
    print(response)
Esempio n. 6
0
async def sample_batch_update_entity_types():
    # Create a client
    client = dialogflow_v2.EntityTypesAsyncClient()

    # Initialize request argument(s)
    request = dialogflow_v2.BatchUpdateEntityTypesRequest(
        entity_type_batch_uri="entity_type_batch_uri_value",
        parent="parent_value",
    )

    # Make the request
    operation = client.batch_update_entity_types(request=request)

    print("Waiting for operation to complete...")

    response = await operation.result()

    # Handle the response
    print(response)