Search in sources :

Example 1 with DeleteContextRequest

use of com.google.cloud.dialogflow.v2.DeleteContextRequest in project java-dialogflow by googleapis.

the class ITSystemTest method tearDown.

@AfterClass
public static void tearDown() {
    /* delete context */
    DeleteContextRequest deleteContextRequest = DeleteContextRequest.newBuilder().setName(CONTEXT_NAME.toString()).build();
    contextsClient.deleteContext(deleteContextRequest);
    contextsClient.close();
    /* delete session */
    sessionsClient.close();
    /* delete intents */
    DeleteIntentRequest deleteIntentRequest = DeleteIntentRequest.newBuilder().setName(intentName.toString()).build();
    intentsClient.deleteIntent(deleteIntentRequest);
    intentsClient.close();
    /* delete entity */
    DeleteEntityTypeRequest deleteEntityTypeRequest = DeleteEntityTypeRequest.newBuilder().setName(entityTypeName.toString()).build();
    entityTypesClient.deleteEntityType(deleteEntityTypeRequest);
    entityTypesClient.close();
    agentsClient.close();
}
Also used : DeleteEntityTypeRequest(com.google.cloud.dialogflow.v2.DeleteEntityTypeRequest) DeleteContextRequest(com.google.cloud.dialogflow.v2.DeleteContextRequest) DeleteIntentRequest(com.google.cloud.dialogflow.v2.DeleteIntentRequest) AfterClass(org.junit.AfterClass)

Aggregations

DeleteContextRequest (com.google.cloud.dialogflow.v2.DeleteContextRequest)1 DeleteEntityTypeRequest (com.google.cloud.dialogflow.v2.DeleteEntityTypeRequest)1 DeleteIntentRequest (com.google.cloud.dialogflow.v2.DeleteIntentRequest)1 AfterClass (org.junit.AfterClass)1