google-api-client 0.17.1 → 0.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -0,0 +1,1398 @@
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/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module DialogflowV2beta1
23
+ # Dialogflow API
24
+ #
25
+ # An end-to-end development suite for conversational interfaces (e.g., chatbots,
26
+ # voice-powered apps and devices).
27
+ #
28
+ # @example
29
+ # require 'google/apis/dialogflow_v2beta1'
30
+ #
31
+ # Dialogflow = Google::Apis::DialogflowV2beta1 # Alias the module
32
+ # service = Dialogflow::DialogflowService.new
33
+ #
34
+ # @see https://cloud.google.com/dialogflow-enterprise/
35
+ class DialogflowService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://dialogflow.googleapis.com/', '')
48
+ @batch_path = 'batch'
49
+ end
50
+
51
+ # Retrieves the specified agent.
52
+ # @param [String] parent
53
+ # Required. The project that the agent to fetch is associated with.
54
+ # Format: `projects/<Project ID>`.
55
+ # @param [String] fields
56
+ # Selector specifying which fields to include in a partial response.
57
+ # @param [String] quota_user
58
+ # Available to use for quota purposes for server-side applications. Can be any
59
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
60
+ # @param [Google::Apis::RequestOptions] options
61
+ # Request-specific options
62
+ #
63
+ # @yield [result, err] Result & error if block supplied
64
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::Agent] parsed result object
65
+ # @yieldparam err [StandardError] error object if request failed
66
+ #
67
+ # @return [Google::Apis::DialogflowV2beta1::Agent]
68
+ #
69
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
70
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
71
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
72
+ def get_project_agent(parent, fields: nil, quota_user: nil, options: nil, &block)
73
+ command = make_simple_command(:get, 'v2beta1/{+parent}/agent', options)
74
+ command.response_representation = Google::Apis::DialogflowV2beta1::Agent::Representation
75
+ command.response_class = Google::Apis::DialogflowV2beta1::Agent
76
+ command.params['parent'] = parent unless parent.nil?
77
+ command.query['fields'] = fields unless fields.nil?
78
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
79
+ execute_or_queue_command(command, &block)
80
+ end
81
+
82
+ # Exports the specified agent to a ZIP file.
83
+ # Operation<response: ExportAgentResponse,
84
+ # metadata: google.protobuf.Struct>
85
+ # @param [String] parent
86
+ # Required. The project that the agent to export is associated with.
87
+ # Format: `projects/<Project ID>`.
88
+ # @param [Google::Apis::DialogflowV2beta1::ExportAgentRequest] export_agent_request_object
89
+ # @param [String] fields
90
+ # Selector specifying which fields to include in a partial response.
91
+ # @param [String] quota_user
92
+ # Available to use for quota purposes for server-side applications. Can be any
93
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
94
+ # @param [Google::Apis::RequestOptions] options
95
+ # Request-specific options
96
+ #
97
+ # @yield [result, err] Result & error if block supplied
98
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::Operation] parsed result object
99
+ # @yieldparam err [StandardError] error object if request failed
100
+ #
101
+ # @return [Google::Apis::DialogflowV2beta1::Operation]
102
+ #
103
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
104
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
105
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
106
+ def export_agent(parent, export_agent_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
107
+ command = make_simple_command(:post, 'v2beta1/{+parent}/agent:export', options)
108
+ command.request_representation = Google::Apis::DialogflowV2beta1::ExportAgentRequest::Representation
109
+ command.request_object = export_agent_request_object
110
+ command.response_representation = Google::Apis::DialogflowV2beta1::Operation::Representation
111
+ command.response_class = Google::Apis::DialogflowV2beta1::Operation
112
+ command.params['parent'] = parent unless parent.nil?
113
+ command.query['fields'] = fields unless fields.nil?
114
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
115
+ execute_or_queue_command(command, &block)
116
+ end
117
+
118
+ # Imports the specified agent from a ZIP file.
119
+ # Uploads new intents and entity types without deleting the existing ones.
120
+ # Intents and entity types with the same name are replaced with the new
121
+ # versions from ImportAgentRequest.
122
+ # Operation<response: google.protobuf.Empty,
123
+ # metadata: google.protobuf.Struct>
124
+ # @param [String] parent
125
+ # Required. The project that the agent to import is associated with.
126
+ # Format: `projects/<Project ID>`.
127
+ # @param [Google::Apis::DialogflowV2beta1::ImportAgentRequest] import_agent_request_object
128
+ # @param [String] fields
129
+ # Selector specifying which fields to include in a partial response.
130
+ # @param [String] quota_user
131
+ # Available to use for quota purposes for server-side applications. Can be any
132
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
133
+ # @param [Google::Apis::RequestOptions] options
134
+ # Request-specific options
135
+ #
136
+ # @yield [result, err] Result & error if block supplied
137
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::Operation] parsed result object
138
+ # @yieldparam err [StandardError] error object if request failed
139
+ #
140
+ # @return [Google::Apis::DialogflowV2beta1::Operation]
141
+ #
142
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
143
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
144
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
145
+ def import_agent(parent, import_agent_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
146
+ command = make_simple_command(:post, 'v2beta1/{+parent}/agent:import', options)
147
+ command.request_representation = Google::Apis::DialogflowV2beta1::ImportAgentRequest::Representation
148
+ command.request_object = import_agent_request_object
149
+ command.response_representation = Google::Apis::DialogflowV2beta1::Operation::Representation
150
+ command.response_class = Google::Apis::DialogflowV2beta1::Operation
151
+ command.params['parent'] = parent unless parent.nil?
152
+ command.query['fields'] = fields unless fields.nil?
153
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
154
+ execute_or_queue_command(command, &block)
155
+ end
156
+
157
+ # Restores the specified agent from a ZIP file.
158
+ # Replaces the current agent version with a new one. All the intents and
159
+ # entity types in the older version are deleted.
160
+ # Operation<response: google.protobuf.Empty,
161
+ # metadata: google.protobuf.Struct>
162
+ # @param [String] parent
163
+ # Required. The project that the agent to restore is associated with.
164
+ # Format: `projects/<Project ID>`.
165
+ # @param [Google::Apis::DialogflowV2beta1::RestoreAgentRequest] restore_agent_request_object
166
+ # @param [String] fields
167
+ # Selector specifying which fields to include in a partial response.
168
+ # @param [String] quota_user
169
+ # Available to use for quota purposes for server-side applications. Can be any
170
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
171
+ # @param [Google::Apis::RequestOptions] options
172
+ # Request-specific options
173
+ #
174
+ # @yield [result, err] Result & error if block supplied
175
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::Operation] parsed result object
176
+ # @yieldparam err [StandardError] error object if request failed
177
+ #
178
+ # @return [Google::Apis::DialogflowV2beta1::Operation]
179
+ #
180
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
181
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
182
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
183
+ def restore_agent(parent, restore_agent_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
184
+ command = make_simple_command(:post, 'v2beta1/{+parent}/agent:restore', options)
185
+ command.request_representation = Google::Apis::DialogflowV2beta1::RestoreAgentRequest::Representation
186
+ command.request_object = restore_agent_request_object
187
+ command.response_representation = Google::Apis::DialogflowV2beta1::Operation::Representation
188
+ command.response_class = Google::Apis::DialogflowV2beta1::Operation
189
+ command.params['parent'] = parent unless parent.nil?
190
+ command.query['fields'] = fields unless fields.nil?
191
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
192
+ execute_or_queue_command(command, &block)
193
+ end
194
+
195
+ # Returns the list of agents.
196
+ # Since there is at most one conversational agent per project, this method is
197
+ # useful primarily for listing all agents across projects the caller has
198
+ # access to. One can achieve that with a wildcard project collection id "-".
199
+ # Refer to [List
200
+ # Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-
201
+ # collections).
202
+ # @param [String] parent
203
+ # Required. The project to list agents from.
204
+ # Format: `projects/<Project ID or '-'>`.
205
+ # @param [Fixnum] page_size
206
+ # Optional. The maximum number of items to return in a single page. By
207
+ # default 100 and at most 1000.
208
+ # @param [String] page_token
209
+ # Optional. The next_page_token value returned from a previous list request.
210
+ # @param [String] fields
211
+ # Selector specifying which fields to include in a partial response.
212
+ # @param [String] quota_user
213
+ # Available to use for quota purposes for server-side applications. Can be any
214
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
215
+ # @param [Google::Apis::RequestOptions] options
216
+ # Request-specific options
217
+ #
218
+ # @yield [result, err] Result & error if block supplied
219
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::SearchAgentsResponse] parsed result object
220
+ # @yieldparam err [StandardError] error object if request failed
221
+ #
222
+ # @return [Google::Apis::DialogflowV2beta1::SearchAgentsResponse]
223
+ #
224
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
225
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
226
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
227
+ def search_project_agents(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
228
+ command = make_simple_command(:get, 'v2beta1/{+parent}/agent:search', options)
229
+ command.response_representation = Google::Apis::DialogflowV2beta1::SearchAgentsResponse::Representation
230
+ command.response_class = Google::Apis::DialogflowV2beta1::SearchAgentsResponse
231
+ command.params['parent'] = parent unless parent.nil?
232
+ command.query['pageSize'] = page_size unless page_size.nil?
233
+ command.query['pageToken'] = page_token unless page_token.nil?
234
+ command.query['fields'] = fields unless fields.nil?
235
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
236
+ execute_or_queue_command(command, &block)
237
+ end
238
+
239
+ # Trains the specified agent.
240
+ # Operation<response: google.protobuf.Empty,
241
+ # metadata: google.protobuf.Struct>
242
+ # @param [String] parent
243
+ # Required. The project that the agent to train is associated with.
244
+ # Format: `projects/<Project ID>`.
245
+ # @param [Google::Apis::DialogflowV2beta1::TrainAgentRequest] train_agent_request_object
246
+ # @param [String] fields
247
+ # Selector specifying which fields to include in a partial response.
248
+ # @param [String] quota_user
249
+ # Available to use for quota purposes for server-side applications. Can be any
250
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
251
+ # @param [Google::Apis::RequestOptions] options
252
+ # Request-specific options
253
+ #
254
+ # @yield [result, err] Result & error if block supplied
255
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::Operation] parsed result object
256
+ # @yieldparam err [StandardError] error object if request failed
257
+ #
258
+ # @return [Google::Apis::DialogflowV2beta1::Operation]
259
+ #
260
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
261
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
262
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
263
+ def train_agent(parent, train_agent_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
264
+ command = make_simple_command(:post, 'v2beta1/{+parent}/agent:train', options)
265
+ command.request_representation = Google::Apis::DialogflowV2beta1::TrainAgentRequest::Representation
266
+ command.request_object = train_agent_request_object
267
+ command.response_representation = Google::Apis::DialogflowV2beta1::Operation::Representation
268
+ command.response_class = Google::Apis::DialogflowV2beta1::Operation
269
+ command.params['parent'] = parent unless parent.nil?
270
+ command.query['fields'] = fields unless fields.nil?
271
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
272
+ execute_or_queue_command(command, &block)
273
+ end
274
+
275
+ # Deletes entity types in the specified agent.
276
+ # Operation<response: google.protobuf.Empty,
277
+ # metadata: google.protobuf.Struct>
278
+ # @param [String] parent
279
+ # Required. The name of the agent to delete all entities types for. Format:
280
+ # `projects/<Project ID>/agent`.
281
+ # @param [Google::Apis::DialogflowV2beta1::BatchDeleteEntityTypesRequest] batch_delete_entity_types_request_object
282
+ # @param [String] fields
283
+ # Selector specifying which fields to include in a partial response.
284
+ # @param [String] quota_user
285
+ # Available to use for quota purposes for server-side applications. Can be any
286
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
287
+ # @param [Google::Apis::RequestOptions] options
288
+ # Request-specific options
289
+ #
290
+ # @yield [result, err] Result & error if block supplied
291
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::Operation] parsed result object
292
+ # @yieldparam err [StandardError] error object if request failed
293
+ #
294
+ # @return [Google::Apis::DialogflowV2beta1::Operation]
295
+ #
296
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
297
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
298
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
299
+ def batch_delete_entity_types(parent, batch_delete_entity_types_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
300
+ command = make_simple_command(:post, 'v2beta1/{+parent}/entityTypes:batchDelete', options)
301
+ command.request_representation = Google::Apis::DialogflowV2beta1::BatchDeleteEntityTypesRequest::Representation
302
+ command.request_object = batch_delete_entity_types_request_object
303
+ command.response_representation = Google::Apis::DialogflowV2beta1::Operation::Representation
304
+ command.response_class = Google::Apis::DialogflowV2beta1::Operation
305
+ command.params['parent'] = parent unless parent.nil?
306
+ command.query['fields'] = fields unless fields.nil?
307
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
308
+ execute_or_queue_command(command, &block)
309
+ end
310
+
311
+ # Updates/Creates multiple entity types in the specified agent.
312
+ # Operation<response: BatchUpdateEntityTypesResponse,
313
+ # metadata: google.protobuf.Struct>
314
+ # @param [String] parent
315
+ # Required. The name of the agent to update or create entity types in.
316
+ # Format: `projects/<Project ID>/agent`.
317
+ # @param [Google::Apis::DialogflowV2beta1::BatchUpdateEntityTypesRequest] batch_update_entity_types_request_object
318
+ # @param [String] fields
319
+ # Selector specifying which fields to include in a partial response.
320
+ # @param [String] quota_user
321
+ # Available to use for quota purposes for server-side applications. Can be any
322
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
323
+ # @param [Google::Apis::RequestOptions] options
324
+ # Request-specific options
325
+ #
326
+ # @yield [result, err] Result & error if block supplied
327
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::Operation] parsed result object
328
+ # @yieldparam err [StandardError] error object if request failed
329
+ #
330
+ # @return [Google::Apis::DialogflowV2beta1::Operation]
331
+ #
332
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
333
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
334
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
335
+ def batch_update_entity_types(parent, batch_update_entity_types_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
336
+ command = make_simple_command(:post, 'v2beta1/{+parent}/entityTypes:batchUpdate', options)
337
+ command.request_representation = Google::Apis::DialogflowV2beta1::BatchUpdateEntityTypesRequest::Representation
338
+ command.request_object = batch_update_entity_types_request_object
339
+ command.response_representation = Google::Apis::DialogflowV2beta1::Operation::Representation
340
+ command.response_class = Google::Apis::DialogflowV2beta1::Operation
341
+ command.params['parent'] = parent unless parent.nil?
342
+ command.query['fields'] = fields unless fields.nil?
343
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
344
+ execute_or_queue_command(command, &block)
345
+ end
346
+
347
+ # Creates an entity type in the specified agent.
348
+ # @param [String] parent
349
+ # Required. The agent to create a entity type for.
350
+ # Format: `projects/<Project ID>/agent`.
351
+ # @param [Google::Apis::DialogflowV2beta1::EntityType] entity_type_object
352
+ # @param [String] language_code
353
+ # Optional. The language of entity synonyms defined in `entity_type`. If not
354
+ # specified, the agent's default language is used.
355
+ # [More than a dozen
356
+ # languages](https://dialogflow.com/docs/reference/language) are supported.
357
+ # Note: languages must be enabled in the agent, before they can be used.
358
+ # @param [String] fields
359
+ # Selector specifying which fields to include in a partial response.
360
+ # @param [String] quota_user
361
+ # Available to use for quota purposes for server-side applications. Can be any
362
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
363
+ # @param [Google::Apis::RequestOptions] options
364
+ # Request-specific options
365
+ #
366
+ # @yield [result, err] Result & error if block supplied
367
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::EntityType] parsed result object
368
+ # @yieldparam err [StandardError] error object if request failed
369
+ #
370
+ # @return [Google::Apis::DialogflowV2beta1::EntityType]
371
+ #
372
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
373
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
374
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
375
+ def create_project_agent_entity_type(parent, entity_type_object = nil, language_code: nil, fields: nil, quota_user: nil, options: nil, &block)
376
+ command = make_simple_command(:post, 'v2beta1/{+parent}/entityTypes', options)
377
+ command.request_representation = Google::Apis::DialogflowV2beta1::EntityType::Representation
378
+ command.request_object = entity_type_object
379
+ command.response_representation = Google::Apis::DialogflowV2beta1::EntityType::Representation
380
+ command.response_class = Google::Apis::DialogflowV2beta1::EntityType
381
+ command.params['parent'] = parent unless parent.nil?
382
+ command.query['languageCode'] = language_code unless language_code.nil?
383
+ command.query['fields'] = fields unless fields.nil?
384
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
385
+ execute_or_queue_command(command, &block)
386
+ end
387
+
388
+ # Deletes the specified entity type.
389
+ # @param [String] name
390
+ # Required. The name of the entity type to delete.
391
+ # Format: `projects/<Project ID>/agent/entityTypes/<EntityType ID>`.
392
+ # @param [String] fields
393
+ # Selector specifying which fields to include in a partial response.
394
+ # @param [String] quota_user
395
+ # Available to use for quota purposes for server-side applications. Can be any
396
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
397
+ # @param [Google::Apis::RequestOptions] options
398
+ # Request-specific options
399
+ #
400
+ # @yield [result, err] Result & error if block supplied
401
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::Empty] parsed result object
402
+ # @yieldparam err [StandardError] error object if request failed
403
+ #
404
+ # @return [Google::Apis::DialogflowV2beta1::Empty]
405
+ #
406
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
407
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
408
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
409
+ def delete_project_agent_entity_type(name, fields: nil, quota_user: nil, options: nil, &block)
410
+ command = make_simple_command(:delete, 'v2beta1/{+name}', options)
411
+ command.response_representation = Google::Apis::DialogflowV2beta1::Empty::Representation
412
+ command.response_class = Google::Apis::DialogflowV2beta1::Empty
413
+ command.params['name'] = name unless name.nil?
414
+ command.query['fields'] = fields unless fields.nil?
415
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
416
+ execute_or_queue_command(command, &block)
417
+ end
418
+
419
+ # Retrieves the specified entity type.
420
+ # @param [String] name
421
+ # Required. The name of the entity type.
422
+ # Format: `projects/<Project ID>/agent/entityTypes/<EntityType ID>`.
423
+ # @param [String] language_code
424
+ # Optional. The language to retrieve entity synonyms for. If not specified,
425
+ # the agent's default language is used.
426
+ # [More than a dozen
427
+ # languages](https://dialogflow.com/docs/reference/language) are supported.
428
+ # Note: languages must be enabled in the agent, before they can be used.
429
+ # @param [String] fields
430
+ # Selector specifying which fields to include in a partial response.
431
+ # @param [String] quota_user
432
+ # Available to use for quota purposes for server-side applications. Can be any
433
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
434
+ # @param [Google::Apis::RequestOptions] options
435
+ # Request-specific options
436
+ #
437
+ # @yield [result, err] Result & error if block supplied
438
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::EntityType] parsed result object
439
+ # @yieldparam err [StandardError] error object if request failed
440
+ #
441
+ # @return [Google::Apis::DialogflowV2beta1::EntityType]
442
+ #
443
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
444
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
445
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
446
+ def get_project_agent_entity_type(name, language_code: nil, fields: nil, quota_user: nil, options: nil, &block)
447
+ command = make_simple_command(:get, 'v2beta1/{+name}', options)
448
+ command.response_representation = Google::Apis::DialogflowV2beta1::EntityType::Representation
449
+ command.response_class = Google::Apis::DialogflowV2beta1::EntityType
450
+ command.params['name'] = name unless name.nil?
451
+ command.query['languageCode'] = language_code unless language_code.nil?
452
+ command.query['fields'] = fields unless fields.nil?
453
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
454
+ execute_or_queue_command(command, &block)
455
+ end
456
+
457
+ # Returns the list of all entity types in the specified agent.
458
+ # @param [String] parent
459
+ # Required. The agent to list all entity types from.
460
+ # Format: `projects/<Project ID>/agent`.
461
+ # @param [String] language_code
462
+ # Optional. The language to list entity synonyms for. If not specified,
463
+ # the agent's default language is used.
464
+ # [More than a dozen
465
+ # languages](https://dialogflow.com/docs/reference/language) are supported.
466
+ # Note: languages must be enabled in the agent, before they can be used.
467
+ # @param [Fixnum] page_size
468
+ # Optional. The maximum number of items to return in a single page. By
469
+ # default 100 and at most 1000.
470
+ # @param [String] page_token
471
+ # Optional. The next_page_token value returned from a previous list request.
472
+ # @param [String] fields
473
+ # Selector specifying which fields to include in a partial response.
474
+ # @param [String] quota_user
475
+ # Available to use for quota purposes for server-side applications. Can be any
476
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
477
+ # @param [Google::Apis::RequestOptions] options
478
+ # Request-specific options
479
+ #
480
+ # @yield [result, err] Result & error if block supplied
481
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::ListEntityTypesResponse] parsed result object
482
+ # @yieldparam err [StandardError] error object if request failed
483
+ #
484
+ # @return [Google::Apis::DialogflowV2beta1::ListEntityTypesResponse]
485
+ #
486
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
487
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
488
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
489
+ def list_project_agent_entity_types(parent, language_code: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
490
+ command = make_simple_command(:get, 'v2beta1/{+parent}/entityTypes', options)
491
+ command.response_representation = Google::Apis::DialogflowV2beta1::ListEntityTypesResponse::Representation
492
+ command.response_class = Google::Apis::DialogflowV2beta1::ListEntityTypesResponse
493
+ command.params['parent'] = parent unless parent.nil?
494
+ command.query['languageCode'] = language_code unless language_code.nil?
495
+ command.query['pageSize'] = page_size unless page_size.nil?
496
+ command.query['pageToken'] = page_token unless page_token.nil?
497
+ command.query['fields'] = fields unless fields.nil?
498
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
499
+ execute_or_queue_command(command, &block)
500
+ end
501
+
502
+ # Updates the specified entity type.
503
+ # @param [String] name
504
+ # Required for all methods except `create` (`create` populates the name
505
+ # automatically.
506
+ # The unique identifier of the entity type. Format:
507
+ # `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
508
+ # @param [Google::Apis::DialogflowV2beta1::EntityType] entity_type_object
509
+ # @param [String] language_code
510
+ # Optional. The language of entity synonyms defined in `entity_type`. If not
511
+ # specified, the agent's default language is used.
512
+ # [More than a dozen
513
+ # languages](https://dialogflow.com/docs/reference/language) are supported.
514
+ # Note: languages must be enabled in the agent, before they can be used.
515
+ # @param [String] update_mask
516
+ # Optional. The mask to control which fields get updated.
517
+ # @param [String] fields
518
+ # Selector specifying which fields to include in a partial response.
519
+ # @param [String] quota_user
520
+ # Available to use for quota purposes for server-side applications. Can be any
521
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
522
+ # @param [Google::Apis::RequestOptions] options
523
+ # Request-specific options
524
+ #
525
+ # @yield [result, err] Result & error if block supplied
526
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::EntityType] parsed result object
527
+ # @yieldparam err [StandardError] error object if request failed
528
+ #
529
+ # @return [Google::Apis::DialogflowV2beta1::EntityType]
530
+ #
531
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
532
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
533
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
534
+ def patch_project_agent_entity_type(name, entity_type_object = nil, language_code: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
535
+ command = make_simple_command(:patch, 'v2beta1/{+name}', options)
536
+ command.request_representation = Google::Apis::DialogflowV2beta1::EntityType::Representation
537
+ command.request_object = entity_type_object
538
+ command.response_representation = Google::Apis::DialogflowV2beta1::EntityType::Representation
539
+ command.response_class = Google::Apis::DialogflowV2beta1::EntityType
540
+ command.params['name'] = name unless name.nil?
541
+ command.query['languageCode'] = language_code unless language_code.nil?
542
+ command.query['updateMask'] = update_mask unless update_mask.nil?
543
+ command.query['fields'] = fields unless fields.nil?
544
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
545
+ execute_or_queue_command(command, &block)
546
+ end
547
+
548
+ # Creates multiple new entities in the specified entity type (extends the
549
+ # existing collection of entries).
550
+ # Operation<response: google.protobuf.Empty>
551
+ # @param [String] parent
552
+ # Required. The name of the entity type to create entities in. Format:
553
+ # `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
554
+ # @param [Google::Apis::DialogflowV2beta1::BatchCreateEntitiesRequest] batch_create_entities_request_object
555
+ # @param [String] fields
556
+ # Selector specifying which fields to include in a partial response.
557
+ # @param [String] quota_user
558
+ # Available to use for quota purposes for server-side applications. Can be any
559
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
560
+ # @param [Google::Apis::RequestOptions] options
561
+ # Request-specific options
562
+ #
563
+ # @yield [result, err] Result & error if block supplied
564
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::Operation] parsed result object
565
+ # @yieldparam err [StandardError] error object if request failed
566
+ #
567
+ # @return [Google::Apis::DialogflowV2beta1::Operation]
568
+ #
569
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
570
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
571
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
572
+ def batch_entity_create_entities(parent, batch_create_entities_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
573
+ command = make_simple_command(:post, 'v2beta1/{+parent}/entities:batchCreate', options)
574
+ command.request_representation = Google::Apis::DialogflowV2beta1::BatchCreateEntitiesRequest::Representation
575
+ command.request_object = batch_create_entities_request_object
576
+ command.response_representation = Google::Apis::DialogflowV2beta1::Operation::Representation
577
+ command.response_class = Google::Apis::DialogflowV2beta1::Operation
578
+ command.params['parent'] = parent unless parent.nil?
579
+ command.query['fields'] = fields unless fields.nil?
580
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
581
+ execute_or_queue_command(command, &block)
582
+ end
583
+
584
+ # Deletes entities in the specified entity type.
585
+ # Operation<response: google.protobuf.Empty,
586
+ # metadata: google.protobuf.Struct>
587
+ # @param [String] parent
588
+ # Required. The name of the entity type to delete entries for. Format:
589
+ # `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
590
+ # @param [Google::Apis::DialogflowV2beta1::BatchDeleteEntitiesRequest] batch_delete_entities_request_object
591
+ # @param [String] fields
592
+ # Selector specifying which fields to include in a partial response.
593
+ # @param [String] quota_user
594
+ # Available to use for quota purposes for server-side applications. Can be any
595
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
596
+ # @param [Google::Apis::RequestOptions] options
597
+ # Request-specific options
598
+ #
599
+ # @yield [result, err] Result & error if block supplied
600
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::Operation] parsed result object
601
+ # @yieldparam err [StandardError] error object if request failed
602
+ #
603
+ # @return [Google::Apis::DialogflowV2beta1::Operation]
604
+ #
605
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
606
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
607
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
608
+ def batch_entity_delete_entities(parent, batch_delete_entities_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
609
+ command = make_simple_command(:post, 'v2beta1/{+parent}/entities:batchDelete', options)
610
+ command.request_representation = Google::Apis::DialogflowV2beta1::BatchDeleteEntitiesRequest::Representation
611
+ command.request_object = batch_delete_entities_request_object
612
+ command.response_representation = Google::Apis::DialogflowV2beta1::Operation::Representation
613
+ command.response_class = Google::Apis::DialogflowV2beta1::Operation
614
+ command.params['parent'] = parent unless parent.nil?
615
+ command.query['fields'] = fields unless fields.nil?
616
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
617
+ execute_or_queue_command(command, &block)
618
+ end
619
+
620
+ # Updates entities in the specified entity type (replaces the existing
621
+ # collection of entries).
622
+ # Operation<response: google.protobuf.Empty,
623
+ # metadata: google.protobuf.Struct>
624
+ # @param [String] parent
625
+ # Required. The name of the entity type to update the entities in. Format:
626
+ # `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
627
+ # @param [Google::Apis::DialogflowV2beta1::BatchUpdateEntitiesRequest] batch_update_entities_request_object
628
+ # @param [String] fields
629
+ # Selector specifying which fields to include in a partial response.
630
+ # @param [String] quota_user
631
+ # Available to use for quota purposes for server-side applications. Can be any
632
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
633
+ # @param [Google::Apis::RequestOptions] options
634
+ # Request-specific options
635
+ #
636
+ # @yield [result, err] Result & error if block supplied
637
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::Operation] parsed result object
638
+ # @yieldparam err [StandardError] error object if request failed
639
+ #
640
+ # @return [Google::Apis::DialogflowV2beta1::Operation]
641
+ #
642
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
643
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
644
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
645
+ def batch_entity_update_entities(parent, batch_update_entities_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
646
+ command = make_simple_command(:post, 'v2beta1/{+parent}/entities:batchUpdate', options)
647
+ command.request_representation = Google::Apis::DialogflowV2beta1::BatchUpdateEntitiesRequest::Representation
648
+ command.request_object = batch_update_entities_request_object
649
+ command.response_representation = Google::Apis::DialogflowV2beta1::Operation::Representation
650
+ command.response_class = Google::Apis::DialogflowV2beta1::Operation
651
+ command.params['parent'] = parent unless parent.nil?
652
+ command.query['fields'] = fields unless fields.nil?
653
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
654
+ execute_or_queue_command(command, &block)
655
+ end
656
+
657
+ # Deletes intents in the specified agent.
658
+ # Operation<response: google.protobuf.Empty>
659
+ # @param [String] parent
660
+ # Required. The name of the agent to delete all entities types for. Format:
661
+ # `projects/<Project ID>/agent`.
662
+ # @param [Google::Apis::DialogflowV2beta1::BatchDeleteIntentsRequest] batch_delete_intents_request_object
663
+ # @param [String] fields
664
+ # Selector specifying which fields to include in a partial response.
665
+ # @param [String] quota_user
666
+ # Available to use for quota purposes for server-side applications. Can be any
667
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
668
+ # @param [Google::Apis::RequestOptions] options
669
+ # Request-specific options
670
+ #
671
+ # @yield [result, err] Result & error if block supplied
672
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::Operation] parsed result object
673
+ # @yieldparam err [StandardError] error object if request failed
674
+ #
675
+ # @return [Google::Apis::DialogflowV2beta1::Operation]
676
+ #
677
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
678
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
679
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
680
+ def batch_delete_intents(parent, batch_delete_intents_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
681
+ command = make_simple_command(:post, 'v2beta1/{+parent}/intents:batchDelete', options)
682
+ command.request_representation = Google::Apis::DialogflowV2beta1::BatchDeleteIntentsRequest::Representation
683
+ command.request_object = batch_delete_intents_request_object
684
+ command.response_representation = Google::Apis::DialogflowV2beta1::Operation::Representation
685
+ command.response_class = Google::Apis::DialogflowV2beta1::Operation
686
+ command.params['parent'] = parent unless parent.nil?
687
+ command.query['fields'] = fields unless fields.nil?
688
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
689
+ execute_or_queue_command(command, &block)
690
+ end
691
+
692
+ # Updates/Creates multiple intents in the specified agent.
693
+ # Operation<response: BatchUpdateIntentsResponse>
694
+ # @param [String] parent
695
+ # Required. The name of the agent to update or create intents in.
696
+ # Format: `projects/<Project ID>/agent`.
697
+ # @param [Google::Apis::DialogflowV2beta1::BatchUpdateIntentsRequest] batch_update_intents_request_object
698
+ # @param [String] fields
699
+ # Selector specifying which fields to include in a partial response.
700
+ # @param [String] quota_user
701
+ # Available to use for quota purposes for server-side applications. Can be any
702
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
703
+ # @param [Google::Apis::RequestOptions] options
704
+ # Request-specific options
705
+ #
706
+ # @yield [result, err] Result & error if block supplied
707
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::Operation] parsed result object
708
+ # @yieldparam err [StandardError] error object if request failed
709
+ #
710
+ # @return [Google::Apis::DialogflowV2beta1::Operation]
711
+ #
712
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
713
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
714
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
715
+ def batch_update_intents(parent, batch_update_intents_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
716
+ command = make_simple_command(:post, 'v2beta1/{+parent}/intents:batchUpdate', options)
717
+ command.request_representation = Google::Apis::DialogflowV2beta1::BatchUpdateIntentsRequest::Representation
718
+ command.request_object = batch_update_intents_request_object
719
+ command.response_representation = Google::Apis::DialogflowV2beta1::Operation::Representation
720
+ command.response_class = Google::Apis::DialogflowV2beta1::Operation
721
+ command.params['parent'] = parent unless parent.nil?
722
+ command.query['fields'] = fields unless fields.nil?
723
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
724
+ execute_or_queue_command(command, &block)
725
+ end
726
+
727
+ # Creates an intent in the specified agent.
728
+ # @param [String] parent
729
+ # Required. The agent to create a intent for.
730
+ # Format: `projects/<Project ID>/agent`.
731
+ # @param [Google::Apis::DialogflowV2beta1::Intent] intent_object
732
+ # @param [String] intent_view
733
+ # Optional. The resource view to apply to the returned intent.
734
+ # @param [String] language_code
735
+ # Optional. The language of training phrases, parameters and rich messages
736
+ # defined in `intent`. If not specified, the agent's default language is
737
+ # used. [More than a dozen
738
+ # languages](https://dialogflow.com/docs/reference/language) are supported.
739
+ # Note: languages must be enabled in the agent, before they can be used.
740
+ # @param [String] fields
741
+ # Selector specifying which fields to include in a partial response.
742
+ # @param [String] quota_user
743
+ # Available to use for quota purposes for server-side applications. Can be any
744
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
745
+ # @param [Google::Apis::RequestOptions] options
746
+ # Request-specific options
747
+ #
748
+ # @yield [result, err] Result & error if block supplied
749
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::Intent] parsed result object
750
+ # @yieldparam err [StandardError] error object if request failed
751
+ #
752
+ # @return [Google::Apis::DialogflowV2beta1::Intent]
753
+ #
754
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
755
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
756
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
757
+ def create_project_agent_intent(parent, intent_object = nil, intent_view: nil, language_code: nil, fields: nil, quota_user: nil, options: nil, &block)
758
+ command = make_simple_command(:post, 'v2beta1/{+parent}/intents', options)
759
+ command.request_representation = Google::Apis::DialogflowV2beta1::Intent::Representation
760
+ command.request_object = intent_object
761
+ command.response_representation = Google::Apis::DialogflowV2beta1::Intent::Representation
762
+ command.response_class = Google::Apis::DialogflowV2beta1::Intent
763
+ command.params['parent'] = parent unless parent.nil?
764
+ command.query['intentView'] = intent_view unless intent_view.nil?
765
+ command.query['languageCode'] = language_code unless language_code.nil?
766
+ command.query['fields'] = fields unless fields.nil?
767
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
768
+ execute_or_queue_command(command, &block)
769
+ end
770
+
771
+ # Deletes the specified intent.
772
+ # @param [String] name
773
+ # Required. The name of the intent to delete.
774
+ # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
775
+ # @param [String] fields
776
+ # Selector specifying which fields to include in a partial response.
777
+ # @param [String] quota_user
778
+ # Available to use for quota purposes for server-side applications. Can be any
779
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
780
+ # @param [Google::Apis::RequestOptions] options
781
+ # Request-specific options
782
+ #
783
+ # @yield [result, err] Result & error if block supplied
784
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::Empty] parsed result object
785
+ # @yieldparam err [StandardError] error object if request failed
786
+ #
787
+ # @return [Google::Apis::DialogflowV2beta1::Empty]
788
+ #
789
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
790
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
791
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
792
+ def delete_project_agent_intent(name, fields: nil, quota_user: nil, options: nil, &block)
793
+ command = make_simple_command(:delete, 'v2beta1/{+name}', options)
794
+ command.response_representation = Google::Apis::DialogflowV2beta1::Empty::Representation
795
+ command.response_class = Google::Apis::DialogflowV2beta1::Empty
796
+ command.params['name'] = name unless name.nil?
797
+ command.query['fields'] = fields unless fields.nil?
798
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
799
+ execute_or_queue_command(command, &block)
800
+ end
801
+
802
+ # Retrieves the specified intent.
803
+ # @param [String] name
804
+ # Required. The name of the intent.
805
+ # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
806
+ # @param [String] intent_view
807
+ # Optional. The resource view to apply to the returned intent.
808
+ # @param [String] language_code
809
+ # Optional. The language to retrieve training phrases, parameters and rich
810
+ # messages for. If not specified, the agent's default language is used.
811
+ # [More than a dozen
812
+ # languages](https://dialogflow.com/docs/reference/language) are supported.
813
+ # Note: languages must be enabled in the agent, before they can be used.
814
+ # @param [String] fields
815
+ # Selector specifying which fields to include in a partial response.
816
+ # @param [String] quota_user
817
+ # Available to use for quota purposes for server-side applications. Can be any
818
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
819
+ # @param [Google::Apis::RequestOptions] options
820
+ # Request-specific options
821
+ #
822
+ # @yield [result, err] Result & error if block supplied
823
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::Intent] parsed result object
824
+ # @yieldparam err [StandardError] error object if request failed
825
+ #
826
+ # @return [Google::Apis::DialogflowV2beta1::Intent]
827
+ #
828
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
829
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
830
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
831
+ def get_project_agent_intent(name, intent_view: nil, language_code: nil, fields: nil, quota_user: nil, options: nil, &block)
832
+ command = make_simple_command(:get, 'v2beta1/{+name}', options)
833
+ command.response_representation = Google::Apis::DialogflowV2beta1::Intent::Representation
834
+ command.response_class = Google::Apis::DialogflowV2beta1::Intent
835
+ command.params['name'] = name unless name.nil?
836
+ command.query['intentView'] = intent_view unless intent_view.nil?
837
+ command.query['languageCode'] = language_code unless language_code.nil?
838
+ command.query['fields'] = fields unless fields.nil?
839
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
840
+ execute_or_queue_command(command, &block)
841
+ end
842
+
843
+ # Returns the list of all intents in the specified agent.
844
+ # @param [String] parent
845
+ # Required. The agent to list all intents from.
846
+ # Format: `projects/<Project ID>/agent`.
847
+ # @param [String] intent_view
848
+ # Optional. The resource view to apply to the returned intent.
849
+ # @param [String] language_code
850
+ # Optional. The language to list training phrases, parameters and rich
851
+ # messages for. If not specified, the agent's default language is used.
852
+ # [More than a dozen
853
+ # languages](https://dialogflow.com/docs/reference/language) are supported.
854
+ # Note: languages must be enabled in the agent before they can be used.
855
+ # @param [Fixnum] page_size
856
+ # Optional. The maximum number of items to return in a single page. By
857
+ # default 100 and at most 1000.
858
+ # @param [String] page_token
859
+ # Optional. The next_page_token value returned from a previous list request.
860
+ # @param [String] fields
861
+ # Selector specifying which fields to include in a partial response.
862
+ # @param [String] quota_user
863
+ # Available to use for quota purposes for server-side applications. Can be any
864
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
865
+ # @param [Google::Apis::RequestOptions] options
866
+ # Request-specific options
867
+ #
868
+ # @yield [result, err] Result & error if block supplied
869
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::ListIntentsResponse] parsed result object
870
+ # @yieldparam err [StandardError] error object if request failed
871
+ #
872
+ # @return [Google::Apis::DialogflowV2beta1::ListIntentsResponse]
873
+ #
874
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
875
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
876
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
877
+ def list_project_agent_intents(parent, intent_view: nil, language_code: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
878
+ command = make_simple_command(:get, 'v2beta1/{+parent}/intents', options)
879
+ command.response_representation = Google::Apis::DialogflowV2beta1::ListIntentsResponse::Representation
880
+ command.response_class = Google::Apis::DialogflowV2beta1::ListIntentsResponse
881
+ command.params['parent'] = parent unless parent.nil?
882
+ command.query['intentView'] = intent_view unless intent_view.nil?
883
+ command.query['languageCode'] = language_code unless language_code.nil?
884
+ command.query['pageSize'] = page_size unless page_size.nil?
885
+ command.query['pageToken'] = page_token unless page_token.nil?
886
+ command.query['fields'] = fields unless fields.nil?
887
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
888
+ execute_or_queue_command(command, &block)
889
+ end
890
+
891
+ # Updates the specified intent.
892
+ # @param [String] name
893
+ # Required for all methods except `create` (`create` populates the name
894
+ # automatically.
895
+ # The unique identifier of this intent.
896
+ # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
897
+ # @param [Google::Apis::DialogflowV2beta1::Intent] intent_object
898
+ # @param [String] intent_view
899
+ # Optional. The resource view to apply to the returned intent.
900
+ # @param [String] language_code
901
+ # Optional. The language of training phrases, parameters and rich messages
902
+ # defined in `intent`. If not specified, the agent's default language is
903
+ # used. [More than a dozen
904
+ # languages](https://dialogflow.com/docs/reference/language) are supported.
905
+ # Note: languages must be enabled in the agent, before they can be used.
906
+ # @param [String] update_mask
907
+ # Optional. The mask to control which fields get updated.
908
+ # @param [String] fields
909
+ # Selector specifying which fields to include in a partial response.
910
+ # @param [String] quota_user
911
+ # Available to use for quota purposes for server-side applications. Can be any
912
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
913
+ # @param [Google::Apis::RequestOptions] options
914
+ # Request-specific options
915
+ #
916
+ # @yield [result, err] Result & error if block supplied
917
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::Intent] parsed result object
918
+ # @yieldparam err [StandardError] error object if request failed
919
+ #
920
+ # @return [Google::Apis::DialogflowV2beta1::Intent]
921
+ #
922
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
923
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
924
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
925
+ def patch_project_agent_intent(name, intent_object = nil, intent_view: nil, language_code: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
926
+ command = make_simple_command(:patch, 'v2beta1/{+name}', options)
927
+ command.request_representation = Google::Apis::DialogflowV2beta1::Intent::Representation
928
+ command.request_object = intent_object
929
+ command.response_representation = Google::Apis::DialogflowV2beta1::Intent::Representation
930
+ command.response_class = Google::Apis::DialogflowV2beta1::Intent
931
+ command.params['name'] = name unless name.nil?
932
+ command.query['intentView'] = intent_view unless intent_view.nil?
933
+ command.query['languageCode'] = language_code unless language_code.nil?
934
+ command.query['updateMask'] = update_mask unless update_mask.nil?
935
+ command.query['fields'] = fields unless fields.nil?
936
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
937
+ execute_or_queue_command(command, &block)
938
+ end
939
+
940
+ # Deletes all active contexts in the specified session.
941
+ # @param [String] parent
942
+ # Required. The name of the session to delete all contexts from. Format:
943
+ # `projects/<Project ID>/agent/sessions/<Session ID>`.
944
+ # @param [String] fields
945
+ # Selector specifying which fields to include in a partial response.
946
+ # @param [String] quota_user
947
+ # Available to use for quota purposes for server-side applications. Can be any
948
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
949
+ # @param [Google::Apis::RequestOptions] options
950
+ # Request-specific options
951
+ #
952
+ # @yield [result, err] Result & error if block supplied
953
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::Empty] parsed result object
954
+ # @yieldparam err [StandardError] error object if request failed
955
+ #
956
+ # @return [Google::Apis::DialogflowV2beta1::Empty]
957
+ #
958
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
959
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
960
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
961
+ def delete_project_agent_session_contexts(parent, fields: nil, quota_user: nil, options: nil, &block)
962
+ command = make_simple_command(:delete, 'v2beta1/{+parent}/contexts', options)
963
+ command.response_representation = Google::Apis::DialogflowV2beta1::Empty::Representation
964
+ command.response_class = Google::Apis::DialogflowV2beta1::Empty
965
+ command.params['parent'] = parent unless parent.nil?
966
+ command.query['fields'] = fields unless fields.nil?
967
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
968
+ execute_or_queue_command(command, &block)
969
+ end
970
+
971
+ # Processes a natural language query and returns structured, actionable data
972
+ # as a result. This method is not idempotent, because it may cause contexts
973
+ # and session entity types to be updated, which in turn might affect
974
+ # results of future queries.
975
+ # @param [String] session
976
+ # Required. The name of the session this query is sent to. Format:
977
+ # `projects/<Project ID>/agent/sessions/<Session ID>`.
978
+ # It's up to the API caller to choose an appropriate session ID. It can be
979
+ # a random number or some type of user identifier (preferably hashed).
980
+ # The length of the session ID must not exceed 36 bytes.
981
+ # @param [Google::Apis::DialogflowV2beta1::DetectIntentRequest] detect_intent_request_object
982
+ # @param [String] fields
983
+ # Selector specifying which fields to include in a partial response.
984
+ # @param [String] quota_user
985
+ # Available to use for quota purposes for server-side applications. Can be any
986
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
987
+ # @param [Google::Apis::RequestOptions] options
988
+ # Request-specific options
989
+ #
990
+ # @yield [result, err] Result & error if block supplied
991
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::DetectIntentResponse] parsed result object
992
+ # @yieldparam err [StandardError] error object if request failed
993
+ #
994
+ # @return [Google::Apis::DialogflowV2beta1::DetectIntentResponse]
995
+ #
996
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
997
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
998
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
999
+ def detect_session_intent(session, detect_intent_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1000
+ command = make_simple_command(:post, 'v2beta1/{+session}:detectIntent', options)
1001
+ command.request_representation = Google::Apis::DialogflowV2beta1::DetectIntentRequest::Representation
1002
+ command.request_object = detect_intent_request_object
1003
+ command.response_representation = Google::Apis::DialogflowV2beta1::DetectIntentResponse::Representation
1004
+ command.response_class = Google::Apis::DialogflowV2beta1::DetectIntentResponse
1005
+ command.params['session'] = session unless session.nil?
1006
+ command.query['fields'] = fields unless fields.nil?
1007
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1008
+ execute_or_queue_command(command, &block)
1009
+ end
1010
+
1011
+ # Creates a context.
1012
+ # @param [String] parent
1013
+ # Required. The session to create a context for.
1014
+ # Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
1015
+ # @param [Google::Apis::DialogflowV2beta1::Context] context_object
1016
+ # @param [String] fields
1017
+ # Selector specifying which fields to include in a partial response.
1018
+ # @param [String] quota_user
1019
+ # Available to use for quota purposes for server-side applications. Can be any
1020
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1021
+ # @param [Google::Apis::RequestOptions] options
1022
+ # Request-specific options
1023
+ #
1024
+ # @yield [result, err] Result & error if block supplied
1025
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::Context] parsed result object
1026
+ # @yieldparam err [StandardError] error object if request failed
1027
+ #
1028
+ # @return [Google::Apis::DialogflowV2beta1::Context]
1029
+ #
1030
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1031
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1032
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1033
+ def create_project_agent_session_context(parent, context_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1034
+ command = make_simple_command(:post, 'v2beta1/{+parent}/contexts', options)
1035
+ command.request_representation = Google::Apis::DialogflowV2beta1::Context::Representation
1036
+ command.request_object = context_object
1037
+ command.response_representation = Google::Apis::DialogflowV2beta1::Context::Representation
1038
+ command.response_class = Google::Apis::DialogflowV2beta1::Context
1039
+ command.params['parent'] = parent unless parent.nil?
1040
+ command.query['fields'] = fields unless fields.nil?
1041
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1042
+ execute_or_queue_command(command, &block)
1043
+ end
1044
+
1045
+ # Deletes the specified context.
1046
+ # @param [String] name
1047
+ # Required. The name of the context to delete. Format:
1048
+ # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
1049
+ # @param [String] fields
1050
+ # Selector specifying which fields to include in a partial response.
1051
+ # @param [String] quota_user
1052
+ # Available to use for quota purposes for server-side applications. Can be any
1053
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1054
+ # @param [Google::Apis::RequestOptions] options
1055
+ # Request-specific options
1056
+ #
1057
+ # @yield [result, err] Result & error if block supplied
1058
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::Empty] parsed result object
1059
+ # @yieldparam err [StandardError] error object if request failed
1060
+ #
1061
+ # @return [Google::Apis::DialogflowV2beta1::Empty]
1062
+ #
1063
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1064
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1065
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1066
+ def delete_project_agent_session_context(name, fields: nil, quota_user: nil, options: nil, &block)
1067
+ command = make_simple_command(:delete, 'v2beta1/{+name}', options)
1068
+ command.response_representation = Google::Apis::DialogflowV2beta1::Empty::Representation
1069
+ command.response_class = Google::Apis::DialogflowV2beta1::Empty
1070
+ command.params['name'] = name unless name.nil?
1071
+ command.query['fields'] = fields unless fields.nil?
1072
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1073
+ execute_or_queue_command(command, &block)
1074
+ end
1075
+
1076
+ # Retrieves the specified context.
1077
+ # @param [String] name
1078
+ # Required. The name of the context. Format:
1079
+ # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
1080
+ # @param [String] fields
1081
+ # Selector specifying which fields to include in a partial response.
1082
+ # @param [String] quota_user
1083
+ # Available to use for quota purposes for server-side applications. Can be any
1084
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1085
+ # @param [Google::Apis::RequestOptions] options
1086
+ # Request-specific options
1087
+ #
1088
+ # @yield [result, err] Result & error if block supplied
1089
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::Context] parsed result object
1090
+ # @yieldparam err [StandardError] error object if request failed
1091
+ #
1092
+ # @return [Google::Apis::DialogflowV2beta1::Context]
1093
+ #
1094
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1095
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1096
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1097
+ def get_project_agent_session_context(name, fields: nil, quota_user: nil, options: nil, &block)
1098
+ command = make_simple_command(:get, 'v2beta1/{+name}', options)
1099
+ command.response_representation = Google::Apis::DialogflowV2beta1::Context::Representation
1100
+ command.response_class = Google::Apis::DialogflowV2beta1::Context
1101
+ command.params['name'] = name unless name.nil?
1102
+ command.query['fields'] = fields unless fields.nil?
1103
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1104
+ execute_or_queue_command(command, &block)
1105
+ end
1106
+
1107
+ # Returns the list of all contexts in the specified session.
1108
+ # @param [String] parent
1109
+ # Required. The session to list all contexts from.
1110
+ # Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
1111
+ # @param [Fixnum] page_size
1112
+ # Optional. The maximum number of items to return in a single page. By
1113
+ # default 100 and at most 1000.
1114
+ # @param [String] page_token
1115
+ # Optional. The next_page_token value returned from a previous list request.
1116
+ # @param [String] fields
1117
+ # Selector specifying which fields to include in a partial response.
1118
+ # @param [String] quota_user
1119
+ # Available to use for quota purposes for server-side applications. Can be any
1120
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1121
+ # @param [Google::Apis::RequestOptions] options
1122
+ # Request-specific options
1123
+ #
1124
+ # @yield [result, err] Result & error if block supplied
1125
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::ListContextsResponse] parsed result object
1126
+ # @yieldparam err [StandardError] error object if request failed
1127
+ #
1128
+ # @return [Google::Apis::DialogflowV2beta1::ListContextsResponse]
1129
+ #
1130
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1131
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1132
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1133
+ def list_project_agent_session_contexts(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1134
+ command = make_simple_command(:get, 'v2beta1/{+parent}/contexts', options)
1135
+ command.response_representation = Google::Apis::DialogflowV2beta1::ListContextsResponse::Representation
1136
+ command.response_class = Google::Apis::DialogflowV2beta1::ListContextsResponse
1137
+ command.params['parent'] = parent unless parent.nil?
1138
+ command.query['pageSize'] = page_size unless page_size.nil?
1139
+ command.query['pageToken'] = page_token unless page_token.nil?
1140
+ command.query['fields'] = fields unless fields.nil?
1141
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1142
+ execute_or_queue_command(command, &block)
1143
+ end
1144
+
1145
+ # Updates the specified context.
1146
+ # @param [String] name
1147
+ # Required. The unique identifier of the context. Format:
1148
+ # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
1149
+ # Note: The Context ID is always converted to lowercase.
1150
+ # @param [Google::Apis::DialogflowV2beta1::Context] context_object
1151
+ # @param [String] update_mask
1152
+ # Optional. The mask to control which fields get updated.
1153
+ # @param [String] fields
1154
+ # Selector specifying which fields to include in a partial response.
1155
+ # @param [String] quota_user
1156
+ # Available to use for quota purposes for server-side applications. Can be any
1157
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1158
+ # @param [Google::Apis::RequestOptions] options
1159
+ # Request-specific options
1160
+ #
1161
+ # @yield [result, err] Result & error if block supplied
1162
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::Context] parsed result object
1163
+ # @yieldparam err [StandardError] error object if request failed
1164
+ #
1165
+ # @return [Google::Apis::DialogflowV2beta1::Context]
1166
+ #
1167
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1168
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1169
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1170
+ def patch_project_agent_session_context(name, context_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1171
+ command = make_simple_command(:patch, 'v2beta1/{+name}', options)
1172
+ command.request_representation = Google::Apis::DialogflowV2beta1::Context::Representation
1173
+ command.request_object = context_object
1174
+ command.response_representation = Google::Apis::DialogflowV2beta1::Context::Representation
1175
+ command.response_class = Google::Apis::DialogflowV2beta1::Context
1176
+ command.params['name'] = name unless name.nil?
1177
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1178
+ command.query['fields'] = fields unless fields.nil?
1179
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1180
+ execute_or_queue_command(command, &block)
1181
+ end
1182
+
1183
+ # Creates a session entity type.
1184
+ # @param [String] parent
1185
+ # Required. The session to create a session entity type for.
1186
+ # Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
1187
+ # @param [Google::Apis::DialogflowV2beta1::SessionEntityType] session_entity_type_object
1188
+ # @param [String] fields
1189
+ # Selector specifying which fields to include in a partial response.
1190
+ # @param [String] quota_user
1191
+ # Available to use for quota purposes for server-side applications. Can be any
1192
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1193
+ # @param [Google::Apis::RequestOptions] options
1194
+ # Request-specific options
1195
+ #
1196
+ # @yield [result, err] Result & error if block supplied
1197
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::SessionEntityType] parsed result object
1198
+ # @yieldparam err [StandardError] error object if request failed
1199
+ #
1200
+ # @return [Google::Apis::DialogflowV2beta1::SessionEntityType]
1201
+ #
1202
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1203
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1204
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1205
+ def create_project_agent_session_entity_type(parent, session_entity_type_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1206
+ command = make_simple_command(:post, 'v2beta1/{+parent}/entityTypes', options)
1207
+ command.request_representation = Google::Apis::DialogflowV2beta1::SessionEntityType::Representation
1208
+ command.request_object = session_entity_type_object
1209
+ command.response_representation = Google::Apis::DialogflowV2beta1::SessionEntityType::Representation
1210
+ command.response_class = Google::Apis::DialogflowV2beta1::SessionEntityType
1211
+ command.params['parent'] = parent unless parent.nil?
1212
+ command.query['fields'] = fields unless fields.nil?
1213
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1214
+ execute_or_queue_command(command, &block)
1215
+ end
1216
+
1217
+ # Deletes the specified session entity type.
1218
+ # @param [String] name
1219
+ # Required. The name of the entity type to delete. Format:
1220
+ # `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
1221
+ # Display Name>`.
1222
+ # @param [String] fields
1223
+ # Selector specifying which fields to include in a partial response.
1224
+ # @param [String] quota_user
1225
+ # Available to use for quota purposes for server-side applications. Can be any
1226
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1227
+ # @param [Google::Apis::RequestOptions] options
1228
+ # Request-specific options
1229
+ #
1230
+ # @yield [result, err] Result & error if block supplied
1231
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::Empty] parsed result object
1232
+ # @yieldparam err [StandardError] error object if request failed
1233
+ #
1234
+ # @return [Google::Apis::DialogflowV2beta1::Empty]
1235
+ #
1236
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1237
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1238
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1239
+ def delete_project_agent_session_entity_type(name, fields: nil, quota_user: nil, options: nil, &block)
1240
+ command = make_simple_command(:delete, 'v2beta1/{+name}', options)
1241
+ command.response_representation = Google::Apis::DialogflowV2beta1::Empty::Representation
1242
+ command.response_class = Google::Apis::DialogflowV2beta1::Empty
1243
+ command.params['name'] = name unless name.nil?
1244
+ command.query['fields'] = fields unless fields.nil?
1245
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1246
+ execute_or_queue_command(command, &block)
1247
+ end
1248
+
1249
+ # Retrieves the specified session entity type.
1250
+ # @param [String] name
1251
+ # Required. The name of the session entity type. Format:
1252
+ # `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
1253
+ # Display Name>`.
1254
+ # @param [String] fields
1255
+ # Selector specifying which fields to include in a partial response.
1256
+ # @param [String] quota_user
1257
+ # Available to use for quota purposes for server-side applications. Can be any
1258
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1259
+ # @param [Google::Apis::RequestOptions] options
1260
+ # Request-specific options
1261
+ #
1262
+ # @yield [result, err] Result & error if block supplied
1263
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::SessionEntityType] parsed result object
1264
+ # @yieldparam err [StandardError] error object if request failed
1265
+ #
1266
+ # @return [Google::Apis::DialogflowV2beta1::SessionEntityType]
1267
+ #
1268
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1269
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1270
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1271
+ def get_project_agent_session_entity_type(name, fields: nil, quota_user: nil, options: nil, &block)
1272
+ command = make_simple_command(:get, 'v2beta1/{+name}', options)
1273
+ command.response_representation = Google::Apis::DialogflowV2beta1::SessionEntityType::Representation
1274
+ command.response_class = Google::Apis::DialogflowV2beta1::SessionEntityType
1275
+ command.params['name'] = name unless name.nil?
1276
+ command.query['fields'] = fields unless fields.nil?
1277
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1278
+ execute_or_queue_command(command, &block)
1279
+ end
1280
+
1281
+ # Returns the list of all session entity types in the specified session.
1282
+ # @param [String] parent
1283
+ # Required. The session to list all session entity types from.
1284
+ # Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
1285
+ # @param [Fixnum] page_size
1286
+ # Optional. The maximum number of items to return in a single page. By
1287
+ # default 100 and at most 1000.
1288
+ # @param [String] page_token
1289
+ # Optional. The next_page_token value returned from a previous list request.
1290
+ # @param [String] fields
1291
+ # Selector specifying which fields to include in a partial response.
1292
+ # @param [String] quota_user
1293
+ # Available to use for quota purposes for server-side applications. Can be any
1294
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1295
+ # @param [Google::Apis::RequestOptions] options
1296
+ # Request-specific options
1297
+ #
1298
+ # @yield [result, err] Result & error if block supplied
1299
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::ListSessionEntityTypesResponse] parsed result object
1300
+ # @yieldparam err [StandardError] error object if request failed
1301
+ #
1302
+ # @return [Google::Apis::DialogflowV2beta1::ListSessionEntityTypesResponse]
1303
+ #
1304
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1305
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1306
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1307
+ def list_project_agent_session_entity_types(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1308
+ command = make_simple_command(:get, 'v2beta1/{+parent}/entityTypes', options)
1309
+ command.response_representation = Google::Apis::DialogflowV2beta1::ListSessionEntityTypesResponse::Representation
1310
+ command.response_class = Google::Apis::DialogflowV2beta1::ListSessionEntityTypesResponse
1311
+ command.params['parent'] = parent unless parent.nil?
1312
+ command.query['pageSize'] = page_size unless page_size.nil?
1313
+ command.query['pageToken'] = page_token unless page_token.nil?
1314
+ command.query['fields'] = fields unless fields.nil?
1315
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1316
+ execute_or_queue_command(command, &block)
1317
+ end
1318
+
1319
+ # Updates the specified session entity type.
1320
+ # @param [String] name
1321
+ # Required. The unique identifier of this session entity type. Format:
1322
+ # `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
1323
+ # Display Name>`.
1324
+ # @param [Google::Apis::DialogflowV2beta1::SessionEntityType] session_entity_type_object
1325
+ # @param [String] update_mask
1326
+ # Optional. The mask to control which fields get updated.
1327
+ # @param [String] fields
1328
+ # Selector specifying which fields to include in a partial response.
1329
+ # @param [String] quota_user
1330
+ # Available to use for quota purposes for server-side applications. Can be any
1331
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1332
+ # @param [Google::Apis::RequestOptions] options
1333
+ # Request-specific options
1334
+ #
1335
+ # @yield [result, err] Result & error if block supplied
1336
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::SessionEntityType] parsed result object
1337
+ # @yieldparam err [StandardError] error object if request failed
1338
+ #
1339
+ # @return [Google::Apis::DialogflowV2beta1::SessionEntityType]
1340
+ #
1341
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1342
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1343
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1344
+ def patch_project_agent_session_entity_type(name, session_entity_type_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1345
+ command = make_simple_command(:patch, 'v2beta1/{+name}', options)
1346
+ command.request_representation = Google::Apis::DialogflowV2beta1::SessionEntityType::Representation
1347
+ command.request_object = session_entity_type_object
1348
+ command.response_representation = Google::Apis::DialogflowV2beta1::SessionEntityType::Representation
1349
+ command.response_class = Google::Apis::DialogflowV2beta1::SessionEntityType
1350
+ command.params['name'] = name unless name.nil?
1351
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1352
+ command.query['fields'] = fields unless fields.nil?
1353
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1354
+ execute_or_queue_command(command, &block)
1355
+ end
1356
+
1357
+ # Gets the latest state of a long-running operation. Clients can use this
1358
+ # method to poll the operation result at intervals as recommended by the API
1359
+ # service.
1360
+ # @param [String] name
1361
+ # The name of the operation resource.
1362
+ # @param [String] fields
1363
+ # Selector specifying which fields to include in a partial response.
1364
+ # @param [String] quota_user
1365
+ # Available to use for quota purposes for server-side applications. Can be any
1366
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1367
+ # @param [Google::Apis::RequestOptions] options
1368
+ # Request-specific options
1369
+ #
1370
+ # @yield [result, err] Result & error if block supplied
1371
+ # @yieldparam result [Google::Apis::DialogflowV2beta1::Operation] parsed result object
1372
+ # @yieldparam err [StandardError] error object if request failed
1373
+ #
1374
+ # @return [Google::Apis::DialogflowV2beta1::Operation]
1375
+ #
1376
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1377
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1378
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1379
+ def get_project_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1380
+ command = make_simple_command(:get, 'v2beta1/{+name}', options)
1381
+ command.response_representation = Google::Apis::DialogflowV2beta1::Operation::Representation
1382
+ command.response_class = Google::Apis::DialogflowV2beta1::Operation
1383
+ command.params['name'] = name unless name.nil?
1384
+ command.query['fields'] = fields unless fields.nil?
1385
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1386
+ execute_or_queue_command(command, &block)
1387
+ end
1388
+
1389
+ protected
1390
+
1391
+ def apply_command_defaults(command)
1392
+ command.query['key'] = key unless key.nil?
1393
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1394
+ end
1395
+ end
1396
+ end
1397
+ end
1398
+ end