Skip navigation links

@Generated(value="by gapic-generator")

Package com.google.cloud.dialogflow.v2

A client to Dialogflow API.

See: Description

Package com.google.cloud.dialogflow.v2 Description

A client to Dialogflow API.

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

============ AgentsClient ============

Service Description: Service for managing [Agents][google.cloud.dialogflow.v2.Agent].

Sample for AgentsClient:

 
 try (AgentsClient agentsClient = AgentsClient.create()) {
   ProjectName parent = ProjectName.of("[PROJECT]");
   Agent response = agentsClient.getAgent(parent);
 }
 
 
============== ContextsClient ==============

Service Description: Service for managing [Contexts][google.cloud.dialogflow.v2.Context].

Sample for ContextsClient:

 
 try (ContextsClient contextsClient = ContextsClient.create()) {
   ContextName name = ContextName.ofProjectSessionContextName("[PROJECT]", "[SESSION]", "[CONTEXT]");
   Context response = contextsClient.getContext(name);
 }
 
 
================= EntityTypesClient =================

Service Description: Service for managing [EntityTypes][google.cloud.dialogflow.v2.EntityType].

Sample for EntityTypesClient:

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

Service Description: Service for managing [Environments][google.cloud.dialogflow.v2.Environment].

Sample for EnvironmentsClient:

 
 try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
   AgentName parent = AgentName.of("[PROJECT]");
   ListEnvironmentsRequest request = ListEnvironmentsRequest.newBuilder()
     .setParent(parent.toString())
     .build();
   ListEnvironmentsPagedResponse response = environmentsClient.listEnvironmentsPagedCallable(request);
 }
 
 
============= IntentsClient =============

Service Description: Service for managing [Intents][google.cloud.dialogflow.v2.Intent].

Sample for IntentsClient:

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

Service Description: Service for managing [SessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityType].

Sample for SessionEntityTypesClient:

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

Service Description: A service used for session interactions.

For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview).

Sample for SessionsClient:

 
 try (SessionsClient sessionsClient = SessionsClient.create()) {
   SessionName session = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
   QueryInput queryInput = QueryInput.newBuilder().build();
   DetectIntentResponse response = sessionsClient.detectIntent(session, queryInput);
 }
 
 
Skip navigation links

Copyright © 2020 Google LLC. All rights reserved.