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

Commit

Permalink
feat: added support for custom content types (#250)
Browse files Browse the repository at this point in the history
* changes without context

        autosynth cannot find the source of changes triggered by earlier changes in this
        repository, or by version upgrades to tools such as linters.

* fix: publish missing client config annotations

PiperOrigin-RevId: 322420178

Source-Author: Google APIs <noreply@google.com>
Source-Date: Tue Jul 21 12:43:47 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: be0c5a9b1b88ca3bb8ad993ae7b2e6affde7fee2
Source-Link: googleapis/googleapis@be0c5a9

* fix!: migrate dialogflow/v2beta1 to gapic v2

PiperOrigin-RevId: 322667213

Source-Author: Google APIs <noreply@google.com>
Source-Date: Wed Jul 22 15:22:03 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 1d3ca22734bfd1c00d229e49009547c43f2d7a48
Source-Link: googleapis/googleapis@1d3ca22

* docs: more detailed docs on APIs such as Environment, Intents, Sessions.

PiperOrigin-RevId: 323086730

Source-Author: Google APIs <noreply@google.com>
Source-Date: Fri Jul 24 15:42:41 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: a6b2dac798ed266136e990a2319b2e2e96f3bdbe
Source-Link: googleapis/googleapis@a6b2dac

* feat: added support for custom content types docs: clarified wording around quota usage

PiperOrigin-RevId: 323397413

Source-Author: Google APIs <noreply@google.com>
Source-Date: Mon Jul 27 11:04:11 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: ca22cfe3477f1c0095fba606d5a18c52d918a0dd
Source-Link: googleapis/googleapis@ca22cfe

* feat: added support for custom content types docs: clarified wording around quota usage

PiperOrigin-RevId: 323436667

Source-Author: Google APIs <noreply@google.com>
Source-Date: Mon Jul 27 14:05:51 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 546f389d95dbbc88d9d5a00fae25b29d49a0d5b6
Source-Link: googleapis/googleapis@546f389

* chore: allow resource name change from ProjectAgentName to AgentName

Co-authored-by: Jeff Ching <chingor@google.com>
  • Loading branch information
yoshi-automation and chingor13 committed Aug 3, 2020
1 parent 2897483 commit f06e8af
Show file tree
Hide file tree
Showing 122 changed files with 6,364 additions and 2,562 deletions.
2 changes: 1 addition & 1 deletion google-cloud-dialogflow-bom/pom.xml
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
@@ -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>
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
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
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
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
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
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
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

0 comments on commit f06e8af

Please sign in to comment.