google-cloud-dialogflow 0.2.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -0
  3. data/AUTHENTICATION.md +199 -0
  4. data/README.md +2 -2
  5. data/lib/google/cloud/dialogflow.rb +21 -14
  6. data/lib/google/cloud/dialogflow/v2.rb +21 -14
  7. data/lib/google/cloud/dialogflow/v2/agent_pb.rb +1 -0
  8. data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +14 -14
  9. data/lib/google/cloud/dialogflow/v2/agents_client.rb +56 -36
  10. data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +51 -0
  11. data/lib/google/cloud/dialogflow/v2/context_pb.rb +1 -0
  12. data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +7 -3
  13. data/lib/google/cloud/dialogflow/v2/contexts_client.rb +48 -26
  14. data/lib/google/cloud/dialogflow/v2/credentials.rb +3 -2
  15. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/agent.rb +31 -26
  16. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/audio_config.rb +120 -0
  17. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/context.rb +8 -4
  18. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/entity_type.rb +74 -56
  19. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb +78 -44
  20. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/session.rb +111 -37
  21. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/session_entity_type.rb +11 -5
  22. data/lib/google/cloud/dialogflow/v2/doc/google/longrunning/operations.rb +2 -44
  23. data/lib/google/cloud/dialogflow/v2/doc/google/protobuf/any.rb +3 -2
  24. data/lib/google/cloud/dialogflow/v2/doc/google/protobuf/empty.rb +1 -1
  25. data/lib/google/cloud/dialogflow/v2/doc/google/protobuf/field_mask.rb +19 -27
  26. data/lib/google/cloud/dialogflow/v2/doc/google/protobuf/struct.rb +1 -1
  27. data/lib/google/cloud/dialogflow/v2/doc/google/rpc/status.rb +18 -15
  28. data/lib/google/cloud/dialogflow/v2/doc/google/type/latlng.rb +1 -35
  29. data/lib/google/cloud/dialogflow/v2/entity_type_pb.rb +1 -0
  30. data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +12 -14
  31. data/lib/google/cloud/dialogflow/v2/entity_types_client.rb +104 -69
  32. data/lib/google/cloud/dialogflow/v2/intent_pb.rb +2 -0
  33. data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +6 -4
  34. data/lib/google/cloud/dialogflow/v2/intents_client.rb +73 -45
  35. data/lib/google/cloud/dialogflow/v2/session_entity_type_pb.rb +1 -0
  36. data/lib/google/cloud/dialogflow/v2/session_entity_type_services_pb.rb +7 -2
  37. data/lib/google/cloud/dialogflow/v2/session_entity_types_client.rb +28 -8
  38. data/lib/google/cloud/dialogflow/v2/session_pb.rb +23 -0
  39. data/lib/google/cloud/dialogflow/v2/session_services_pb.rb +2 -1
  40. data/lib/google/cloud/dialogflow/v2/sessions_client.rb +15 -3
  41. data/lib/google/cloud/dialogflow/v2/webhook_pb.rb +2 -1
  42. metadata +28 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24bf72106ccea46d97757e8175577e8fed94a9f840a3d9f1ca13f44f52c5bd3a
4
- data.tar.gz: 7dc856b7b9ac7f4a440eab6caf562618b5dec2484b75209a6d3c3641a40cab8c
3
+ metadata.gz: a91f4d1ed395a053797ed4a18078793942ddf00e3a15ceac9d69d5abec649c20
4
+ data.tar.gz: 325b78d0ae5c147613862fc696600b590a3e31ebcd0bf002faca4b0076e892e1
5
5
  SHA512:
6
- metadata.gz: f6e68a62529d7f7b59a74f4d8f709cd9c7d3edea273ebfa47ca57f6159dfd8c63829aa2883d6a946e93ef0e4df04e74c8991cc683bc303ec527f17977531e419
7
- data.tar.gz: 4943a94fd6a43ec95d5e0fea954d06088f0c1d31732de48798151cfdb9f80f0cfec8e94b6e4ed6f3aea22aa0b81c5ca4ff474bc1b73e9280b57a4a68a234cf78
6
+ metadata.gz: c7f6470ded0e778f9c9f53f585a8365adbf5dee93d7dfa1179be0eb48a5e15fcf94fc23f6cad372758f0958073b3af6f1d450e880f4a7af15132c47876857298
7
+ data.tar.gz: 691fd8af3d4242eb0b5d45b05c805a2677fcb8d85094aefea5d17914266087a7849a3071a06c846df73704710a82fa7057b0658a32a9bd04d4356faebf9e83fd
data/.yardopts CHANGED
@@ -7,3 +7,5 @@
7
7
  ./lib/**/*.rb
8
8
  -
9
9
  README.md
10
+ AUTHENTICATION.md
11
+ LICENSE
data/AUTHENTICATION.md ADDED
@@ -0,0 +1,199 @@
1
+ # Authentication
2
+
3
+ In general, the google-cloud-dialogflow library uses [Service
4
+ Account](https://cloud.google.com/iam/docs/creating-managing-service-accounts)
5
+ credentials to connect to Google Cloud services. When running within [Google
6
+ Cloud Platform environments](#google-cloud-platform-environments)
7
+ the credentials will be discovered automatically. When running on other
8
+ environments, the Service Account credentials can be specified by providing the
9
+ path to the [JSON
10
+ keyfile](https://cloud.google.com/iam/docs/managing-service-account-keys) for
11
+ the account (or the JSON itself) in [environment
12
+ variables](#environment-variables). Additionally, Cloud SDK credentials can also
13
+ be discovered automatically, but this is only recommended during development.
14
+
15
+ ## Quickstart
16
+
17
+ 1. [Create a service account and credentials](#creating-a-service-account).
18
+ 2. Set the [environment variable](#environment-variables).
19
+
20
+ ```sh
21
+ export DIALOGFLOW_CREDENTIALS=/path/to/json`
22
+ ```
23
+
24
+ 3. Initialize the client.
25
+
26
+ ```ruby
27
+ require "google/cloud/dialogflow"
28
+
29
+ client = Google::Cloud::Dialogflow.new
30
+ ```
31
+
32
+ ## Project and Credential Lookup
33
+
34
+ The google-cloud-dialogflow library aims to make authentication
35
+ as simple as possible, and provides several mechanisms to configure your system
36
+ without providing **Project ID** and **Service Account Credentials** directly in
37
+ code.
38
+
39
+ **Project ID** is discovered in the following order:
40
+
41
+ 1. Specify project ID in method arguments
42
+ 2. Specify project ID in configuration
43
+ 3. Discover project ID in environment variables
44
+ 4. Discover GCE project ID
45
+ 5. Discover project ID in credentials JSON
46
+
47
+ **Credentials** are discovered in the following order:
48
+
49
+ 1. Specify credentials in method arguments
50
+ 2. Specify credentials in configuration
51
+ 3. Discover credentials path in environment variables
52
+ 4. Discover credentials JSON in environment variables
53
+ 5. Discover credentials file in the Cloud SDK's path
54
+ 6. Discover GCE credentials
55
+
56
+ ### Google Cloud Platform environments
57
+
58
+ While running on Google Cloud Platform environments such as Google Compute
59
+ Engine, Google App Engine and Google Kubernetes Engine, no extra work is needed.
60
+ The **Project ID** and **Credentials** and are discovered automatically. Code
61
+ should be written as if already authenticated. Just be sure when you [set up the
62
+ GCE instance][gce-how-to], you add the correct scopes for the APIs you want to
63
+ access. For example:
64
+
65
+ * **All APIs**
66
+ * `https://www.googleapis.com/auth/cloud-platform`
67
+ * `https://www.googleapis.com/auth/cloud-platform.read-only`
68
+ * **BigQuery**
69
+ * `https://www.googleapis.com/auth/bigquery`
70
+ * `https://www.googleapis.com/auth/bigquery.insertdata`
71
+ * **Compute Engine**
72
+ * `https://www.googleapis.com/auth/compute`
73
+ * **Datastore**
74
+ * `https://www.googleapis.com/auth/datastore`
75
+ * `https://www.googleapis.com/auth/userinfo.email`
76
+ * **DNS**
77
+ * `https://www.googleapis.com/auth/ndev.clouddns.readwrite`
78
+ * **Pub/Sub**
79
+ * `https://www.googleapis.com/auth/pubsub`
80
+ * **Storage**
81
+ * `https://www.googleapis.com/auth/devstorage.full_control`
82
+ * `https://www.googleapis.com/auth/devstorage.read_only`
83
+ * `https://www.googleapis.com/auth/devstorage.read_write`
84
+
85
+ ### Environment Variables
86
+
87
+ The **Project ID** and **Credentials JSON** can be placed in environment
88
+ variables instead of declaring them directly in code. Each service has its own
89
+ environment variable, allowing for different service accounts to be used for
90
+ different services. (See the READMEs for the individual service gems for
91
+ details.) The path to the **Credentials JSON** file can be stored in the
92
+ environment variable, or the **Credentials JSON** itself can be stored for
93
+ environments such as Docker containers where writing files is difficult or not
94
+ encouraged.
95
+
96
+ The environment variables that google-cloud-dialogflow checks for project ID are:
97
+
98
+ 1. `DIALOGFLOW_PROJECT`
99
+ 2. `GOOGLE_CLOUD_PROJECT`
100
+
101
+ The environment variables that google-cloud-dialogflow checks for credentials are configured on {Google::Cloud::Dialogflow::V2::Credentials}:
102
+
103
+ 1. `DIALOGFLOW_CREDENTIALS` - Path to JSON file, or JSON contents
104
+ 2. `DIALOGFLOW_KEYFILE` - Path to JSON file, or JSON contents
105
+ 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
106
+ 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
107
+ 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
108
+
109
+ ```ruby
110
+ require "google/cloud/dialogflow"
111
+
112
+ ENV["DIALOGFLOW_PROJECT"] = "my-project-id"
113
+ ENV["DIALOGFLOW_CREDENTIALS"] = "path/to/keyfile.json"
114
+
115
+ client = Google::Cloud::Dialogflow.new
116
+ ```
117
+
118
+ ### Configuration
119
+
120
+ The **Project ID** and **Credentials JSON** can be configured instead of placing them in environment variables or providing them as arguments.
121
+
122
+ ```ruby
123
+ require "google/cloud/dialogflow"
124
+
125
+ Google::Cloud::Dialogflow.configure do |config|
126
+ config.project_id = "my-project-id"
127
+ config.credentials = "path/to/keyfile.json"
128
+ end
129
+
130
+ client = Google::Cloud::Dialogflow.new
131
+ ```
132
+
133
+ ### Cloud SDK
134
+
135
+ This option allows for an easy way to authenticate during development. If
136
+ credentials are not provided in code or in environment variables, then Cloud SDK
137
+ credentials are discovered.
138
+
139
+ To configure your system for this, simply:
140
+
141
+ 1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
142
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
143
+ 3. Write code as if already authenticated.
144
+
145
+ **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
146
+ *should* only be used during development.
147
+
148
+ [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
149
+ [dev-console]: https://console.cloud.google.com/project
150
+
151
+ [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
152
+
153
+ [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
154
+ [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
155
+ [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
156
+
157
+ ## Creating a Service Account
158
+
159
+ Google Cloud requires a **Project ID** and **Service Account Credentials** to
160
+ connect to the APIs. You will use the **Project ID** and **JSON key file** to
161
+ connect to most services with google-cloud-dialogflow.
162
+
163
+ If you are not running this client within [Google Cloud Platform
164
+ environments](#google-cloud-platform-environments), you need a Google
165
+ Developers service account.
166
+
167
+ 1. Visit the [Google Developers Console][dev-console].
168
+ 1. Create a new project or click on an existing project.
169
+ 1. Activate the slide-out navigation tray and select **API Manager**. From
170
+ here, you will enable the APIs that your application requires.
171
+
172
+ ![Enable the APIs that your application requires][enable-apis]
173
+
174
+ *Note: You may need to enable billing in order to use these services.*
175
+
176
+ 1. Select **Credentials** from the side navigation.
177
+
178
+ You should see a screen like one of the following.
179
+
180
+ ![Create a new service account][create-new-service-account]
181
+
182
+ ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
183
+
184
+ Find the "Add credentials" drop down and select "Service account" to be
185
+ guided through downloading a new JSON key file.
186
+
187
+ If you want to re-use an existing service account, you can easily generate a
188
+ new key file. Just select the account you wish to re-use, and click "Generate
189
+ new JSON key":
190
+
191
+ ![Re-use an existing service account][reuse-service-account]
192
+
193
+ The key file you download will be used by this library to authenticate API
194
+ requests and should be stored in a secure location.
195
+
196
+ ## Troubleshooting
197
+
198
+ If you're having trouble authenticating you can ask for help by following the
199
+ {file:TROUBLESHOOTING.md Troubleshooting Guide}.
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Ruby Client for Dialogflow API ([Alpha](https://github.com/googleapis/google-cloud-ruby#versioning))
2
2
 
3
3
  [Dialogflow API][Product Documentation]:
4
- An end-to-end development suite for conversational interfaces (e.g.,
5
- chatbots, voice-powered apps and devices).
4
+ Builds conversational interfaces (for example, chatbots, and voice-powered
5
+ apps and devices).
6
6
  - [Client Library Documentation][]
7
7
  - [Product Documentation][]
8
8
 
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Google LLC
1
+ # Copyright 2019 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -24,8 +24,8 @@ module Google
24
24
  # # Ruby Client for Dialogflow API ([Alpha](https://github.com/googleapis/google-cloud-ruby#versioning))
25
25
  #
26
26
  # [Dialogflow API][Product Documentation]:
27
- # An end-to-end development suite for conversational interfaces (e.g.,
28
- # chatbots, voice-powered apps and devices).
27
+ # Builds conversational interfaces (for example, chatbots, and voice-powered
28
+ # apps and devices).
29
29
  # - [Product Documentation][]
30
30
  #
31
31
  # ## Quick Start
@@ -101,19 +101,22 @@ module Google
101
101
  #
102
102
  # You can create an agent using both Dialogflow Standard Edition and
103
103
  # Dialogflow Enterprise Edition. For details, see
104
- # [Dialogflow Editions](https://cloud.google.com/dialogflow-enterprise/docs/editions).
104
+ # [Dialogflow
105
+ # Editions](https://cloud.google.com/dialogflow-enterprise/docs/editions).
105
106
  #
106
107
  # You can save your agent for backup or versioning by exporting the agent by
107
108
  # using the {Google::Cloud::Dialogflow::V2::Agents::ExportAgent ExportAgent} method. You can import a saved
108
109
  # agent by using the {Google::Cloud::Dialogflow::V2::Agents::ImportAgent ImportAgent} method.
109
110
  #
110
111
  # Dialogflow provides several
111
- # [prebuilt agents](https://dialogflow.com/docs/prebuilt-agents) for common
112
- # conversation scenarios such as determining a date and time, converting
113
- # currency, and so on.
112
+ # [prebuilt
113
+ # agents](https://cloud.google.com/dialogflow-enterprise/docs/agents-prebuilt)
114
+ # for common conversation scenarios such as determining a date and time,
115
+ # converting currency, and so on.
114
116
  #
115
117
  # For more information about agents, see the
116
- # [Dialogflow documentation](https://dialogflow.com/docs/agents).
118
+ # [Dialogflow
119
+ # documentation](https://cloud.google.com/dialogflow-enterprise/docs/agents-overview).
117
120
  #
118
121
  # @param version [Symbol, String]
119
122
  # The major version of the service to be used. By default :v2
@@ -177,11 +180,12 @@ module Google
177
180
  # {Google::Cloud::Dialogflow::V2::Sessions::StreamingDetectIntent StreamingDetectIntent}) request,
178
181
  # or as output contexts included in the returned intent.
179
182
  # Contexts expire when an intent is matched, after the number of `DetectIntent`
180
- # requests specified by the `lifespan_count` parameter, or after 10 minutes
183
+ # requests specified by the `lifespan_count` parameter, or after 20 minutes
181
184
  # if no intents are matched for a `DetectIntent` request.
182
185
  #
183
186
  # For more information about contexts, see the
184
- # [Dialogflow documentation](https://dialogflow.com/docs/contexts).
187
+ # [Dialogflow
188
+ # documentation](https://cloud.google.com/dialogflow-enterprise/docs/contexts-overview).
185
189
  #
186
190
  # @param version [Symbol, String]
187
191
  # The major version of the service to be used. By default :v2
@@ -259,7 +263,8 @@ module Google
259
263
  # represented by the {Google::Cloud::Dialogflow::V2::SessionEntityType SessionEntityType} type.
260
264
  #
261
265
  # For more information about entity types, see the
262
- # [Dialogflow documentation](https://dialogflow.com/docs/entities).
266
+ # [Dialogflow
267
+ # documentation](https://cloud.google.com/dialogflow-enterprise/docs/entities-overview).
263
268
  #
264
269
  # @param version [Symbol, String]
265
270
  # The major version of the service to be used. By default :v2
@@ -325,7 +330,7 @@ module Google
325
330
  # * **Contexts** - provide additional context for intent analysis. For
326
331
  # example, if an intent is related to an object in your application that
327
332
  # plays music, you can provide a context to determine when to match the
328
- # intent if the user input is turn it off”. You can include a context
333
+ # intent if the user input is "turn it off". You can include a context
329
334
  # that matches the intent when there is previous user input of
330
335
  # "play music", and not when there is previous user input of
331
336
  # "turn on the light".
@@ -341,7 +346,8 @@ module Google
341
346
  # Dialogflow API agent to better match intents.
342
347
  #
343
348
  # For more information about intents, see the
344
- # [Dialogflow documentation](https://dialogflow.com/docs/intents).
349
+ # [Dialogflow
350
+ # documentation](https://cloud.google.com/dialogflow-enterprise/docs/intents-overview).
345
351
  #
346
352
  # @param version [Symbol, String]
347
353
  # The major version of the service to be used. By default :v2
@@ -404,7 +410,8 @@ module Google
404
410
  # entity type at the session level.
405
411
  #
406
412
  # For more information about entity types, see the
407
- # [Dialogflow documentation](https://dialogflow.com/docs/entities).
413
+ # [Dialogflow
414
+ # documentation](https://cloud.google.com/dialogflow-enterprise/docs/entities-overview).
408
415
  #
409
416
  # @param version [Symbol, String]
410
417
  # The major version of the service to be used. By default :v2
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Google LLC
1
+ # Copyright 2019 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -33,8 +33,8 @@ module Google
33
33
  # # Ruby Client for Dialogflow API ([Alpha](https://github.com/googleapis/google-cloud-ruby#versioning))
34
34
  #
35
35
  # [Dialogflow API][Product Documentation]:
36
- # An end-to-end development suite for conversational interfaces (e.g.,
37
- # chatbots, voice-powered apps and devices).
36
+ # Builds conversational interfaces (for example, chatbots, and voice-powered
37
+ # apps and devices).
38
38
  # - [Product Documentation][]
39
39
  #
40
40
  # ## Quick Start
@@ -102,19 +102,22 @@ module Google
102
102
  #
103
103
  # You can create an agent using both Dialogflow Standard Edition and
104
104
  # Dialogflow Enterprise Edition. For details, see
105
- # [Dialogflow Editions](https://cloud.google.com/dialogflow-enterprise/docs/editions).
105
+ # [Dialogflow
106
+ # Editions](https://cloud.google.com/dialogflow-enterprise/docs/editions).
106
107
  #
107
108
  # You can save your agent for backup or versioning by exporting the agent by
108
109
  # using the {Google::Cloud::Dialogflow::V2::Agents::ExportAgent ExportAgent} method. You can import a saved
109
110
  # agent by using the {Google::Cloud::Dialogflow::V2::Agents::ImportAgent ImportAgent} method.
110
111
  #
111
112
  # Dialogflow provides several
112
- # [prebuilt agents](https://dialogflow.com/docs/prebuilt-agents) for common
113
- # conversation scenarios such as determining a date and time, converting
114
- # currency, and so on.
113
+ # [prebuilt
114
+ # agents](https://cloud.google.com/dialogflow-enterprise/docs/agents-prebuilt)
115
+ # for common conversation scenarios such as determining a date and time,
116
+ # converting currency, and so on.
115
117
  #
116
118
  # For more information about agents, see the
117
- # [Dialogflow documentation](https://dialogflow.com/docs/agents).
119
+ # [Dialogflow
120
+ # documentation](https://cloud.google.com/dialogflow-enterprise/docs/agents-overview).
118
121
  #
119
122
  # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
120
123
  # Provides the means for authenticating requests made by the client. This parameter can
@@ -182,11 +185,12 @@ module Google
182
185
  # {Google::Cloud::Dialogflow::V2::Sessions::StreamingDetectIntent StreamingDetectIntent}) request,
183
186
  # or as output contexts included in the returned intent.
184
187
  # Contexts expire when an intent is matched, after the number of `DetectIntent`
185
- # requests specified by the `lifespan_count` parameter, or after 10 minutes
188
+ # requests specified by the `lifespan_count` parameter, or after 20 minutes
186
189
  # if no intents are matched for a `DetectIntent` request.
187
190
  #
188
191
  # For more information about contexts, see the
189
- # [Dialogflow documentation](https://dialogflow.com/docs/contexts).
192
+ # [Dialogflow
193
+ # documentation](https://cloud.google.com/dialogflow-enterprise/docs/contexts-overview).
190
194
  #
191
195
  # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
192
196
  # Provides the means for authenticating requests made by the client. This parameter can
@@ -268,7 +272,8 @@ module Google
268
272
  # represented by the {Google::Cloud::Dialogflow::V2::SessionEntityType SessionEntityType} type.
269
273
  #
270
274
  # For more information about entity types, see the
271
- # [Dialogflow documentation](https://dialogflow.com/docs/entities).
275
+ # [Dialogflow
276
+ # documentation](https://cloud.google.com/dialogflow-enterprise/docs/entities-overview).
272
277
  #
273
278
  # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
274
279
  # Provides the means for authenticating requests made by the client. This parameter can
@@ -338,7 +343,7 @@ module Google
338
343
  # * **Contexts** - provide additional context for intent analysis. For
339
344
  # example, if an intent is related to an object in your application that
340
345
  # plays music, you can provide a context to determine when to match the
341
- # intent if the user input is turn it off”. You can include a context
346
+ # intent if the user input is "turn it off". You can include a context
342
347
  # that matches the intent when there is previous user input of
343
348
  # "play music", and not when there is previous user input of
344
349
  # "turn on the light".
@@ -354,7 +359,8 @@ module Google
354
359
  # Dialogflow API agent to better match intents.
355
360
  #
356
361
  # For more information about intents, see the
357
- # [Dialogflow documentation](https://dialogflow.com/docs/intents).
362
+ # [Dialogflow
363
+ # documentation](https://cloud.google.com/dialogflow-enterprise/docs/intents-overview).
358
364
  #
359
365
  # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
360
366
  # Provides the means for authenticating requests made by the client. This parameter can
@@ -421,7 +427,8 @@ module Google
421
427
  # entity type at the session level.
422
428
  #
423
429
  # For more information about entity types, see the
424
- # [Dialogflow documentation](https://dialogflow.com/docs/entities).
430
+ # [Dialogflow
431
+ # documentation](https://cloud.google.com/dialogflow-enterprise/docs/entities-overview).
425
432
  #
426
433
  # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
427
434
  # Provides the means for authenticating requests made by the client. This parameter can
@@ -5,6 +5,7 @@
5
5
  require 'google/protobuf'
6
6
 
7
7
  require 'google/api/annotations_pb'
8
+ require 'google/api/resource_pb'
8
9
  require 'google/longrunning/operations_pb'
9
10
  require 'google/protobuf/empty_pb'
10
11
  require 'google/protobuf/field_mask_pb'
@@ -1,7 +1,7 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # Source: google/cloud/dialogflow/v2/agent.proto for package 'google.cloud.dialogflow.v2'
3
3
  # Original file comments:
4
- # Copyright 2018 Google Inc.
4
+ # Copyright 2019 Google LLC.
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
@@ -15,6 +15,7 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
+ #
18
19
 
19
20
 
20
21
  require 'grpc'
@@ -37,19 +38,22 @@ module Google
37
38
  #
38
39
  # You can create an agent using both Dialogflow Standard Edition and
39
40
  # Dialogflow Enterprise Edition. For details, see
40
- # [Dialogflow Editions](/dialogflow-enterprise/docs/editions).
41
+ # [Dialogflow
42
+ # Editions](https://cloud.google.com/dialogflow-enterprise/docs/editions).
41
43
  #
42
44
  # You can save your agent for backup or versioning by exporting the agent by
43
45
  # using the [ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent] method. You can import a saved
44
46
  # agent by using the [ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent] method.
45
47
  #
46
48
  # Dialogflow provides several
47
- # [prebuilt agents](https://dialogflow.com/docs/prebuilt-agents) for common
48
- # conversation scenarios such as determining a date and time, converting
49
- # currency, and so on.
49
+ # [prebuilt
50
+ # agents](https://cloud.google.com/dialogflow-enterprise/docs/agents-prebuilt)
51
+ # for common conversation scenarios such as determining a date and time,
52
+ # converting currency, and so on.
50
53
  #
51
54
  # For more information about agents, see the
52
- # [Dialogflow documentation](https://dialogflow.com/docs/agents).
55
+ # [Dialogflow
56
+ # documentation](https://cloud.google.com/dialogflow-enterprise/docs/agents-overview).
53
57
  class Service
54
58
 
55
59
  include GRPC::GenericService
@@ -70,13 +74,11 @@ module Google
70
74
  rpc :SearchAgents, SearchAgentsRequest, SearchAgentsResponse
71
75
  # Trains the specified agent.
72
76
  #
73
- # Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
74
- # metadata: [google.protobuf.Struct][google.protobuf.Struct]>
77
+ # Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
75
78
  rpc :TrainAgent, TrainAgentRequest, Google::Longrunning::Operation
76
79
  # Exports the specified agent to a ZIP file.
77
80
  #
78
- # Operation <response: [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse],
79
- # metadata: [google.protobuf.Struct][google.protobuf.Struct]>
81
+ # Operation <response: [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]>
80
82
  rpc :ExportAgent, ExportAgentRequest, Google::Longrunning::Operation
81
83
  # Imports the specified agent from a ZIP file.
82
84
  #
@@ -84,16 +86,14 @@ module Google
84
86
  # Intents and entity types with the same name are replaced with the new
85
87
  # versions from ImportAgentRequest.
86
88
  #
87
- # Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
88
- # metadata: [google.protobuf.Struct][google.protobuf.Struct]>
89
+ # Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
89
90
  rpc :ImportAgent, ImportAgentRequest, Google::Longrunning::Operation
90
91
  # Restores the specified agent from a ZIP file.
91
92
  #
92
93
  # Replaces the current agent version with a new one. All the intents and
93
94
  # entity types in the older version are deleted.
94
95
  #
95
- # Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
96
- # metadata: [google.protobuf.Struct][google.protobuf.Struct]>
96
+ # Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
97
97
  rpc :RestoreAgent, RestoreAgentRequest, Google::Longrunning::Operation
98
98
  end
99
99