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

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

    # Make the request
    await client.delete_intent(request=request)
Esempio n. 2
0
async def sample_get_intent():
    # Create a client
    client = dialogflow_v2.IntentsAsyncClient()

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

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

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

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

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

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

    # Initialize request argument(s)
    intent = dialogflow_v2.Intent()
    intent.display_name = "display_name_value"

    request = dialogflow_v2.UpdateIntentRequest(intent=intent, )

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

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

    # Initialize request argument(s)
    request = dialogflow_v2.BatchUpdateIntentsRequest(
        intent_batch_uri="intent_batch_uri_value",
        parent="parent_value",
    )

    # Make the request
    operation = client.batch_update_intents(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_delete_intents():
    # Create a client
    client = dialogflow_v2.IntentsAsyncClient()

    # Initialize request argument(s)
    intents = dialogflow_v2.Intent()
    intents.display_name = "display_name_value"

    request = dialogflow_v2.BatchDeleteIntentsRequest(
        parent="parent_value",
        intents=intents,
    )

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

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

    response = await operation.result()

    # Handle the response
    print(response)