Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

feat: added support for custom content types #250

Merged
merged 8 commits into from
Aug 3, 2020
2 changes: 1 addition & 1 deletion google-cloud-dialogflow-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<version>0.9.2</version>
</parent>

<name>Google Cloud dialogflow BOM</name>
<name>Google Cloud Dialogflow BOM</name>
<url>https://github.com/googleapis/java-dialogflow</url>
<description>
BOM for Google Cloud Dialog Flow API
Expand Down
23 changes: 8 additions & 15 deletions google-cloud-dialogflow/clirr-ignored-differences.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- see http://www.mojohaus.org/clirr-maven-plugin/examples/ignored-differences.html -->
<differences>
<!-- TODO: remove after 2.1.0 is released -->
<!-- TODO: remove after 2.2.0 is released -->
<difference>
<differenceType>7006</differenceType>
<className>com/google/cloud/dialogflow/v2beta1/EnvironmentsClient</className>
<method>com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse listEnvironments(com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest)</method>
<to>com.google.cloud.dialogflow.v2beta1.EnvironmentsClient$ListEnvironmentsPagedResponse</to>
<differenceType>7002</differenceType>
<className>com/google/cloud/dialogflow/v2beta1/DocumentsClient</className>
<method>com.google.longrunning.Operation reloadDocument(com.google.cloud.dialogflow.v2beta1.ReloadDocumentRequest)</method>
</difference>
<difference>
<differenceType>7006</differenceType>
<className>com/google/cloud/dialogflow/v2beta1/EnvironmentsSettings*</className>
<method>com.google.api.gax.rpc.UnaryCallSettings* listEnvironmentsSettings()</method>
<to>com.google.api.gax.rpc.PagedCallSettings*</to>
</difference>
<difference>
<differenceType>7006</differenceType>
<className>com/google/cloud/dialogflow/v2beta1/stub/EnvironmentsStubSettings*</className>
<method>com.google.api.gax.rpc.UnaryCallSettings* listEnvironmentsSettings()</method>
<to>com.google.api.gax.rpc.PagedCallSettings*</to>
<differenceType>7005</differenceType>
<className>com/google/cloud/dialogflow/v2beta1/*Client</className>
<method>* *(com.google.cloud.dialogflow.v2beta1.ProjectAgentName*)</method>
<to>* *(com.google.cloud.dialogflow.v2beta1.AgentName*)</to>
</difference>
</differences>
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,7 @@

// AUTO-GENERATED DOCUMENTATION AND SERVICE
/**
* Service Description: A context represents additional information included with user input or with
* an intent returned by the Dialogflow API. Contexts are helpful for differentiating user input
* which may be vague or have a different meaning depending on additional details from your
* application such as user setting and preferences, previous user input, where the user is in your
* application, geographic location, and so on.
*
* <p>You can include contexts as input parameters of a
* [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or
* [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) request, or
* as output contexts included in the returned intent. Contexts expire when an intent is matched,
* after the number of `DetectIntent` requests specified by the `lifespan_count` parameter, or after
* 20 minutes if no intents are matched for a `DetectIntent` request.
*
* <p>For more information about contexts, see the [Dialogflow
* documentation](https://cloud.google.com/dialogflow/docs/contexts-overview).
* Service Description: Service for managing [Contexts][google.cloud.dialogflow.v2.Context].
*
* <p>This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,31 +41,7 @@

// AUTO-GENERATED DOCUMENTATION AND SERVICE
/**
* Service Description: Entities are extracted from user input and represent parameters that are
* meaningful to your application. For example, a date range, a proper name such as a geographic
* location or landmark, and so on. Entities represent actionable data for your application.
*
* <p>When you define an entity, you can also include synonyms that all map to that entity. For
* example, "soft drink", "soda", "pop", and so on.
*
* <p>There are three types of entities:
*
* <p>&#42; &#42;&#42;System&#42;&#42; - entities that are defined by the Dialogflow API for common
* data types such as date, time, currency, and so on. A system entity is represented by the
* `EntityType` type.
*
* <p>&#42; &#42;&#42;Custom&#42;&#42; - entities that are defined by you that represent actionable
* data that is meaningful to your application. For example, you could define a `pizza.sauce` entity
* for red or white pizza sauce, a `pizza.cheese` entity for the different types of cheese on a
* pizza, a `pizza.topping` entity for different toppings, and so on. A custom entity is represented
* by the `EntityType` type.
*
* <p>&#42; &#42;&#42;User&#42;&#42; - entities that are built for an individual user such as
* favorites, preferences, playlists, and so on. A user entity is represented by the
* [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] type.
*
* <p>For more information about entity types, see the [Dialogflow
* documentation](https://cloud.google.com/dialogflow/docs/entities-overview).
* Service Description: Service for managing [EntityTypes][google.cloud.dialogflow.v2.EntityType].
*
* <p>This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

// AUTO-GENERATED DOCUMENTATION AND SERVICE
/**
* Service Description: Manages agent environments.
* Service Description: Service for managing [Environments][google.cloud.dialogflow.v2.Environment].
*
* <p>This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,33 +42,7 @@

// AUTO-GENERATED DOCUMENTATION AND SERVICE
/**
* Service Description: An intent represents a mapping between input from a user and an action to be
* taken by your application. When you pass user input to the
* [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or
* [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) method, the
* Dialogflow API analyzes the input and searches for a matching intent. If no match is found, the
* Dialogflow API returns a fallback intent (`is_fallback` = true).
*
* <p>You can provide additional information for the Dialogflow API to use to match user input to an
* intent by adding the following to your intent.
*
* <p>&#42; &#42;&#42;Contexts&#42;&#42; - provide additional context for intent analysis. For
* example, if an intent is related to an object in your application that plays music, you can
* provide a context to determine when to match the intent if the user input is "turn it off". You
* can include a context that matches the intent when there is previous user input of "play music",
* and not when there is previous user input of "turn on the light".
*
* <p>&#42; &#42;&#42;Events&#42;&#42; - allow for matching an intent by using an event name instead
* of user input. Your application can provide an event name and related parameters to the
* Dialogflow API to match an intent. For example, when your application starts, you can send a
* welcome event with a user name parameter to the Dialogflow API to match an intent with a
* personalized welcome message for the user.
*
* <p>&#42; &#42;&#42;Training phrases&#42;&#42; - provide examples of user input to train the
* Dialogflow API agent to better match intents.
*
* <p>For more information about intents, see the [Dialogflow
* documentation](https://cloud.google.com/dialogflow/docs/intents-overview).
* Service Description: Service for managing [Intents][google.cloud.dialogflow.v2.Intent].
*
* <p>This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,8 @@

// AUTO-GENERATED DOCUMENTATION AND SERVICE
/**
* Service Description: Entities are extracted from user input and represent parameters that are
* meaningful to your application. For example, a date range, a proper name such as a geographic
* location or landmark, and so on. Entities represent actionable data for your application.
*
* <p>Session entity types are referred to as &#42;&#42;User&#42;&#42; entity types and are entities
* that are built for an individual user such as favorites, preferences, playlists, and so on. You
* can redefine a session entity type at the session level.
*
* <p>Session entity methods do not work with Google Assistant integration. Contact Dialogflow
* support if you need to use session entities with Google Assistant integration.
*
* <p>For more information about entity types, see the [Dialogflow
* documentation](https://cloud.google.com/dialogflow/docs/entities-overview).
* Service Description: Service for managing
* [SessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityType].
*
* <p>This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@

// AUTO-GENERATED DOCUMENTATION AND SERVICE
/**
* Service Description: A session represents an interaction with a user. You retrieve user input and
* pass it to the [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or
* [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) method to
* determine user intent and respond.
* Service Description: A service used for session interactions.
*
* <p>For more information, see the [API interactions
* guide](https://cloud.google.com/dialogflow/docs/api-overview).
*
* <p>This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
Expand Down Expand Up @@ -171,6 +171,8 @@ public SessionsStub getStub() {
* appropriate `Session ID` and `User Id`. They can be a random number or some type of user
* and session identifiers (preferably hashed). The length of the `Session ID` and `User ID`
* must not exceed 36 characters.
* <p>For more information, see the [API interactions
* guide](https://cloud.google.com/dialogflow/docs/api-overview).
* @param queryInput Required. The input specification. It can be set to:
* <p>1. an audio config which instructs the speech recognizer how to process the speech
* audio,
Expand Down Expand Up @@ -211,6 +213,8 @@ public final DetectIntentResponse detectIntent(SessionName session, QueryInput q
* appropriate `Session ID` and `User Id`. They can be a random number or some type of user
* and session identifiers (preferably hashed). The length of the `Session ID` and `User ID`
* must not exceed 36 characters.
* <p>For more information, see the [API interactions
* guide](https://cloud.google.com/dialogflow/docs/api-overview).
* @param queryInput Required. The input specification. It can be set to:
* <p>1. an audio config which instructs the speech recognizer how to process the speech
* audio,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,7 @@
*
* ============== ContextsClient ==============
*
* <p>Service Description: A context represents additional information included with user input or
* with an intent returned by the Dialogflow API. Contexts are helpful for differentiating user
* input which may be vague or have a different meaning depending on additional details from your
* application such as user setting and preferences, previous user input, where the user is in your
* application, geographic location, and so on.
*
* <p>You can include contexts as input parameters of a
* [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or
* [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) request, or
* as output contexts included in the returned intent. Contexts expire when an intent is matched,
* after the number of `DetectIntent` requests specified by the `lifespan_count` parameter, or after
* 20 minutes if no intents are matched for a `DetectIntent` request.
*
* <p>For more information about contexts, see the [Dialogflow
* documentation](https://cloud.google.com/dialogflow/docs/contexts-overview).
* <p>Service Description: Service for managing [Contexts][google.cloud.dialogflow.v2.Context].
*
* <p>Sample for ContextsClient:
*
Expand All @@ -65,31 +51,8 @@
*
* ================= EntityTypesClient =================
*
* <p>Service Description: Entities are extracted from user input and represent parameters that are
* meaningful to your application. For example, a date range, a proper name such as a geographic
* location or landmark, and so on. Entities represent actionable data for your application.
*
* <p>When you define an entity, you can also include synonyms that all map to that entity. For
* example, "soft drink", "soda", "pop", and so on.
*
* <p>There are three types of entities:
*
* <p>&#42; &#42;&#42;System&#42;&#42; - entities that are defined by the Dialogflow API for common
* data types such as date, time, currency, and so on. A system entity is represented by the
* `EntityType` type.
*
* <p>&#42; &#42;&#42;Custom&#42;&#42; - entities that are defined by you that represent actionable
* data that is meaningful to your application. For example, you could define a `pizza.sauce` entity
* for red or white pizza sauce, a `pizza.cheese` entity for the different types of cheese on a
* pizza, a `pizza.topping` entity for different toppings, and so on. A custom entity is represented
* by the `EntityType` type.
*
* <p>&#42; &#42;&#42;User&#42;&#42; - entities that are built for an individual user such as
* favorites, preferences, playlists, and so on. A user entity is represented by the
* [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] type.
*
* <p>For more information about entity types, see the [Dialogflow
* documentation](https://cloud.google.com/dialogflow/docs/entities-overview).
* <p>Service Description: Service for managing
* [EntityTypes][google.cloud.dialogflow.v2.EntityType].
*
* <p>Sample for EntityTypesClient:
*
Expand All @@ -104,7 +67,8 @@
*
* ================== EnvironmentsClient ==================
*
* <p>Service Description: Manages agent environments.
* <p>Service Description: Service for managing
* [Environments][google.cloud.dialogflow.v2.Environment].
*
* <p>Sample for EnvironmentsClient:
*
Expand All @@ -122,33 +86,7 @@
*
* ============= IntentsClient =============
*
* <p>Service Description: An intent represents a mapping between input from a user and an action to
* be taken by your application. When you pass user input to the
* [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or
* [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) method, the
* Dialogflow API analyzes the input and searches for a matching intent. If no match is found, the
* Dialogflow API returns a fallback intent (`is_fallback` = true).
*
* <p>You can provide additional information for the Dialogflow API to use to match user input to an
* intent by adding the following to your intent.
*
* <p>&#42; &#42;&#42;Contexts&#42;&#42; - provide additional context for intent analysis. For
* example, if an intent is related to an object in your application that plays music, you can
* provide a context to determine when to match the intent if the user input is "turn it off". You
* can include a context that matches the intent when there is previous user input of "play music",
* and not when there is previous user input of "turn on the light".
*
* <p>&#42; &#42;&#42;Events&#42;&#42; - allow for matching an intent by using an event name instead
* of user input. Your application can provide an event name and related parameters to the
* Dialogflow API to match an intent. For example, when your application starts, you can send a
* welcome event with a user name parameter to the Dialogflow API to match an intent with a
* personalized welcome message for the user.
*
* <p>&#42; &#42;&#42;Training phrases&#42;&#42; - provide examples of user input to train the
* Dialogflow API agent to better match intents.
*
* <p>For more information about intents, see the [Dialogflow
* documentation](https://cloud.google.com/dialogflow/docs/intents-overview).
* <p>Service Description: Service for managing [Intents][google.cloud.dialogflow.v2.Intent].
*
* <p>Sample for IntentsClient:
*
Expand All @@ -163,19 +101,8 @@
*
* ======================== SessionEntityTypesClient ========================
*
* <p>Service Description: Entities are extracted from user input and represent parameters that are
* meaningful to your application. For example, a date range, a proper name such as a geographic
* location or landmark, and so on. Entities represent actionable data for your application.
*
* <p>Session entity types are referred to as &#42;&#42;User&#42;&#42; entity types and are entities
* that are built for an individual user such as favorites, preferences, playlists, and so on. You
* can redefine a session entity type at the session level.
*
* <p>Session entity methods do not work with Google Assistant integration. Contact Dialogflow
* support if you need to use session entities with Google Assistant integration.
*
* <p>For more information about entity types, see the [Dialogflow
* documentation](https://cloud.google.com/dialogflow/docs/entities-overview).
* <p>Service Description: Service for managing
* [SessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityType].
*
* <p>Sample for SessionEntityTypesClient:
*
Expand All @@ -190,10 +117,10 @@
*
* ============== SessionsClient ==============
*
* <p>Service Description: A session represents an interaction with a user. You retrieve user input
* and pass it to the [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or
* [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) method to
* determine user intent and respond.
* <p>Service Description: A service used for session interactions.
*
* <p>For more information, see the [API interactions
* guide](https://cloud.google.com/dialogflow/docs/api-overview).
*
* <p>Sample for SessionsClient:
*
Expand Down
Loading