use of com.google.cloud.dialogflow.v2.AgentsClient in project java-dialogflow-cx by googleapis.
the class CreateAgentIT method tearDown.
@After
public void tearDown() throws IOException {
System.setOut(originalOut);
String apiEndpoint = "global-dialogflow.googleapis.com:443";
AgentsSettings agentsSettings = AgentsSettings.newBuilder().setEndpoint(apiEndpoint).build();
AgentsClient client = AgentsClient.create(agentsSettings);
client.deleteAgent(CreateAgentIT.agentPath);
}
use of com.google.cloud.dialogflow.v2.AgentsClient in project java-dialogflow-cx by googleapis.
the class ExportAgentIT method setUp.
@Before
public void setUp() throws IOException {
stdOut = new ByteArrayOutputStream();
System.setOut(new PrintStream(stdOut));
Builder build = Agent.newBuilder();
build.setDefaultLanguageCode("en");
build.setDisplayName("temp_agent_" + UUID.randomUUID().toString());
build.setTimeZone("America/Los_Angeles");
Agent agent = build.build();
String apiEndpoint = "global-dialogflow.googleapis.com:443";
String parentPath = "projects/" + PROJECT_ID + "/locations/global";
AgentsSettings agentsSettings = AgentsSettings.newBuilder().setEndpoint(apiEndpoint).build();
AgentsClient client = AgentsClient.create(agentsSettings);
parent = client.createAgent(parentPath, agent).getName();
ExportAgentIT.agentPath = parent;
ExportAgentIT.agentID = parent.split("/")[5];
client.close();
}
use of com.google.cloud.dialogflow.v2.AgentsClient in project java-dialogflow-cx by googleapis.
the class ExportAgentIT method tearDown.
@After
public void tearDown() throws IOException {
stdOut = null;
System.setOut(null);
String apiEndpoint = "global-dialogflow.googleapis.com:443";
AgentsSettings agentsSettings = AgentsSettings.newBuilder().setEndpoint(apiEndpoint).build();
AgentsClient client = AgentsClient.create(agentsSettings);
client.deleteAgent(ExportAgentIT.agentPath);
client.close();
}
use of com.google.cloud.dialogflow.v2.AgentsClient in project java-dialogflow-cx by googleapis.
the class PageManagementIT method setUp.
@BeforeClass
public static void setUp() throws IOException {
stdOut = new ByteArrayOutputStream();
System.setOut(new PrintStream(stdOut));
Builder build = Agent.newBuilder();
build.setDefaultLanguageCode("en");
build.setDisplayName("temp_agent_" + UUID.randomUUID().toString());
build.setTimeZone("America/Los_Angeles");
Agent agent = build.build();
String apiEndpoint = "global-dialogflow.googleapis.com:443";
String parentPath = "projects/" + PROJECT_ID + "/locations/global";
AgentsSettings agentsSettings = AgentsSettings.newBuilder().setEndpoint(apiEndpoint).build();
AgentsClient client = AgentsClient.create(agentsSettings);
parent = client.createAgent(parentPath, agent).getName();
agentID = parent.split("/")[5];
}
use of com.google.cloud.dialogflow.v2.AgentsClient in project java-dialogflow-cx by googleapis.
the class PageManagementIT method tearDown.
@AfterClass
public static void tearDown() throws IOException {
String apiEndpoint = "global-dialogflow.googleapis.com:443";
String parentPath = "projects/" + PROJECT_ID + "/locations/global";
AgentsSettings agentsSettings = AgentsSettings.newBuilder().setEndpoint(apiEndpoint).build();
AgentsClient client = AgentsClient.create(agentsSettings);
client.deleteAgent(parent);
}
Aggregations