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();
}
Aggregations