google-apis-dialogflow_v2 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2285 @@
1
+ # Copyright 2020 Google LLC
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 DialogflowV2
23
+ # Dialogflow API
24
+ #
25
+ # Builds conversational interfaces (for example, chatbots, and voice-powered
26
+ # apps and devices).
27
+ #
28
+ # @example
29
+ # require 'google/apis/dialogflow_v2'
30
+ #
31
+ # Dialogflow = Google::Apis::DialogflowV2 # Alias the module
32
+ # service = Dialogflow::DialogflowService.new
33
+ #
34
+ # @see https://cloud.google.com/dialogflow/
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
+ client_name: 'google-apis-dialogflow_v2',
49
+ client_version: Google::Apis::DialogflowV2::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Deletes the specified agent.
54
+ # @param [String] parent
55
+ # Required. The project that the agent to delete is associated with. Format: `
56
+ # projects/`.
57
+ # @param [String] fields
58
+ # Selector specifying which fields to include in a partial response.
59
+ # @param [String] quota_user
60
+ # Available to use for quota purposes for server-side applications. Can be any
61
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
62
+ # @param [Google::Apis::RequestOptions] options
63
+ # Request-specific options
64
+ #
65
+ # @yield [result, err] Result & error if block supplied
66
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleProtobufEmpty] parsed result object
67
+ # @yieldparam err [StandardError] error object if request failed
68
+ #
69
+ # @return [Google::Apis::DialogflowV2::GoogleProtobufEmpty]
70
+ #
71
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
72
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
73
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
74
+ def delete_project_agent(parent, fields: nil, quota_user: nil, options: nil, &block)
75
+ command = make_simple_command(:delete, 'v2/{+parent}/agent', options)
76
+ command.response_representation = Google::Apis::DialogflowV2::GoogleProtobufEmpty::Representation
77
+ command.response_class = Google::Apis::DialogflowV2::GoogleProtobufEmpty
78
+ command.params['parent'] = parent unless parent.nil?
79
+ command.query['fields'] = fields unless fields.nil?
80
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
81
+ execute_or_queue_command(command, &block)
82
+ end
83
+
84
+ # Retrieves the specified agent.
85
+ # @param [String] parent
86
+ # Required. The project that the agent to fetch is associated with. Format: `
87
+ # projects/`.
88
+ # @param [String] fields
89
+ # Selector specifying which fields to include in a partial response.
90
+ # @param [String] quota_user
91
+ # Available to use for quota purposes for server-side applications. Can be any
92
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
93
+ # @param [Google::Apis::RequestOptions] options
94
+ # Request-specific options
95
+ #
96
+ # @yield [result, err] Result & error if block supplied
97
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Agent] parsed result object
98
+ # @yieldparam err [StandardError] error object if request failed
99
+ #
100
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Agent]
101
+ #
102
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
103
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
104
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
105
+ def get_project_agent(parent, fields: nil, quota_user: nil, options: nil, &block)
106
+ command = make_simple_command(:get, 'v2/{+parent}/agent', options)
107
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Agent::Representation
108
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Agent
109
+ command.params['parent'] = parent unless parent.nil?
110
+ command.query['fields'] = fields unless fields.nil?
111
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
112
+ execute_or_queue_command(command, &block)
113
+ end
114
+
115
+ # Creates/updates the specified agent.
116
+ # @param [String] parent
117
+ # Required. The project of this agent. Format: `projects/`.
118
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Agent] google_cloud_dialogflow_v2_agent_object
119
+ # @param [String] update_mask
120
+ # Optional. The mask to control which fields get updated.
121
+ # @param [String] fields
122
+ # Selector specifying which fields to include in a partial response.
123
+ # @param [String] quota_user
124
+ # Available to use for quota purposes for server-side applications. Can be any
125
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
126
+ # @param [Google::Apis::RequestOptions] options
127
+ # Request-specific options
128
+ #
129
+ # @yield [result, err] Result & error if block supplied
130
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Agent] parsed result object
131
+ # @yieldparam err [StandardError] error object if request failed
132
+ #
133
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Agent]
134
+ #
135
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
136
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
137
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
138
+ def set_project_agent(parent, google_cloud_dialogflow_v2_agent_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
139
+ command = make_simple_command(:post, 'v2/{+parent}/agent', options)
140
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Agent::Representation
141
+ command.request_object = google_cloud_dialogflow_v2_agent_object
142
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Agent::Representation
143
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Agent
144
+ command.params['parent'] = parent unless parent.nil?
145
+ command.query['updateMask'] = update_mask unless update_mask.nil?
146
+ command.query['fields'] = fields unless fields.nil?
147
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
148
+ execute_or_queue_command(command, &block)
149
+ end
150
+
151
+ # Exports the specified agent to a ZIP file. Operation
152
+ # @param [String] parent
153
+ # Required. The project that the agent to export is associated with. Format: `
154
+ # projects/`.
155
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ExportAgentRequest] google_cloud_dialogflow_v2_export_agent_request_object
156
+ # @param [String] fields
157
+ # Selector specifying which fields to include in a partial response.
158
+ # @param [String] quota_user
159
+ # Available to use for quota purposes for server-side applications. Can be any
160
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
161
+ # @param [Google::Apis::RequestOptions] options
162
+ # Request-specific options
163
+ #
164
+ # @yield [result, err] Result & error if block supplied
165
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleLongrunningOperation] parsed result object
166
+ # @yieldparam err [StandardError] error object if request failed
167
+ #
168
+ # @return [Google::Apis::DialogflowV2::GoogleLongrunningOperation]
169
+ #
170
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
171
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
172
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
173
+ def export_project_agent(parent, google_cloud_dialogflow_v2_export_agent_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
174
+ command = make_simple_command(:post, 'v2/{+parent}/agent:export', options)
175
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ExportAgentRequest::Representation
176
+ command.request_object = google_cloud_dialogflow_v2_export_agent_request_object
177
+ command.response_representation = Google::Apis::DialogflowV2::GoogleLongrunningOperation::Representation
178
+ command.response_class = Google::Apis::DialogflowV2::GoogleLongrunningOperation
179
+ command.params['parent'] = parent unless parent.nil?
180
+ command.query['fields'] = fields unless fields.nil?
181
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
182
+ execute_or_queue_command(command, &block)
183
+ end
184
+
185
+ # Retrieves the fulfillment.
186
+ # @param [String] name
187
+ # Required. The name of the fulfillment. Format: `projects//agent/fulfillment`.
188
+ # @param [String] fields
189
+ # Selector specifying which fields to include in a partial response.
190
+ # @param [String] quota_user
191
+ # Available to use for quota purposes for server-side applications. Can be any
192
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
193
+ # @param [Google::Apis::RequestOptions] options
194
+ # Request-specific options
195
+ #
196
+ # @yield [result, err] Result & error if block supplied
197
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Fulfillment] parsed result object
198
+ # @yieldparam err [StandardError] error object if request failed
199
+ #
200
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Fulfillment]
201
+ #
202
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
203
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
204
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
205
+ def get_project_agent_fulfillment(name, fields: nil, quota_user: nil, options: nil, &block)
206
+ command = make_simple_command(:get, 'v2/{+name}', options)
207
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Fulfillment::Representation
208
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Fulfillment
209
+ command.params['name'] = name unless name.nil?
210
+ command.query['fields'] = fields unless fields.nil?
211
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
212
+ execute_or_queue_command(command, &block)
213
+ end
214
+
215
+ # Gets agent validation result. Agent validation is performed during training
216
+ # time and is updated automatically when training is completed.
217
+ # @param [String] parent
218
+ # Required. The project that the agent is associated with. Format: `projects/`.
219
+ # @param [String] language_code
220
+ # Optional. The language for which you want a validation result. If not
221
+ # specified, the agent's default language is used. [Many languages](https://
222
+ # cloud.google.com/dialogflow/docs/reference/language) are supported. Note:
223
+ # languages must be enabled in the agent before they can be used.
224
+ # @param [String] fields
225
+ # Selector specifying which fields to include in a partial response.
226
+ # @param [String] quota_user
227
+ # Available to use for quota purposes for server-side applications. Can be any
228
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
229
+ # @param [Google::Apis::RequestOptions] options
230
+ # Request-specific options
231
+ #
232
+ # @yield [result, err] Result & error if block supplied
233
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ValidationResult] parsed result object
234
+ # @yieldparam err [StandardError] error object if request failed
235
+ #
236
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ValidationResult]
237
+ #
238
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
239
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
240
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
241
+ def get_project_agent_validation_result(parent, language_code: nil, fields: nil, quota_user: nil, options: nil, &block)
242
+ command = make_simple_command(:get, 'v2/{+parent}/agent/validationResult', options)
243
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ValidationResult::Representation
244
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ValidationResult
245
+ command.params['parent'] = parent unless parent.nil?
246
+ command.query['languageCode'] = language_code unless language_code.nil?
247
+ command.query['fields'] = fields unless fields.nil?
248
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
249
+ execute_or_queue_command(command, &block)
250
+ end
251
+
252
+ # Imports the specified agent from a ZIP file. Uploads new intents and entity
253
+ # types without deleting the existing ones. Intents and entity types with the
254
+ # same name are replaced with the new versions from ImportAgentRequest. After
255
+ # the import, the imported draft agent will be trained automatically (unless
256
+ # disabled in agent settings). However, once the import is done, training may
257
+ # not be completed yet. Please call TrainAgent and wait for the operation it
258
+ # returns in order to train explicitly. Operation An operation which tracks when
259
+ # importing is complete. It only tracks when the draft agent is updated not when
260
+ # it is done training.
261
+ # @param [String] parent
262
+ # Required. The project that the agent to import is associated with. Format: `
263
+ # projects/`.
264
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ImportAgentRequest] google_cloud_dialogflow_v2_import_agent_request_object
265
+ # @param [String] fields
266
+ # Selector specifying which fields to include in a partial response.
267
+ # @param [String] quota_user
268
+ # Available to use for quota purposes for server-side applications. Can be any
269
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
270
+ # @param [Google::Apis::RequestOptions] options
271
+ # Request-specific options
272
+ #
273
+ # @yield [result, err] Result & error if block supplied
274
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleLongrunningOperation] parsed result object
275
+ # @yieldparam err [StandardError] error object if request failed
276
+ #
277
+ # @return [Google::Apis::DialogflowV2::GoogleLongrunningOperation]
278
+ #
279
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
280
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
281
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
282
+ def import_project_agent(parent, google_cloud_dialogflow_v2_import_agent_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
283
+ command = make_simple_command(:post, 'v2/{+parent}/agent:import', options)
284
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ImportAgentRequest::Representation
285
+ command.request_object = google_cloud_dialogflow_v2_import_agent_request_object
286
+ command.response_representation = Google::Apis::DialogflowV2::GoogleLongrunningOperation::Representation
287
+ command.response_class = Google::Apis::DialogflowV2::GoogleLongrunningOperation
288
+ command.params['parent'] = parent unless parent.nil?
289
+ command.query['fields'] = fields unless fields.nil?
290
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
291
+ execute_or_queue_command(command, &block)
292
+ end
293
+
294
+ # Restores the specified agent from a ZIP file. Replaces the current agent
295
+ # version with a new one. All the intents and entity types in the older version
296
+ # are deleted. After the restore, the restored draft agent will be trained
297
+ # automatically (unless disabled in agent settings). However, once the restore
298
+ # is done, training may not be completed yet. Please call TrainAgent and wait
299
+ # for the operation it returns in order to train explicitly. Operation An
300
+ # operation which tracks when restoring is complete. It only tracks when the
301
+ # draft agent is updated not when it is done training.
302
+ # @param [String] parent
303
+ # Required. The project that the agent to restore is associated with. Format: `
304
+ # projects/`.
305
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2RestoreAgentRequest] google_cloud_dialogflow_v2_restore_agent_request_object
306
+ # @param [String] fields
307
+ # Selector specifying which fields to include in a partial response.
308
+ # @param [String] quota_user
309
+ # Available to use for quota purposes for server-side applications. Can be any
310
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
311
+ # @param [Google::Apis::RequestOptions] options
312
+ # Request-specific options
313
+ #
314
+ # @yield [result, err] Result & error if block supplied
315
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleLongrunningOperation] parsed result object
316
+ # @yieldparam err [StandardError] error object if request failed
317
+ #
318
+ # @return [Google::Apis::DialogflowV2::GoogleLongrunningOperation]
319
+ #
320
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
321
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
322
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
323
+ def restore_project_agent(parent, google_cloud_dialogflow_v2_restore_agent_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
324
+ command = make_simple_command(:post, 'v2/{+parent}/agent:restore', options)
325
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2RestoreAgentRequest::Representation
326
+ command.request_object = google_cloud_dialogflow_v2_restore_agent_request_object
327
+ command.response_representation = Google::Apis::DialogflowV2::GoogleLongrunningOperation::Representation
328
+ command.response_class = Google::Apis::DialogflowV2::GoogleLongrunningOperation
329
+ command.params['parent'] = parent unless parent.nil?
330
+ command.query['fields'] = fields unless fields.nil?
331
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
332
+ execute_or_queue_command(command, &block)
333
+ end
334
+
335
+ # Returns the list of agents. Since there is at most one conversational agent
336
+ # per project, this method is useful primarily for listing all agents across
337
+ # projects the caller has access to. One can achieve that with a wildcard
338
+ # project collection id "-". Refer to [List Sub-Collections](https://cloud.
339
+ # google.com/apis/design/design_patterns#list_sub-collections).
340
+ # @param [String] parent
341
+ # Required. The project to list agents from. Format: `projects/`.
342
+ # @param [Fixnum] page_size
343
+ # Optional. The maximum number of items to return in a single page. By default
344
+ # 100 and at most 1000.
345
+ # @param [String] page_token
346
+ # The next_page_token value returned from a previous list request.
347
+ # @param [String] fields
348
+ # Selector specifying which fields to include in a partial response.
349
+ # @param [String] quota_user
350
+ # Available to use for quota purposes for server-side applications. Can be any
351
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
352
+ # @param [Google::Apis::RequestOptions] options
353
+ # Request-specific options
354
+ #
355
+ # @yield [result, err] Result & error if block supplied
356
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SearchAgentsResponse] parsed result object
357
+ # @yieldparam err [StandardError] error object if request failed
358
+ #
359
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SearchAgentsResponse]
360
+ #
361
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
362
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
363
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
364
+ def search_project_agents(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
365
+ command = make_simple_command(:get, 'v2/{+parent}/agent:search', options)
366
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SearchAgentsResponse::Representation
367
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SearchAgentsResponse
368
+ command.params['parent'] = parent unless parent.nil?
369
+ command.query['pageSize'] = page_size unless page_size.nil?
370
+ command.query['pageToken'] = page_token unless page_token.nil?
371
+ command.query['fields'] = fields unless fields.nil?
372
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
373
+ execute_or_queue_command(command, &block)
374
+ end
375
+
376
+ # Trains the specified agent. Operation
377
+ # @param [String] parent
378
+ # Required. The project that the agent to train is associated with. Format: `
379
+ # projects/`.
380
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2TrainAgentRequest] google_cloud_dialogflow_v2_train_agent_request_object
381
+ # @param [String] fields
382
+ # Selector specifying which fields to include in a partial response.
383
+ # @param [String] quota_user
384
+ # Available to use for quota purposes for server-side applications. Can be any
385
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
386
+ # @param [Google::Apis::RequestOptions] options
387
+ # Request-specific options
388
+ #
389
+ # @yield [result, err] Result & error if block supplied
390
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleLongrunningOperation] parsed result object
391
+ # @yieldparam err [StandardError] error object if request failed
392
+ #
393
+ # @return [Google::Apis::DialogflowV2::GoogleLongrunningOperation]
394
+ #
395
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
396
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
397
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
398
+ def train_project_agent(parent, google_cloud_dialogflow_v2_train_agent_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
399
+ command = make_simple_command(:post, 'v2/{+parent}/agent:train', options)
400
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2TrainAgentRequest::Representation
401
+ command.request_object = google_cloud_dialogflow_v2_train_agent_request_object
402
+ command.response_representation = Google::Apis::DialogflowV2::GoogleLongrunningOperation::Representation
403
+ command.response_class = Google::Apis::DialogflowV2::GoogleLongrunningOperation
404
+ command.params['parent'] = parent unless parent.nil?
405
+ command.query['fields'] = fields unless fields.nil?
406
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
407
+ execute_or_queue_command(command, &block)
408
+ end
409
+
410
+ # Updates the fulfillment.
411
+ # @param [String] name
412
+ # Required. The unique identifier of the fulfillment. Format: `projects//agent/
413
+ # fulfillment`.
414
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Fulfillment] google_cloud_dialogflow_v2_fulfillment_object
415
+ # @param [String] update_mask
416
+ # Required. The mask to control which fields get updated. If the mask is not
417
+ # present, all fields will be updated.
418
+ # @param [String] fields
419
+ # Selector specifying which fields to include in a partial response.
420
+ # @param [String] quota_user
421
+ # Available to use for quota purposes for server-side applications. Can be any
422
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
423
+ # @param [Google::Apis::RequestOptions] options
424
+ # Request-specific options
425
+ #
426
+ # @yield [result, err] Result & error if block supplied
427
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Fulfillment] parsed result object
428
+ # @yieldparam err [StandardError] error object if request failed
429
+ #
430
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Fulfillment]
431
+ #
432
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
433
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
434
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
435
+ def update_project_agent_fulfillment(name, google_cloud_dialogflow_v2_fulfillment_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
436
+ command = make_simple_command(:patch, 'v2/{+name}', options)
437
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Fulfillment::Representation
438
+ command.request_object = google_cloud_dialogflow_v2_fulfillment_object
439
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Fulfillment::Representation
440
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Fulfillment
441
+ command.params['name'] = name unless name.nil?
442
+ command.query['updateMask'] = update_mask unless update_mask.nil?
443
+ command.query['fields'] = fields unless fields.nil?
444
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
445
+ execute_or_queue_command(command, &block)
446
+ end
447
+
448
+ # Deletes entity types in the specified agent. Operation
449
+ # @param [String] parent
450
+ # Required. The name of the agent to delete all entities types for. Format: `
451
+ # projects//agent`.
452
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest] google_cloud_dialogflow_v2_batch_delete_entity_types_request_object
453
+ # @param [String] fields
454
+ # Selector specifying which fields to include in a partial response.
455
+ # @param [String] quota_user
456
+ # Available to use for quota purposes for server-side applications. Can be any
457
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
458
+ # @param [Google::Apis::RequestOptions] options
459
+ # Request-specific options
460
+ #
461
+ # @yield [result, err] Result & error if block supplied
462
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleLongrunningOperation] parsed result object
463
+ # @yieldparam err [StandardError] error object if request failed
464
+ #
465
+ # @return [Google::Apis::DialogflowV2::GoogleLongrunningOperation]
466
+ #
467
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
468
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
469
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
470
+ def batch_project_agent_entity_type_delete(parent, google_cloud_dialogflow_v2_batch_delete_entity_types_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
471
+ command = make_simple_command(:post, 'v2/{+parent}/entityTypes:batchDelete', options)
472
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest::Representation
473
+ command.request_object = google_cloud_dialogflow_v2_batch_delete_entity_types_request_object
474
+ command.response_representation = Google::Apis::DialogflowV2::GoogleLongrunningOperation::Representation
475
+ command.response_class = Google::Apis::DialogflowV2::GoogleLongrunningOperation
476
+ command.params['parent'] = parent unless parent.nil?
477
+ command.query['fields'] = fields unless fields.nil?
478
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
479
+ execute_or_queue_command(command, &block)
480
+ end
481
+
482
+ # Updates/Creates multiple entity types in the specified agent. Operation
483
+ # @param [String] parent
484
+ # Required. The name of the agent to update or create entity types in. Format: `
485
+ # projects//agent`.
486
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest] google_cloud_dialogflow_v2_batch_update_entity_types_request_object
487
+ # @param [String] fields
488
+ # Selector specifying which fields to include in a partial response.
489
+ # @param [String] quota_user
490
+ # Available to use for quota purposes for server-side applications. Can be any
491
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
492
+ # @param [Google::Apis::RequestOptions] options
493
+ # Request-specific options
494
+ #
495
+ # @yield [result, err] Result & error if block supplied
496
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleLongrunningOperation] parsed result object
497
+ # @yieldparam err [StandardError] error object if request failed
498
+ #
499
+ # @return [Google::Apis::DialogflowV2::GoogleLongrunningOperation]
500
+ #
501
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
502
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
503
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
504
+ def batch_project_agent_entity_type_update(parent, google_cloud_dialogflow_v2_batch_update_entity_types_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
505
+ command = make_simple_command(:post, 'v2/{+parent}/entityTypes:batchUpdate', options)
506
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest::Representation
507
+ command.request_object = google_cloud_dialogflow_v2_batch_update_entity_types_request_object
508
+ command.response_representation = Google::Apis::DialogflowV2::GoogleLongrunningOperation::Representation
509
+ command.response_class = Google::Apis::DialogflowV2::GoogleLongrunningOperation
510
+ command.params['parent'] = parent unless parent.nil?
511
+ command.query['fields'] = fields unless fields.nil?
512
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
513
+ execute_or_queue_command(command, &block)
514
+ end
515
+
516
+ # Creates an entity type in the specified agent.
517
+ # @param [String] parent
518
+ # Required. The agent to create a entity type for. Format: `projects//agent`.
519
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityType] google_cloud_dialogflow_v2_entity_type_object
520
+ # @param [String] language_code
521
+ # Optional. The language used to access language-specific data. If not specified,
522
+ # the agent's default language is used. For more information, see [Multilingual
523
+ # intent and entity data](https://cloud.google.com/dialogflow/docs/agents-
524
+ # multilingual#intent-entity).
525
+ # @param [String] fields
526
+ # Selector specifying which fields to include in a partial response.
527
+ # @param [String] quota_user
528
+ # Available to use for quota purposes for server-side applications. Can be any
529
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
530
+ # @param [Google::Apis::RequestOptions] options
531
+ # Request-specific options
532
+ #
533
+ # @yield [result, err] Result & error if block supplied
534
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityType] parsed result object
535
+ # @yieldparam err [StandardError] error object if request failed
536
+ #
537
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityType]
538
+ #
539
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
540
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
541
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
542
+ def create_project_agent_entity_type(parent, google_cloud_dialogflow_v2_entity_type_object = nil, language_code: nil, fields: nil, quota_user: nil, options: nil, &block)
543
+ command = make_simple_command(:post, 'v2/{+parent}/entityTypes', options)
544
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityType::Representation
545
+ command.request_object = google_cloud_dialogflow_v2_entity_type_object
546
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityType::Representation
547
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityType
548
+ command.params['parent'] = parent unless parent.nil?
549
+ command.query['languageCode'] = language_code unless language_code.nil?
550
+ command.query['fields'] = fields unless fields.nil?
551
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
552
+ execute_or_queue_command(command, &block)
553
+ end
554
+
555
+ # Deletes the specified entity type.
556
+ # @param [String] name
557
+ # Required. The name of the entity type to delete. Format: `projects//agent/
558
+ # entityTypes/`.
559
+ # @param [String] fields
560
+ # Selector specifying which fields to include in a partial response.
561
+ # @param [String] quota_user
562
+ # Available to use for quota purposes for server-side applications. Can be any
563
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
564
+ # @param [Google::Apis::RequestOptions] options
565
+ # Request-specific options
566
+ #
567
+ # @yield [result, err] Result & error if block supplied
568
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleProtobufEmpty] parsed result object
569
+ # @yieldparam err [StandardError] error object if request failed
570
+ #
571
+ # @return [Google::Apis::DialogflowV2::GoogleProtobufEmpty]
572
+ #
573
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
574
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
575
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
576
+ def delete_project_agent_entity_type(name, fields: nil, quota_user: nil, options: nil, &block)
577
+ command = make_simple_command(:delete, 'v2/{+name}', options)
578
+ command.response_representation = Google::Apis::DialogflowV2::GoogleProtobufEmpty::Representation
579
+ command.response_class = Google::Apis::DialogflowV2::GoogleProtobufEmpty
580
+ command.params['name'] = name unless name.nil?
581
+ command.query['fields'] = fields unless fields.nil?
582
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
583
+ execute_or_queue_command(command, &block)
584
+ end
585
+
586
+ # Retrieves the specified entity type.
587
+ # @param [String] name
588
+ # Required. The name of the entity type. Format: `projects//agent/entityTypes/`.
589
+ # @param [String] language_code
590
+ # Optional. The language used to access language-specific data. If not specified,
591
+ # the agent's default language is used. For more information, see [Multilingual
592
+ # intent and entity data](https://cloud.google.com/dialogflow/docs/agents-
593
+ # multilingual#intent-entity).
594
+ # @param [String] fields
595
+ # Selector specifying which fields to include in a partial response.
596
+ # @param [String] quota_user
597
+ # Available to use for quota purposes for server-side applications. Can be any
598
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
599
+ # @param [Google::Apis::RequestOptions] options
600
+ # Request-specific options
601
+ #
602
+ # @yield [result, err] Result & error if block supplied
603
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityType] parsed result object
604
+ # @yieldparam err [StandardError] error object if request failed
605
+ #
606
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityType]
607
+ #
608
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
609
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
610
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
611
+ def get_project_agent_entity_type(name, language_code: nil, fields: nil, quota_user: nil, options: nil, &block)
612
+ command = make_simple_command(:get, 'v2/{+name}', options)
613
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityType::Representation
614
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityType
615
+ command.params['name'] = name unless name.nil?
616
+ command.query['languageCode'] = language_code unless language_code.nil?
617
+ command.query['fields'] = fields unless fields.nil?
618
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
619
+ execute_or_queue_command(command, &block)
620
+ end
621
+
622
+ # Returns the list of all entity types in the specified agent.
623
+ # @param [String] parent
624
+ # Required. The agent to list all entity types from. Format: `projects//agent`.
625
+ # @param [String] language_code
626
+ # Optional. The language used to access language-specific data. If not specified,
627
+ # the agent's default language is used. For more information, see [Multilingual
628
+ # intent and entity data](https://cloud.google.com/dialogflow/docs/agents-
629
+ # multilingual#intent-entity).
630
+ # @param [Fixnum] page_size
631
+ # Optional. The maximum number of items to return in a single page. By default
632
+ # 100 and at most 1000.
633
+ # @param [String] page_token
634
+ # Optional. The next_page_token value returned from a previous list request.
635
+ # @param [String] fields
636
+ # Selector specifying which fields to include in a partial response.
637
+ # @param [String] quota_user
638
+ # Available to use for quota purposes for server-side applications. Can be any
639
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
640
+ # @param [Google::Apis::RequestOptions] options
641
+ # Request-specific options
642
+ #
643
+ # @yield [result, err] Result & error if block supplied
644
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListEntityTypesResponse] parsed result object
645
+ # @yieldparam err [StandardError] error object if request failed
646
+ #
647
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListEntityTypesResponse]
648
+ #
649
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
650
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
651
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
652
+ def list_project_agent_entity_types(parent, language_code: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
653
+ command = make_simple_command(:get, 'v2/{+parent}/entityTypes', options)
654
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListEntityTypesResponse::Representation
655
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListEntityTypesResponse
656
+ command.params['parent'] = parent unless parent.nil?
657
+ command.query['languageCode'] = language_code unless language_code.nil?
658
+ command.query['pageSize'] = page_size unless page_size.nil?
659
+ command.query['pageToken'] = page_token unless page_token.nil?
660
+ command.query['fields'] = fields unless fields.nil?
661
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
662
+ execute_or_queue_command(command, &block)
663
+ end
664
+
665
+ # Updates the specified entity type.
666
+ # @param [String] name
667
+ # The unique identifier of the entity type. Required for EntityTypes.
668
+ # UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Format: `
669
+ # projects//agent/entityTypes/`.
670
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityType] google_cloud_dialogflow_v2_entity_type_object
671
+ # @param [String] language_code
672
+ # Optional. The language used to access language-specific data. If not specified,
673
+ # the agent's default language is used. For more information, see [Multilingual
674
+ # intent and entity data](https://cloud.google.com/dialogflow/docs/agents-
675
+ # multilingual#intent-entity).
676
+ # @param [String] update_mask
677
+ # Optional. The mask to control which fields get updated.
678
+ # @param [String] fields
679
+ # Selector specifying which fields to include in a partial response.
680
+ # @param [String] quota_user
681
+ # Available to use for quota purposes for server-side applications. Can be any
682
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
683
+ # @param [Google::Apis::RequestOptions] options
684
+ # Request-specific options
685
+ #
686
+ # @yield [result, err] Result & error if block supplied
687
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityType] parsed result object
688
+ # @yieldparam err [StandardError] error object if request failed
689
+ #
690
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityType]
691
+ #
692
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
693
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
694
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
695
+ def patch_project_agent_entity_type(name, google_cloud_dialogflow_v2_entity_type_object = nil, language_code: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
696
+ command = make_simple_command(:patch, 'v2/{+name}', options)
697
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityType::Representation
698
+ command.request_object = google_cloud_dialogflow_v2_entity_type_object
699
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityType::Representation
700
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityType
701
+ command.params['name'] = name unless name.nil?
702
+ command.query['languageCode'] = language_code unless language_code.nil?
703
+ command.query['updateMask'] = update_mask unless update_mask.nil?
704
+ command.query['fields'] = fields unless fields.nil?
705
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
706
+ execute_or_queue_command(command, &block)
707
+ end
708
+
709
+ # Creates multiple new entities in the specified entity type. Operation
710
+ # @param [String] parent
711
+ # Required. The name of the entity type to create entities in. Format: `projects/
712
+ # /agent/entityTypes/`.
713
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2BatchCreateEntitiesRequest] google_cloud_dialogflow_v2_batch_create_entities_request_object
714
+ # @param [String] fields
715
+ # Selector specifying which fields to include in a partial response.
716
+ # @param [String] quota_user
717
+ # Available to use for quota purposes for server-side applications. Can be any
718
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
719
+ # @param [Google::Apis::RequestOptions] options
720
+ # Request-specific options
721
+ #
722
+ # @yield [result, err] Result & error if block supplied
723
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleLongrunningOperation] parsed result object
724
+ # @yieldparam err [StandardError] error object if request failed
725
+ #
726
+ # @return [Google::Apis::DialogflowV2::GoogleLongrunningOperation]
727
+ #
728
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
729
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
730
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
731
+ def batch_project_agent_entity_type_entity_create(parent, google_cloud_dialogflow_v2_batch_create_entities_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
732
+ command = make_simple_command(:post, 'v2/{+parent}/entities:batchCreate', options)
733
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2BatchCreateEntitiesRequest::Representation
734
+ command.request_object = google_cloud_dialogflow_v2_batch_create_entities_request_object
735
+ command.response_representation = Google::Apis::DialogflowV2::GoogleLongrunningOperation::Representation
736
+ command.response_class = Google::Apis::DialogflowV2::GoogleLongrunningOperation
737
+ command.params['parent'] = parent unless parent.nil?
738
+ command.query['fields'] = fields unless fields.nil?
739
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
740
+ execute_or_queue_command(command, &block)
741
+ end
742
+
743
+ # Deletes entities in the specified entity type. Operation
744
+ # @param [String] parent
745
+ # Required. The name of the entity type to delete entries for. Format: `projects/
746
+ # /agent/entityTypes/`.
747
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2BatchDeleteEntitiesRequest] google_cloud_dialogflow_v2_batch_delete_entities_request_object
748
+ # @param [String] fields
749
+ # Selector specifying which fields to include in a partial response.
750
+ # @param [String] quota_user
751
+ # Available to use for quota purposes for server-side applications. Can be any
752
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
753
+ # @param [Google::Apis::RequestOptions] options
754
+ # Request-specific options
755
+ #
756
+ # @yield [result, err] Result & error if block supplied
757
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleLongrunningOperation] parsed result object
758
+ # @yieldparam err [StandardError] error object if request failed
759
+ #
760
+ # @return [Google::Apis::DialogflowV2::GoogleLongrunningOperation]
761
+ #
762
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
763
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
764
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
765
+ def batch_project_agent_entity_type_entity_delete(parent, google_cloud_dialogflow_v2_batch_delete_entities_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
766
+ command = make_simple_command(:post, 'v2/{+parent}/entities:batchDelete', options)
767
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2BatchDeleteEntitiesRequest::Representation
768
+ command.request_object = google_cloud_dialogflow_v2_batch_delete_entities_request_object
769
+ command.response_representation = Google::Apis::DialogflowV2::GoogleLongrunningOperation::Representation
770
+ command.response_class = Google::Apis::DialogflowV2::GoogleLongrunningOperation
771
+ command.params['parent'] = parent unless parent.nil?
772
+ command.query['fields'] = fields unless fields.nil?
773
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
774
+ execute_or_queue_command(command, &block)
775
+ end
776
+
777
+ # Updates or creates multiple entities in the specified entity type. This method
778
+ # does not affect entities in the entity type that aren't explicitly specified
779
+ # in the request. Operation
780
+ # @param [String] parent
781
+ # Required. The name of the entity type to update or create entities in. Format:
782
+ # `projects//agent/entityTypes/`.
783
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2BatchUpdateEntitiesRequest] google_cloud_dialogflow_v2_batch_update_entities_request_object
784
+ # @param [String] fields
785
+ # Selector specifying which fields to include in a partial response.
786
+ # @param [String] quota_user
787
+ # Available to use for quota purposes for server-side applications. Can be any
788
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
789
+ # @param [Google::Apis::RequestOptions] options
790
+ # Request-specific options
791
+ #
792
+ # @yield [result, err] Result & error if block supplied
793
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleLongrunningOperation] parsed result object
794
+ # @yieldparam err [StandardError] error object if request failed
795
+ #
796
+ # @return [Google::Apis::DialogflowV2::GoogleLongrunningOperation]
797
+ #
798
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
799
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
800
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
801
+ def batch_project_agent_entity_type_entity_update(parent, google_cloud_dialogflow_v2_batch_update_entities_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
802
+ command = make_simple_command(:post, 'v2/{+parent}/entities:batchUpdate', options)
803
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2BatchUpdateEntitiesRequest::Representation
804
+ command.request_object = google_cloud_dialogflow_v2_batch_update_entities_request_object
805
+ command.response_representation = Google::Apis::DialogflowV2::GoogleLongrunningOperation::Representation
806
+ command.response_class = Google::Apis::DialogflowV2::GoogleLongrunningOperation
807
+ command.params['parent'] = parent unless parent.nil?
808
+ command.query['fields'] = fields unless fields.nil?
809
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
810
+ execute_or_queue_command(command, &block)
811
+ end
812
+
813
+ # Returns the list of all non-draft environments of the specified agent.
814
+ # @param [String] parent
815
+ # Required. The agent to list all environments from. Format: `projects//agent`.
816
+ # @param [Fixnum] page_size
817
+ # Optional. The maximum number of items to return in a single page. By default
818
+ # 100 and at most 1000.
819
+ # @param [String] page_token
820
+ # Optional. The next_page_token value returned from a previous list request.
821
+ # @param [String] fields
822
+ # Selector specifying which fields to include in a partial response.
823
+ # @param [String] quota_user
824
+ # Available to use for quota purposes for server-side applications. Can be any
825
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
826
+ # @param [Google::Apis::RequestOptions] options
827
+ # Request-specific options
828
+ #
829
+ # @yield [result, err] Result & error if block supplied
830
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListEnvironmentsResponse] parsed result object
831
+ # @yieldparam err [StandardError] error object if request failed
832
+ #
833
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListEnvironmentsResponse]
834
+ #
835
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
836
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
837
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
838
+ def list_project_agent_environments(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
839
+ command = make_simple_command(:get, 'v2/{+parent}/environments', options)
840
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListEnvironmentsResponse::Representation
841
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListEnvironmentsResponse
842
+ command.params['parent'] = parent unless parent.nil?
843
+ command.query['pageSize'] = page_size unless page_size.nil?
844
+ command.query['pageToken'] = page_token unless page_token.nil?
845
+ command.query['fields'] = fields unless fields.nil?
846
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
847
+ execute_or_queue_command(command, &block)
848
+ end
849
+
850
+ # Deletes all active contexts in the specified session.
851
+ # @param [String] parent
852
+ # Required. The name of the session to delete all contexts from. Format: `
853
+ # projects//agent/sessions/` or `projects//agent/environments//users//sessions/`.
854
+ # If `Environment ID` is not specified we assume default 'draft' environment.
855
+ # If `User ID` is not specified, we assume default '-' user.
856
+ # @param [String] fields
857
+ # Selector specifying which fields to include in a partial response.
858
+ # @param [String] quota_user
859
+ # Available to use for quota purposes for server-side applications. Can be any
860
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
861
+ # @param [Google::Apis::RequestOptions] options
862
+ # Request-specific options
863
+ #
864
+ # @yield [result, err] Result & error if block supplied
865
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleProtobufEmpty] parsed result object
866
+ # @yieldparam err [StandardError] error object if request failed
867
+ #
868
+ # @return [Google::Apis::DialogflowV2::GoogleProtobufEmpty]
869
+ #
870
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
871
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
872
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
873
+ def delete_project_agent_environment_user_session_contexts(parent, fields: nil, quota_user: nil, options: nil, &block)
874
+ command = make_simple_command(:delete, 'v2/{+parent}/contexts', options)
875
+ command.response_representation = Google::Apis::DialogflowV2::GoogleProtobufEmpty::Representation
876
+ command.response_class = Google::Apis::DialogflowV2::GoogleProtobufEmpty
877
+ command.params['parent'] = parent unless parent.nil?
878
+ command.query['fields'] = fields unless fields.nil?
879
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
880
+ execute_or_queue_command(command, &block)
881
+ end
882
+
883
+ # Processes a natural language query and returns structured, actionable data as
884
+ # a result. This method is not idempotent, because it may cause contexts and
885
+ # session entity types to be updated, which in turn might affect results of
886
+ # future queries. Note: Always use agent versions for production traffic. See [
887
+ # Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-
888
+ # versions).
889
+ # @param [String] session
890
+ # Required. The name of the session this query is sent to. Format: `projects//
891
+ # agent/sessions/`, or `projects//agent/environments//users//sessions/`. If `
892
+ # Environment ID` is not specified, we assume default 'draft' environment. If `
893
+ # User ID` is not specified, we are using "-". It's up to the API caller to
894
+ # choose an appropriate `Session ID` and `User Id`. They can be a random number
895
+ # or some type of user and session identifiers (preferably hashed). The length
896
+ # of the `Session ID` and `User ID` must not exceed 36 characters. For more
897
+ # information, see the [API interactions guide](https://cloud.google.com/
898
+ # dialogflow/docs/api-overview). Note: Always use agent versions for production
899
+ # traffic. See [Versions and environments](https://cloud.google.com/dialogflow/
900
+ # es/docs/agents-versions).
901
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2DetectIntentRequest] google_cloud_dialogflow_v2_detect_intent_request_object
902
+ # @param [String] fields
903
+ # Selector specifying which fields to include in a partial response.
904
+ # @param [String] quota_user
905
+ # Available to use for quota purposes for server-side applications. Can be any
906
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
907
+ # @param [Google::Apis::RequestOptions] options
908
+ # Request-specific options
909
+ #
910
+ # @yield [result, err] Result & error if block supplied
911
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2DetectIntentResponse] parsed result object
912
+ # @yieldparam err [StandardError] error object if request failed
913
+ #
914
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2DetectIntentResponse]
915
+ #
916
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
917
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
918
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
919
+ def detect_project_agent_environment_user_session_intent(session, google_cloud_dialogflow_v2_detect_intent_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
920
+ command = make_simple_command(:post, 'v2/{+session}:detectIntent', options)
921
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2DetectIntentRequest::Representation
922
+ command.request_object = google_cloud_dialogflow_v2_detect_intent_request_object
923
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2DetectIntentResponse::Representation
924
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2DetectIntentResponse
925
+ command.params['session'] = session unless session.nil?
926
+ command.query['fields'] = fields unless fields.nil?
927
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
928
+ execute_or_queue_command(command, &block)
929
+ end
930
+
931
+ # Creates a context. If the specified context already exists, overrides the
932
+ # context.
933
+ # @param [String] parent
934
+ # Required. The session to create a context for. Format: `projects//agent/
935
+ # sessions/` or `projects//agent/environments//users//sessions/`. If `
936
+ # Environment ID` is not specified, we assume default 'draft' environment. If `
937
+ # User ID` is not specified, we assume default '-' user.
938
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context] google_cloud_dialogflow_v2_context_object
939
+ # @param [String] fields
940
+ # Selector specifying which fields to include in a partial response.
941
+ # @param [String] quota_user
942
+ # Available to use for quota purposes for server-side applications. Can be any
943
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
944
+ # @param [Google::Apis::RequestOptions] options
945
+ # Request-specific options
946
+ #
947
+ # @yield [result, err] Result & error if block supplied
948
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context] parsed result object
949
+ # @yieldparam err [StandardError] error object if request failed
950
+ #
951
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context]
952
+ #
953
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
954
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
955
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
956
+ def create_project_agent_environment_user_session_context(parent, google_cloud_dialogflow_v2_context_object = nil, fields: nil, quota_user: nil, options: nil, &block)
957
+ command = make_simple_command(:post, 'v2/{+parent}/contexts', options)
958
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context::Representation
959
+ command.request_object = google_cloud_dialogflow_v2_context_object
960
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context::Representation
961
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context
962
+ command.params['parent'] = parent unless parent.nil?
963
+ command.query['fields'] = fields unless fields.nil?
964
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
965
+ execute_or_queue_command(command, &block)
966
+ end
967
+
968
+ # Deletes the specified context.
969
+ # @param [String] name
970
+ # Required. The name of the context to delete. Format: `projects//agent/sessions/
971
+ # /contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `
972
+ # Environment ID` is not specified, we assume default 'draft' environment. If `
973
+ # User ID` is not specified, we assume default '-' user.
974
+ # @param [String] fields
975
+ # Selector specifying which fields to include in a partial response.
976
+ # @param [String] quota_user
977
+ # Available to use for quota purposes for server-side applications. Can be any
978
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
979
+ # @param [Google::Apis::RequestOptions] options
980
+ # Request-specific options
981
+ #
982
+ # @yield [result, err] Result & error if block supplied
983
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleProtobufEmpty] parsed result object
984
+ # @yieldparam err [StandardError] error object if request failed
985
+ #
986
+ # @return [Google::Apis::DialogflowV2::GoogleProtobufEmpty]
987
+ #
988
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
989
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
990
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
991
+ def delete_project_agent_environment_user_session_context(name, fields: nil, quota_user: nil, options: nil, &block)
992
+ command = make_simple_command(:delete, 'v2/{+name}', options)
993
+ command.response_representation = Google::Apis::DialogflowV2::GoogleProtobufEmpty::Representation
994
+ command.response_class = Google::Apis::DialogflowV2::GoogleProtobufEmpty
995
+ command.params['name'] = name unless name.nil?
996
+ command.query['fields'] = fields unless fields.nil?
997
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
998
+ execute_or_queue_command(command, &block)
999
+ end
1000
+
1001
+ # Retrieves the specified context.
1002
+ # @param [String] name
1003
+ # Required. The name of the context. Format: `projects//agent/sessions//contexts/
1004
+ # ` or `projects//agent/environments//users//sessions//contexts/`. If `
1005
+ # Environment ID` is not specified, we assume default 'draft' environment. If `
1006
+ # User ID` is not specified, we assume default '-' user.
1007
+ # @param [String] fields
1008
+ # Selector specifying which fields to include in a partial response.
1009
+ # @param [String] quota_user
1010
+ # Available to use for quota purposes for server-side applications. Can be any
1011
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1012
+ # @param [Google::Apis::RequestOptions] options
1013
+ # Request-specific options
1014
+ #
1015
+ # @yield [result, err] Result & error if block supplied
1016
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context] parsed result object
1017
+ # @yieldparam err [StandardError] error object if request failed
1018
+ #
1019
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context]
1020
+ #
1021
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1022
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1023
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1024
+ def get_project_agent_environment_user_session_context(name, fields: nil, quota_user: nil, options: nil, &block)
1025
+ command = make_simple_command(:get, 'v2/{+name}', options)
1026
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context::Representation
1027
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context
1028
+ command.params['name'] = name unless name.nil?
1029
+ command.query['fields'] = fields unless fields.nil?
1030
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1031
+ execute_or_queue_command(command, &block)
1032
+ end
1033
+
1034
+ # Returns the list of all contexts in the specified session.
1035
+ # @param [String] parent
1036
+ # Required. The session to list all contexts from. Format: `projects//agent/
1037
+ # sessions/` or `projects//agent/environments//users//sessions/`. If `
1038
+ # Environment ID` is not specified, we assume default 'draft' environment. If `
1039
+ # User ID` is not specified, we assume default '-' user.
1040
+ # @param [Fixnum] page_size
1041
+ # Optional. The maximum number of items to return in a single page. By default
1042
+ # 100 and at most 1000.
1043
+ # @param [String] page_token
1044
+ # Optional. The next_page_token value returned from a previous list request.
1045
+ # @param [String] fields
1046
+ # Selector specifying which fields to include in a partial response.
1047
+ # @param [String] quota_user
1048
+ # Available to use for quota purposes for server-side applications. Can be any
1049
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1050
+ # @param [Google::Apis::RequestOptions] options
1051
+ # Request-specific options
1052
+ #
1053
+ # @yield [result, err] Result & error if block supplied
1054
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListContextsResponse] parsed result object
1055
+ # @yieldparam err [StandardError] error object if request failed
1056
+ #
1057
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListContextsResponse]
1058
+ #
1059
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1060
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1061
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1062
+ def list_project_agent_environment_user_session_contexts(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1063
+ command = make_simple_command(:get, 'v2/{+parent}/contexts', options)
1064
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListContextsResponse::Representation
1065
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListContextsResponse
1066
+ command.params['parent'] = parent unless parent.nil?
1067
+ command.query['pageSize'] = page_size unless page_size.nil?
1068
+ command.query['pageToken'] = page_token unless page_token.nil?
1069
+ command.query['fields'] = fields unless fields.nil?
1070
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1071
+ execute_or_queue_command(command, &block)
1072
+ end
1073
+
1074
+ # Updates the specified context.
1075
+ # @param [String] name
1076
+ # Required. The unique identifier of the context. Format: `projects//agent/
1077
+ # sessions//contexts/`, or `projects//agent/environments//users//sessions//
1078
+ # contexts/`. The `Context ID` is always converted to lowercase, may only
1079
+ # contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `
1080
+ # Environment ID` is not specified, we assume default 'draft' environment. If `
1081
+ # User ID` is not specified, we assume default '-' user. The following context
1082
+ # names are reserved for internal use by Dialogflow. You should not use these
1083
+ # contexts or create contexts with these names: * `__system_counters__` * `*
1084
+ # _id_dialog_context` * `*_dialog_params_size`
1085
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context] google_cloud_dialogflow_v2_context_object
1086
+ # @param [String] update_mask
1087
+ # Optional. The mask to control which fields get updated.
1088
+ # @param [String] fields
1089
+ # Selector specifying which fields to include in a partial response.
1090
+ # @param [String] quota_user
1091
+ # Available to use for quota purposes for server-side applications. Can be any
1092
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1093
+ # @param [Google::Apis::RequestOptions] options
1094
+ # Request-specific options
1095
+ #
1096
+ # @yield [result, err] Result & error if block supplied
1097
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context] parsed result object
1098
+ # @yieldparam err [StandardError] error object if request failed
1099
+ #
1100
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context]
1101
+ #
1102
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1103
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1104
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1105
+ def patch_project_agent_environment_user_session_context(name, google_cloud_dialogflow_v2_context_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1106
+ command = make_simple_command(:patch, 'v2/{+name}', options)
1107
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context::Representation
1108
+ command.request_object = google_cloud_dialogflow_v2_context_object
1109
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context::Representation
1110
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context
1111
+ command.params['name'] = name unless name.nil?
1112
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1113
+ command.query['fields'] = fields unless fields.nil?
1114
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1115
+ execute_or_queue_command(command, &block)
1116
+ end
1117
+
1118
+ # Creates a session entity type. If the specified session entity type already
1119
+ # exists, overrides the session entity type. This method doesn't work with
1120
+ # Google Assistant integration. Contact Dialogflow support if you need to use
1121
+ # session entities with Google Assistant integration.
1122
+ # @param [String] parent
1123
+ # Required. The session to create a session entity type for. Format: `projects//
1124
+ # agent/sessions/` or `projects//agent/environments//users// sessions/`. If `
1125
+ # Environment ID` is not specified, we assume default 'draft' environment. If `
1126
+ # User ID` is not specified, we assume default '-' user.
1127
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType] google_cloud_dialogflow_v2_session_entity_type_object
1128
+ # @param [String] fields
1129
+ # Selector specifying which fields to include in a partial response.
1130
+ # @param [String] quota_user
1131
+ # Available to use for quota purposes for server-side applications. Can be any
1132
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1133
+ # @param [Google::Apis::RequestOptions] options
1134
+ # Request-specific options
1135
+ #
1136
+ # @yield [result, err] Result & error if block supplied
1137
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType] parsed result object
1138
+ # @yieldparam err [StandardError] error object if request failed
1139
+ #
1140
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType]
1141
+ #
1142
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1143
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1144
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1145
+ def create_project_agent_environment_user_session_entity_type(parent, google_cloud_dialogflow_v2_session_entity_type_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1146
+ command = make_simple_command(:post, 'v2/{+parent}/entityTypes', options)
1147
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType::Representation
1148
+ command.request_object = google_cloud_dialogflow_v2_session_entity_type_object
1149
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType::Representation
1150
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType
1151
+ command.params['parent'] = parent unless parent.nil?
1152
+ command.query['fields'] = fields unless fields.nil?
1153
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1154
+ execute_or_queue_command(command, &block)
1155
+ end
1156
+
1157
+ # Deletes the specified session entity type. This method doesn't work with
1158
+ # Google Assistant integration. Contact Dialogflow support if you need to use
1159
+ # session entities with Google Assistant integration.
1160
+ # @param [String] name
1161
+ # Required. The name of the entity type to delete. Format: `projects//agent/
1162
+ # sessions//entityTypes/` or `projects//agent/environments//users//sessions//
1163
+ # entityTypes/`. If `Environment ID` is not specified, we assume default 'draft'
1164
+ # environment. If `User ID` is not specified, we assume default '-' user.
1165
+ # @param [String] fields
1166
+ # Selector specifying which fields to include in a partial response.
1167
+ # @param [String] quota_user
1168
+ # Available to use for quota purposes for server-side applications. Can be any
1169
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1170
+ # @param [Google::Apis::RequestOptions] options
1171
+ # Request-specific options
1172
+ #
1173
+ # @yield [result, err] Result & error if block supplied
1174
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleProtobufEmpty] parsed result object
1175
+ # @yieldparam err [StandardError] error object if request failed
1176
+ #
1177
+ # @return [Google::Apis::DialogflowV2::GoogleProtobufEmpty]
1178
+ #
1179
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1180
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1181
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1182
+ def delete_project_agent_environment_user_session_entity_type(name, fields: nil, quota_user: nil, options: nil, &block)
1183
+ command = make_simple_command(:delete, 'v2/{+name}', options)
1184
+ command.response_representation = Google::Apis::DialogflowV2::GoogleProtobufEmpty::Representation
1185
+ command.response_class = Google::Apis::DialogflowV2::GoogleProtobufEmpty
1186
+ command.params['name'] = name unless name.nil?
1187
+ command.query['fields'] = fields unless fields.nil?
1188
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1189
+ execute_or_queue_command(command, &block)
1190
+ end
1191
+
1192
+ # Retrieves the specified session entity type. This method doesn't work with
1193
+ # Google Assistant integration. Contact Dialogflow support if you need to use
1194
+ # session entities with Google Assistant integration.
1195
+ # @param [String] name
1196
+ # Required. The name of the session entity type. Format: `projects//agent/
1197
+ # sessions//entityTypes/` or `projects//agent/environments//users//sessions//
1198
+ # entityTypes/`. If `Environment ID` is not specified, we assume default 'draft'
1199
+ # environment. If `User ID` is not specified, we assume default '-' user.
1200
+ # @param [String] fields
1201
+ # Selector specifying which fields to include in a partial response.
1202
+ # @param [String] quota_user
1203
+ # Available to use for quota purposes for server-side applications. Can be any
1204
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1205
+ # @param [Google::Apis::RequestOptions] options
1206
+ # Request-specific options
1207
+ #
1208
+ # @yield [result, err] Result & error if block supplied
1209
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType] parsed result object
1210
+ # @yieldparam err [StandardError] error object if request failed
1211
+ #
1212
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType]
1213
+ #
1214
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1215
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1216
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1217
+ def get_project_agent_environment_user_session_entity_type(name, fields: nil, quota_user: nil, options: nil, &block)
1218
+ command = make_simple_command(:get, 'v2/{+name}', options)
1219
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType::Representation
1220
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType
1221
+ command.params['name'] = name unless name.nil?
1222
+ command.query['fields'] = fields unless fields.nil?
1223
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1224
+ execute_or_queue_command(command, &block)
1225
+ end
1226
+
1227
+ # Returns the list of all session entity types in the specified session. This
1228
+ # method doesn't work with Google Assistant integration. Contact Dialogflow
1229
+ # support if you need to use session entities with Google Assistant integration.
1230
+ # @param [String] parent
1231
+ # Required. The session to list all session entity types from. Format: `projects/
1232
+ # /agent/sessions/` or `projects//agent/environments//users// sessions/`. If `
1233
+ # Environment ID` is not specified, we assume default 'draft' environment. If `
1234
+ # User ID` is not specified, we assume default '-' user.
1235
+ # @param [Fixnum] page_size
1236
+ # Optional. The maximum number of items to return in a single page. By default
1237
+ # 100 and at most 1000.
1238
+ # @param [String] page_token
1239
+ # Optional. The next_page_token value returned from a previous list request.
1240
+ # @param [String] fields
1241
+ # Selector specifying which fields to include in a partial response.
1242
+ # @param [String] quota_user
1243
+ # Available to use for quota purposes for server-side applications. Can be any
1244
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1245
+ # @param [Google::Apis::RequestOptions] options
1246
+ # Request-specific options
1247
+ #
1248
+ # @yield [result, err] Result & error if block supplied
1249
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListSessionEntityTypesResponse] parsed result object
1250
+ # @yieldparam err [StandardError] error object if request failed
1251
+ #
1252
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListSessionEntityTypesResponse]
1253
+ #
1254
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1255
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1256
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1257
+ def list_project_agent_environment_user_session_entity_types(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1258
+ command = make_simple_command(:get, 'v2/{+parent}/entityTypes', options)
1259
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListSessionEntityTypesResponse::Representation
1260
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListSessionEntityTypesResponse
1261
+ command.params['parent'] = parent unless parent.nil?
1262
+ command.query['pageSize'] = page_size unless page_size.nil?
1263
+ command.query['pageToken'] = page_token unless page_token.nil?
1264
+ command.query['fields'] = fields unless fields.nil?
1265
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1266
+ execute_or_queue_command(command, &block)
1267
+ end
1268
+
1269
+ # Updates the specified session entity type. This method doesn't work with
1270
+ # Google Assistant integration. Contact Dialogflow support if you need to use
1271
+ # session entities with Google Assistant integration.
1272
+ # @param [String] name
1273
+ # Required. The unique identifier of this session entity type. Format: `projects/
1274
+ # /agent/sessions//entityTypes/`, or `projects//agent/environments//users//
1275
+ # sessions//entityTypes/`. If `Environment ID` is not specified, we assume
1276
+ # default 'draft' environment. If `User ID` is not specified, we assume default '
1277
+ # -' user. `` must be the display name of an existing entity type in the same
1278
+ # agent that will be overridden or supplemented.
1279
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType] google_cloud_dialogflow_v2_session_entity_type_object
1280
+ # @param [String] update_mask
1281
+ # Optional. The mask to control which fields get updated.
1282
+ # @param [String] fields
1283
+ # Selector specifying which fields to include in a partial response.
1284
+ # @param [String] quota_user
1285
+ # Available to use for quota purposes for server-side applications. Can be any
1286
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1287
+ # @param [Google::Apis::RequestOptions] options
1288
+ # Request-specific options
1289
+ #
1290
+ # @yield [result, err] Result & error if block supplied
1291
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType] parsed result object
1292
+ # @yieldparam err [StandardError] error object if request failed
1293
+ #
1294
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType]
1295
+ #
1296
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1297
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1298
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1299
+ def patch_project_agent_environment_user_session_entity_type(name, google_cloud_dialogflow_v2_session_entity_type_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1300
+ command = make_simple_command(:patch, 'v2/{+name}', options)
1301
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType::Representation
1302
+ command.request_object = google_cloud_dialogflow_v2_session_entity_type_object
1303
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType::Representation
1304
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType
1305
+ command.params['name'] = name unless name.nil?
1306
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1307
+ command.query['fields'] = fields unless fields.nil?
1308
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1309
+ execute_or_queue_command(command, &block)
1310
+ end
1311
+
1312
+ # Deletes intents in the specified agent. Operation
1313
+ # @param [String] parent
1314
+ # Required. The name of the agent to delete all entities types for. Format: `
1315
+ # projects//agent`.
1316
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2BatchDeleteIntentsRequest] google_cloud_dialogflow_v2_batch_delete_intents_request_object
1317
+ # @param [String] fields
1318
+ # Selector specifying which fields to include in a partial response.
1319
+ # @param [String] quota_user
1320
+ # Available to use for quota purposes for server-side applications. Can be any
1321
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1322
+ # @param [Google::Apis::RequestOptions] options
1323
+ # Request-specific options
1324
+ #
1325
+ # @yield [result, err] Result & error if block supplied
1326
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleLongrunningOperation] parsed result object
1327
+ # @yieldparam err [StandardError] error object if request failed
1328
+ #
1329
+ # @return [Google::Apis::DialogflowV2::GoogleLongrunningOperation]
1330
+ #
1331
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1332
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1333
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1334
+ def batch_project_agent_intent_delete(parent, google_cloud_dialogflow_v2_batch_delete_intents_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1335
+ command = make_simple_command(:post, 'v2/{+parent}/intents:batchDelete', options)
1336
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2BatchDeleteIntentsRequest::Representation
1337
+ command.request_object = google_cloud_dialogflow_v2_batch_delete_intents_request_object
1338
+ command.response_representation = Google::Apis::DialogflowV2::GoogleLongrunningOperation::Representation
1339
+ command.response_class = Google::Apis::DialogflowV2::GoogleLongrunningOperation
1340
+ command.params['parent'] = parent unless parent.nil?
1341
+ command.query['fields'] = fields unless fields.nil?
1342
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1343
+ execute_or_queue_command(command, &block)
1344
+ end
1345
+
1346
+ # Updates/Creates multiple intents in the specified agent. Operation
1347
+ # @param [String] parent
1348
+ # Required. The name of the agent to update or create intents in. Format: `
1349
+ # projects//agent`.
1350
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2BatchUpdateIntentsRequest] google_cloud_dialogflow_v2_batch_update_intents_request_object
1351
+ # @param [String] fields
1352
+ # Selector specifying which fields to include in a partial response.
1353
+ # @param [String] quota_user
1354
+ # Available to use for quota purposes for server-side applications. Can be any
1355
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1356
+ # @param [Google::Apis::RequestOptions] options
1357
+ # Request-specific options
1358
+ #
1359
+ # @yield [result, err] Result & error if block supplied
1360
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleLongrunningOperation] parsed result object
1361
+ # @yieldparam err [StandardError] error object if request failed
1362
+ #
1363
+ # @return [Google::Apis::DialogflowV2::GoogleLongrunningOperation]
1364
+ #
1365
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1366
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1367
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1368
+ def batch_project_agent_intent_update(parent, google_cloud_dialogflow_v2_batch_update_intents_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1369
+ command = make_simple_command(:post, 'v2/{+parent}/intents:batchUpdate', options)
1370
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2BatchUpdateIntentsRequest::Representation
1371
+ command.request_object = google_cloud_dialogflow_v2_batch_update_intents_request_object
1372
+ command.response_representation = Google::Apis::DialogflowV2::GoogleLongrunningOperation::Representation
1373
+ command.response_class = Google::Apis::DialogflowV2::GoogleLongrunningOperation
1374
+ command.params['parent'] = parent unless parent.nil?
1375
+ command.query['fields'] = fields unless fields.nil?
1376
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1377
+ execute_or_queue_command(command, &block)
1378
+ end
1379
+
1380
+ # Creates an intent in the specified agent.
1381
+ # @param [String] parent
1382
+ # Required. The agent to create a intent for. Format: `projects//agent`.
1383
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Intent] google_cloud_dialogflow_v2_intent_object
1384
+ # @param [String] intent_view
1385
+ # Optional. The resource view to apply to the returned intent.
1386
+ # @param [String] language_code
1387
+ # Optional. The language used to access language-specific data. If not specified,
1388
+ # the agent's default language is used. For more information, see [Multilingual
1389
+ # intent and entity data](https://cloud.google.com/dialogflow/docs/agents-
1390
+ # multilingual#intent-entity).
1391
+ # @param [String] fields
1392
+ # Selector specifying which fields to include in a partial response.
1393
+ # @param [String] quota_user
1394
+ # Available to use for quota purposes for server-side applications. Can be any
1395
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1396
+ # @param [Google::Apis::RequestOptions] options
1397
+ # Request-specific options
1398
+ #
1399
+ # @yield [result, err] Result & error if block supplied
1400
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Intent] parsed result object
1401
+ # @yieldparam err [StandardError] error object if request failed
1402
+ #
1403
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Intent]
1404
+ #
1405
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1406
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1407
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1408
+ def create_project_agent_intent(parent, google_cloud_dialogflow_v2_intent_object = nil, intent_view: nil, language_code: nil, fields: nil, quota_user: nil, options: nil, &block)
1409
+ command = make_simple_command(:post, 'v2/{+parent}/intents', options)
1410
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Intent::Representation
1411
+ command.request_object = google_cloud_dialogflow_v2_intent_object
1412
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Intent::Representation
1413
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Intent
1414
+ command.params['parent'] = parent unless parent.nil?
1415
+ command.query['intentView'] = intent_view unless intent_view.nil?
1416
+ command.query['languageCode'] = language_code unless language_code.nil?
1417
+ command.query['fields'] = fields unless fields.nil?
1418
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1419
+ execute_or_queue_command(command, &block)
1420
+ end
1421
+
1422
+ # Deletes the specified intent and its direct or indirect followup intents.
1423
+ # @param [String] name
1424
+ # Required. The name of the intent to delete. If this intent has direct or
1425
+ # indirect followup intents, we also delete them. Format: `projects//agent/
1426
+ # intents/`.
1427
+ # @param [String] fields
1428
+ # Selector specifying which fields to include in a partial response.
1429
+ # @param [String] quota_user
1430
+ # Available to use for quota purposes for server-side applications. Can be any
1431
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1432
+ # @param [Google::Apis::RequestOptions] options
1433
+ # Request-specific options
1434
+ #
1435
+ # @yield [result, err] Result & error if block supplied
1436
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleProtobufEmpty] parsed result object
1437
+ # @yieldparam err [StandardError] error object if request failed
1438
+ #
1439
+ # @return [Google::Apis::DialogflowV2::GoogleProtobufEmpty]
1440
+ #
1441
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1442
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1443
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1444
+ def delete_project_agent_intent(name, fields: nil, quota_user: nil, options: nil, &block)
1445
+ command = make_simple_command(:delete, 'v2/{+name}', options)
1446
+ command.response_representation = Google::Apis::DialogflowV2::GoogleProtobufEmpty::Representation
1447
+ command.response_class = Google::Apis::DialogflowV2::GoogleProtobufEmpty
1448
+ command.params['name'] = name unless name.nil?
1449
+ command.query['fields'] = fields unless fields.nil?
1450
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1451
+ execute_or_queue_command(command, &block)
1452
+ end
1453
+
1454
+ # Retrieves the specified intent.
1455
+ # @param [String] name
1456
+ # Required. The name of the intent. Format: `projects//agent/intents/`.
1457
+ # @param [String] intent_view
1458
+ # Optional. The resource view to apply to the returned intent.
1459
+ # @param [String] language_code
1460
+ # Optional. The language used to access language-specific data. If not specified,
1461
+ # the agent's default language is used. For more information, see [Multilingual
1462
+ # intent and entity data](https://cloud.google.com/dialogflow/docs/agents-
1463
+ # multilingual#intent-entity).
1464
+ # @param [String] fields
1465
+ # Selector specifying which fields to include in a partial response.
1466
+ # @param [String] quota_user
1467
+ # Available to use for quota purposes for server-side applications. Can be any
1468
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1469
+ # @param [Google::Apis::RequestOptions] options
1470
+ # Request-specific options
1471
+ #
1472
+ # @yield [result, err] Result & error if block supplied
1473
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Intent] parsed result object
1474
+ # @yieldparam err [StandardError] error object if request failed
1475
+ #
1476
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Intent]
1477
+ #
1478
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1479
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1480
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1481
+ def get_project_agent_intent(name, intent_view: nil, language_code: nil, fields: nil, quota_user: nil, options: nil, &block)
1482
+ command = make_simple_command(:get, 'v2/{+name}', options)
1483
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Intent::Representation
1484
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Intent
1485
+ command.params['name'] = name unless name.nil?
1486
+ command.query['intentView'] = intent_view unless intent_view.nil?
1487
+ command.query['languageCode'] = language_code unless language_code.nil?
1488
+ command.query['fields'] = fields unless fields.nil?
1489
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1490
+ execute_or_queue_command(command, &block)
1491
+ end
1492
+
1493
+ # Returns the list of all intents in the specified agent.
1494
+ # @param [String] parent
1495
+ # Required. The agent to list all intents from. Format: `projects//agent`.
1496
+ # @param [String] intent_view
1497
+ # Optional. The resource view to apply to the returned intent.
1498
+ # @param [String] language_code
1499
+ # Optional. The language used to access language-specific data. If not specified,
1500
+ # the agent's default language is used. For more information, see [Multilingual
1501
+ # intent and entity data](https://cloud.google.com/dialogflow/docs/agents-
1502
+ # multilingual#intent-entity).
1503
+ # @param [Fixnum] page_size
1504
+ # Optional. The maximum number of items to return in a single page. By default
1505
+ # 100 and at most 1000.
1506
+ # @param [String] page_token
1507
+ # Optional. The next_page_token value returned from a previous list request.
1508
+ # @param [String] fields
1509
+ # Selector specifying which fields to include in a partial response.
1510
+ # @param [String] quota_user
1511
+ # Available to use for quota purposes for server-side applications. Can be any
1512
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1513
+ # @param [Google::Apis::RequestOptions] options
1514
+ # Request-specific options
1515
+ #
1516
+ # @yield [result, err] Result & error if block supplied
1517
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListIntentsResponse] parsed result object
1518
+ # @yieldparam err [StandardError] error object if request failed
1519
+ #
1520
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListIntentsResponse]
1521
+ #
1522
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1523
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1524
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1525
+ 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)
1526
+ command = make_simple_command(:get, 'v2/{+parent}/intents', options)
1527
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListIntentsResponse::Representation
1528
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListIntentsResponse
1529
+ command.params['parent'] = parent unless parent.nil?
1530
+ command.query['intentView'] = intent_view unless intent_view.nil?
1531
+ command.query['languageCode'] = language_code unless language_code.nil?
1532
+ command.query['pageSize'] = page_size unless page_size.nil?
1533
+ command.query['pageToken'] = page_token unless page_token.nil?
1534
+ command.query['fields'] = fields unless fields.nil?
1535
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1536
+ execute_or_queue_command(command, &block)
1537
+ end
1538
+
1539
+ # Updates the specified intent.
1540
+ # @param [String] name
1541
+ # Optional. The unique identifier of this intent. Required for Intents.
1542
+ # UpdateIntent and Intents.BatchUpdateIntents methods. Format: `projects//agent/
1543
+ # intents/`.
1544
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Intent] google_cloud_dialogflow_v2_intent_object
1545
+ # @param [String] intent_view
1546
+ # Optional. The resource view to apply to the returned intent.
1547
+ # @param [String] language_code
1548
+ # Optional. The language used to access language-specific data. If not specified,
1549
+ # the agent's default language is used. For more information, see [Multilingual
1550
+ # intent and entity data](https://cloud.google.com/dialogflow/docs/agents-
1551
+ # multilingual#intent-entity).
1552
+ # @param [String] update_mask
1553
+ # Optional. The mask to control which fields get updated.
1554
+ # @param [String] fields
1555
+ # Selector specifying which fields to include in a partial response.
1556
+ # @param [String] quota_user
1557
+ # Available to use for quota purposes for server-side applications. Can be any
1558
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1559
+ # @param [Google::Apis::RequestOptions] options
1560
+ # Request-specific options
1561
+ #
1562
+ # @yield [result, err] Result & error if block supplied
1563
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Intent] parsed result object
1564
+ # @yieldparam err [StandardError] error object if request failed
1565
+ #
1566
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Intent]
1567
+ #
1568
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1569
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1570
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1571
+ def patch_project_agent_intent(name, google_cloud_dialogflow_v2_intent_object = nil, intent_view: nil, language_code: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1572
+ command = make_simple_command(:patch, 'v2/{+name}', options)
1573
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Intent::Representation
1574
+ command.request_object = google_cloud_dialogflow_v2_intent_object
1575
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Intent::Representation
1576
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Intent
1577
+ command.params['name'] = name unless name.nil?
1578
+ command.query['intentView'] = intent_view unless intent_view.nil?
1579
+ command.query['languageCode'] = language_code unless language_code.nil?
1580
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1581
+ command.query['fields'] = fields unless fields.nil?
1582
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1583
+ execute_or_queue_command(command, &block)
1584
+ end
1585
+
1586
+ # Deletes all active contexts in the specified session.
1587
+ # @param [String] parent
1588
+ # Required. The name of the session to delete all contexts from. Format: `
1589
+ # projects//agent/sessions/` or `projects//agent/environments//users//sessions/`.
1590
+ # If `Environment ID` is not specified we assume default 'draft' environment.
1591
+ # If `User ID` is not specified, we assume default '-' user.
1592
+ # @param [String] fields
1593
+ # Selector specifying which fields to include in a partial response.
1594
+ # @param [String] quota_user
1595
+ # Available to use for quota purposes for server-side applications. Can be any
1596
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1597
+ # @param [Google::Apis::RequestOptions] options
1598
+ # Request-specific options
1599
+ #
1600
+ # @yield [result, err] Result & error if block supplied
1601
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleProtobufEmpty] parsed result object
1602
+ # @yieldparam err [StandardError] error object if request failed
1603
+ #
1604
+ # @return [Google::Apis::DialogflowV2::GoogleProtobufEmpty]
1605
+ #
1606
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1607
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1608
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1609
+ def delete_project_agent_session_contexts(parent, fields: nil, quota_user: nil, options: nil, &block)
1610
+ command = make_simple_command(:delete, 'v2/{+parent}/contexts', options)
1611
+ command.response_representation = Google::Apis::DialogflowV2::GoogleProtobufEmpty::Representation
1612
+ command.response_class = Google::Apis::DialogflowV2::GoogleProtobufEmpty
1613
+ command.params['parent'] = parent unless parent.nil?
1614
+ command.query['fields'] = fields unless fields.nil?
1615
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1616
+ execute_or_queue_command(command, &block)
1617
+ end
1618
+
1619
+ # Processes a natural language query and returns structured, actionable data as
1620
+ # a result. This method is not idempotent, because it may cause contexts and
1621
+ # session entity types to be updated, which in turn might affect results of
1622
+ # future queries. Note: Always use agent versions for production traffic. See [
1623
+ # Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-
1624
+ # versions).
1625
+ # @param [String] session
1626
+ # Required. The name of the session this query is sent to. Format: `projects//
1627
+ # agent/sessions/`, or `projects//agent/environments//users//sessions/`. If `
1628
+ # Environment ID` is not specified, we assume default 'draft' environment. If `
1629
+ # User ID` is not specified, we are using "-". It's up to the API caller to
1630
+ # choose an appropriate `Session ID` and `User Id`. They can be a random number
1631
+ # or some type of user and session identifiers (preferably hashed). The length
1632
+ # of the `Session ID` and `User ID` must not exceed 36 characters. For more
1633
+ # information, see the [API interactions guide](https://cloud.google.com/
1634
+ # dialogflow/docs/api-overview). Note: Always use agent versions for production
1635
+ # traffic. See [Versions and environments](https://cloud.google.com/dialogflow/
1636
+ # es/docs/agents-versions).
1637
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2DetectIntentRequest] google_cloud_dialogflow_v2_detect_intent_request_object
1638
+ # @param [String] fields
1639
+ # Selector specifying which fields to include in a partial response.
1640
+ # @param [String] quota_user
1641
+ # Available to use for quota purposes for server-side applications. Can be any
1642
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1643
+ # @param [Google::Apis::RequestOptions] options
1644
+ # Request-specific options
1645
+ #
1646
+ # @yield [result, err] Result & error if block supplied
1647
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2DetectIntentResponse] parsed result object
1648
+ # @yieldparam err [StandardError] error object if request failed
1649
+ #
1650
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2DetectIntentResponse]
1651
+ #
1652
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1653
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1654
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1655
+ def detect_project_agent_session_intent(session, google_cloud_dialogflow_v2_detect_intent_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1656
+ command = make_simple_command(:post, 'v2/{+session}:detectIntent', options)
1657
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2DetectIntentRequest::Representation
1658
+ command.request_object = google_cloud_dialogflow_v2_detect_intent_request_object
1659
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2DetectIntentResponse::Representation
1660
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2DetectIntentResponse
1661
+ command.params['session'] = session unless session.nil?
1662
+ command.query['fields'] = fields unless fields.nil?
1663
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1664
+ execute_or_queue_command(command, &block)
1665
+ end
1666
+
1667
+ # Creates a context. If the specified context already exists, overrides the
1668
+ # context.
1669
+ # @param [String] parent
1670
+ # Required. The session to create a context for. Format: `projects//agent/
1671
+ # sessions/` or `projects//agent/environments//users//sessions/`. If `
1672
+ # Environment ID` is not specified, we assume default 'draft' environment. If `
1673
+ # User ID` is not specified, we assume default '-' user.
1674
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context] google_cloud_dialogflow_v2_context_object
1675
+ # @param [String] fields
1676
+ # Selector specifying which fields to include in a partial response.
1677
+ # @param [String] quota_user
1678
+ # Available to use for quota purposes for server-side applications. Can be any
1679
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1680
+ # @param [Google::Apis::RequestOptions] options
1681
+ # Request-specific options
1682
+ #
1683
+ # @yield [result, err] Result & error if block supplied
1684
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context] parsed result object
1685
+ # @yieldparam err [StandardError] error object if request failed
1686
+ #
1687
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context]
1688
+ #
1689
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1690
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1691
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1692
+ def create_project_agent_session_context(parent, google_cloud_dialogflow_v2_context_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1693
+ command = make_simple_command(:post, 'v2/{+parent}/contexts', options)
1694
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context::Representation
1695
+ command.request_object = google_cloud_dialogflow_v2_context_object
1696
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context::Representation
1697
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context
1698
+ command.params['parent'] = parent unless parent.nil?
1699
+ command.query['fields'] = fields unless fields.nil?
1700
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1701
+ execute_or_queue_command(command, &block)
1702
+ end
1703
+
1704
+ # Deletes the specified context.
1705
+ # @param [String] name
1706
+ # Required. The name of the context to delete. Format: `projects//agent/sessions/
1707
+ # /contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `
1708
+ # Environment ID` is not specified, we assume default 'draft' environment. If `
1709
+ # User ID` is not specified, we assume default '-' user.
1710
+ # @param [String] fields
1711
+ # Selector specifying which fields to include in a partial response.
1712
+ # @param [String] quota_user
1713
+ # Available to use for quota purposes for server-side applications. Can be any
1714
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1715
+ # @param [Google::Apis::RequestOptions] options
1716
+ # Request-specific options
1717
+ #
1718
+ # @yield [result, err] Result & error if block supplied
1719
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleProtobufEmpty] parsed result object
1720
+ # @yieldparam err [StandardError] error object if request failed
1721
+ #
1722
+ # @return [Google::Apis::DialogflowV2::GoogleProtobufEmpty]
1723
+ #
1724
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1725
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1726
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1727
+ def delete_project_agent_session_context(name, fields: nil, quota_user: nil, options: nil, &block)
1728
+ command = make_simple_command(:delete, 'v2/{+name}', options)
1729
+ command.response_representation = Google::Apis::DialogflowV2::GoogleProtobufEmpty::Representation
1730
+ command.response_class = Google::Apis::DialogflowV2::GoogleProtobufEmpty
1731
+ command.params['name'] = name unless name.nil?
1732
+ command.query['fields'] = fields unless fields.nil?
1733
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1734
+ execute_or_queue_command(command, &block)
1735
+ end
1736
+
1737
+ # Retrieves the specified context.
1738
+ # @param [String] name
1739
+ # Required. The name of the context. Format: `projects//agent/sessions//contexts/
1740
+ # ` or `projects//agent/environments//users//sessions//contexts/`. If `
1741
+ # Environment ID` is not specified, we assume default 'draft' environment. If `
1742
+ # User ID` is not specified, we assume default '-' user.
1743
+ # @param [String] fields
1744
+ # Selector specifying which fields to include in a partial response.
1745
+ # @param [String] quota_user
1746
+ # Available to use for quota purposes for server-side applications. Can be any
1747
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1748
+ # @param [Google::Apis::RequestOptions] options
1749
+ # Request-specific options
1750
+ #
1751
+ # @yield [result, err] Result & error if block supplied
1752
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context] parsed result object
1753
+ # @yieldparam err [StandardError] error object if request failed
1754
+ #
1755
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context]
1756
+ #
1757
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1758
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1759
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1760
+ def get_project_agent_session_context(name, fields: nil, quota_user: nil, options: nil, &block)
1761
+ command = make_simple_command(:get, 'v2/{+name}', options)
1762
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context::Representation
1763
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context
1764
+ command.params['name'] = name unless name.nil?
1765
+ command.query['fields'] = fields unless fields.nil?
1766
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1767
+ execute_or_queue_command(command, &block)
1768
+ end
1769
+
1770
+ # Returns the list of all contexts in the specified session.
1771
+ # @param [String] parent
1772
+ # Required. The session to list all contexts from. Format: `projects//agent/
1773
+ # sessions/` or `projects//agent/environments//users//sessions/`. If `
1774
+ # Environment ID` is not specified, we assume default 'draft' environment. If `
1775
+ # User ID` is not specified, we assume default '-' user.
1776
+ # @param [Fixnum] page_size
1777
+ # Optional. The maximum number of items to return in a single page. By default
1778
+ # 100 and at most 1000.
1779
+ # @param [String] page_token
1780
+ # Optional. The next_page_token value returned from a previous list request.
1781
+ # @param [String] fields
1782
+ # Selector specifying which fields to include in a partial response.
1783
+ # @param [String] quota_user
1784
+ # Available to use for quota purposes for server-side applications. Can be any
1785
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1786
+ # @param [Google::Apis::RequestOptions] options
1787
+ # Request-specific options
1788
+ #
1789
+ # @yield [result, err] Result & error if block supplied
1790
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListContextsResponse] parsed result object
1791
+ # @yieldparam err [StandardError] error object if request failed
1792
+ #
1793
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListContextsResponse]
1794
+ #
1795
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1796
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1797
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1798
+ def list_project_agent_session_contexts(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1799
+ command = make_simple_command(:get, 'v2/{+parent}/contexts', options)
1800
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListContextsResponse::Representation
1801
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListContextsResponse
1802
+ command.params['parent'] = parent unless parent.nil?
1803
+ command.query['pageSize'] = page_size unless page_size.nil?
1804
+ command.query['pageToken'] = page_token unless page_token.nil?
1805
+ command.query['fields'] = fields unless fields.nil?
1806
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1807
+ execute_or_queue_command(command, &block)
1808
+ end
1809
+
1810
+ # Updates the specified context.
1811
+ # @param [String] name
1812
+ # Required. The unique identifier of the context. Format: `projects//agent/
1813
+ # sessions//contexts/`, or `projects//agent/environments//users//sessions//
1814
+ # contexts/`. The `Context ID` is always converted to lowercase, may only
1815
+ # contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `
1816
+ # Environment ID` is not specified, we assume default 'draft' environment. If `
1817
+ # User ID` is not specified, we assume default '-' user. The following context
1818
+ # names are reserved for internal use by Dialogflow. You should not use these
1819
+ # contexts or create contexts with these names: * `__system_counters__` * `*
1820
+ # _id_dialog_context` * `*_dialog_params_size`
1821
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context] google_cloud_dialogflow_v2_context_object
1822
+ # @param [String] update_mask
1823
+ # Optional. The mask to control which fields get updated.
1824
+ # @param [String] fields
1825
+ # Selector specifying which fields to include in a partial response.
1826
+ # @param [String] quota_user
1827
+ # Available to use for quota purposes for server-side applications. Can be any
1828
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1829
+ # @param [Google::Apis::RequestOptions] options
1830
+ # Request-specific options
1831
+ #
1832
+ # @yield [result, err] Result & error if block supplied
1833
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context] parsed result object
1834
+ # @yieldparam err [StandardError] error object if request failed
1835
+ #
1836
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context]
1837
+ #
1838
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1839
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1840
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1841
+ def patch_project_agent_session_context(name, google_cloud_dialogflow_v2_context_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1842
+ command = make_simple_command(:patch, 'v2/{+name}', options)
1843
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context::Representation
1844
+ command.request_object = google_cloud_dialogflow_v2_context_object
1845
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context::Representation
1846
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context
1847
+ command.params['name'] = name unless name.nil?
1848
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1849
+ command.query['fields'] = fields unless fields.nil?
1850
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1851
+ execute_or_queue_command(command, &block)
1852
+ end
1853
+
1854
+ # Creates a session entity type. If the specified session entity type already
1855
+ # exists, overrides the session entity type. This method doesn't work with
1856
+ # Google Assistant integration. Contact Dialogflow support if you need to use
1857
+ # session entities with Google Assistant integration.
1858
+ # @param [String] parent
1859
+ # Required. The session to create a session entity type for. Format: `projects//
1860
+ # agent/sessions/` or `projects//agent/environments//users// sessions/`. If `
1861
+ # Environment ID` is not specified, we assume default 'draft' environment. If `
1862
+ # User ID` is not specified, we assume default '-' user.
1863
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType] google_cloud_dialogflow_v2_session_entity_type_object
1864
+ # @param [String] fields
1865
+ # Selector specifying which fields to include in a partial response.
1866
+ # @param [String] quota_user
1867
+ # Available to use for quota purposes for server-side applications. Can be any
1868
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1869
+ # @param [Google::Apis::RequestOptions] options
1870
+ # Request-specific options
1871
+ #
1872
+ # @yield [result, err] Result & error if block supplied
1873
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType] parsed result object
1874
+ # @yieldparam err [StandardError] error object if request failed
1875
+ #
1876
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType]
1877
+ #
1878
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1879
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1880
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1881
+ def create_project_agent_session_entity_type(parent, google_cloud_dialogflow_v2_session_entity_type_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1882
+ command = make_simple_command(:post, 'v2/{+parent}/entityTypes', options)
1883
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType::Representation
1884
+ command.request_object = google_cloud_dialogflow_v2_session_entity_type_object
1885
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType::Representation
1886
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType
1887
+ command.params['parent'] = parent unless parent.nil?
1888
+ command.query['fields'] = fields unless fields.nil?
1889
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1890
+ execute_or_queue_command(command, &block)
1891
+ end
1892
+
1893
+ # Deletes the specified session entity type. This method doesn't work with
1894
+ # Google Assistant integration. Contact Dialogflow support if you need to use
1895
+ # session entities with Google Assistant integration.
1896
+ # @param [String] name
1897
+ # Required. The name of the entity type to delete. Format: `projects//agent/
1898
+ # sessions//entityTypes/` or `projects//agent/environments//users//sessions//
1899
+ # entityTypes/`. If `Environment ID` is not specified, we assume default 'draft'
1900
+ # environment. If `User ID` is not specified, we assume default '-' user.
1901
+ # @param [String] fields
1902
+ # Selector specifying which fields to include in a partial response.
1903
+ # @param [String] quota_user
1904
+ # Available to use for quota purposes for server-side applications. Can be any
1905
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1906
+ # @param [Google::Apis::RequestOptions] options
1907
+ # Request-specific options
1908
+ #
1909
+ # @yield [result, err] Result & error if block supplied
1910
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleProtobufEmpty] parsed result object
1911
+ # @yieldparam err [StandardError] error object if request failed
1912
+ #
1913
+ # @return [Google::Apis::DialogflowV2::GoogleProtobufEmpty]
1914
+ #
1915
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1916
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1917
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1918
+ def delete_project_agent_session_entity_type(name, fields: nil, quota_user: nil, options: nil, &block)
1919
+ command = make_simple_command(:delete, 'v2/{+name}', options)
1920
+ command.response_representation = Google::Apis::DialogflowV2::GoogleProtobufEmpty::Representation
1921
+ command.response_class = Google::Apis::DialogflowV2::GoogleProtobufEmpty
1922
+ command.params['name'] = name unless name.nil?
1923
+ command.query['fields'] = fields unless fields.nil?
1924
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1925
+ execute_or_queue_command(command, &block)
1926
+ end
1927
+
1928
+ # Retrieves the specified session entity type. This method doesn't work with
1929
+ # Google Assistant integration. Contact Dialogflow support if you need to use
1930
+ # session entities with Google Assistant integration.
1931
+ # @param [String] name
1932
+ # Required. The name of the session entity type. Format: `projects//agent/
1933
+ # sessions//entityTypes/` or `projects//agent/environments//users//sessions//
1934
+ # entityTypes/`. If `Environment ID` is not specified, we assume default 'draft'
1935
+ # environment. If `User ID` is not specified, we assume default '-' user.
1936
+ # @param [String] fields
1937
+ # Selector specifying which fields to include in a partial response.
1938
+ # @param [String] quota_user
1939
+ # Available to use for quota purposes for server-side applications. Can be any
1940
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1941
+ # @param [Google::Apis::RequestOptions] options
1942
+ # Request-specific options
1943
+ #
1944
+ # @yield [result, err] Result & error if block supplied
1945
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType] parsed result object
1946
+ # @yieldparam err [StandardError] error object if request failed
1947
+ #
1948
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType]
1949
+ #
1950
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1951
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1952
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1953
+ def get_project_agent_session_entity_type(name, fields: nil, quota_user: nil, options: nil, &block)
1954
+ command = make_simple_command(:get, 'v2/{+name}', options)
1955
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType::Representation
1956
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType
1957
+ command.params['name'] = name unless name.nil?
1958
+ command.query['fields'] = fields unless fields.nil?
1959
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1960
+ execute_or_queue_command(command, &block)
1961
+ end
1962
+
1963
+ # Returns the list of all session entity types in the specified session. This
1964
+ # method doesn't work with Google Assistant integration. Contact Dialogflow
1965
+ # support if you need to use session entities with Google Assistant integration.
1966
+ # @param [String] parent
1967
+ # Required. The session to list all session entity types from. Format: `projects/
1968
+ # /agent/sessions/` or `projects//agent/environments//users// sessions/`. If `
1969
+ # Environment ID` is not specified, we assume default 'draft' environment. If `
1970
+ # User ID` is not specified, we assume default '-' user.
1971
+ # @param [Fixnum] page_size
1972
+ # Optional. The maximum number of items to return in a single page. By default
1973
+ # 100 and at most 1000.
1974
+ # @param [String] page_token
1975
+ # Optional. The next_page_token value returned from a previous list request.
1976
+ # @param [String] fields
1977
+ # Selector specifying which fields to include in a partial response.
1978
+ # @param [String] quota_user
1979
+ # Available to use for quota purposes for server-side applications. Can be any
1980
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1981
+ # @param [Google::Apis::RequestOptions] options
1982
+ # Request-specific options
1983
+ #
1984
+ # @yield [result, err] Result & error if block supplied
1985
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListSessionEntityTypesResponse] parsed result object
1986
+ # @yieldparam err [StandardError] error object if request failed
1987
+ #
1988
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListSessionEntityTypesResponse]
1989
+ #
1990
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1991
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1992
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1993
+ def list_project_agent_session_entity_types(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1994
+ command = make_simple_command(:get, 'v2/{+parent}/entityTypes', options)
1995
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListSessionEntityTypesResponse::Representation
1996
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ListSessionEntityTypesResponse
1997
+ command.params['parent'] = parent unless parent.nil?
1998
+ command.query['pageSize'] = page_size unless page_size.nil?
1999
+ command.query['pageToken'] = page_token unless page_token.nil?
2000
+ command.query['fields'] = fields unless fields.nil?
2001
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2002
+ execute_or_queue_command(command, &block)
2003
+ end
2004
+
2005
+ # Updates the specified session entity type. This method doesn't work with
2006
+ # Google Assistant integration. Contact Dialogflow support if you need to use
2007
+ # session entities with Google Assistant integration.
2008
+ # @param [String] name
2009
+ # Required. The unique identifier of this session entity type. Format: `projects/
2010
+ # /agent/sessions//entityTypes/`, or `projects//agent/environments//users//
2011
+ # sessions//entityTypes/`. If `Environment ID` is not specified, we assume
2012
+ # default 'draft' environment. If `User ID` is not specified, we assume default '
2013
+ # -' user. `` must be the display name of an existing entity type in the same
2014
+ # agent that will be overridden or supplemented.
2015
+ # @param [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType] google_cloud_dialogflow_v2_session_entity_type_object
2016
+ # @param [String] update_mask
2017
+ # Optional. The mask to control which fields get updated.
2018
+ # @param [String] fields
2019
+ # Selector specifying which fields to include in a partial response.
2020
+ # @param [String] quota_user
2021
+ # Available to use for quota purposes for server-side applications. Can be any
2022
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2023
+ # @param [Google::Apis::RequestOptions] options
2024
+ # Request-specific options
2025
+ #
2026
+ # @yield [result, err] Result & error if block supplied
2027
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType] parsed result object
2028
+ # @yieldparam err [StandardError] error object if request failed
2029
+ #
2030
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType]
2031
+ #
2032
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2033
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2034
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2035
+ def patch_project_agent_session_entity_type(name, google_cloud_dialogflow_v2_session_entity_type_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
2036
+ command = make_simple_command(:patch, 'v2/{+name}', options)
2037
+ command.request_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType::Representation
2038
+ command.request_object = google_cloud_dialogflow_v2_session_entity_type_object
2039
+ command.response_representation = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType::Representation
2040
+ command.response_class = Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType
2041
+ command.params['name'] = name unless name.nil?
2042
+ command.query['updateMask'] = update_mask unless update_mask.nil?
2043
+ command.query['fields'] = fields unless fields.nil?
2044
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2045
+ execute_or_queue_command(command, &block)
2046
+ end
2047
+
2048
+ # Starts asynchronous cancellation on a long-running operation. The server makes
2049
+ # a best effort to cancel the operation, but success is not guaranteed. If the
2050
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
2051
+ # Clients can use Operations.GetOperation or other methods to check whether the
2052
+ # cancellation succeeded or whether the operation completed despite cancellation.
2053
+ # On successful cancellation, the operation is not deleted; instead, it becomes
2054
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
2055
+ # corresponding to `Code.CANCELLED`.
2056
+ # @param [String] name
2057
+ # The name of the operation resource to be cancelled.
2058
+ # @param [String] fields
2059
+ # Selector specifying which fields to include in a partial response.
2060
+ # @param [String] quota_user
2061
+ # Available to use for quota purposes for server-side applications. Can be any
2062
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2063
+ # @param [Google::Apis::RequestOptions] options
2064
+ # Request-specific options
2065
+ #
2066
+ # @yield [result, err] Result & error if block supplied
2067
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleProtobufEmpty] parsed result object
2068
+ # @yieldparam err [StandardError] error object if request failed
2069
+ #
2070
+ # @return [Google::Apis::DialogflowV2::GoogleProtobufEmpty]
2071
+ #
2072
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2073
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2074
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2075
+ def cancel_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
2076
+ command = make_simple_command(:post, 'v2/{+name}:cancel', options)
2077
+ command.response_representation = Google::Apis::DialogflowV2::GoogleProtobufEmpty::Representation
2078
+ command.response_class = Google::Apis::DialogflowV2::GoogleProtobufEmpty
2079
+ command.params['name'] = name unless name.nil?
2080
+ command.query['fields'] = fields unless fields.nil?
2081
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2082
+ execute_or_queue_command(command, &block)
2083
+ end
2084
+
2085
+ # Gets the latest state of a long-running operation. Clients can use this method
2086
+ # to poll the operation result at intervals as recommended by the API service.
2087
+ # @param [String] name
2088
+ # The name of the operation resource.
2089
+ # @param [String] fields
2090
+ # Selector specifying which fields to include in a partial response.
2091
+ # @param [String] quota_user
2092
+ # Available to use for quota purposes for server-side applications. Can be any
2093
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2094
+ # @param [Google::Apis::RequestOptions] options
2095
+ # Request-specific options
2096
+ #
2097
+ # @yield [result, err] Result & error if block supplied
2098
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleLongrunningOperation] parsed result object
2099
+ # @yieldparam err [StandardError] error object if request failed
2100
+ #
2101
+ # @return [Google::Apis::DialogflowV2::GoogleLongrunningOperation]
2102
+ #
2103
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2104
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2105
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2106
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
2107
+ command = make_simple_command(:get, 'v2/{+name}', options)
2108
+ command.response_representation = Google::Apis::DialogflowV2::GoogleLongrunningOperation::Representation
2109
+ command.response_class = Google::Apis::DialogflowV2::GoogleLongrunningOperation
2110
+ command.params['name'] = name unless name.nil?
2111
+ command.query['fields'] = fields unless fields.nil?
2112
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2113
+ execute_or_queue_command(command, &block)
2114
+ end
2115
+
2116
+ # Lists operations that match the specified filter in the request. If the server
2117
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
2118
+ # binding allows API services to override the binding to use different resource
2119
+ # name schemes, such as `users/*/operations`. To override the binding, API
2120
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
2121
+ # service configuration. For backwards compatibility, the default name includes
2122
+ # the operations collection id, however overriding users must ensure the name
2123
+ # binding is the parent resource, without the operations collection id.
2124
+ # @param [String] name
2125
+ # The name of the operation's parent resource.
2126
+ # @param [String] filter
2127
+ # The standard list filter.
2128
+ # @param [Fixnum] page_size
2129
+ # The standard list page size.
2130
+ # @param [String] page_token
2131
+ # The standard list page token.
2132
+ # @param [String] fields
2133
+ # Selector specifying which fields to include in a partial response.
2134
+ # @param [String] quota_user
2135
+ # Available to use for quota purposes for server-side applications. Can be any
2136
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2137
+ # @param [Google::Apis::RequestOptions] options
2138
+ # Request-specific options
2139
+ #
2140
+ # @yield [result, err] Result & error if block supplied
2141
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleLongrunningListOperationsResponse] parsed result object
2142
+ # @yieldparam err [StandardError] error object if request failed
2143
+ #
2144
+ # @return [Google::Apis::DialogflowV2::GoogleLongrunningListOperationsResponse]
2145
+ #
2146
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2147
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2148
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2149
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
2150
+ command = make_simple_command(:get, 'v2/{+name}/operations', options)
2151
+ command.response_representation = Google::Apis::DialogflowV2::GoogleLongrunningListOperationsResponse::Representation
2152
+ command.response_class = Google::Apis::DialogflowV2::GoogleLongrunningListOperationsResponse
2153
+ command.params['name'] = name unless name.nil?
2154
+ command.query['filter'] = filter unless filter.nil?
2155
+ command.query['pageSize'] = page_size unless page_size.nil?
2156
+ command.query['pageToken'] = page_token unless page_token.nil?
2157
+ command.query['fields'] = fields unless fields.nil?
2158
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2159
+ execute_or_queue_command(command, &block)
2160
+ end
2161
+
2162
+ # Starts asynchronous cancellation on a long-running operation. The server makes
2163
+ # a best effort to cancel the operation, but success is not guaranteed. If the
2164
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
2165
+ # Clients can use Operations.GetOperation or other methods to check whether the
2166
+ # cancellation succeeded or whether the operation completed despite cancellation.
2167
+ # On successful cancellation, the operation is not deleted; instead, it becomes
2168
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
2169
+ # corresponding to `Code.CANCELLED`.
2170
+ # @param [String] name
2171
+ # The name of the operation resource to be cancelled.
2172
+ # @param [String] fields
2173
+ # Selector specifying which fields to include in a partial response.
2174
+ # @param [String] quota_user
2175
+ # Available to use for quota purposes for server-side applications. Can be any
2176
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2177
+ # @param [Google::Apis::RequestOptions] options
2178
+ # Request-specific options
2179
+ #
2180
+ # @yield [result, err] Result & error if block supplied
2181
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleProtobufEmpty] parsed result object
2182
+ # @yieldparam err [StandardError] error object if request failed
2183
+ #
2184
+ # @return [Google::Apis::DialogflowV2::GoogleProtobufEmpty]
2185
+ #
2186
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2187
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2188
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2189
+ def cancel_project_operation(name, fields: nil, quota_user: nil, options: nil, &block)
2190
+ command = make_simple_command(:post, 'v2/{+name}:cancel', options)
2191
+ command.response_representation = Google::Apis::DialogflowV2::GoogleProtobufEmpty::Representation
2192
+ command.response_class = Google::Apis::DialogflowV2::GoogleProtobufEmpty
2193
+ command.params['name'] = name unless name.nil?
2194
+ command.query['fields'] = fields unless fields.nil?
2195
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2196
+ execute_or_queue_command(command, &block)
2197
+ end
2198
+
2199
+ # Gets the latest state of a long-running operation. Clients can use this method
2200
+ # to poll the operation result at intervals as recommended by the API service.
2201
+ # @param [String] name
2202
+ # The name of the operation resource.
2203
+ # @param [String] fields
2204
+ # Selector specifying which fields to include in a partial response.
2205
+ # @param [String] quota_user
2206
+ # Available to use for quota purposes for server-side applications. Can be any
2207
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2208
+ # @param [Google::Apis::RequestOptions] options
2209
+ # Request-specific options
2210
+ #
2211
+ # @yield [result, err] Result & error if block supplied
2212
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleLongrunningOperation] parsed result object
2213
+ # @yieldparam err [StandardError] error object if request failed
2214
+ #
2215
+ # @return [Google::Apis::DialogflowV2::GoogleLongrunningOperation]
2216
+ #
2217
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2218
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2219
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2220
+ def get_project_operation(name, fields: nil, quota_user: nil, options: nil, &block)
2221
+ command = make_simple_command(:get, 'v2/{+name}', options)
2222
+ command.response_representation = Google::Apis::DialogflowV2::GoogleLongrunningOperation::Representation
2223
+ command.response_class = Google::Apis::DialogflowV2::GoogleLongrunningOperation
2224
+ command.params['name'] = name unless name.nil?
2225
+ command.query['fields'] = fields unless fields.nil?
2226
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2227
+ execute_or_queue_command(command, &block)
2228
+ end
2229
+
2230
+ # Lists operations that match the specified filter in the request. If the server
2231
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
2232
+ # binding allows API services to override the binding to use different resource
2233
+ # name schemes, such as `users/*/operations`. To override the binding, API
2234
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
2235
+ # service configuration. For backwards compatibility, the default name includes
2236
+ # the operations collection id, however overriding users must ensure the name
2237
+ # binding is the parent resource, without the operations collection id.
2238
+ # @param [String] name
2239
+ # The name of the operation's parent resource.
2240
+ # @param [String] filter
2241
+ # The standard list filter.
2242
+ # @param [Fixnum] page_size
2243
+ # The standard list page size.
2244
+ # @param [String] page_token
2245
+ # The standard list page token.
2246
+ # @param [String] fields
2247
+ # Selector specifying which fields to include in a partial response.
2248
+ # @param [String] quota_user
2249
+ # Available to use for quota purposes for server-side applications. Can be any
2250
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2251
+ # @param [Google::Apis::RequestOptions] options
2252
+ # Request-specific options
2253
+ #
2254
+ # @yield [result, err] Result & error if block supplied
2255
+ # @yieldparam result [Google::Apis::DialogflowV2::GoogleLongrunningListOperationsResponse] parsed result object
2256
+ # @yieldparam err [StandardError] error object if request failed
2257
+ #
2258
+ # @return [Google::Apis::DialogflowV2::GoogleLongrunningListOperationsResponse]
2259
+ #
2260
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2261
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2262
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2263
+ def list_project_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
2264
+ command = make_simple_command(:get, 'v2/{+name}/operations', options)
2265
+ command.response_representation = Google::Apis::DialogflowV2::GoogleLongrunningListOperationsResponse::Representation
2266
+ command.response_class = Google::Apis::DialogflowV2::GoogleLongrunningListOperationsResponse
2267
+ command.params['name'] = name unless name.nil?
2268
+ command.query['filter'] = filter unless filter.nil?
2269
+ command.query['pageSize'] = page_size unless page_size.nil?
2270
+ command.query['pageToken'] = page_token unless page_token.nil?
2271
+ command.query['fields'] = fields unless fields.nil?
2272
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2273
+ execute_or_queue_command(command, &block)
2274
+ end
2275
+
2276
+ protected
2277
+
2278
+ def apply_command_defaults(command)
2279
+ command.query['key'] = key unless key.nil?
2280
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2281
+ end
2282
+ end
2283
+ end
2284
+ end
2285
+ end