Skip navigation links

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

Package com.google.cloud.dialogflow.v2

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

See: Description

Package com.google.cloud.dialogflow.v2 Description

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()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   Agent response = agentsClient.getAgent(parent);
 }
 

======================= AnswerRecordsClient =======================

Service Description: Service for managing [AnswerRecords][google.cloud.dialogflow.v2.AnswerRecord].

Sample for AnswerRecordsClient:


 try (AnswerRecordsClient answerRecordsClient = AnswerRecordsClient.create()) {
   AnswerRecord answerRecord = AnswerRecord.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   AnswerRecord response = answerRecordsClient.updateAnswerRecord(answerRecord, updateMask);
 }
 

======================= 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);
 }
 

======================= ConversationsClient =======================

Service Description: Service for managing [Conversations][google.cloud.dialogflow.v2.Conversation].

Sample for ConversationsClient:


 try (ConversationsClient conversationsClient = ConversationsClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   Conversation conversation = Conversation.newBuilder().build();
   Conversation response = conversationsClient.createConversation(parent, conversation);
 }
 

======================= ConversationProfilesClient =======================

Service Description: Service for managing [ConversationProfiles][google.cloud.dialogflow.v2.ConversationProfile].

Sample for ConversationProfilesClient:


 try (ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create()) {
   ConversationProfileName name =
       ConversationProfileName.ofProjectConversationProfileName(
           "[PROJECT]", "[CONVERSATION_PROFILE]");
   ConversationProfile response = conversationProfilesClient.getConversationProfile(name);
 }
 

======================= DocumentsClient =======================

Service Description: Service for managing knowledge [Documents][google.cloud.dialogflow.v2.Document].

Sample for DocumentsClient:


 try (DocumentsClient documentsClient = DocumentsClient.create()) {
   DocumentName name =
       DocumentName.ofProjectKnowledgeBaseDocumentName(
           "[PROJECT]", "[KNOWLEDGE_BASE]", "[DOCUMENT]");
   Document response = documentsClient.getDocument(name);
 }
 

======================= EntityTypesClient =======================

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

Sample for EntityTypesClient:


 try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
   EntityTypeName name = EntityTypeName.ofProjectEntityTypeName("[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()) {
   GetEnvironmentRequest request =
       GetEnvironmentRequest.newBuilder()
           .setName(
               EnvironmentName.ofProjectEnvironmentName("[PROJECT]", "[ENVIRONMENT]").toString())
           .build();
   Environment response = environmentsClient.getEnvironment(request);
 }
 

======================= FulfillmentsClient =======================

Service Description: Service for managing [Fulfillments][google.cloud.dialogflow.v2.Fulfillment].

Sample for FulfillmentsClient:


 try (FulfillmentsClient fulfillmentsClient = FulfillmentsClient.create()) {
   FulfillmentName name = FulfillmentName.ofProjectName("[PROJECT]");
   Fulfillment response = fulfillmentsClient.getFulfillment(name);
 }
 

======================= IntentsClient =======================

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

Sample for IntentsClient:


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

======================= KnowledgeBasesClient =======================

Service Description: Service for managing [KnowledgeBases][google.cloud.dialogflow.v2.KnowledgeBase].

Sample for KnowledgeBasesClient:


 try (KnowledgeBasesClient knowledgeBasesClient = KnowledgeBasesClient.create()) {
   KnowledgeBaseName name =
       KnowledgeBaseName.ofProjectKnowledgeBaseName("[PROJECT]", "[KNOWLEDGE_BASE]");
   KnowledgeBase response = knowledgeBasesClient.getKnowledgeBase(name);
 }
 

======================= ParticipantsClient =======================

Service Description: Service for managing [Participants][google.cloud.dialogflow.v2.Participant].

Sample for ParticipantsClient:


 try (ParticipantsClient participantsClient = ParticipantsClient.create()) {
   ConversationName parent =
       ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]");
   Participant participant = Participant.newBuilder().build();
   Participant response = participantsClient.createParticipant(parent, participant);
 }
 

======================= 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);
 }
 

======================= 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);
 }
 

======================= VersionsClient =======================

Service Description: Service for managing [Versions][google.cloud.dialogflow.v2.Version].

Sample for VersionsClient:


 try (VersionsClient versionsClient = VersionsClient.create()) {
   VersionName name = VersionName.ofProjectVersionName("[PROJECT]", "[VERSION]");
   Version response = versionsClient.getVersion(name);
 }
 
Skip navigation links

Copyright © 2021 Google LLC. All rights reserved.