use of com.google.cloud.dialogflow.cx.v3beta1.DeleteIntentRequest in project java-dialogflow-cx by googleapis.
the class ITSystemTest method tearDown.
@AfterClass
public static void tearDown() {
/* delete version */
DeleteVersionRequest deleteVersionRequest = DeleteVersionRequest.newBuilder().setName(versionName).build();
versionsClient.deleteVersion(deleteVersionRequest);
versionsClient.close();
/* delete transition route groups */
DeleteTransitionRouteGroupRequest deleteTransitionRouteGroupRequest = DeleteTransitionRouteGroupRequest.newBuilder().setName(transitionRouteGroupName).build();
transitionRouteGroupsClient.deleteTransitionRouteGroup(deleteTransitionRouteGroupRequest);
transitionRouteGroupsClient.close();
/* delete session */
sessionsClient.close();
/* delete pages */
DeletePageRequest deletePageRequest = DeletePageRequest.newBuilder().setName(pageName).build();
pagesClient.deletePage(deletePageRequest);
pagesClient.close();
/* delete intents */
DeleteIntentRequest deleteIntentRequest = DeleteIntentRequest.newBuilder().setName(intentsName).build();
intentsClient.deleteIntent(deleteIntentRequest);
intentsClient.close();
/* delete flows */
DeleteFlowRequest deleteFlowRequest = DeleteFlowRequest.newBuilder().setName(flowName).build();
flowsClient.deleteFlow(deleteFlowRequest);
DeleteFlowRequest deleteTrainFlowRequest = DeleteFlowRequest.newBuilder().setName(trainFlowName).build();
flowsClient.deleteFlow(deleteTrainFlowRequest);
flowsClient.close();
/* delete entity types */
DeleteEntityTypeRequest deleteEntityTypeRequest = DeleteEntityTypeRequest.newBuilder().setName(entityTypesName).build();
entityTypesClient.deleteEntityType(deleteEntityTypeRequest);
entityTypesClient.close();
/* delete agents */
DeleteAgentRequest deleteAgentRequest = DeleteAgentRequest.newBuilder().setName(agentName).build();
agentsClient.deleteAgent(deleteAgentRequest);
agentsClient.close();
}
use of com.google.cloud.dialogflow.cx.v3beta1.DeleteIntentRequest 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