async def sample_delete_environment():
    # Create a client
    client = dialogflowcx_v3.EnvironmentsAsyncClient()

    # Initialize request argument(s)
    request = dialogflowcx_v3.DeleteEnvironmentRequest(name="name_value", )

    # Make the request
    await client.delete_environment(request=request)
Esempio n. 2
0
async def sample_list_environments():
    # Create a client
    client = dialogflowcx_v3.EnvironmentsAsyncClient()

    # Initialize request argument(s)
    request = dialogflowcx_v3.ListEnvironmentsRequest(parent="parent_value", )

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

    # Handle the response
    async for response in page_result:
        print(response)
async def sample_get_environment():
    # Create a client
    client = dialogflowcx_v3.EnvironmentsAsyncClient()

    # Initialize request argument(s)
    request = dialogflowcx_v3.GetEnvironmentRequest(
        name="name_value",
    )

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

    # Handle the response
    print(response)
async def sample_lookup_environment_history():
    # Create a client
    client = dialogflowcx_v3.EnvironmentsAsyncClient()

    # Initialize request argument(s)
    request = dialogflowcx_v3.LookupEnvironmentHistoryRequest(
        name="name_value", )

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

    # Handle the response
    async for response in page_result:
        print(response)
async def sample_run_continuous_test():
    # Create a client
    client = dialogflowcx_v3.EnvironmentsAsyncClient()

    # Initialize request argument(s)
    request = dialogflowcx_v3.RunContinuousTestRequest(
        environment="environment_value", )

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

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

    response = await operation.result()

    # Handle the response
    print(response)
async def sample_update_environment():
    # Create a client
    client = dialogflowcx_v3.EnvironmentsAsyncClient()

    # Initialize request argument(s)
    environment = dialogflowcx_v3.Environment()
    environment.display_name = "display_name_value"
    environment.version_configs.version = "version_value"

    request = dialogflowcx_v3.UpdateEnvironmentRequest(
        environment=environment, )

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

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

    response = await operation.result()

    # Handle the response
    print(response)