async def sample_delete_session_entity_type():
    # Create a client
    client = dialogflow_v2.SessionEntityTypesAsyncClient()

    # Initialize request argument(s)
    request = dialogflow_v2.DeleteSessionEntityTypeRequest(name="name_value", )

    # Make the request
    await client.delete_session_entity_type(request=request)
Example #2
0
async def sample_get_session_entity_type():
    # Create a client
    client = dialogflow_v2.SessionEntityTypesAsyncClient()

    # Initialize request argument(s)
    request = dialogflow_v2.GetSessionEntityTypeRequest(name="name_value", )

    # Make the request
    response = await client.get_session_entity_type(request=request)

    # Handle the response
    print(response)
async def sample_list_session_entity_types():
    # Create a client
    client = dialogflow_v2.SessionEntityTypesAsyncClient()

    # Initialize request argument(s)
    request = dialogflow_v2.ListSessionEntityTypesRequest(
        parent="parent_value", )

    # Make the request
    page_result = client.list_session_entity_types(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
async def sample_create_session_entity_type():
    # Create a client
    client = dialogflow_v2.SessionEntityTypesAsyncClient()

    # Initialize request argument(s)
    session_entity_type = dialogflow_v2.SessionEntityType()
    session_entity_type.name = "name_value"
    session_entity_type.entity_override_mode = "ENTITY_OVERRIDE_MODE_SUPPLEMENT"
    session_entity_type.entities.value = "value_value"
    session_entity_type.entities.synonyms = ['synonyms_value_1', 'synonyms_value_2']

    request = dialogflow_v2.CreateSessionEntityTypeRequest(
        parent="parent_value",
        session_entity_type=session_entity_type,
    )

    # Make the request
    response = await client.create_session_entity_type(request=request)

    # Handle the response
    print(response)