google-api-client 0.17.1 → 0.17.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +33 -0
  3. data/generated/google/apis/admin_directory_v1.rb +1 -1
  4. data/generated/google/apis/admin_directory_v1/classes.rb +26 -0
  5. data/generated/google/apis/admin_directory_v1/representations.rb +14 -0
  6. data/generated/google/apis/admin_directory_v1/service.rb +90 -52
  7. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  8. data/generated/google/apis/androidenterprise_v1/classes.rb +150 -3
  9. data/generated/google/apis/androidenterprise_v1/representations.rb +65 -0
  10. data/generated/google/apis/androidenterprise_v1/service.rb +50 -4
  11. data/generated/google/apis/appengine_v1.rb +1 -1
  12. data/generated/google/apis/appengine_v1/classes.rb +45 -0
  13. data/generated/google/apis/appengine_v1/representations.rb +18 -0
  14. data/generated/google/apis/appengine_v1beta.rb +1 -1
  15. data/generated/google/apis/appengine_v1beta/classes.rb +8 -0
  16. data/generated/google/apis/appengine_v1beta/representations.rb +1 -0
  17. data/generated/google/apis/bigquerydatatransfer_v1.rb +1 -1
  18. data/generated/google/apis/bigquerydatatransfer_v1/service.rb +4 -4
  19. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  20. data/generated/google/apis/cloudbuild_v1/classes.rb +17 -0
  21. data/generated/google/apis/cloudbuild_v1/representations.rb +2 -0
  22. data/generated/google/apis/cloudiot_v1.rb +1 -1
  23. data/generated/google/apis/cloudiot_v1/classes.rb +5 -1
  24. data/generated/google/apis/cloudkms_v1.rb +1 -1
  25. data/generated/google/apis/cloudkms_v1/classes.rb +2 -1
  26. data/generated/google/apis/cloudtasks_v2beta2.rb +1 -1
  27. data/generated/google/apis/cloudtasks_v2beta2/classes.rb +57 -61
  28. data/generated/google/apis/cloudtasks_v2beta2/representations.rb +1 -1
  29. data/generated/google/apis/cloudtasks_v2beta2/service.rb +20 -19
  30. data/generated/google/apis/compute_alpha.rb +1 -1
  31. data/generated/google/apis/compute_beta.rb +1 -1
  32. data/generated/google/apis/compute_v1.rb +1 -1
  33. data/generated/google/apis/container_v1.rb +1 -1
  34. data/generated/google/apis/container_v1/classes.rb +4 -6
  35. data/generated/google/apis/container_v1beta1.rb +1 -1
  36. data/generated/google/apis/container_v1beta1/classes.rb +4 -6
  37. data/generated/google/apis/customsearch_v1.rb +1 -1
  38. data/generated/google/apis/customsearch_v1/service.rb +140 -0
  39. data/generated/google/apis/dialogflow_v2beta1.rb +35 -0
  40. data/generated/google/apis/dialogflow_v2beta1/classes.rb +2536 -0
  41. data/generated/google/apis/dialogflow_v2beta1/representations.rb +1078 -0
  42. data/generated/google/apis/dialogflow_v2beta1/service.rb +1398 -0
  43. data/generated/google/apis/dlp_v2beta1.rb +1 -1
  44. data/generated/google/apis/genomics_v1alpha2.rb +1 -1
  45. data/generated/google/apis/genomics_v1alpha2/classes.rb +7 -5
  46. data/generated/google/apis/logging_v2.rb +1 -1
  47. data/generated/google/apis/logging_v2/classes.rb +4 -4
  48. data/generated/google/apis/logging_v2beta1.rb +1 -1
  49. data/generated/google/apis/logging_v2beta1/classes.rb +4 -4
  50. data/generated/google/apis/monitoring_v3.rb +1 -1
  51. data/generated/google/apis/monitoring_v3/classes.rb +55 -46
  52. data/generated/google/apis/monitoring_v3/representations.rb +19 -0
  53. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  54. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +16 -60
  55. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +1 -0
  56. data/generated/google/apis/script_v1.rb +1 -1
  57. data/generated/google/apis/script_v1/classes.rb +19 -21
  58. data/generated/google/apis/serviceconsumermanagement_v1.rb +38 -0
  59. data/generated/google/apis/serviceconsumermanagement_v1/classes.rb +3945 -0
  60. data/generated/google/apis/serviceconsumermanagement_v1/representations.rb +1235 -0
  61. data/generated/google/apis/serviceconsumermanagement_v1/service.rb +467 -0
  62. data/generated/google/apis/slides_v1.rb +1 -1
  63. data/generated/google/apis/slides_v1/classes.rb +16 -0
  64. data/generated/google/apis/slides_v1/representations.rb +2 -0
  65. data/generated/google/apis/sourcerepo_v1.rb +1 -1
  66. data/generated/google/apis/sourcerepo_v1/classes.rb +3 -2
  67. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  68. data/generated/google/apis/storagetransfer_v1/classes.rb +4 -4
  69. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  70. data/generated/google/apis/toolresults_v1beta3/classes.rb +21 -21
  71. data/generated/google/apis/tpu_v1alpha1.rb +34 -0
  72. data/generated/google/apis/tpu_v1alpha1/classes.rb +530 -0
  73. data/generated/google/apis/tpu_v1alpha1/representations.rb +191 -0
  74. data/generated/google/apis/tpu_v1alpha1/service.rb +474 -0
  75. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  76. data/lib/google/apis/version.rb +1 -1
  77. metadata +14 -2
@@ -487,7 +487,7 @@ module Google
487
487
  class RenewLeaseRequest
488
488
  # @private
489
489
  class Representation < Google::Apis::Core::JsonRepresentation
490
- property :new_lease_duration, as: 'newLeaseDuration'
490
+ property :lease_duration, as: 'leaseDuration'
491
491
  property :response_view, as: 'responseView'
492
492
  property :schedule_time, as: 'scheduleTime'
493
493
  end
@@ -118,11 +118,11 @@ module Google
118
118
  end
119
119
 
120
120
  # Creates a queue.
121
- # WARNING: This method is only available to whitelisted
122
- # users. Using this method carries some risk. Read
121
+ # WARNING: Using this method may have unintended side effects if you are
122
+ # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
123
+ # Read
123
124
  # [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)
124
- # carefully and then sign up for
125
- # [whitelist access to this method](https://goo.gl/Fe5mUy).
125
+ # carefully before using this method.
126
126
  # @param [String] parent
127
127
  # Required.
128
128
  # The location name in which the queue will be created.
@@ -164,11 +164,11 @@ module Google
164
164
  # This command will delete the queue even if it has tasks in it.
165
165
  # Note: If you delete a queue, a queue with the same name can't be created
166
166
  # for 7 days.
167
- # WARNING: This method is only available to whitelisted
168
- # users. Using this method carries some risk. Read
167
+ # WARNING: Using this method may have unintended side effects if you are
168
+ # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
169
+ # Read
169
170
  # [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)
170
- # carefully and then sign up for
171
- # [whitelist access to this method](https://goo.gl/Fe5mUy).
171
+ # carefully before using this method.
172
172
  # @param [String] name
173
173
  # Required.
174
174
  # The queue name. For example:
@@ -334,22 +334,19 @@ module Google
334
334
  # Updates a queue.
335
335
  # This method creates the queue if it does not exist and updates
336
336
  # the queue if it does exist.
337
- # WARNING: This method is only available to whitelisted
338
- # users. Using this method carries some risk. Read
337
+ # WARNING: Using this method may have unintended side effects if you are
338
+ # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
339
+ # Read
339
340
  # [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)
340
- # carefully and then sign up for
341
- # [whitelist access to this method](https://goo.gl/Fe5mUy).
341
+ # carefully before using this method.
342
342
  # @param [String] name
343
343
  # The queue name.
344
344
  # The queue name must have the following format:
345
345
  # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
346
- # * `PROJECT_ID` can contain uppercase and lowercase letters,
347
- # numbers, hyphens, colons, and periods; that is, it must match
348
- # the regular expression: `[a-zA-Z\\d-:\\.]+`.
349
- # * `QUEUE_ID` can contain uppercase and lowercase letters,
350
- # numbers, and hyphens; that is, it must match the regular
351
- # expression: `[a-zA-Z\\d-]+`. The maximum length is 100
352
- # characters.
346
+ # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
347
+ # hyphens (-), colons (:), or periods (.).
348
+ # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
349
+ # hyphens (-). The maximum length is 100 characters.
353
350
  # Caller-specified and required in CreateQueueRequest, after which
354
351
  # it becomes output only.
355
352
  # @param [Google::Apis::CloudtasksV2beta2::Queue] queue_object
@@ -598,6 +595,10 @@ module Google
598
595
  # PullTasksResponse. After the task is acknowledged, it will
599
596
  # not be returned by a later CloudTasks.PullTasks,
600
597
  # CloudTasks.GetTask, or CloudTasks.ListTasks.
598
+ # To acknowledge multiple tasks at the same time, use
599
+ # [HTTP batching](/storage/docs/json_api/v1/how-tos/batch)
600
+ # or the batching documentation for your client library, for example
601
+ # https://developers.google.com/api-client-library/python/guide/batch.
601
602
  # @param [String] name
602
603
  # Required.
603
604
  # The task name. For example:
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://developers.google.com/compute/docs/reference/latest/
26
26
  module ComputeAlpha
27
27
  VERSION = 'Alpha'
28
- REVISION = '20171026'
28
+ REVISION = '20171114'
29
29
 
30
30
  # View and manage your data across Google Cloud Platform services
31
31
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://developers.google.com/compute/docs/reference/latest/
26
26
  module ComputeBeta
27
27
  VERSION = 'Beta'
28
- REVISION = '20171010'
28
+ REVISION = '20171114'
29
29
 
30
30
  # View and manage your data across Google Cloud Platform services
31
31
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://developers.google.com/compute/docs/reference/latest/
26
26
  module ComputeV1
27
27
  VERSION = 'V1'
28
- REVISION = '20171026'
28
+ REVISION = '20171114'
29
29
 
30
30
  # View and manage your data across Google Cloud Platform services
31
31
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -26,7 +26,7 @@ module Google
26
26
  # @see https://cloud.google.com/container-engine/
27
27
  module ContainerV1
28
28
  VERSION = 'V1'
29
- REVISION = '20171030'
29
+ REVISION = '20171111'
30
30
 
31
31
  # View and manage your data across Google Cloud Platform services
32
32
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -270,9 +270,7 @@ module Google
270
270
  # @return [Fixnum]
271
271
  attr_accessor :initial_node_count
272
272
 
273
- # [Output only] The resource URLs of [instance
274
- # groups](/compute/docs/instance-groups/) associated with this
275
- # cluster.
273
+ # Deprecated. Use node_pools.instance_group_urls.
276
274
  # Corresponds to the JSON property `instanceGroupUrls`
277
275
  # @return [Array<String>]
278
276
  attr_accessor :instance_group_urls
@@ -1334,9 +1332,9 @@ module Google
1334
1332
  # @return [Fixnum]
1335
1333
  attr_accessor :initial_node_count
1336
1334
 
1337
- # [Output only] The resource URLs of [instance
1338
- # groups](/compute/docs/instance-groups/) associated with this
1339
- # node pool.
1335
+ # [Output only] The resource URLs of the [managed instance
1336
+ # groups](/compute/docs/instance-groups/creating-groups-of-managed-instances)
1337
+ # associated with this node pool.
1340
1338
  # Corresponds to the JSON property `instanceGroupUrls`
1341
1339
  # @return [Array<String>]
1342
1340
  attr_accessor :instance_group_urls
@@ -26,7 +26,7 @@ module Google
26
26
  # @see https://cloud.google.com/container-engine/
27
27
  module ContainerV1beta1
28
28
  VERSION = 'V1beta1'
29
- REVISION = '20171030'
29
+ REVISION = '20171111'
30
30
 
31
31
  # View and manage your data across Google Cloud Platform services
32
32
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -300,9 +300,7 @@ module Google
300
300
  # @return [Fixnum]
301
301
  attr_accessor :initial_node_count
302
302
 
303
- # [Output only] The resource URLs of [instance
304
- # groups](/compute/docs/instance-groups/) associated with this
305
- # cluster.
303
+ # Deprecated. Use node_pools.instance_group_urls.
306
304
  # Corresponds to the JSON property `instanceGroupUrls`
307
305
  # @return [Array<String>]
308
306
  attr_accessor :instance_group_urls
@@ -1426,9 +1424,9 @@ module Google
1426
1424
  # @return [Fixnum]
1427
1425
  attr_accessor :initial_node_count
1428
1426
 
1429
- # [Output only] The resource URLs of [instance
1430
- # groups](/compute/docs/instance-groups/) associated with this
1431
- # node pool.
1427
+ # [Output only] The resource URLs of the [managed instance
1428
+ # groups](/compute/docs/instance-groups/creating-groups-of-managed-instances)
1429
+ # associated with this node pool.
1432
1430
  # Corresponds to the JSON property `instanceGroupUrls`
1433
1431
  # @return [Array<String>]
1434
1432
  attr_accessor :instance_group_urls
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://developers.google.com/custom-search/v1/using_rest
26
26
  module CustomsearchV1
27
27
  VERSION = 'V1'
28
- REVISION = '20170615'
28
+ REVISION = '20171116'
29
29
  end
30
30
  end
31
31
  end
@@ -191,6 +191,146 @@ module Google
191
191
  command.query['userIp'] = user_ip unless user_ip.nil?
192
192
  execute_or_queue_command(command, &block)
193
193
  end
194
+
195
+ # (Closed Beta API) Returns metadata about the search performed, metadata about
196
+ # the custom search engine used for the search, and the search results only for
197
+ # site-restrict cses.
198
+ # @param [String] q
199
+ # Query
200
+ # @param [String] c2coff
201
+ # Turns off the translation between zh-CN and zh-TW.
202
+ # @param [String] cr
203
+ # Country restrict(s).
204
+ # @param [String] cx
205
+ # The custom search engine ID to scope this search query
206
+ # @param [String] date_restrict
207
+ # Specifies all search results are from a time period
208
+ # @param [String] exact_terms
209
+ # Identifies a phrase that all documents in the search results must contain
210
+ # @param [String] exclude_terms
211
+ # Identifies a word or phrase that should not appear in any documents in the
212
+ # search results
213
+ # @param [String] file_type
214
+ # Returns images of a specified type. Some of the allowed values are: bmp, gif,
215
+ # png, jpg, svg, pdf, ...
216
+ # @param [String] filter
217
+ # Controls turning on or off the duplicate content filter.
218
+ # @param [String] gl
219
+ # Geolocation of end user.
220
+ # @param [String] googlehost
221
+ # The local Google domain to use to perform the search.
222
+ # @param [String] high_range
223
+ # Creates a range in form as_nlo value..as_nhi value and attempts to append it
224
+ # to query
225
+ # @param [String] hl
226
+ # Sets the user interface language.
227
+ # @param [String] hq
228
+ # Appends the extra query terms to the query.
229
+ # @param [String] img_color_type
230
+ # Returns black and white, grayscale, or color images: mono, gray, and color.
231
+ # @param [String] img_dominant_color
232
+ # Returns images of a specific dominant color: yellow, green, teal, blue, purple,
233
+ # pink, white, gray, black and brown.
234
+ # @param [String] img_size
235
+ # Returns images of a specified size, where size can be one of: icon, small,
236
+ # medium, large, xlarge, xxlarge, and huge.
237
+ # @param [String] img_type
238
+ # Returns images of a type, which can be one of: clipart, face, lineart, news,
239
+ # and photo.
240
+ # @param [String] link_site
241
+ # Specifies that all search results should contain a link to a particular URL
242
+ # @param [String] low_range
243
+ # Creates a range in form as_nlo value..as_nhi value and attempts to append it
244
+ # to query
245
+ # @param [String] lr
246
+ # The language restriction for the search results
247
+ # @param [Fixnum] num
248
+ # Number of search results to return
249
+ # @param [String] or_terms
250
+ # Provides additional search terms to check for in a document, where each
251
+ # document in the search results must contain at least one of the additional
252
+ # search terms
253
+ # @param [String] related_site
254
+ # Specifies that all search results should be pages that are related to the
255
+ # specified URL
256
+ # @param [String] rights
257
+ # Filters based on licensing. Supported values include: cc_publicdomain,
258
+ # cc_attribute, cc_sharealike, cc_noncommercial, cc_nonderived and combinations
259
+ # of these.
260
+ # @param [String] safe
261
+ # Search safety level
262
+ # @param [String] search_type
263
+ # Specifies the search type: image.
264
+ # @param [String] site_search
265
+ # Specifies all search results should be pages from a given site
266
+ # @param [String] site_search_filter
267
+ # Controls whether to include or exclude results from the site named in the
268
+ # as_sitesearch parameter
269
+ # @param [String] sort
270
+ # The sort expression to apply to the results
271
+ # @param [Fixnum] start
272
+ # The index of the first result to return
273
+ # @param [String] fields
274
+ # Selector specifying which fields to include in a partial response.
275
+ # @param [String] quota_user
276
+ # Available to use for quota purposes for server-side applications. Can be any
277
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
278
+ # Overrides userIp if both are provided.
279
+ # @param [String] user_ip
280
+ # IP address of the site where the request originates. Use this if you want to
281
+ # enforce per-user limits.
282
+ # @param [Google::Apis::RequestOptions] options
283
+ # Request-specific options
284
+ #
285
+ # @yield [result, err] Result & error if block supplied
286
+ # @yieldparam result [Google::Apis::CustomsearchV1::Search] parsed result object
287
+ # @yieldparam err [StandardError] error object if request failed
288
+ #
289
+ # @return [Google::Apis::CustomsearchV1::Search]
290
+ #
291
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
292
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
293
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
294
+ def list_cse_siterestricts(q, c2coff: nil, cr: nil, cx: nil, date_restrict: nil, exact_terms: nil, exclude_terms: nil, file_type: nil, filter: nil, gl: nil, googlehost: nil, high_range: nil, hl: nil, hq: nil, img_color_type: nil, img_dominant_color: nil, img_size: nil, img_type: nil, link_site: nil, low_range: nil, lr: nil, num: nil, or_terms: nil, related_site: nil, rights: nil, safe: nil, search_type: nil, site_search: nil, site_search_filter: nil, sort: nil, start: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
295
+ command = make_simple_command(:get, 'v1/siterestrict', options)
296
+ command.response_representation = Google::Apis::CustomsearchV1::Search::Representation
297
+ command.response_class = Google::Apis::CustomsearchV1::Search
298
+ command.query['c2coff'] = c2coff unless c2coff.nil?
299
+ command.query['cr'] = cr unless cr.nil?
300
+ command.query['cx'] = cx unless cx.nil?
301
+ command.query['dateRestrict'] = date_restrict unless date_restrict.nil?
302
+ command.query['exactTerms'] = exact_terms unless exact_terms.nil?
303
+ command.query['excludeTerms'] = exclude_terms unless exclude_terms.nil?
304
+ command.query['fileType'] = file_type unless file_type.nil?
305
+ command.query['filter'] = filter unless filter.nil?
306
+ command.query['gl'] = gl unless gl.nil?
307
+ command.query['googlehost'] = googlehost unless googlehost.nil?
308
+ command.query['highRange'] = high_range unless high_range.nil?
309
+ command.query['hl'] = hl unless hl.nil?
310
+ command.query['hq'] = hq unless hq.nil?
311
+ command.query['imgColorType'] = img_color_type unless img_color_type.nil?
312
+ command.query['imgDominantColor'] = img_dominant_color unless img_dominant_color.nil?
313
+ command.query['imgSize'] = img_size unless img_size.nil?
314
+ command.query['imgType'] = img_type unless img_type.nil?
315
+ command.query['linkSite'] = link_site unless link_site.nil?
316
+ command.query['lowRange'] = low_range unless low_range.nil?
317
+ command.query['lr'] = lr unless lr.nil?
318
+ command.query['num'] = num unless num.nil?
319
+ command.query['orTerms'] = or_terms unless or_terms.nil?
320
+ command.query['q'] = q unless q.nil?
321
+ command.query['relatedSite'] = related_site unless related_site.nil?
322
+ command.query['rights'] = rights unless rights.nil?
323
+ command.query['safe'] = safe unless safe.nil?
324
+ command.query['searchType'] = search_type unless search_type.nil?
325
+ command.query['siteSearch'] = site_search unless site_search.nil?
326
+ command.query['siteSearchFilter'] = site_search_filter unless site_search_filter.nil?
327
+ command.query['sort'] = sort unless sort.nil?
328
+ command.query['start'] = start unless start.nil?
329
+ command.query['fields'] = fields unless fields.nil?
330
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
331
+ command.query['userIp'] = user_ip unless user_ip.nil?
332
+ execute_or_queue_command(command, &block)
333
+ end
194
334
 
195
335
  protected
196
336
 
@@ -0,0 +1,35 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/dialogflow_v2beta1/service.rb'
16
+ require 'google/apis/dialogflow_v2beta1/classes.rb'
17
+ require 'google/apis/dialogflow_v2beta1/representations.rb'
18
+
19
+ module Google
20
+ module Apis
21
+ # Dialogflow API
22
+ #
23
+ # An end-to-end development suite for conversational interfaces (e.g., chatbots,
24
+ # voice-powered apps and devices).
25
+ #
26
+ # @see https://cloud.google.com/dialogflow-enterprise/
27
+ module DialogflowV2beta1
28
+ VERSION = 'V2beta1'
29
+ REVISION = '20171115'
30
+
31
+ # View and manage your data across Google Cloud Platform services
32
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,2536 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module DialogflowV2beta1
24
+
25
+ # Represents a conversational agent.
26
+ class Agent
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # Optional. The URI of the agent's avatar.
30
+ # Avatars are used throughout API.AI console and in the self-hosted
31
+ # [Web Demo](https://dialogflow.com/docs/integrations/web-demo) integration.
32
+ # Corresponds to the JSON property `avatarUri`
33
+ # @return [String]
34
+ attr_accessor :avatar_uri
35
+
36
+ # Optional. To filter out false positive results and still get variety in
37
+ # matched natural language inputs for your agent, you can tune the machine
38
+ # learning classification threshold. If the returned score value is less than
39
+ # the threshold value, then a fallback intent is be triggered or, if there
40
+ # are no fallback intents defined, no intent will be triggered. The score
41
+ # values range from 0.0 (completely uncertain) to 1.0 (completely certain).
42
+ # If set to 0.0, the default of 0.3 is used.
43
+ # Corresponds to the JSON property `classificationThreshold`
44
+ # @return [Float]
45
+ attr_accessor :classification_threshold
46
+
47
+ # Required. The default language of the agent as a language tag. See
48
+ # [Language Support](https://dialogflow.com/docs/reference/language) for a
49
+ # list of the currently supported language codes.
50
+ # This field cannot be set by the `Update` method.
51
+ # Corresponds to the JSON property `defaultLanguageCode`
52
+ # @return [String]
53
+ attr_accessor :default_language_code
54
+
55
+ # Optional. The description of this agent.
56
+ # The maximum length is 500 characters. If exceeded, the request is rejected.
57
+ # Corresponds to the JSON property `description`
58
+ # @return [String]
59
+ attr_accessor :description
60
+
61
+ # Required. The name of this agent.
62
+ # Corresponds to the JSON property `displayName`
63
+ # @return [String]
64
+ attr_accessor :display_name
65
+
66
+ # Optional. Determines whether this agent should log conversation queries.
67
+ # Corresponds to the JSON property `enableLogging`
68
+ # @return [Boolean]
69
+ attr_accessor :enable_logging
70
+ alias_method :enable_logging?, :enable_logging
71
+
72
+ # Optional. Determines how intents are detected from user queries.
73
+ # Corresponds to the JSON property `matchMode`
74
+ # @return [String]
75
+ attr_accessor :match_mode
76
+
77
+ # Required. The project of this agent.
78
+ # Format: `projects/<Project ID>`.
79
+ # Corresponds to the JSON property `parent`
80
+ # @return [String]
81
+ attr_accessor :parent
82
+
83
+ # Optional. The list of all languages supported by this agent (except for the
84
+ # `default_language_code`).
85
+ # Corresponds to the JSON property `supportedLanguageCodes`
86
+ # @return [Array<String>]
87
+ attr_accessor :supported_language_codes
88
+
89
+ # Required. The time zone of this agent from the
90
+ # [time zone database](https://www.iana.org/time-zones), e.g.,
91
+ # America/New_York, Europe/Paris.
92
+ # Corresponds to the JSON property `timeZone`
93
+ # @return [String]
94
+ attr_accessor :time_zone
95
+
96
+ def initialize(**args)
97
+ update!(**args)
98
+ end
99
+
100
+ # Update properties of this object
101
+ def update!(**args)
102
+ @avatar_uri = args[:avatar_uri] if args.key?(:avatar_uri)
103
+ @classification_threshold = args[:classification_threshold] if args.key?(:classification_threshold)
104
+ @default_language_code = args[:default_language_code] if args.key?(:default_language_code)
105
+ @description = args[:description] if args.key?(:description)
106
+ @display_name = args[:display_name] if args.key?(:display_name)
107
+ @enable_logging = args[:enable_logging] if args.key?(:enable_logging)
108
+ @match_mode = args[:match_mode] if args.key?(:match_mode)
109
+ @parent = args[:parent] if args.key?(:parent)
110
+ @supported_language_codes = args[:supported_language_codes] if args.key?(:supported_language_codes)
111
+ @time_zone = args[:time_zone] if args.key?(:time_zone)
112
+ end
113
+ end
114
+
115
+ # The request message for EntityTypes.BatchCreateEntities.
116
+ class BatchCreateEntitiesRequest
117
+ include Google::Apis::Core::Hashable
118
+
119
+ # Required. The collection of entities to create.
120
+ # Corresponds to the JSON property `entities`
121
+ # @return [Array<Google::Apis::DialogflowV2beta1::EntityTypeEntity>]
122
+ attr_accessor :entities
123
+
124
+ # Optional. The language of entity synonyms defined in `entities`. If not
125
+ # specified, the agent's default language is used.
126
+ # [More than a dozen
127
+ # languages](https://dialogflow.com/docs/reference/language) are supported.
128
+ # Note: languages must be enabled in the agent, before they can be used.
129
+ # Corresponds to the JSON property `languageCode`
130
+ # @return [String]
131
+ attr_accessor :language_code
132
+
133
+ def initialize(**args)
134
+ update!(**args)
135
+ end
136
+
137
+ # Update properties of this object
138
+ def update!(**args)
139
+ @entities = args[:entities] if args.key?(:entities)
140
+ @language_code = args[:language_code] if args.key?(:language_code)
141
+ end
142
+ end
143
+
144
+ # The request message for EntityTypes.BatchDeleteEntities.
145
+ class BatchDeleteEntitiesRequest
146
+ include Google::Apis::Core::Hashable
147
+
148
+ # Required. The canonical `values` of the entities to delete. Note that
149
+ # these are not fully-qualified names, i.e. they don't start with
150
+ # `projects/<Project ID>`.
151
+ # Corresponds to the JSON property `entityValues`
152
+ # @return [Array<String>]
153
+ attr_accessor :entity_values
154
+
155
+ # Optional. The language of entity synonyms defined in `entities`. If not
156
+ # specified, the agent's default language is used.
157
+ # [More than a dozen
158
+ # languages](https://dialogflow.com/docs/reference/language) are supported.
159
+ # Note: languages must be enabled in the agent, before they can be used.
160
+ # Corresponds to the JSON property `languageCode`
161
+ # @return [String]
162
+ attr_accessor :language_code
163
+
164
+ def initialize(**args)
165
+ update!(**args)
166
+ end
167
+
168
+ # Update properties of this object
169
+ def update!(**args)
170
+ @entity_values = args[:entity_values] if args.key?(:entity_values)
171
+ @language_code = args[:language_code] if args.key?(:language_code)
172
+ end
173
+ end
174
+
175
+ # The request message for EntityTypes.BatchDeleteEntityTypes.
176
+ class BatchDeleteEntityTypesRequest
177
+ include Google::Apis::Core::Hashable
178
+
179
+ # Required. The names entity types to delete. All names must point to the
180
+ # same agent as `parent`.
181
+ # Corresponds to the JSON property `entityTypeNames`
182
+ # @return [Array<String>]
183
+ attr_accessor :entity_type_names
184
+
185
+ def initialize(**args)
186
+ update!(**args)
187
+ end
188
+
189
+ # Update properties of this object
190
+ def update!(**args)
191
+ @entity_type_names = args[:entity_type_names] if args.key?(:entity_type_names)
192
+ end
193
+ end
194
+
195
+ # The request message for Intents.BatchDeleteIntents.
196
+ class BatchDeleteIntentsRequest
197
+ include Google::Apis::Core::Hashable
198
+
199
+ # Required. The collection of intents to delete. Only intent `name` must be
200
+ # filled in.
201
+ # Corresponds to the JSON property `intents`
202
+ # @return [Array<Google::Apis::DialogflowV2beta1::Intent>]
203
+ attr_accessor :intents
204
+
205
+ def initialize(**args)
206
+ update!(**args)
207
+ end
208
+
209
+ # Update properties of this object
210
+ def update!(**args)
211
+ @intents = args[:intents] if args.key?(:intents)
212
+ end
213
+ end
214
+
215
+ # The response message for EntityTypes.BatchCreateEntities.
216
+ class BatchUpdateEntitiesRequest
217
+ include Google::Apis::Core::Hashable
218
+
219
+ # Required. The collection of new entities to replace the existing entities.
220
+ # Corresponds to the JSON property `entities`
221
+ # @return [Array<Google::Apis::DialogflowV2beta1::EntityTypeEntity>]
222
+ attr_accessor :entities
223
+
224
+ # Optional. The language of entity synonyms defined in `entities`. If not
225
+ # specified, the agent's default language is used.
226
+ # [More than a dozen
227
+ # languages](https://dialogflow.com/docs/reference/language) are supported.
228
+ # Note: languages must be enabled in the agent, before they can be used.
229
+ # Corresponds to the JSON property `languageCode`
230
+ # @return [String]
231
+ attr_accessor :language_code
232
+
233
+ # Optional. The mask to control which fields get updated.
234
+ # Corresponds to the JSON property `updateMask`
235
+ # @return [String]
236
+ attr_accessor :update_mask
237
+
238
+ def initialize(**args)
239
+ update!(**args)
240
+ end
241
+
242
+ # Update properties of this object
243
+ def update!(**args)
244
+ @entities = args[:entities] if args.key?(:entities)
245
+ @language_code = args[:language_code] if args.key?(:language_code)
246
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
247
+ end
248
+ end
249
+
250
+ # The request message for EntityTypes.BatchUpdateEntityTypes.
251
+ class BatchUpdateEntityTypesRequest
252
+ include Google::Apis::Core::Hashable
253
+
254
+ # This message is a wrapper around a collection of entity types.
255
+ # Corresponds to the JSON property `entityTypeBatchInline`
256
+ # @return [Google::Apis::DialogflowV2beta1::EntityTypeBatch]
257
+ attr_accessor :entity_type_batch_inline
258
+
259
+ # Warning: Importing entity types from a URI is not implemented yet.
260
+ # This feature is coming soon.
261
+ # The URI to a Google Cloud Storage file containing entity types to update
262
+ # or create. The file format can either be a serialized proto (of
263
+ # EntityBatch type) or a JSON object. Note: The URI must start with
264
+ # "gs://".
265
+ # Corresponds to the JSON property `entityTypeBatchUri`
266
+ # @return [String]
267
+ attr_accessor :entity_type_batch_uri
268
+
269
+ # Optional. The language of entity synonyms defined in `entity_types`. If not
270
+ # specified, the agent's default language is used.
271
+ # [More than a dozen
272
+ # languages](https://dialogflow.com/docs/reference/language) are supported.
273
+ # Note: languages must be enabled in the agent, before they can be used.
274
+ # Corresponds to the JSON property `languageCode`
275
+ # @return [String]
276
+ attr_accessor :language_code
277
+
278
+ # Optional. The mask to control which fields get updated.
279
+ # Corresponds to the JSON property `updateMask`
280
+ # @return [String]
281
+ attr_accessor :update_mask
282
+
283
+ def initialize(**args)
284
+ update!(**args)
285
+ end
286
+
287
+ # Update properties of this object
288
+ def update!(**args)
289
+ @entity_type_batch_inline = args[:entity_type_batch_inline] if args.key?(:entity_type_batch_inline)
290
+ @entity_type_batch_uri = args[:entity_type_batch_uri] if args.key?(:entity_type_batch_uri)
291
+ @language_code = args[:language_code] if args.key?(:language_code)
292
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
293
+ end
294
+ end
295
+
296
+ # The response message for EntityTypes.BatchUpdateEntityTypes.
297
+ class BatchUpdateEntityTypesResponse
298
+ include Google::Apis::Core::Hashable
299
+
300
+ # The collection of updated or created entity types.
301
+ # Corresponds to the JSON property `entityTypes`
302
+ # @return [Array<Google::Apis::DialogflowV2beta1::EntityType>]
303
+ attr_accessor :entity_types
304
+
305
+ def initialize(**args)
306
+ update!(**args)
307
+ end
308
+
309
+ # Update properties of this object
310
+ def update!(**args)
311
+ @entity_types = args[:entity_types] if args.key?(:entity_types)
312
+ end
313
+ end
314
+
315
+ # The request message for Intents.BatchUpdateIntents.
316
+ class BatchUpdateIntentsRequest
317
+ include Google::Apis::Core::Hashable
318
+
319
+ # This message is a wrapper around a collection of intents.
320
+ # Corresponds to the JSON property `intentBatchInline`
321
+ # @return [Google::Apis::DialogflowV2beta1::IntentBatch]
322
+ attr_accessor :intent_batch_inline
323
+
324
+ # Warning: Importing intents from a URI is not implemented yet.
325
+ # This feature is coming soon.
326
+ # The URI to a Google Cloud Storage file containing intents to update or
327
+ # create. The file format can either be a serialized proto (of IntentBatch
328
+ # type) or JSON object. Note: The URI must start with "gs://".
329
+ # Corresponds to the JSON property `intentBatchUri`
330
+ # @return [String]
331
+ attr_accessor :intent_batch_uri
332
+
333
+ # Optional. The resource view to apply to the returned intent.
334
+ # Corresponds to the JSON property `intentView`
335
+ # @return [String]
336
+ attr_accessor :intent_view
337
+
338
+ # Optional. The language of training phrases, parameters and rich messages
339
+ # defined in `intents`. If not specified, the agent's default language is
340
+ # used. [More than a dozen
341
+ # languages](https://dialogflow.com/docs/reference/language) are supported.
342
+ # Note: languages must be enabled in the agent, before they can be used.
343
+ # Corresponds to the JSON property `languageCode`
344
+ # @return [String]
345
+ attr_accessor :language_code
346
+
347
+ # Optional. The mask to control which fields get updated.
348
+ # Corresponds to the JSON property `updateMask`
349
+ # @return [String]
350
+ attr_accessor :update_mask
351
+
352
+ def initialize(**args)
353
+ update!(**args)
354
+ end
355
+
356
+ # Update properties of this object
357
+ def update!(**args)
358
+ @intent_batch_inline = args[:intent_batch_inline] if args.key?(:intent_batch_inline)
359
+ @intent_batch_uri = args[:intent_batch_uri] if args.key?(:intent_batch_uri)
360
+ @intent_view = args[:intent_view] if args.key?(:intent_view)
361
+ @language_code = args[:language_code] if args.key?(:language_code)
362
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
363
+ end
364
+ end
365
+
366
+ # The response message for Intents.BatchUpdateIntents.
367
+ class BatchUpdateIntentsResponse
368
+ include Google::Apis::Core::Hashable
369
+
370
+ # The collection of updated or created intents.
371
+ # Corresponds to the JSON property `intents`
372
+ # @return [Array<Google::Apis::DialogflowV2beta1::Intent>]
373
+ attr_accessor :intents
374
+
375
+ def initialize(**args)
376
+ update!(**args)
377
+ end
378
+
379
+ # Update properties of this object
380
+ def update!(**args)
381
+ @intents = args[:intents] if args.key?(:intents)
382
+ end
383
+ end
384
+
385
+ # Represents a context.
386
+ class Context
387
+ include Google::Apis::Core::Hashable
388
+
389
+ # Optional. The number of conversational query requests after which the
390
+ # context expires. If set to `0` (the default) the context expires
391
+ # immediately. Contexts expire automatically after 10 minutes even if there
392
+ # are no matching queries.
393
+ # Corresponds to the JSON property `lifespanCount`
394
+ # @return [Fixnum]
395
+ attr_accessor :lifespan_count
396
+
397
+ # Required. The unique identifier of the context. Format:
398
+ # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
399
+ # Note: The Context ID is always converted to lowercase.
400
+ # Corresponds to the JSON property `name`
401
+ # @return [String]
402
+ attr_accessor :name
403
+
404
+ # Optional. The collection of parameters associated with this context.
405
+ # Refer to [this doc](https://dialogflow.com/docs/actions-and-parameters) for
406
+ # syntax.
407
+ # Corresponds to the JSON property `parameters`
408
+ # @return [Hash<String,Object>]
409
+ attr_accessor :parameters
410
+
411
+ def initialize(**args)
412
+ update!(**args)
413
+ end
414
+
415
+ # Update properties of this object
416
+ def update!(**args)
417
+ @lifespan_count = args[:lifespan_count] if args.key?(:lifespan_count)
418
+ @name = args[:name] if args.key?(:name)
419
+ @parameters = args[:parameters] if args.key?(:parameters)
420
+ end
421
+ end
422
+
423
+ # The request to detect user's intent.
424
+ class DetectIntentRequest
425
+ include Google::Apis::Core::Hashable
426
+
427
+ # Optional. The natural language speech audio to be processed. This field
428
+ # should be populated iff `query_input` is set to an input audio config.
429
+ # A single request can contain up to 1 minute of speech audio data.
430
+ # Corresponds to the JSON property `inputAudio`
431
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
432
+ # @return [String]
433
+ attr_accessor :input_audio
434
+
435
+ # Represents the query input. It can contain either:
436
+ # 1. an audio config which
437
+ # instructs the speech recognizer how to process the speech audio,
438
+ # 2. a conversational query in the form of text, or
439
+ # 3. an event that specifies which intent to trigger.
440
+ # Corresponds to the JSON property `queryInput`
441
+ # @return [Google::Apis::DialogflowV2beta1::QueryInput]
442
+ attr_accessor :query_input
443
+
444
+ # Represents the parameters of the conversational query.
445
+ # Corresponds to the JSON property `queryParams`
446
+ # @return [Google::Apis::DialogflowV2beta1::QueryParameters]
447
+ attr_accessor :query_params
448
+
449
+ def initialize(**args)
450
+ update!(**args)
451
+ end
452
+
453
+ # Update properties of this object
454
+ def update!(**args)
455
+ @input_audio = args[:input_audio] if args.key?(:input_audio)
456
+ @query_input = args[:query_input] if args.key?(:query_input)
457
+ @query_params = args[:query_params] if args.key?(:query_params)
458
+ end
459
+ end
460
+
461
+ # The message returned from the DetectIntent method.
462
+ class DetectIntentResponse
463
+ include Google::Apis::Core::Hashable
464
+
465
+ # Represents the result of conversational query or event processing.
466
+ # Corresponds to the JSON property `queryResult`
467
+ # @return [Google::Apis::DialogflowV2beta1::QueryResult]
468
+ attr_accessor :query_result
469
+
470
+ # The unique identifier of the response. It can be used to
471
+ # locate a response in the training example set or for reporting issues.
472
+ # Corresponds to the JSON property `responseId`
473
+ # @return [String]
474
+ attr_accessor :response_id
475
+
476
+ # The `Status` type defines a logical error model that is suitable for different
477
+ # programming environments, including REST APIs and RPC APIs. It is used by
478
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
479
+ # - Simple to use and understand for most users
480
+ # - Flexible enough to meet unexpected needs
481
+ # # Overview
482
+ # The `Status` message contains three pieces of data: error code, error message,
483
+ # and error details. The error code should be an enum value of
484
+ # google.rpc.Code, but it may accept additional error codes if needed. The
485
+ # error message should be a developer-facing English message that helps
486
+ # developers *understand* and *resolve* the error. If a localized user-facing
487
+ # error message is needed, put the localized message in the error details or
488
+ # localize it in the client. The optional error details may contain arbitrary
489
+ # information about the error. There is a predefined set of error detail types
490
+ # in the package `google.rpc` that can be used for common error conditions.
491
+ # # Language mapping
492
+ # The `Status` message is the logical representation of the error model, but it
493
+ # is not necessarily the actual wire format. When the `Status` message is
494
+ # exposed in different client libraries and different wire protocols, it can be
495
+ # mapped differently. For example, it will likely be mapped to some exceptions
496
+ # in Java, but more likely mapped to some error codes in C.
497
+ # # Other uses
498
+ # The error model and the `Status` message can be used in a variety of
499
+ # environments, either with or without APIs, to provide a
500
+ # consistent developer experience across different environments.
501
+ # Example uses of this error model include:
502
+ # - Partial errors. If a service needs to return partial errors to the client,
503
+ # it may embed the `Status` in the normal response to indicate the partial
504
+ # errors.
505
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
506
+ # have a `Status` message for error reporting.
507
+ # - Batch operations. If a client uses batch request and batch response, the
508
+ # `Status` message should be used directly inside batch response, one for
509
+ # each error sub-response.
510
+ # - Asynchronous operations. If an API call embeds asynchronous operation
511
+ # results in its response, the status of those operations should be
512
+ # represented directly using the `Status` message.
513
+ # - Logging. If some API errors are stored in logs, the message `Status` could
514
+ # be used directly after any stripping needed for security/privacy reasons.
515
+ # Corresponds to the JSON property `webhookStatus`
516
+ # @return [Google::Apis::DialogflowV2beta1::Status]
517
+ attr_accessor :webhook_status
518
+
519
+ def initialize(**args)
520
+ update!(**args)
521
+ end
522
+
523
+ # Update properties of this object
524
+ def update!(**args)
525
+ @query_result = args[:query_result] if args.key?(:query_result)
526
+ @response_id = args[:response_id] if args.key?(:response_id)
527
+ @webhook_status = args[:webhook_status] if args.key?(:webhook_status)
528
+ end
529
+ end
530
+
531
+ # A generic empty message that you can re-use to avoid defining duplicated
532
+ # empty messages in your APIs. A typical example is to use it as the request
533
+ # or the response type of an API method. For instance:
534
+ # service Foo `
535
+ # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
536
+ # `
537
+ # The JSON representation for `Empty` is empty JSON object ````.
538
+ class Empty
539
+ include Google::Apis::Core::Hashable
540
+
541
+ def initialize(**args)
542
+ update!(**args)
543
+ end
544
+
545
+ # Update properties of this object
546
+ def update!(**args)
547
+ end
548
+ end
549
+
550
+ # Represents an entity type.
551
+ # Entity types serve as a tool for extracting parameter values from natural
552
+ # language queries.
553
+ class EntityType
554
+ include Google::Apis::Core::Hashable
555
+
556
+ # Optional. Indicates whether the entity type can be automatically
557
+ # expanded.
558
+ # Corresponds to the JSON property `autoExpansionMode`
559
+ # @return [String]
560
+ attr_accessor :auto_expansion_mode
561
+
562
+ # Required. The name of the entity.
563
+ # Corresponds to the JSON property `displayName`
564
+ # @return [String]
565
+ attr_accessor :display_name
566
+
567
+ # Optional. The collection of entities associated with the entity type.
568
+ # Corresponds to the JSON property `entities`
569
+ # @return [Array<Google::Apis::DialogflowV2beta1::EntityTypeEntity>]
570
+ attr_accessor :entities
571
+
572
+ # Required. Indicates the kind of entity type.
573
+ # Corresponds to the JSON property `kind`
574
+ # @return [String]
575
+ attr_accessor :kind
576
+
577
+ # Required for all methods except `create` (`create` populates the name
578
+ # automatically.
579
+ # The unique identifier of the entity type. Format:
580
+ # `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
581
+ # Corresponds to the JSON property `name`
582
+ # @return [String]
583
+ attr_accessor :name
584
+
585
+ def initialize(**args)
586
+ update!(**args)
587
+ end
588
+
589
+ # Update properties of this object
590
+ def update!(**args)
591
+ @auto_expansion_mode = args[:auto_expansion_mode] if args.key?(:auto_expansion_mode)
592
+ @display_name = args[:display_name] if args.key?(:display_name)
593
+ @entities = args[:entities] if args.key?(:entities)
594
+ @kind = args[:kind] if args.key?(:kind)
595
+ @name = args[:name] if args.key?(:name)
596
+ end
597
+ end
598
+
599
+ # This message is a wrapper around a collection of entity types.
600
+ class EntityTypeBatch
601
+ include Google::Apis::Core::Hashable
602
+
603
+ # A collection of entity types.
604
+ # Corresponds to the JSON property `entityTypes`
605
+ # @return [Array<Google::Apis::DialogflowV2beta1::EntityType>]
606
+ attr_accessor :entity_types
607
+
608
+ def initialize(**args)
609
+ update!(**args)
610
+ end
611
+
612
+ # Update properties of this object
613
+ def update!(**args)
614
+ @entity_types = args[:entity_types] if args.key?(:entity_types)
615
+ end
616
+ end
617
+
618
+ # Optional. Represents an entity.
619
+ class EntityTypeEntity
620
+ include Google::Apis::Core::Hashable
621
+
622
+ # Required. A collection of synonyms. For `KIND_LIST` entity types this
623
+ # must contain exactly one synonym equal to `value`.
624
+ # Corresponds to the JSON property `synonyms`
625
+ # @return [Array<String>]
626
+ attr_accessor :synonyms
627
+
628
+ # Required.
629
+ # For `KIND_MAP` entity types:
630
+ # A canonical name to be used in place of synonyms.
631
+ # For `KIND_LIST` entity types:
632
+ # A string that can contain references to other entity types (with or
633
+ # without aliases).
634
+ # Corresponds to the JSON property `value`
635
+ # @return [String]
636
+ attr_accessor :value
637
+
638
+ def initialize(**args)
639
+ update!(**args)
640
+ end
641
+
642
+ # Update properties of this object
643
+ def update!(**args)
644
+ @synonyms = args[:synonyms] if args.key?(:synonyms)
645
+ @value = args[:value] if args.key?(:value)
646
+ end
647
+ end
648
+
649
+ # Events allow for matching intents by event name instead of the natural
650
+ # language input. For instance, input `<event: ` name: “welcome_event”,
651
+ # parameters: ` name: “Sam” ` `>` can trigger a personalized welcome response.
652
+ # The parameter `name` may be used by the agent in the response:
653
+ # `“Hello #welcome_event.name! What can I do for you today?”`.
654
+ class EventInput
655
+ include Google::Apis::Core::Hashable
656
+
657
+ # Required. The language of this query. See [Language
658
+ # Support](https://dialogflow.com/docs/languages) for a list of the
659
+ # currently supported language codes. Note that queries in the same session
660
+ # do not necessarily need to specify the same language.
661
+ # Corresponds to the JSON property `languageCode`
662
+ # @return [String]
663
+ attr_accessor :language_code
664
+
665
+ # Required. The unique identifier of the event.
666
+ # Corresponds to the JSON property `name`
667
+ # @return [String]
668
+ attr_accessor :name
669
+
670
+ # Optional. The collection of parameters associated with the event.
671
+ # Corresponds to the JSON property `parameters`
672
+ # @return [Hash<String,Object>]
673
+ attr_accessor :parameters
674
+
675
+ def initialize(**args)
676
+ update!(**args)
677
+ end
678
+
679
+ # Update properties of this object
680
+ def update!(**args)
681
+ @language_code = args[:language_code] if args.key?(:language_code)
682
+ @name = args[:name] if args.key?(:name)
683
+ @parameters = args[:parameters] if args.key?(:parameters)
684
+ end
685
+ end
686
+
687
+ # The request message for Agents.ExportAgent.
688
+ class ExportAgentRequest
689
+ include Google::Apis::Core::Hashable
690
+
691
+ # Warning: Exporting agents to a URI is not implemented yet.
692
+ # This feature is coming soon.
693
+ # Optional. The Google Cloud Storage URI to export the agent to.
694
+ # Note: The URI must start with
695
+ # "gs://". If left unspecified, the serialized agent is returned inline.
696
+ # Corresponds to the JSON property `agentUri`
697
+ # @return [String]
698
+ attr_accessor :agent_uri
699
+
700
+ def initialize(**args)
701
+ update!(**args)
702
+ end
703
+
704
+ # Update properties of this object
705
+ def update!(**args)
706
+ @agent_uri = args[:agent_uri] if args.key?(:agent_uri)
707
+ end
708
+ end
709
+
710
+ # The response message for Agents.ExportAgent.
711
+ class ExportAgentResponse
712
+ include Google::Apis::Core::Hashable
713
+
714
+ # The exported agent.
715
+ # Corresponds to the JSON property `agentContent`
716
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
717
+ # @return [String]
718
+ attr_accessor :agent_content
719
+
720
+ # The URI to a file containing the exported agent. This field is populated
721
+ # only if `agent_uri`
722
+ # Corresponds to the JSON property `agentUri`
723
+ # @return [String]
724
+ attr_accessor :agent_uri
725
+
726
+ def initialize(**args)
727
+ update!(**args)
728
+ end
729
+
730
+ # Update properties of this object
731
+ def update!(**args)
732
+ @agent_content = args[:agent_content] if args.key?(:agent_content)
733
+ @agent_uri = args[:agent_uri] if args.key?(:agent_uri)
734
+ end
735
+ end
736
+
737
+ # The request message for Agents.ImportAgent.
738
+ class ImportAgentRequest
739
+ include Google::Apis::Core::Hashable
740
+
741
+ # The agent to import.
742
+ # Corresponds to the JSON property `agentContent`
743
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
744
+ # @return [String]
745
+ attr_accessor :agent_content
746
+
747
+ # Warning: Importing agents from a URI is not implemented yet.
748
+ # This feature is coming soon.
749
+ # The URI to a Google Cloud Storage file containing the agent to import.
750
+ # Note: The URI must start with "gs://".
751
+ # Corresponds to the JSON property `agentUri`
752
+ # @return [String]
753
+ attr_accessor :agent_uri
754
+
755
+ def initialize(**args)
756
+ update!(**args)
757
+ end
758
+
759
+ # Update properties of this object
760
+ def update!(**args)
761
+ @agent_content = args[:agent_content] if args.key?(:agent_content)
762
+ @agent_uri = args[:agent_uri] if args.key?(:agent_uri)
763
+ end
764
+ end
765
+
766
+ # Instructs the speech recognizer how to process the audio content.
767
+ class InputAudioConfig
768
+ include Google::Apis::Core::Hashable
769
+
770
+ # Required. Audio encoding of the audio content to process.
771
+ # Corresponds to the JSON property `audioEncoding`
772
+ # @return [String]
773
+ attr_accessor :audio_encoding
774
+
775
+ # Required. The language of the supplied audio. Dialogflow does not do
776
+ # translations. See [Language
777
+ # Support](https://dialogflow.com/docs/languages) for a list of the
778
+ # currently supported language codes. Note that queries in the same session
779
+ # do not necessarily need to specify the same language.
780
+ # Corresponds to the JSON property `languageCode`
781
+ # @return [String]
782
+ attr_accessor :language_code
783
+
784
+ # Optional. The collection of phrase hints which are used to boost accuracy
785
+ # of speech recognition.
786
+ # Refer to [Cloud Speech API documentation](/speech/docs/basics#phrase-hints)
787
+ # for more details.
788
+ # Corresponds to the JSON property `phraseHints`
789
+ # @return [Array<String>]
790
+ attr_accessor :phrase_hints
791
+
792
+ # Required. Sample rate (in Hertz) of the audio content sent in the query.
793
+ # Refer to [Cloud Speech API documentation](/speech/docs/basics) for more
794
+ # details.
795
+ # Corresponds to the JSON property `sampleRateHertz`
796
+ # @return [Fixnum]
797
+ attr_accessor :sample_rate_hertz
798
+
799
+ def initialize(**args)
800
+ update!(**args)
801
+ end
802
+
803
+ # Update properties of this object
804
+ def update!(**args)
805
+ @audio_encoding = args[:audio_encoding] if args.key?(:audio_encoding)
806
+ @language_code = args[:language_code] if args.key?(:language_code)
807
+ @phrase_hints = args[:phrase_hints] if args.key?(:phrase_hints)
808
+ @sample_rate_hertz = args[:sample_rate_hertz] if args.key?(:sample_rate_hertz)
809
+ end
810
+ end
811
+
812
+ # Represents an intent.
813
+ # Intents convert a number of user expressions or patterns into an action. An
814
+ # action is an extraction of a user command or sentence semantics.
815
+ class Intent
816
+ include Google::Apis::Core::Hashable
817
+
818
+ # Optional. The name of the action associated with the intent.
819
+ # Corresponds to the JSON property `action`
820
+ # @return [String]
821
+ attr_accessor :action
822
+
823
+ # Optional. The list of platforms for which the first response will be
824
+ # taken from among the messages assigned to the DEFAULT_PLATFORM.
825
+ # Corresponds to the JSON property `defaultResponsePlatforms`
826
+ # @return [Array<String>]
827
+ attr_accessor :default_response_platforms
828
+
829
+ # Required. The name of this intent.
830
+ # Corresponds to the JSON property `displayName`
831
+ # @return [String]
832
+ attr_accessor :display_name
833
+
834
+ # Optional. The collection of event names that trigger the intent.
835
+ # If the collection of input contexts is not empty, all of the contexts must
836
+ # be present in the active user session for an event to trigger this intent.
837
+ # Corresponds to the JSON property `events`
838
+ # @return [Array<String>]
839
+ attr_accessor :events
840
+
841
+ # Optional. Collection of information about all followup intents that have
842
+ # name of this intent as a root_name.
843
+ # Corresponds to the JSON property `followupIntentInfo`
844
+ # @return [Array<Google::Apis::DialogflowV2beta1::IntentFollowupIntentInfo>]
845
+ attr_accessor :followup_intent_info
846
+
847
+ # Optional. The list of context names required for this intent to be
848
+ # triggered.
849
+ # Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
850
+ # Corresponds to the JSON property `inputContextNames`
851
+ # @return [Array<String>]
852
+ attr_accessor :input_context_names
853
+
854
+ # Optional. Indicates whether this is a fallback intent.
855
+ # Corresponds to the JSON property `isFallback`
856
+ # @return [Boolean]
857
+ attr_accessor :is_fallback
858
+ alias_method :is_fallback?, :is_fallback
859
+
860
+ # Optional. The collection of rich messages corresponding to the
861
+ # `Response` field in API.AI console.
862
+ # Corresponds to the JSON property `messages`
863
+ # @return [Array<Google::Apis::DialogflowV2beta1::IntentMessage>]
864
+ attr_accessor :messages
865
+
866
+ # Optional. Indicates whether Machine Learning is enabled for the intent.
867
+ # Note: If `ml_enabled` setting is set to false, then this intent is not
868
+ # taken into account during inference in `ML ONLY` match mode. Also,
869
+ # auto-markup in the UI is turned off.
870
+ # Corresponds to the JSON property `mlEnabled`
871
+ # @return [Boolean]
872
+ attr_accessor :ml_enabled
873
+ alias_method :ml_enabled?, :ml_enabled
874
+
875
+ # Required for all methods except `create` (`create` populates the name
876
+ # automatically.
877
+ # The unique identifier of this intent.
878
+ # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
879
+ # Corresponds to the JSON property `name`
880
+ # @return [String]
881
+ attr_accessor :name
882
+
883
+ # Optional. The collection of contexts that are activated when the intent
884
+ # is matched. Context messages in this collection should not set the
885
+ # parameters field. Setting the `lifespan_count` to 0 will reset the context
886
+ # when the intent is matched.
887
+ # Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
888
+ # Corresponds to the JSON property `outputContexts`
889
+ # @return [Array<Google::Apis::DialogflowV2beta1::Context>]
890
+ attr_accessor :output_contexts
891
+
892
+ # Optional. The collection of parameters associated with the intent.
893
+ # Corresponds to the JSON property `parameters`
894
+ # @return [Array<Google::Apis::DialogflowV2beta1::IntentParameter>]
895
+ attr_accessor :parameters
896
+
897
+ # The unique identifier of the parent intent in the chain of followup
898
+ # intents.
899
+ # It identifies the parent followup intent.
900
+ # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
901
+ # Corresponds to the JSON property `parentFollowupIntentName`
902
+ # @return [String]
903
+ attr_accessor :parent_followup_intent_name
904
+
905
+ # Optional. The priority of this intent. Higher numbers represent higher
906
+ # priorities. Zero or negative numbers mean that the intent is disabled.
907
+ # Corresponds to the JSON property `priority`
908
+ # @return [Fixnum]
909
+ attr_accessor :priority
910
+
911
+ # Optional. Indicates whether to delete all contexts in the current
912
+ # session when this intent is matched.
913
+ # Corresponds to the JSON property `resetContexts`
914
+ # @return [Boolean]
915
+ attr_accessor :reset_contexts
916
+ alias_method :reset_contexts?, :reset_contexts
917
+
918
+ # The unique identifier of the root intent in the chain of followup intents.
919
+ # It identifies the correct followup intents chain for this intent.
920
+ # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
921
+ # Corresponds to the JSON property `rootFollowupIntentName`
922
+ # @return [String]
923
+ attr_accessor :root_followup_intent_name
924
+
925
+ # Optional. The collection of examples/templates that the agent is
926
+ # trained on.
927
+ # Corresponds to the JSON property `trainingPhrases`
928
+ # @return [Array<Google::Apis::DialogflowV2beta1::IntentTrainingPhrase>]
929
+ attr_accessor :training_phrases
930
+
931
+ # Required. Indicates whether webhooks are enabled for the intent.
932
+ # Corresponds to the JSON property `webhookState`
933
+ # @return [String]
934
+ attr_accessor :webhook_state
935
+
936
+ def initialize(**args)
937
+ update!(**args)
938
+ end
939
+
940
+ # Update properties of this object
941
+ def update!(**args)
942
+ @action = args[:action] if args.key?(:action)
943
+ @default_response_platforms = args[:default_response_platforms] if args.key?(:default_response_platforms)
944
+ @display_name = args[:display_name] if args.key?(:display_name)
945
+ @events = args[:events] if args.key?(:events)
946
+ @followup_intent_info = args[:followup_intent_info] if args.key?(:followup_intent_info)
947
+ @input_context_names = args[:input_context_names] if args.key?(:input_context_names)
948
+ @is_fallback = args[:is_fallback] if args.key?(:is_fallback)
949
+ @messages = args[:messages] if args.key?(:messages)
950
+ @ml_enabled = args[:ml_enabled] if args.key?(:ml_enabled)
951
+ @name = args[:name] if args.key?(:name)
952
+ @output_contexts = args[:output_contexts] if args.key?(:output_contexts)
953
+ @parameters = args[:parameters] if args.key?(:parameters)
954
+ @parent_followup_intent_name = args[:parent_followup_intent_name] if args.key?(:parent_followup_intent_name)
955
+ @priority = args[:priority] if args.key?(:priority)
956
+ @reset_contexts = args[:reset_contexts] if args.key?(:reset_contexts)
957
+ @root_followup_intent_name = args[:root_followup_intent_name] if args.key?(:root_followup_intent_name)
958
+ @training_phrases = args[:training_phrases] if args.key?(:training_phrases)
959
+ @webhook_state = args[:webhook_state] if args.key?(:webhook_state)
960
+ end
961
+ end
962
+
963
+ # This message is a wrapper around a collection of intents.
964
+ class IntentBatch
965
+ include Google::Apis::Core::Hashable
966
+
967
+ # A collection of intents.
968
+ # Corresponds to the JSON property `intents`
969
+ # @return [Array<Google::Apis::DialogflowV2beta1::Intent>]
970
+ attr_accessor :intents
971
+
972
+ def initialize(**args)
973
+ update!(**args)
974
+ end
975
+
976
+ # Update properties of this object
977
+ def update!(**args)
978
+ @intents = args[:intents] if args.key?(:intents)
979
+ end
980
+ end
981
+
982
+ # Represents a single followup intent in the chain.
983
+ class IntentFollowupIntentInfo
984
+ include Google::Apis::Core::Hashable
985
+
986
+ # The unique identifier of the followup intent.
987
+ # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
988
+ # Corresponds to the JSON property `followupIntentName`
989
+ # @return [String]
990
+ attr_accessor :followup_intent_name
991
+
992
+ # The unique identifier of the followup intent parent.
993
+ # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
994
+ # Corresponds to the JSON property `parentFollowupIntentName`
995
+ # @return [String]
996
+ attr_accessor :parent_followup_intent_name
997
+
998
+ def initialize(**args)
999
+ update!(**args)
1000
+ end
1001
+
1002
+ # Update properties of this object
1003
+ def update!(**args)
1004
+ @followup_intent_name = args[:followup_intent_name] if args.key?(:followup_intent_name)
1005
+ @parent_followup_intent_name = args[:parent_followup_intent_name] if args.key?(:parent_followup_intent_name)
1006
+ end
1007
+ end
1008
+
1009
+ # Corresponds to the `Response` field in API.AI console.
1010
+ class IntentMessage
1011
+ include Google::Apis::Core::Hashable
1012
+
1013
+ # The basic card message. Useful for displaying information.
1014
+ # Corresponds to the JSON property `basicCard`
1015
+ # @return [Google::Apis::DialogflowV2beta1::IntentMessageBasicCard]
1016
+ attr_accessor :basic_card
1017
+
1018
+ # The card response message.
1019
+ # Corresponds to the JSON property `card`
1020
+ # @return [Google::Apis::DialogflowV2beta1::IntentMessageCard]
1021
+ attr_accessor :card
1022
+
1023
+ # The card for presenting a carousel of options to select from.
1024
+ # Corresponds to the JSON property `carouselSelect`
1025
+ # @return [Google::Apis::DialogflowV2beta1::IntentMessageCarouselSelect]
1026
+ attr_accessor :carousel_select
1027
+
1028
+ # The image response message.
1029
+ # Corresponds to the JSON property `image`
1030
+ # @return [Google::Apis::DialogflowV2beta1::IntentMessageImage]
1031
+ attr_accessor :image
1032
+
1033
+ # The suggestion chip message that allows the user to jump out to the app
1034
+ # or website associated with this agent.
1035
+ # Corresponds to the JSON property `linkOutSuggestion`
1036
+ # @return [Google::Apis::DialogflowV2beta1::IntentMessageLinkOutSuggestion]
1037
+ attr_accessor :link_out_suggestion
1038
+
1039
+ # The card for presenting a list of options to select from.
1040
+ # Corresponds to the JSON property `listSelect`
1041
+ # @return [Google::Apis::DialogflowV2beta1::IntentMessageListSelect]
1042
+ attr_accessor :list_select
1043
+
1044
+ # The response containing a custom payload.
1045
+ # Corresponds to the JSON property `payload`
1046
+ # @return [Hash<String,Object>]
1047
+ attr_accessor :payload
1048
+
1049
+ # Optional. The platform that this message is intended for.
1050
+ # Corresponds to the JSON property `platform`
1051
+ # @return [String]
1052
+ attr_accessor :platform
1053
+
1054
+ # The quick replies response message.
1055
+ # Corresponds to the JSON property `quickReplies`
1056
+ # @return [Google::Apis::DialogflowV2beta1::IntentMessageQuickReplies]
1057
+ attr_accessor :quick_replies
1058
+
1059
+ # The collection of simple response candidates.
1060
+ # This message in `QueryResult.fulfillment_messages` and
1061
+ # `WebhookResponse.fulfillment_messages` should contain only one
1062
+ # `SimpleResponse`.
1063
+ # Corresponds to the JSON property `simpleResponses`
1064
+ # @return [Google::Apis::DialogflowV2beta1::IntentMessageSimpleResponses]
1065
+ attr_accessor :simple_responses
1066
+
1067
+ # The collection of suggestions.
1068
+ # Corresponds to the JSON property `suggestions`
1069
+ # @return [Google::Apis::DialogflowV2beta1::IntentMessageSuggestions]
1070
+ attr_accessor :suggestions
1071
+
1072
+ # The text response message.
1073
+ # Corresponds to the JSON property `text`
1074
+ # @return [Google::Apis::DialogflowV2beta1::IntentMessageText]
1075
+ attr_accessor :text
1076
+
1077
+ def initialize(**args)
1078
+ update!(**args)
1079
+ end
1080
+
1081
+ # Update properties of this object
1082
+ def update!(**args)
1083
+ @basic_card = args[:basic_card] if args.key?(:basic_card)
1084
+ @card = args[:card] if args.key?(:card)
1085
+ @carousel_select = args[:carousel_select] if args.key?(:carousel_select)
1086
+ @image = args[:image] if args.key?(:image)
1087
+ @link_out_suggestion = args[:link_out_suggestion] if args.key?(:link_out_suggestion)
1088
+ @list_select = args[:list_select] if args.key?(:list_select)
1089
+ @payload = args[:payload] if args.key?(:payload)
1090
+ @platform = args[:platform] if args.key?(:platform)
1091
+ @quick_replies = args[:quick_replies] if args.key?(:quick_replies)
1092
+ @simple_responses = args[:simple_responses] if args.key?(:simple_responses)
1093
+ @suggestions = args[:suggestions] if args.key?(:suggestions)
1094
+ @text = args[:text] if args.key?(:text)
1095
+ end
1096
+ end
1097
+
1098
+ # The basic card message. Useful for displaying information.
1099
+ class IntentMessageBasicCard
1100
+ include Google::Apis::Core::Hashable
1101
+
1102
+ # Optional. The collection of card buttons.
1103
+ # Corresponds to the JSON property `buttons`
1104
+ # @return [Array<Google::Apis::DialogflowV2beta1::IntentMessageBasicCardButton>]
1105
+ attr_accessor :buttons
1106
+
1107
+ # Required, unless image is present. The body text of the card.
1108
+ # Corresponds to the JSON property `formattedText`
1109
+ # @return [String]
1110
+ attr_accessor :formatted_text
1111
+
1112
+ # The image response message.
1113
+ # Corresponds to the JSON property `image`
1114
+ # @return [Google::Apis::DialogflowV2beta1::IntentMessageImage]
1115
+ attr_accessor :image
1116
+
1117
+ # Optional. The subtitle of the card.
1118
+ # Corresponds to the JSON property `subtitle`
1119
+ # @return [String]
1120
+ attr_accessor :subtitle
1121
+
1122
+ # Optional. The title of the card.
1123
+ # Corresponds to the JSON property `title`
1124
+ # @return [String]
1125
+ attr_accessor :title
1126
+
1127
+ def initialize(**args)
1128
+ update!(**args)
1129
+ end
1130
+
1131
+ # Update properties of this object
1132
+ def update!(**args)
1133
+ @buttons = args[:buttons] if args.key?(:buttons)
1134
+ @formatted_text = args[:formatted_text] if args.key?(:formatted_text)
1135
+ @image = args[:image] if args.key?(:image)
1136
+ @subtitle = args[:subtitle] if args.key?(:subtitle)
1137
+ @title = args[:title] if args.key?(:title)
1138
+ end
1139
+ end
1140
+
1141
+ # The button object that appears at the bottom of a card.
1142
+ class IntentMessageBasicCardButton
1143
+ include Google::Apis::Core::Hashable
1144
+
1145
+ # Opens the given URI.
1146
+ # Corresponds to the JSON property `openUriAction`
1147
+ # @return [Google::Apis::DialogflowV2beta1::IntentMessageBasicCardButtonOpenUriAction]
1148
+ attr_accessor :open_uri_action
1149
+
1150
+ # Required. The title of the button.
1151
+ # Corresponds to the JSON property `title`
1152
+ # @return [String]
1153
+ attr_accessor :title
1154
+
1155
+ def initialize(**args)
1156
+ update!(**args)
1157
+ end
1158
+
1159
+ # Update properties of this object
1160
+ def update!(**args)
1161
+ @open_uri_action = args[:open_uri_action] if args.key?(:open_uri_action)
1162
+ @title = args[:title] if args.key?(:title)
1163
+ end
1164
+ end
1165
+
1166
+ # Opens the given URI.
1167
+ class IntentMessageBasicCardButtonOpenUriAction
1168
+ include Google::Apis::Core::Hashable
1169
+
1170
+ # Required. The HTTP or HTTPS scheme URI.
1171
+ # Corresponds to the JSON property `uri`
1172
+ # @return [String]
1173
+ attr_accessor :uri
1174
+
1175
+ def initialize(**args)
1176
+ update!(**args)
1177
+ end
1178
+
1179
+ # Update properties of this object
1180
+ def update!(**args)
1181
+ @uri = args[:uri] if args.key?(:uri)
1182
+ end
1183
+ end
1184
+
1185
+ # The card response message.
1186
+ class IntentMessageCard
1187
+ include Google::Apis::Core::Hashable
1188
+
1189
+ # Optional. The collection of card buttons.
1190
+ # Corresponds to the JSON property `buttons`
1191
+ # @return [Array<Google::Apis::DialogflowV2beta1::IntentMessageCardButton>]
1192
+ attr_accessor :buttons
1193
+
1194
+ # Optional. The public URI to an image file for the card.
1195
+ # Corresponds to the JSON property `imageUri`
1196
+ # @return [String]
1197
+ attr_accessor :image_uri
1198
+
1199
+ # Optional. The subtitle of the card.
1200
+ # Corresponds to the JSON property `subtitle`
1201
+ # @return [String]
1202
+ attr_accessor :subtitle
1203
+
1204
+ # Optional. The title of the card.
1205
+ # Corresponds to the JSON property `title`
1206
+ # @return [String]
1207
+ attr_accessor :title
1208
+
1209
+ def initialize(**args)
1210
+ update!(**args)
1211
+ end
1212
+
1213
+ # Update properties of this object
1214
+ def update!(**args)
1215
+ @buttons = args[:buttons] if args.key?(:buttons)
1216
+ @image_uri = args[:image_uri] if args.key?(:image_uri)
1217
+ @subtitle = args[:subtitle] if args.key?(:subtitle)
1218
+ @title = args[:title] if args.key?(:title)
1219
+ end
1220
+ end
1221
+
1222
+ # Optional. Contains information about a button.
1223
+ class IntentMessageCardButton
1224
+ include Google::Apis::Core::Hashable
1225
+
1226
+ # Optional. The text to send back to the Dialogflow API or a URI to
1227
+ # open.
1228
+ # Corresponds to the JSON property `postback`
1229
+ # @return [String]
1230
+ attr_accessor :postback
1231
+
1232
+ # Optional. The text to show on the button.
1233
+ # Corresponds to the JSON property `text`
1234
+ # @return [String]
1235
+ attr_accessor :text
1236
+
1237
+ def initialize(**args)
1238
+ update!(**args)
1239
+ end
1240
+
1241
+ # Update properties of this object
1242
+ def update!(**args)
1243
+ @postback = args[:postback] if args.key?(:postback)
1244
+ @text = args[:text] if args.key?(:text)
1245
+ end
1246
+ end
1247
+
1248
+ # The card for presenting a carousel of options to select from.
1249
+ class IntentMessageCarouselSelect
1250
+ include Google::Apis::Core::Hashable
1251
+
1252
+ # Required. Carousel items.
1253
+ # Corresponds to the JSON property `items`
1254
+ # @return [Array<Google::Apis::DialogflowV2beta1::IntentMessageCarouselSelectItem>]
1255
+ attr_accessor :items
1256
+
1257
+ def initialize(**args)
1258
+ update!(**args)
1259
+ end
1260
+
1261
+ # Update properties of this object
1262
+ def update!(**args)
1263
+ @items = args[:items] if args.key?(:items)
1264
+ end
1265
+ end
1266
+
1267
+ # An item in the carousel.
1268
+ class IntentMessageCarouselSelectItem
1269
+ include Google::Apis::Core::Hashable
1270
+
1271
+ # Optional. The body text of the card.
1272
+ # Corresponds to the JSON property `description`
1273
+ # @return [String]
1274
+ attr_accessor :description
1275
+
1276
+ # The image response message.
1277
+ # Corresponds to the JSON property `image`
1278
+ # @return [Google::Apis::DialogflowV2beta1::IntentMessageImage]
1279
+ attr_accessor :image
1280
+
1281
+ # Additional info about the select item for when it is triggered in a
1282
+ # dialog.
1283
+ # Corresponds to the JSON property `info`
1284
+ # @return [Google::Apis::DialogflowV2beta1::IntentMessageSelectItemInfo]
1285
+ attr_accessor :info
1286
+
1287
+ # Required. Title of the carousel item.
1288
+ # Corresponds to the JSON property `title`
1289
+ # @return [String]
1290
+ attr_accessor :title
1291
+
1292
+ def initialize(**args)
1293
+ update!(**args)
1294
+ end
1295
+
1296
+ # Update properties of this object
1297
+ def update!(**args)
1298
+ @description = args[:description] if args.key?(:description)
1299
+ @image = args[:image] if args.key?(:image)
1300
+ @info = args[:info] if args.key?(:info)
1301
+ @title = args[:title] if args.key?(:title)
1302
+ end
1303
+ end
1304
+
1305
+ # The image response message.
1306
+ class IntentMessageImage
1307
+ include Google::Apis::Core::Hashable
1308
+
1309
+ # Optional. The public URI to an image file.
1310
+ # Corresponds to the JSON property `imageUri`
1311
+ # @return [String]
1312
+ attr_accessor :image_uri
1313
+
1314
+ def initialize(**args)
1315
+ update!(**args)
1316
+ end
1317
+
1318
+ # Update properties of this object
1319
+ def update!(**args)
1320
+ @image_uri = args[:image_uri] if args.key?(:image_uri)
1321
+ end
1322
+ end
1323
+
1324
+ # The suggestion chip message that allows the user to jump out to the app
1325
+ # or website associated with this agent.
1326
+ class IntentMessageLinkOutSuggestion
1327
+ include Google::Apis::Core::Hashable
1328
+
1329
+ # Required. The name of the app or site this chip is linking to.
1330
+ # Corresponds to the JSON property `destinationName`
1331
+ # @return [String]
1332
+ attr_accessor :destination_name
1333
+
1334
+ # Required. The URI of the app or site to open when the user taps the
1335
+ # suggestion chip.
1336
+ # Corresponds to the JSON property `uri`
1337
+ # @return [String]
1338
+ attr_accessor :uri
1339
+
1340
+ def initialize(**args)
1341
+ update!(**args)
1342
+ end
1343
+
1344
+ # Update properties of this object
1345
+ def update!(**args)
1346
+ @destination_name = args[:destination_name] if args.key?(:destination_name)
1347
+ @uri = args[:uri] if args.key?(:uri)
1348
+ end
1349
+ end
1350
+
1351
+ # The card for presenting a list of options to select from.
1352
+ class IntentMessageListSelect
1353
+ include Google::Apis::Core::Hashable
1354
+
1355
+ # Required. List items.
1356
+ # Corresponds to the JSON property `items`
1357
+ # @return [Array<Google::Apis::DialogflowV2beta1::IntentMessageListSelectItem>]
1358
+ attr_accessor :items
1359
+
1360
+ # Optional. The overall title of the list.
1361
+ # Corresponds to the JSON property `title`
1362
+ # @return [String]
1363
+ attr_accessor :title
1364
+
1365
+ def initialize(**args)
1366
+ update!(**args)
1367
+ end
1368
+
1369
+ # Update properties of this object
1370
+ def update!(**args)
1371
+ @items = args[:items] if args.key?(:items)
1372
+ @title = args[:title] if args.key?(:title)
1373
+ end
1374
+ end
1375
+
1376
+ # An item in the list.
1377
+ class IntentMessageListSelectItem
1378
+ include Google::Apis::Core::Hashable
1379
+
1380
+ # Optional. The main text describing the item.
1381
+ # Corresponds to the JSON property `description`
1382
+ # @return [String]
1383
+ attr_accessor :description
1384
+
1385
+ # The image response message.
1386
+ # Corresponds to the JSON property `image`
1387
+ # @return [Google::Apis::DialogflowV2beta1::IntentMessageImage]
1388
+ attr_accessor :image
1389
+
1390
+ # Additional info about the select item for when it is triggered in a
1391
+ # dialog.
1392
+ # Corresponds to the JSON property `info`
1393
+ # @return [Google::Apis::DialogflowV2beta1::IntentMessageSelectItemInfo]
1394
+ attr_accessor :info
1395
+
1396
+ # Required. The title of the list item.
1397
+ # Corresponds to the JSON property `title`
1398
+ # @return [String]
1399
+ attr_accessor :title
1400
+
1401
+ def initialize(**args)
1402
+ update!(**args)
1403
+ end
1404
+
1405
+ # Update properties of this object
1406
+ def update!(**args)
1407
+ @description = args[:description] if args.key?(:description)
1408
+ @image = args[:image] if args.key?(:image)
1409
+ @info = args[:info] if args.key?(:info)
1410
+ @title = args[:title] if args.key?(:title)
1411
+ end
1412
+ end
1413
+
1414
+ # The quick replies response message.
1415
+ class IntentMessageQuickReplies
1416
+ include Google::Apis::Core::Hashable
1417
+
1418
+ # Optional. The collection of quick replies.
1419
+ # Corresponds to the JSON property `quickReplies`
1420
+ # @return [Array<String>]
1421
+ attr_accessor :quick_replies
1422
+
1423
+ # Optional. The title of the collection of quick replies.
1424
+ # Corresponds to the JSON property `title`
1425
+ # @return [String]
1426
+ attr_accessor :title
1427
+
1428
+ def initialize(**args)
1429
+ update!(**args)
1430
+ end
1431
+
1432
+ # Update properties of this object
1433
+ def update!(**args)
1434
+ @quick_replies = args[:quick_replies] if args.key?(:quick_replies)
1435
+ @title = args[:title] if args.key?(:title)
1436
+ end
1437
+ end
1438
+
1439
+ # Additional info about the select item for when it is triggered in a
1440
+ # dialog.
1441
+ class IntentMessageSelectItemInfo
1442
+ include Google::Apis::Core::Hashable
1443
+
1444
+ # Required. A unique key that will be sent back to the agent if this
1445
+ # response is given.
1446
+ # Corresponds to the JSON property `key`
1447
+ # @return [String]
1448
+ attr_accessor :key
1449
+
1450
+ # Optional. A list of synonyms that can also be used to trigger this
1451
+ # item in dialog.
1452
+ # Corresponds to the JSON property `synonyms`
1453
+ # @return [Array<String>]
1454
+ attr_accessor :synonyms
1455
+
1456
+ def initialize(**args)
1457
+ update!(**args)
1458
+ end
1459
+
1460
+ # Update properties of this object
1461
+ def update!(**args)
1462
+ @key = args[:key] if args.key?(:key)
1463
+ @synonyms = args[:synonyms] if args.key?(:synonyms)
1464
+ end
1465
+ end
1466
+
1467
+ # The simple response message containing speech or text.
1468
+ class IntentMessageSimpleResponse
1469
+ include Google::Apis::Core::Hashable
1470
+
1471
+ # Optional. The text to display.
1472
+ # Corresponds to the JSON property `displayText`
1473
+ # @return [String]
1474
+ attr_accessor :display_text
1475
+
1476
+ # One of text_to_speech or ssml must be provided. Structured spoken
1477
+ # response to the user in the SSML format. Mutually exclusive with
1478
+ # text_to_speech.
1479
+ # Corresponds to the JSON property `ssml`
1480
+ # @return [String]
1481
+ attr_accessor :ssml
1482
+
1483
+ # One of text_to_speech or ssml must be provided. The plain text of the
1484
+ # speech output. Mutually exclusive with ssml.
1485
+ # Corresponds to the JSON property `textToSpeech`
1486
+ # @return [String]
1487
+ attr_accessor :text_to_speech
1488
+
1489
+ def initialize(**args)
1490
+ update!(**args)
1491
+ end
1492
+
1493
+ # Update properties of this object
1494
+ def update!(**args)
1495
+ @display_text = args[:display_text] if args.key?(:display_text)
1496
+ @ssml = args[:ssml] if args.key?(:ssml)
1497
+ @text_to_speech = args[:text_to_speech] if args.key?(:text_to_speech)
1498
+ end
1499
+ end
1500
+
1501
+ # The collection of simple response candidates.
1502
+ # This message in `QueryResult.fulfillment_messages` and
1503
+ # `WebhookResponse.fulfillment_messages` should contain only one
1504
+ # `SimpleResponse`.
1505
+ class IntentMessageSimpleResponses
1506
+ include Google::Apis::Core::Hashable
1507
+
1508
+ # Required. The list of simple responses.
1509
+ # Corresponds to the JSON property `simpleResponses`
1510
+ # @return [Array<Google::Apis::DialogflowV2beta1::IntentMessageSimpleResponse>]
1511
+ attr_accessor :simple_responses
1512
+
1513
+ def initialize(**args)
1514
+ update!(**args)
1515
+ end
1516
+
1517
+ # Update properties of this object
1518
+ def update!(**args)
1519
+ @simple_responses = args[:simple_responses] if args.key?(:simple_responses)
1520
+ end
1521
+ end
1522
+
1523
+ # The suggestion chip message that the user can tap to quickly post a reply
1524
+ # to the conversation.
1525
+ class IntentMessageSuggestion
1526
+ include Google::Apis::Core::Hashable
1527
+
1528
+ # Required. The text shown the in the suggestion chip.
1529
+ # Corresponds to the JSON property `title`
1530
+ # @return [String]
1531
+ attr_accessor :title
1532
+
1533
+ def initialize(**args)
1534
+ update!(**args)
1535
+ end
1536
+
1537
+ # Update properties of this object
1538
+ def update!(**args)
1539
+ @title = args[:title] if args.key?(:title)
1540
+ end
1541
+ end
1542
+
1543
+ # The collection of suggestions.
1544
+ class IntentMessageSuggestions
1545
+ include Google::Apis::Core::Hashable
1546
+
1547
+ # Required. The list of suggested replies.
1548
+ # Corresponds to the JSON property `suggestions`
1549
+ # @return [Array<Google::Apis::DialogflowV2beta1::IntentMessageSuggestion>]
1550
+ attr_accessor :suggestions
1551
+
1552
+ def initialize(**args)
1553
+ update!(**args)
1554
+ end
1555
+
1556
+ # Update properties of this object
1557
+ def update!(**args)
1558
+ @suggestions = args[:suggestions] if args.key?(:suggestions)
1559
+ end
1560
+ end
1561
+
1562
+ # The text response message.
1563
+ class IntentMessageText
1564
+ include Google::Apis::Core::Hashable
1565
+
1566
+ # Optional. The collection of the agent's responses.
1567
+ # Corresponds to the JSON property `text`
1568
+ # @return [Array<String>]
1569
+ attr_accessor :text
1570
+
1571
+ def initialize(**args)
1572
+ update!(**args)
1573
+ end
1574
+
1575
+ # Update properties of this object
1576
+ def update!(**args)
1577
+ @text = args[:text] if args.key?(:text)
1578
+ end
1579
+ end
1580
+
1581
+ # Represents intent parameters.
1582
+ class IntentParameter
1583
+ include Google::Apis::Core::Hashable
1584
+
1585
+ # Optional. The default value to use when the `value` yields an empty
1586
+ # result.
1587
+ # Default values can be extracted from contexts by using the following
1588
+ # syntax: `#context_name.parameter_name`.
1589
+ # Corresponds to the JSON property `defaultValue`
1590
+ # @return [String]
1591
+ attr_accessor :default_value
1592
+
1593
+ # Required. The name of the parameter.
1594
+ # Corresponds to the JSON property `displayName`
1595
+ # @return [String]
1596
+ attr_accessor :display_name
1597
+
1598
+ # Optional. The name of the entity type, prefixed with `@`, that
1599
+ # describes values of the parameter. If the parameter is
1600
+ # required, this must be provided.
1601
+ # Corresponds to the JSON property `entityTypeDisplayName`
1602
+ # @return [String]
1603
+ attr_accessor :entity_type_display_name
1604
+
1605
+ # Optional. Indicates whether the parameter represents a list of values.
1606
+ # Corresponds to the JSON property `isList`
1607
+ # @return [Boolean]
1608
+ attr_accessor :is_list
1609
+ alias_method :is_list?, :is_list
1610
+
1611
+ # Optional. Indicates whether the parameter is required. That is,
1612
+ # whether the intent cannot be completed without collecting the parameter
1613
+ # value.
1614
+ # Corresponds to the JSON property `mandatory`
1615
+ # @return [Boolean]
1616
+ attr_accessor :mandatory
1617
+ alias_method :mandatory?, :mandatory
1618
+
1619
+ # The unique identifier of this parameter.
1620
+ # Corresponds to the JSON property `name`
1621
+ # @return [String]
1622
+ attr_accessor :name
1623
+
1624
+ # Optional. The collection of prompts that the agent can present to the
1625
+ # user in order to collect value for the parameter.
1626
+ # Corresponds to the JSON property `prompts`
1627
+ # @return [Array<String>]
1628
+ attr_accessor :prompts
1629
+
1630
+ # Optional. The definition of the parameter value. It can be:
1631
+ # - a constant string,
1632
+ # - a parameter value defined as `$parameter_name`,
1633
+ # - an original parameter value defined as `$parameter_name.original`,
1634
+ # - a parameter value from some context defined as
1635
+ # `#context_name.parameter_name`.
1636
+ # Corresponds to the JSON property `value`
1637
+ # @return [String]
1638
+ attr_accessor :value
1639
+
1640
+ def initialize(**args)
1641
+ update!(**args)
1642
+ end
1643
+
1644
+ # Update properties of this object
1645
+ def update!(**args)
1646
+ @default_value = args[:default_value] if args.key?(:default_value)
1647
+ @display_name = args[:display_name] if args.key?(:display_name)
1648
+ @entity_type_display_name = args[:entity_type_display_name] if args.key?(:entity_type_display_name)
1649
+ @is_list = args[:is_list] if args.key?(:is_list)
1650
+ @mandatory = args[:mandatory] if args.key?(:mandatory)
1651
+ @name = args[:name] if args.key?(:name)
1652
+ @prompts = args[:prompts] if args.key?(:prompts)
1653
+ @value = args[:value] if args.key?(:value)
1654
+ end
1655
+ end
1656
+
1657
+ # Represents an example or template that the agent is trained on.
1658
+ class IntentTrainingPhrase
1659
+ include Google::Apis::Core::Hashable
1660
+
1661
+ # Required. The unique identifier of this training phrase.
1662
+ # Corresponds to the JSON property `name`
1663
+ # @return [String]
1664
+ attr_accessor :name
1665
+
1666
+ # Required. The collection of training phrase parts (can be annotated).
1667
+ # Fields: `entity_type`, `alias` and `user_defined` should be populated
1668
+ # only for the annotated parts of the training phrase.
1669
+ # Corresponds to the JSON property `parts`
1670
+ # @return [Array<Google::Apis::DialogflowV2beta1::IntentTrainingPhrasePart>]
1671
+ attr_accessor :parts
1672
+
1673
+ # Optional. Indicates how many times this example or template was added to
1674
+ # the intent. Each time a developer adds an existing sample by editing an
1675
+ # intent or training, this counter is increased.
1676
+ # Corresponds to the JSON property `timesAddedCount`
1677
+ # @return [Fixnum]
1678
+ attr_accessor :times_added_count
1679
+
1680
+ # Required. The type of the training phrase.
1681
+ # Corresponds to the JSON property `type`
1682
+ # @return [String]
1683
+ attr_accessor :type
1684
+
1685
+ def initialize(**args)
1686
+ update!(**args)
1687
+ end
1688
+
1689
+ # Update properties of this object
1690
+ def update!(**args)
1691
+ @name = args[:name] if args.key?(:name)
1692
+ @parts = args[:parts] if args.key?(:parts)
1693
+ @times_added_count = args[:times_added_count] if args.key?(:times_added_count)
1694
+ @type = args[:type] if args.key?(:type)
1695
+ end
1696
+ end
1697
+
1698
+ # Represents a part of a training phrase.
1699
+ class IntentTrainingPhrasePart
1700
+ include Google::Apis::Core::Hashable
1701
+
1702
+ # Optional. The parameter name for the value extracted from the
1703
+ # annotated part of the example.
1704
+ # Corresponds to the JSON property `alias`
1705
+ # @return [String]
1706
+ attr_accessor :alias
1707
+
1708
+ # Optional. The entity type name prefixed with `@`. This field is
1709
+ # required for the annotated part of the text and applies only to
1710
+ # examples.
1711
+ # Corresponds to the JSON property `entityType`
1712
+ # @return [String]
1713
+ attr_accessor :entity_type
1714
+
1715
+ # Required. The text corresponding to the example or template,
1716
+ # if there are no annotations. For
1717
+ # annotated examples, it is the text for one of the example's parts.
1718
+ # Corresponds to the JSON property `text`
1719
+ # @return [String]
1720
+ attr_accessor :text
1721
+
1722
+ # Optional. Indicates whether the text was manually annotated by the
1723
+ # developer.
1724
+ # Corresponds to the JSON property `userDefined`
1725
+ # @return [Boolean]
1726
+ attr_accessor :user_defined
1727
+ alias_method :user_defined?, :user_defined
1728
+
1729
+ def initialize(**args)
1730
+ update!(**args)
1731
+ end
1732
+
1733
+ # Update properties of this object
1734
+ def update!(**args)
1735
+ @alias = args[:alias] if args.key?(:alias)
1736
+ @entity_type = args[:entity_type] if args.key?(:entity_type)
1737
+ @text = args[:text] if args.key?(:text)
1738
+ @user_defined = args[:user_defined] if args.key?(:user_defined)
1739
+ end
1740
+ end
1741
+
1742
+ # An object representing a latitude/longitude pair. This is expressed as a pair
1743
+ # of doubles representing degrees latitude and degrees longitude. Unless
1744
+ # specified otherwise, this must conform to the
1745
+ # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1746
+ # standard</a>. Values must be within normalized ranges.
1747
+ class LatLng
1748
+ include Google::Apis::Core::Hashable
1749
+
1750
+ # The latitude in degrees. It must be in the range [-90.0, +90.0].
1751
+ # Corresponds to the JSON property `latitude`
1752
+ # @return [Float]
1753
+ attr_accessor :latitude
1754
+
1755
+ # The longitude in degrees. It must be in the range [-180.0, +180.0].
1756
+ # Corresponds to the JSON property `longitude`
1757
+ # @return [Float]
1758
+ attr_accessor :longitude
1759
+
1760
+ def initialize(**args)
1761
+ update!(**args)
1762
+ end
1763
+
1764
+ # Update properties of this object
1765
+ def update!(**args)
1766
+ @latitude = args[:latitude] if args.key?(:latitude)
1767
+ @longitude = args[:longitude] if args.key?(:longitude)
1768
+ end
1769
+ end
1770
+
1771
+ # The response message for Contexts.ListContexts.
1772
+ class ListContextsResponse
1773
+ include Google::Apis::Core::Hashable
1774
+
1775
+ # The list of contexts. There will be a maximum number of items
1776
+ # returned based on the page_size field in the request.
1777
+ # Corresponds to the JSON property `contexts`
1778
+ # @return [Array<Google::Apis::DialogflowV2beta1::Context>]
1779
+ attr_accessor :contexts
1780
+
1781
+ # Token to retrieve the next page of results, or empty if there are no
1782
+ # more results in the list.
1783
+ # Corresponds to the JSON property `nextPageToken`
1784
+ # @return [String]
1785
+ attr_accessor :next_page_token
1786
+
1787
+ def initialize(**args)
1788
+ update!(**args)
1789
+ end
1790
+
1791
+ # Update properties of this object
1792
+ def update!(**args)
1793
+ @contexts = args[:contexts] if args.key?(:contexts)
1794
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1795
+ end
1796
+ end
1797
+
1798
+ # The response message for EntityTypes.ListEntityTypes.
1799
+ class ListEntityTypesResponse
1800
+ include Google::Apis::Core::Hashable
1801
+
1802
+ # The list of agent entity types. There will be a maximum number of items
1803
+ # returned based on the page_size field in the request.
1804
+ # Corresponds to the JSON property `entityTypes`
1805
+ # @return [Array<Google::Apis::DialogflowV2beta1::EntityType>]
1806
+ attr_accessor :entity_types
1807
+
1808
+ # Token to retrieve the next page of results, or empty if there are no
1809
+ # more results in the list.
1810
+ # Corresponds to the JSON property `nextPageToken`
1811
+ # @return [String]
1812
+ attr_accessor :next_page_token
1813
+
1814
+ def initialize(**args)
1815
+ update!(**args)
1816
+ end
1817
+
1818
+ # Update properties of this object
1819
+ def update!(**args)
1820
+ @entity_types = args[:entity_types] if args.key?(:entity_types)
1821
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1822
+ end
1823
+ end
1824
+
1825
+ # The response message for Intents.ListIntents.
1826
+ class ListIntentsResponse
1827
+ include Google::Apis::Core::Hashable
1828
+
1829
+ # The list of agent intents. There will be a maximum number of items
1830
+ # returned based on the page_size field in the request.
1831
+ # Corresponds to the JSON property `intents`
1832
+ # @return [Array<Google::Apis::DialogflowV2beta1::Intent>]
1833
+ attr_accessor :intents
1834
+
1835
+ # Token to retrieve the next page of results, or empty if there are no
1836
+ # more results in the list.
1837
+ # Corresponds to the JSON property `nextPageToken`
1838
+ # @return [String]
1839
+ attr_accessor :next_page_token
1840
+
1841
+ def initialize(**args)
1842
+ update!(**args)
1843
+ end
1844
+
1845
+ # Update properties of this object
1846
+ def update!(**args)
1847
+ @intents = args[:intents] if args.key?(:intents)
1848
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1849
+ end
1850
+ end
1851
+
1852
+ # The response message for SessionEntityTypes.ListSessionEntityTypes.
1853
+ class ListSessionEntityTypesResponse
1854
+ include Google::Apis::Core::Hashable
1855
+
1856
+ # Token to retrieve the next page of results, or empty if there are no
1857
+ # more results in the list.
1858
+ # Corresponds to the JSON property `nextPageToken`
1859
+ # @return [String]
1860
+ attr_accessor :next_page_token
1861
+
1862
+ # The list of session entity types. There will be a maximum number of items
1863
+ # returned based on the page_size field in the request.
1864
+ # Corresponds to the JSON property `sessionEntityTypes`
1865
+ # @return [Array<Google::Apis::DialogflowV2beta1::SessionEntityType>]
1866
+ attr_accessor :session_entity_types
1867
+
1868
+ def initialize(**args)
1869
+ update!(**args)
1870
+ end
1871
+
1872
+ # Update properties of this object
1873
+ def update!(**args)
1874
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1875
+ @session_entity_types = args[:session_entity_types] if args.key?(:session_entity_types)
1876
+ end
1877
+ end
1878
+
1879
+ # This resource represents a long-running operation that is the result of a
1880
+ # network API call.
1881
+ class Operation
1882
+ include Google::Apis::Core::Hashable
1883
+
1884
+ # If the value is `false`, it means the operation is still in progress.
1885
+ # If `true`, the operation is completed, and either `error` or `response` is
1886
+ # available.
1887
+ # Corresponds to the JSON property `done`
1888
+ # @return [Boolean]
1889
+ attr_accessor :done
1890
+ alias_method :done?, :done
1891
+
1892
+ # The `Status` type defines a logical error model that is suitable for different
1893
+ # programming environments, including REST APIs and RPC APIs. It is used by
1894
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
1895
+ # - Simple to use and understand for most users
1896
+ # - Flexible enough to meet unexpected needs
1897
+ # # Overview
1898
+ # The `Status` message contains three pieces of data: error code, error message,
1899
+ # and error details. The error code should be an enum value of
1900
+ # google.rpc.Code, but it may accept additional error codes if needed. The
1901
+ # error message should be a developer-facing English message that helps
1902
+ # developers *understand* and *resolve* the error. If a localized user-facing
1903
+ # error message is needed, put the localized message in the error details or
1904
+ # localize it in the client. The optional error details may contain arbitrary
1905
+ # information about the error. There is a predefined set of error detail types
1906
+ # in the package `google.rpc` that can be used for common error conditions.
1907
+ # # Language mapping
1908
+ # The `Status` message is the logical representation of the error model, but it
1909
+ # is not necessarily the actual wire format. When the `Status` message is
1910
+ # exposed in different client libraries and different wire protocols, it can be
1911
+ # mapped differently. For example, it will likely be mapped to some exceptions
1912
+ # in Java, but more likely mapped to some error codes in C.
1913
+ # # Other uses
1914
+ # The error model and the `Status` message can be used in a variety of
1915
+ # environments, either with or without APIs, to provide a
1916
+ # consistent developer experience across different environments.
1917
+ # Example uses of this error model include:
1918
+ # - Partial errors. If a service needs to return partial errors to the client,
1919
+ # it may embed the `Status` in the normal response to indicate the partial
1920
+ # errors.
1921
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
1922
+ # have a `Status` message for error reporting.
1923
+ # - Batch operations. If a client uses batch request and batch response, the
1924
+ # `Status` message should be used directly inside batch response, one for
1925
+ # each error sub-response.
1926
+ # - Asynchronous operations. If an API call embeds asynchronous operation
1927
+ # results in its response, the status of those operations should be
1928
+ # represented directly using the `Status` message.
1929
+ # - Logging. If some API errors are stored in logs, the message `Status` could
1930
+ # be used directly after any stripping needed for security/privacy reasons.
1931
+ # Corresponds to the JSON property `error`
1932
+ # @return [Google::Apis::DialogflowV2beta1::Status]
1933
+ attr_accessor :error
1934
+
1935
+ # Service-specific metadata associated with the operation. It typically
1936
+ # contains progress information and common metadata such as create time.
1937
+ # Some services might not provide such metadata. Any method that returns a
1938
+ # long-running operation should document the metadata type, if any.
1939
+ # Corresponds to the JSON property `metadata`
1940
+ # @return [Hash<String,Object>]
1941
+ attr_accessor :metadata
1942
+
1943
+ # The server-assigned name, which is only unique within the same service that
1944
+ # originally returns it. If you use the default HTTP mapping, the
1945
+ # `name` should have the format of `operations/some/unique/name`.
1946
+ # Corresponds to the JSON property `name`
1947
+ # @return [String]
1948
+ attr_accessor :name
1949
+
1950
+ # The normal response of the operation in case of success. If the original
1951
+ # method returns no data on success, such as `Delete`, the response is
1952
+ # `google.protobuf.Empty`. If the original method is standard
1953
+ # `Get`/`Create`/`Update`, the response should be the resource. For other
1954
+ # methods, the response should have the type `XxxResponse`, where `Xxx`
1955
+ # is the original method name. For example, if the original method name
1956
+ # is `TakeSnapshot()`, the inferred response type is
1957
+ # `TakeSnapshotResponse`.
1958
+ # Corresponds to the JSON property `response`
1959
+ # @return [Hash<String,Object>]
1960
+ attr_accessor :response
1961
+
1962
+ def initialize(**args)
1963
+ update!(**args)
1964
+ end
1965
+
1966
+ # Update properties of this object
1967
+ def update!(**args)
1968
+ @done = args[:done] if args.key?(:done)
1969
+ @error = args[:error] if args.key?(:error)
1970
+ @metadata = args[:metadata] if args.key?(:metadata)
1971
+ @name = args[:name] if args.key?(:name)
1972
+ @response = args[:response] if args.key?(:response)
1973
+ end
1974
+ end
1975
+
1976
+ # Represents the contents of the original request that was passed to
1977
+ # the `[Streaming]DetectIntent` call.
1978
+ class OriginalDetectIntentRequest
1979
+ include Google::Apis::Core::Hashable
1980
+
1981
+ # Optional. This field is set to the value of `QueryParameters.payload` field
1982
+ # passed in the request.
1983
+ # Corresponds to the JSON property `payload`
1984
+ # @return [Hash<String,Object>]
1985
+ attr_accessor :payload
1986
+
1987
+ # The source of this request, e.g., `google`, `facebook`, `slack`. It is set
1988
+ # by Dialogflow-owned servers. Possible values of this field correspond to
1989
+ # Intent.Message.Platform.
1990
+ # Corresponds to the JSON property `source`
1991
+ # @return [String]
1992
+ attr_accessor :source
1993
+
1994
+ def initialize(**args)
1995
+ update!(**args)
1996
+ end
1997
+
1998
+ # Update properties of this object
1999
+ def update!(**args)
2000
+ @payload = args[:payload] if args.key?(:payload)
2001
+ @source = args[:source] if args.key?(:source)
2002
+ end
2003
+ end
2004
+
2005
+ # Represents the query input. It can contain either:
2006
+ # 1. an audio config which
2007
+ # instructs the speech recognizer how to process the speech audio,
2008
+ # 2. a conversational query in the form of text, or
2009
+ # 3. an event that specifies which intent to trigger.
2010
+ class QueryInput
2011
+ include Google::Apis::Core::Hashable
2012
+
2013
+ # Instructs the speech recognizer how to process the audio content.
2014
+ # Corresponds to the JSON property `audioConfig`
2015
+ # @return [Google::Apis::DialogflowV2beta1::InputAudioConfig]
2016
+ attr_accessor :audio_config
2017
+
2018
+ # Events allow for matching intents by event name instead of the natural
2019
+ # language input. For instance, input `<event: ` name: “welcome_event”,
2020
+ # parameters: ` name: “Sam” ` `>` can trigger a personalized welcome response.
2021
+ # The parameter `name` may be used by the agent in the response:
2022
+ # `“Hello #welcome_event.name! What can I do for you today?”`.
2023
+ # Corresponds to the JSON property `event`
2024
+ # @return [Google::Apis::DialogflowV2beta1::EventInput]
2025
+ attr_accessor :event
2026
+
2027
+ # Represents the natural language text to be processed.
2028
+ # Corresponds to the JSON property `text`
2029
+ # @return [Google::Apis::DialogflowV2beta1::TextInput]
2030
+ attr_accessor :text
2031
+
2032
+ def initialize(**args)
2033
+ update!(**args)
2034
+ end
2035
+
2036
+ # Update properties of this object
2037
+ def update!(**args)
2038
+ @audio_config = args[:audio_config] if args.key?(:audio_config)
2039
+ @event = args[:event] if args.key?(:event)
2040
+ @text = args[:text] if args.key?(:text)
2041
+ end
2042
+ end
2043
+
2044
+ # Represents the parameters of the conversational query.
2045
+ class QueryParameters
2046
+ include Google::Apis::Core::Hashable
2047
+
2048
+ # Optional. The collection of contexts to be activated before this query is
2049
+ # executed.
2050
+ # Corresponds to the JSON property `contexts`
2051
+ # @return [Array<Google::Apis::DialogflowV2beta1::Context>]
2052
+ attr_accessor :contexts
2053
+
2054
+ # An object representing a latitude/longitude pair. This is expressed as a pair
2055
+ # of doubles representing degrees latitude and degrees longitude. Unless
2056
+ # specified otherwise, this must conform to the
2057
+ # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
2058
+ # standard</a>. Values must be within normalized ranges.
2059
+ # Corresponds to the JSON property `geoLocation`
2060
+ # @return [Google::Apis::DialogflowV2beta1::LatLng]
2061
+ attr_accessor :geo_location
2062
+
2063
+ # Optional. This field can be used to pass custom data into the webhook
2064
+ # associated with the agent. Arbitrary JSON objects are supported.
2065
+ # Corresponds to the JSON property `payload`
2066
+ # @return [Hash<String,Object>]
2067
+ attr_accessor :payload
2068
+
2069
+ # Optional. Specifies whether to delete all contexts in the current session
2070
+ # before the new ones are activated.
2071
+ # Corresponds to the JSON property `resetContexts`
2072
+ # @return [Boolean]
2073
+ attr_accessor :reset_contexts
2074
+ alias_method :reset_contexts?, :reset_contexts
2075
+
2076
+ # Optional. The collection of session entity types to replace or extend
2077
+ # developer entities with for this query only. The entity synonyms apply
2078
+ # to all languages.
2079
+ # Corresponds to the JSON property `sessionEntityTypes`
2080
+ # @return [Array<Google::Apis::DialogflowV2beta1::SessionEntityType>]
2081
+ attr_accessor :session_entity_types
2082
+
2083
+ # Optional. The time zone of this conversational query from the
2084
+ # [time zone database](https://www.iana.org/time-zones), e.g.,
2085
+ # America/New_York, Europe/Paris. If not provided, the time zone specified in
2086
+ # agent settings is used.
2087
+ # Corresponds to the JSON property `timeZone`
2088
+ # @return [String]
2089
+ attr_accessor :time_zone
2090
+
2091
+ def initialize(**args)
2092
+ update!(**args)
2093
+ end
2094
+
2095
+ # Update properties of this object
2096
+ def update!(**args)
2097
+ @contexts = args[:contexts] if args.key?(:contexts)
2098
+ @geo_location = args[:geo_location] if args.key?(:geo_location)
2099
+ @payload = args[:payload] if args.key?(:payload)
2100
+ @reset_contexts = args[:reset_contexts] if args.key?(:reset_contexts)
2101
+ @session_entity_types = args[:session_entity_types] if args.key?(:session_entity_types)
2102
+ @time_zone = args[:time_zone] if args.key?(:time_zone)
2103
+ end
2104
+ end
2105
+
2106
+ # Represents the result of conversational query or event processing.
2107
+ class QueryResult
2108
+ include Google::Apis::Core::Hashable
2109
+
2110
+ # The action name from the matched intent.
2111
+ # Corresponds to the JSON property `action`
2112
+ # @return [String]
2113
+ attr_accessor :action
2114
+
2115
+ # This field is set to:
2116
+ # - `false` if the matched intent has required parameters and not all of
2117
+ # the required parameter values have been collected.
2118
+ # - `true` if all required parameter values have been collected, or if the
2119
+ # matched intent doesn't contain any required parameters.
2120
+ # Corresponds to the JSON property `allRequiredParamsPresent`
2121
+ # @return [Boolean]
2122
+ attr_accessor :all_required_params_present
2123
+ alias_method :all_required_params_present?, :all_required_params_present
2124
+
2125
+ # The free-form diagnostic info. For example, this field
2126
+ # could contain webhook call latency.
2127
+ # Corresponds to the JSON property `diagnosticInfo`
2128
+ # @return [Hash<String,Object>]
2129
+ attr_accessor :diagnostic_info
2130
+
2131
+ # The collection of rich messages to present to the user.
2132
+ # Corresponds to the JSON property `fulfillmentMessages`
2133
+ # @return [Array<Google::Apis::DialogflowV2beta1::IntentMessage>]
2134
+ attr_accessor :fulfillment_messages
2135
+
2136
+ # The text to be pronounced to the user or shown on the screen.
2137
+ # Corresponds to the JSON property `fulfillmentText`
2138
+ # @return [String]
2139
+ attr_accessor :fulfillment_text
2140
+
2141
+ # Represents an intent.
2142
+ # Intents convert a number of user expressions or patterns into an action. An
2143
+ # action is an extraction of a user command or sentence semantics.
2144
+ # Corresponds to the JSON property `intent`
2145
+ # @return [Google::Apis::DialogflowV2beta1::Intent]
2146
+ attr_accessor :intent
2147
+
2148
+ # The intent detection confidence. Values range from 0.0
2149
+ # (completely uncertain) to 1.0 (completely certain).
2150
+ # Corresponds to the JSON property `intentDetectionConfidence`
2151
+ # @return [Float]
2152
+ attr_accessor :intent_detection_confidence
2153
+
2154
+ # The language that was triggered during intent detection.
2155
+ # See [Language Support](https://dialogflow.com/docs/reference/language)
2156
+ # for a list of the currently supported language codes.
2157
+ # Corresponds to the JSON property `languageCode`
2158
+ # @return [String]
2159
+ attr_accessor :language_code
2160
+
2161
+ # The collection of output contexts. If applicable,
2162
+ # `output_contexts.parameters` contains entries with name
2163
+ # `<parameter name>.original` containing the original parameter values
2164
+ # before the query.
2165
+ # Corresponds to the JSON property `outputContexts`
2166
+ # @return [Array<Google::Apis::DialogflowV2beta1::Context>]
2167
+ attr_accessor :output_contexts
2168
+
2169
+ # The collection of extracted parameters.
2170
+ # Corresponds to the JSON property `parameters`
2171
+ # @return [Hash<String,Object>]
2172
+ attr_accessor :parameters
2173
+
2174
+ # The original conversational query text:
2175
+ # - If natural language text was provided as input, `query_text` contains
2176
+ # a copy of the input.
2177
+ # - If natural language speech audio was provided as input, `query_text`
2178
+ # contains the speech recognition result. If speech recognizer produced
2179
+ # multiple alternatives, a particular one is picked.
2180
+ # - If an event was provided as input, `query_text` is not set.
2181
+ # Corresponds to the JSON property `queryText`
2182
+ # @return [String]
2183
+ attr_accessor :query_text
2184
+
2185
+ # The confidence estimate between 0.0 and 1.0. A higher number
2186
+ # indicates an estimated greater likelihood that the recognized words are
2187
+ # correct. The default of 0.0 is a sentinel value indicating that confidence
2188
+ # was not set. This field is populated if natural speech audio was provided
2189
+ # as input.
2190
+ # Corresponds to the JSON property `speechRecognitionConfidence`
2191
+ # @return [Float]
2192
+ attr_accessor :speech_recognition_confidence
2193
+
2194
+ # If the query was fulfilled by a webhook call, this field is set to the
2195
+ # value of the `payload` field returned in the webhook response.
2196
+ # Corresponds to the JSON property `webhookPayload`
2197
+ # @return [Hash<String,Object>]
2198
+ attr_accessor :webhook_payload
2199
+
2200
+ # If the query was fulfilled by a webhook call, this field is set to the
2201
+ # value of the `source` field returned in the webhook response.
2202
+ # Corresponds to the JSON property `webhookSource`
2203
+ # @return [String]
2204
+ attr_accessor :webhook_source
2205
+
2206
+ def initialize(**args)
2207
+ update!(**args)
2208
+ end
2209
+
2210
+ # Update properties of this object
2211
+ def update!(**args)
2212
+ @action = args[:action] if args.key?(:action)
2213
+ @all_required_params_present = args[:all_required_params_present] if args.key?(:all_required_params_present)
2214
+ @diagnostic_info = args[:diagnostic_info] if args.key?(:diagnostic_info)
2215
+ @fulfillment_messages = args[:fulfillment_messages] if args.key?(:fulfillment_messages)
2216
+ @fulfillment_text = args[:fulfillment_text] if args.key?(:fulfillment_text)
2217
+ @intent = args[:intent] if args.key?(:intent)
2218
+ @intent_detection_confidence = args[:intent_detection_confidence] if args.key?(:intent_detection_confidence)
2219
+ @language_code = args[:language_code] if args.key?(:language_code)
2220
+ @output_contexts = args[:output_contexts] if args.key?(:output_contexts)
2221
+ @parameters = args[:parameters] if args.key?(:parameters)
2222
+ @query_text = args[:query_text] if args.key?(:query_text)
2223
+ @speech_recognition_confidence = args[:speech_recognition_confidence] if args.key?(:speech_recognition_confidence)
2224
+ @webhook_payload = args[:webhook_payload] if args.key?(:webhook_payload)
2225
+ @webhook_source = args[:webhook_source] if args.key?(:webhook_source)
2226
+ end
2227
+ end
2228
+
2229
+ # The request message for Agents.RestoreAgent.
2230
+ class RestoreAgentRequest
2231
+ include Google::Apis::Core::Hashable
2232
+
2233
+ # The agent to restore.
2234
+ # Corresponds to the JSON property `agentContent`
2235
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
2236
+ # @return [String]
2237
+ attr_accessor :agent_content
2238
+
2239
+ # Warning: Restoring agents from a URI is not implemented yet.
2240
+ # This feature is coming soon.
2241
+ # The URI to a Google Cloud Storage file containing the agent to restore.
2242
+ # Note: The URI must start with "gs://".
2243
+ # Corresponds to the JSON property `agentUri`
2244
+ # @return [String]
2245
+ attr_accessor :agent_uri
2246
+
2247
+ def initialize(**args)
2248
+ update!(**args)
2249
+ end
2250
+
2251
+ # Update properties of this object
2252
+ def update!(**args)
2253
+ @agent_content = args[:agent_content] if args.key?(:agent_content)
2254
+ @agent_uri = args[:agent_uri] if args.key?(:agent_uri)
2255
+ end
2256
+ end
2257
+
2258
+ # The response message for Agents.SearchAgents.
2259
+ class SearchAgentsResponse
2260
+ include Google::Apis::Core::Hashable
2261
+
2262
+ # The list of agents. There will be a maximum number of items returned based
2263
+ # on the page_size field in the request.
2264
+ # Corresponds to the JSON property `agents`
2265
+ # @return [Array<Google::Apis::DialogflowV2beta1::Agent>]
2266
+ attr_accessor :agents
2267
+
2268
+ # Token to retrieve the next page of results, or empty if there are no
2269
+ # more results in the list.
2270
+ # Corresponds to the JSON property `nextPageToken`
2271
+ # @return [String]
2272
+ attr_accessor :next_page_token
2273
+
2274
+ def initialize(**args)
2275
+ update!(**args)
2276
+ end
2277
+
2278
+ # Update properties of this object
2279
+ def update!(**args)
2280
+ @agents = args[:agents] if args.key?(:agents)
2281
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2282
+ end
2283
+ end
2284
+
2285
+ # Represents a session entity type.
2286
+ # Extends or replaces a developer entity type at the user session level (we
2287
+ # refer to the entity types defined at the agent level as "developer entity
2288
+ # types").
2289
+ # Note: session entity types apply to all queries, regardless of the language.
2290
+ class SessionEntityType
2291
+ include Google::Apis::Core::Hashable
2292
+
2293
+ # Required. The collection of entities associated with this session entity
2294
+ # type.
2295
+ # Corresponds to the JSON property `entities`
2296
+ # @return [Array<Google::Apis::DialogflowV2beta1::EntityTypeEntity>]
2297
+ attr_accessor :entities
2298
+
2299
+ # Required. Indicates whether the additional data should override or
2300
+ # supplement the developer entity type definition.
2301
+ # Corresponds to the JSON property `entityOverrideMode`
2302
+ # @return [String]
2303
+ attr_accessor :entity_override_mode
2304
+
2305
+ # Required. The unique identifier of this session entity type. Format:
2306
+ # `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
2307
+ # Display Name>`.
2308
+ # Corresponds to the JSON property `name`
2309
+ # @return [String]
2310
+ attr_accessor :name
2311
+
2312
+ def initialize(**args)
2313
+ update!(**args)
2314
+ end
2315
+
2316
+ # Update properties of this object
2317
+ def update!(**args)
2318
+ @entities = args[:entities] if args.key?(:entities)
2319
+ @entity_override_mode = args[:entity_override_mode] if args.key?(:entity_override_mode)
2320
+ @name = args[:name] if args.key?(:name)
2321
+ end
2322
+ end
2323
+
2324
+ # The `Status` type defines a logical error model that is suitable for different
2325
+ # programming environments, including REST APIs and RPC APIs. It is used by
2326
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
2327
+ # - Simple to use and understand for most users
2328
+ # - Flexible enough to meet unexpected needs
2329
+ # # Overview
2330
+ # The `Status` message contains three pieces of data: error code, error message,
2331
+ # and error details. The error code should be an enum value of
2332
+ # google.rpc.Code, but it may accept additional error codes if needed. The
2333
+ # error message should be a developer-facing English message that helps
2334
+ # developers *understand* and *resolve* the error. If a localized user-facing
2335
+ # error message is needed, put the localized message in the error details or
2336
+ # localize it in the client. The optional error details may contain arbitrary
2337
+ # information about the error. There is a predefined set of error detail types
2338
+ # in the package `google.rpc` that can be used for common error conditions.
2339
+ # # Language mapping
2340
+ # The `Status` message is the logical representation of the error model, but it
2341
+ # is not necessarily the actual wire format. When the `Status` message is
2342
+ # exposed in different client libraries and different wire protocols, it can be
2343
+ # mapped differently. For example, it will likely be mapped to some exceptions
2344
+ # in Java, but more likely mapped to some error codes in C.
2345
+ # # Other uses
2346
+ # The error model and the `Status` message can be used in a variety of
2347
+ # environments, either with or without APIs, to provide a
2348
+ # consistent developer experience across different environments.
2349
+ # Example uses of this error model include:
2350
+ # - Partial errors. If a service needs to return partial errors to the client,
2351
+ # it may embed the `Status` in the normal response to indicate the partial
2352
+ # errors.
2353
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
2354
+ # have a `Status` message for error reporting.
2355
+ # - Batch operations. If a client uses batch request and batch response, the
2356
+ # `Status` message should be used directly inside batch response, one for
2357
+ # each error sub-response.
2358
+ # - Asynchronous operations. If an API call embeds asynchronous operation
2359
+ # results in its response, the status of those operations should be
2360
+ # represented directly using the `Status` message.
2361
+ # - Logging. If some API errors are stored in logs, the message `Status` could
2362
+ # be used directly after any stripping needed for security/privacy reasons.
2363
+ class Status
2364
+ include Google::Apis::Core::Hashable
2365
+
2366
+ # The status code, which should be an enum value of google.rpc.Code.
2367
+ # Corresponds to the JSON property `code`
2368
+ # @return [Fixnum]
2369
+ attr_accessor :code
2370
+
2371
+ # A list of messages that carry the error details. There is a common set of
2372
+ # message types for APIs to use.
2373
+ # Corresponds to the JSON property `details`
2374
+ # @return [Array<Hash<String,Object>>]
2375
+ attr_accessor :details
2376
+
2377
+ # A developer-facing error message, which should be in English. Any
2378
+ # user-facing error message should be localized and sent in the
2379
+ # google.rpc.Status.details field, or localized by the client.
2380
+ # Corresponds to the JSON property `message`
2381
+ # @return [String]
2382
+ attr_accessor :message
2383
+
2384
+ def initialize(**args)
2385
+ update!(**args)
2386
+ end
2387
+
2388
+ # Update properties of this object
2389
+ def update!(**args)
2390
+ @code = args[:code] if args.key?(:code)
2391
+ @details = args[:details] if args.key?(:details)
2392
+ @message = args[:message] if args.key?(:message)
2393
+ end
2394
+ end
2395
+
2396
+ # Represents the natural language text to be processed.
2397
+ class TextInput
2398
+ include Google::Apis::Core::Hashable
2399
+
2400
+ # Required. The language of this conversational query. See [Language
2401
+ # Support](https://dialogflow.com/docs/languages) for a list of the
2402
+ # currently supported language codes. Note that queries in the same session
2403
+ # do not necessarily need to specify the same language.
2404
+ # Corresponds to the JSON property `languageCode`
2405
+ # @return [String]
2406
+ attr_accessor :language_code
2407
+
2408
+ # Required. The UTF-8 encoded natural language text to be processed.
2409
+ # Text length must not exceed 256 bytes.
2410
+ # Corresponds to the JSON property `text`
2411
+ # @return [String]
2412
+ attr_accessor :text
2413
+
2414
+ def initialize(**args)
2415
+ update!(**args)
2416
+ end
2417
+
2418
+ # Update properties of this object
2419
+ def update!(**args)
2420
+ @language_code = args[:language_code] if args.key?(:language_code)
2421
+ @text = args[:text] if args.key?(:text)
2422
+ end
2423
+ end
2424
+
2425
+ # The request message for Agents.TrainAgent.
2426
+ class TrainAgentRequest
2427
+ include Google::Apis::Core::Hashable
2428
+
2429
+ def initialize(**args)
2430
+ update!(**args)
2431
+ end
2432
+
2433
+ # Update properties of this object
2434
+ def update!(**args)
2435
+ end
2436
+ end
2437
+
2438
+ # The request message for a webhook call.
2439
+ class WebhookRequest
2440
+ include Google::Apis::Core::Hashable
2441
+
2442
+ # Represents the contents of the original request that was passed to
2443
+ # the `[Streaming]DetectIntent` call.
2444
+ # Corresponds to the JSON property `originalDetectIntentRequest`
2445
+ # @return [Google::Apis::DialogflowV2beta1::OriginalDetectIntentRequest]
2446
+ attr_accessor :original_detect_intent_request
2447
+
2448
+ # Represents the result of conversational query or event processing.
2449
+ # Corresponds to the JSON property `queryResult`
2450
+ # @return [Google::Apis::DialogflowV2beta1::QueryResult]
2451
+ attr_accessor :query_result
2452
+
2453
+ # The unique identifier of the response. Contains the same value as
2454
+ # `[Streaming]DetectIntentResponse.response_id`.
2455
+ # Corresponds to the JSON property `responseId`
2456
+ # @return [String]
2457
+ attr_accessor :response_id
2458
+
2459
+ # The unique identifier of detectIntent request session.
2460
+ # Can be used to identify end-user inside webhook implementation.
2461
+ # Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
2462
+ # Corresponds to the JSON property `session`
2463
+ # @return [String]
2464
+ attr_accessor :session
2465
+
2466
+ def initialize(**args)
2467
+ update!(**args)
2468
+ end
2469
+
2470
+ # Update properties of this object
2471
+ def update!(**args)
2472
+ @original_detect_intent_request = args[:original_detect_intent_request] if args.key?(:original_detect_intent_request)
2473
+ @query_result = args[:query_result] if args.key?(:query_result)
2474
+ @response_id = args[:response_id] if args.key?(:response_id)
2475
+ @session = args[:session] if args.key?(:session)
2476
+ end
2477
+ end
2478
+
2479
+ # The response message for a webhook call.
2480
+ class WebhookResponse
2481
+ include Google::Apis::Core::Hashable
2482
+
2483
+ # Events allow for matching intents by event name instead of the natural
2484
+ # language input. For instance, input `<event: ` name: “welcome_event”,
2485
+ # parameters: ` name: “Sam” ` `>` can trigger a personalized welcome response.
2486
+ # The parameter `name` may be used by the agent in the response:
2487
+ # `“Hello #welcome_event.name! What can I do for you today?”`.
2488
+ # Corresponds to the JSON property `followupEventInput`
2489
+ # @return [Google::Apis::DialogflowV2beta1::EventInput]
2490
+ attr_accessor :followup_event_input
2491
+
2492
+ # Optional. The collection of rich messages to present to the user. This
2493
+ # value is passed directly to `QueryResult.fulfillment_messages`.
2494
+ # Corresponds to the JSON property `fulfillmentMessages`
2495
+ # @return [Array<Google::Apis::DialogflowV2beta1::IntentMessage>]
2496
+ attr_accessor :fulfillment_messages
2497
+
2498
+ # Optional. The text to be shown on the screen. This value is passed directly
2499
+ # to `QueryResult.fulfillment_text`.
2500
+ # Corresponds to the JSON property `fulfillmentText`
2501
+ # @return [String]
2502
+ attr_accessor :fulfillment_text
2503
+
2504
+ # Optional. The collection of output contexts. This value is passed directly
2505
+ # to `QueryResult.output_contexts`.
2506
+ # Corresponds to the JSON property `outputContexts`
2507
+ # @return [Array<Google::Apis::DialogflowV2beta1::Context>]
2508
+ attr_accessor :output_contexts
2509
+
2510
+ # Optional. This value is passed directly to `QueryResult.webhook_payload`.
2511
+ # Corresponds to the JSON property `payload`
2512
+ # @return [Hash<String,Object>]
2513
+ attr_accessor :payload
2514
+
2515
+ # Optional. This value is passed directly to `QueryResult.webhook_source`.
2516
+ # Corresponds to the JSON property `source`
2517
+ # @return [String]
2518
+ attr_accessor :source
2519
+
2520
+ def initialize(**args)
2521
+ update!(**args)
2522
+ end
2523
+
2524
+ # Update properties of this object
2525
+ def update!(**args)
2526
+ @followup_event_input = args[:followup_event_input] if args.key?(:followup_event_input)
2527
+ @fulfillment_messages = args[:fulfillment_messages] if args.key?(:fulfillment_messages)
2528
+ @fulfillment_text = args[:fulfillment_text] if args.key?(:fulfillment_text)
2529
+ @output_contexts = args[:output_contexts] if args.key?(:output_contexts)
2530
+ @payload = args[:payload] if args.key?(:payload)
2531
+ @source = args[:source] if args.key?(:source)
2532
+ end
2533
+ end
2534
+ end
2535
+ end
2536
+ end