google-cloud-dialogflow-cx overview (0.12.1)

A client to Dialogflow API

The interfaces provided are listed below, along with usage samples.

Service Description: Service for managing Agents.

Sample for AgentsClient:


 try (AgentsClient agentsClient = AgentsClient.create()) {
   AgentName name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
   Agent response = agentsClient.getAgent(name);
 }
 

ChangelogsClient

Service Description: Service for managing Changelogs.

Sample for ChangelogsClient:


 try (ChangelogsClient changelogsClient = ChangelogsClient.create()) {
   ChangelogName name = ChangelogName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[CHANGELOG]");
   Changelog response = changelogsClient.getChangelog(name);
 }
 

DeploymentsClient

Service Description: Service for managing Deployments.

Sample for DeploymentsClient:


 try (DeploymentsClient deploymentsClient = DeploymentsClient.create()) {
   DeploymentName name =
       DeploymentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]");
   Deployment response = deploymentsClient.getDeployment(name);
 }
 

EntityTypesClient

Service Description: Service for managing EntityTypes.

Sample for EntityTypesClient:


 try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
   EntityTypeName name =
       EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]");
   EntityType response = entityTypesClient.getEntityType(name);
 }
 

EnvironmentsClient

Service Description: Service for managing Environments.

Sample for EnvironmentsClient:


 try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
   EnvironmentName name =
       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
   Environment response = environmentsClient.getEnvironment(name);
 }
 

ExperimentsClient

Service Description: Service for managing Experiments.

Sample for ExperimentsClient:


 try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
   ExperimentName name =
       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
   Experiment response = experimentsClient.getExperiment(name);
 }
 

FlowsClient

Service Description: Service for managing Flows.

Sample for FlowsClient:


 try (FlowsClient flowsClient = FlowsClient.create()) {
   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
   Flow flow = Flow.newBuilder().build();
   Flow response = flowsClient.createFlow(parent, flow);
 }
 

IntentsClient

Service Description: Service for managing Intents.

Sample for IntentsClient:


 try (IntentsClient intentsClient = IntentsClient.create()) {
   IntentName name = IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]");
   Intent response = intentsClient.getIntent(name);
 }
 

PagesClient

Service Description: Service for managing Pages.

Sample for PagesClient:


 try (PagesClient pagesClient = PagesClient.create()) {
   PageName name = PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]");
   Page response = pagesClient.getPage(name);
 }
 

SecuritySettingsServiceClient

Service Description: Service for managing security settings for Dialogflow.

Sample for SecuritySettingsServiceClient:


 try (SecuritySettingsServiceClient securitySettingsServiceClient =
     SecuritySettingsServiceClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   SecuritySettings securitySettings = SecuritySettings.newBuilder().build();
   SecuritySettings response =
       securitySettingsServiceClient.createSecuritySettings(parent, securitySettings);
 }
 

SessionsClient

Service Description: A session represents an interaction with a user. You retrieve user input and pass it to the DetectIntent method to determine user intent and respond.

Sample for SessionsClient:


 try (SessionsClient sessionsClient = SessionsClient.create()) {
   DetectIntentRequest request =
       DetectIntentRequest.newBuilder()
           .setSession(
               SessionName.ofProjectLocationAgentSessionName(
                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]")
                   .toString())
           .setQueryParams(QueryParameters.newBuilder().build())
           .setQueryInput(QueryInput.newBuilder().build())
           .setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
           .build();
   DetectIntentResponse response = sessionsClient.detectIntent(request);
 }
 

SessionEntityTypesClient

Service Description: Service for managing SessionEntityTypes.

Sample for SessionEntityTypesClient:


 try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
   SessionEntityTypeName name =
       SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
           "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]");
   SessionEntityType response = sessionEntityTypesClient.getSessionEntityType(name);
 }
 

TestCasesClient

Service Description: Service for managing Test Cases and Test Case Results.

Sample for TestCasesClient:


 try (TestCasesClient testCasesClient = TestCasesClient.create()) {
   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
   testCasesClient.batchDeleteTestCases(parent);
 }
 

TransitionRouteGroupsClient

Service Description: Service for managing TransitionRouteGroups.

Sample for TransitionRouteGroupsClient:


 try (TransitionRouteGroupsClient transitionRouteGroupsClient =
     TransitionRouteGroupsClient.create()) {
   TransitionRouteGroupName name =
       TransitionRouteGroupName.of(
           "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]");
   TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name);
 }
 

VersionsClient

Service Description: Service for managing Versions.

Sample for VersionsClient:


 try (VersionsClient versionsClient = VersionsClient.create()) {
   VersionName name =
       VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]");
   Version response = versionsClient.getVersion(name);
 }
 

WebhooksClient

Service Description: Service for managing Webhooks.

Sample for WebhooksClient:


 try (WebhooksClient webhooksClient = WebhooksClient.create()) {
   WebhookName name = WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]");
   Webhook response = webhooksClient.getWebhook(name);
 }
 

com.google.cloud.dialogflow.cx.v3.stub

com.google.cloud.dialogflow.cx.v3beta1

A client to Dialogflow API

The interfaces provided are listed below, along with usage samples.

AgentsClient

Service Description: Service for managing Agents.

Sample for AgentsClient:


 try (AgentsClient agentsClient = AgentsClient.create()) {
   AgentName name = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
   Agent response = agentsClient.getAgent(name);
 }
 

ChangelogsClient

Service Description: Service for managing Changelogs.

Sample for ChangelogsClient:


 try (ChangelogsClient changelogsClient = ChangelogsClient.create()) {
   ChangelogName name = ChangelogName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[CHANGELOG]");
   Changelog response = changelogsClient.getChangelog(name);
 }
 

DeploymentsClient

Service Description: Service for managing Deployments.

Sample for DeploymentsClient:


 try (DeploymentsClient deploymentsClient = DeploymentsClient.create()) {
   DeploymentName name =
       DeploymentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]");
   Deployment response = deploymentsClient.getDeployment(name);
 }
 

EntityTypesClient

Service Description: Service for managing EntityTypes.

Sample for EntityTypesClient:


 try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
   EntityTypeName name =
       EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]");
   EntityType response = entityTypesClient.getEntityType(name);
 }
 

EnvironmentsClient

Service Description: Service for managing Environments.

Sample for EnvironmentsClient:


 try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
   EnvironmentName name =
       EnvironmentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
   Environment response = environmentsClient.getEnvironment(name);
 }
 

ExperimentsClient

Service Description: Service for managing Experiments.

Sample for ExperimentsClient:


 try (ExperimentsClient experimentsClient = ExperimentsClient.create()) {
   ExperimentName name =
       ExperimentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
   Experiment response = experimentsClient.getExperiment(name);
 }
 

FlowsClient

Service Description: Service for managing Flows.

Sample for FlowsClient:


 try (FlowsClient flowsClient = FlowsClient.create()) {
   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
   Flow flow = Flow.newBuilder().build();
   Flow response = flowsClient.createFlow(parent, flow);
 }
 

IntentsClient

Service Description: Service for managing Intents.

Sample for IntentsClient:


 try (IntentsClient intentsClient = IntentsClient.create()) {
   IntentName name = IntentName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]");
   Intent response = intentsClient.getIntent(name);
 }
 

PagesClient

Service Description: Service for managing Pages.

Sample for PagesClient:


 try (PagesClient pagesClient = PagesClient.create()) {
   PageName name = PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]");
   Page response = pagesClient.getPage(name);
 }
 

SecuritySettingsServiceClient

Service Description: Service for managing security settings for Dialogflow.

Sample for SecuritySettingsServiceClient:


 try (SecuritySettingsServiceClient securitySettingsServiceClient =
     SecuritySettingsServiceClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   SecuritySettings securitySettings = SecuritySettings.newBuilder().build();
   SecuritySettings response =
       securitySettingsServiceClient.createSecuritySettings(parent, securitySettings);
 }
 

SessionsClient

Service Description: A session represents an interaction with a user. You retrieve user input and pass it to the DetectIntent method to determine user intent and respond.

Sample for SessionsClient:


 try (SessionsClient sessionsClient = SessionsClient.create()) {
   DetectIntentRequest request =
       DetectIntentRequest.newBuilder()
           .setSession(
               SessionName.ofProjectLocationAgentSessionName(
                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]")
                   .toString())
           .setQueryParams(QueryParameters.newBuilder().build())
           .setQueryInput(QueryInput.newBuilder().build())
           .setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
           .build();
   DetectIntentResponse response = sessionsClient.detectIntent(request);
 }
 

SessionEntityTypesClient

Service Description: Service for managing SessionEntityTypes.

Sample for SessionEntityTypesClient:


 try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
   SessionEntityTypeName name =
       SessionEntityTypeName.ofProjectLocationAgentSessionEntityTypeName(
           "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]", "[ENTITY_TYPE]");
   SessionEntityType response = sessionEntityTypesClient.getSessionEntityType(name);
 }
 

TestCasesClient

Service Description: Service for managing Test Cases and Test Case Results.

Sample for TestCasesClient:


 try (TestCasesClient testCasesClient = TestCasesClient.create()) {
   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
   testCasesClient.batchDeleteTestCases(parent);
 }
 

TransitionRouteGroupsClient

Service Description: Service for managing TransitionRouteGroups.

Sample for TransitionRouteGroupsClient:


 try (TransitionRouteGroupsClient transitionRouteGroupsClient =
     TransitionRouteGroupsClient.create()) {
   TransitionRouteGroupName name =
       TransitionRouteGroupName.of(
           "[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]");
   TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name);
 }
 

VersionsClient

Service Description: Service for managing Versions.

Sample for VersionsClient:


 try (VersionsClient versionsClient = VersionsClient.create()) {
   VersionName name =
       VersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[VERSION]");
   Version response = versionsClient.getVersion(name);
 }
 

WebhooksClient

Service Description: Service for managing Webhooks.

Sample for WebhooksClient:


 try (WebhooksClient webhooksClient = WebhooksClient.create()) {
   WebhookName name = WebhookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]");
   Webhook response = webhooksClient.getWebhook(name);
 }
 

com.google.cloud.dialogflow.cx.v3beta1.stub