google-cloud-dialogflow-v2 0.11.3 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/lib/google/cloud/dialogflow/v2/agents/client.rb +215 -27
- data/lib/google/cloud/dialogflow/v2/agents/operations.rb +115 -12
- data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +46 -6
- data/lib/google/cloud/dialogflow/v2/contexts/client.rb +126 -18
- data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +4 -0
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +106 -15
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb +19 -0
- data/lib/google/cloud/dialogflow/v2/conversations/client.rb +112 -15
- data/lib/google/cloud/dialogflow/v2/document_pb.rb +13 -0
- data/lib/google/cloud/dialogflow/v2/document_services_pb.rb +10 -0
- data/lib/google/cloud/dialogflow/v2/documents/client.rb +303 -20
- data/lib/google/cloud/dialogflow/v2/documents/operations.rb +115 -12
- data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +242 -30
- data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +115 -12
- data/lib/google/cloud/dialogflow/v2/environments/client.rb +132 -18
- data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +40 -6
- data/lib/google/cloud/dialogflow/v2/gcs_pb.rb +4 -0
- data/lib/google/cloud/dialogflow/v2/intents/client.rb +161 -21
- data/lib/google/cloud/dialogflow/v2/intents/operations.rb +115 -12
- data/lib/google/cloud/dialogflow/v2/knowledge_base_pb.rb +1 -0
- data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +134 -16
- data/lib/google/cloud/dialogflow/v2/participant_pb.rb +9 -0
- data/lib/google/cloud/dialogflow/v2/participants/client.rb +155 -24
- data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +106 -15
- data/lib/google/cloud/dialogflow/v2/session_pb.rb +1 -0
- data/lib/google/cloud/dialogflow/v2/sessions/client.rb +44 -3
- data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/versions/client.rb +106 -15
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/dialogflow/v2/agent.rb +4 -3
- data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +4 -1
- data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +28 -8
- data/proto_docs/google/cloud/dialogflow/v2/document.rb +53 -0
- data/proto_docs/google/cloud/dialogflow/v2/gcs.rb +39 -0
- data/proto_docs/google/cloud/dialogflow/v2/knowledge_base.rb +28 -0
- data/proto_docs/google/cloud/dialogflow/v2/participant.rb +69 -0
- data/proto_docs/google/cloud/dialogflow/v2/session.rb +38 -33
- metadata +4 -3
@@ -187,6 +187,27 @@ module Google
|
|
187
187
|
#
|
188
188
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
189
189
|
#
|
190
|
+
# @example Basic example
|
191
|
+
# require "google/cloud/dialogflow/v2"
|
192
|
+
#
|
193
|
+
# # Create a client object. The client can be reused for multiple calls.
|
194
|
+
# client = Google::Cloud::Dialogflow::V2::Environments::Client.new
|
195
|
+
#
|
196
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
197
|
+
# request = Google::Cloud::Dialogflow::V2::ListEnvironmentsRequest.new
|
198
|
+
#
|
199
|
+
# # Call the list_environments method.
|
200
|
+
# result = client.list_environments request
|
201
|
+
#
|
202
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
203
|
+
# # iterate over all elements by calling #each, and the enumerable
|
204
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
205
|
+
# # methods are also available for managing paging directly.
|
206
|
+
# result.each do |response|
|
207
|
+
# # Each element is of type ::Google::Cloud::Dialogflow::V2::Environment.
|
208
|
+
# p response
|
209
|
+
# end
|
210
|
+
#
|
190
211
|
def list_environments request, options = nil
|
191
212
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
192
213
|
|
@@ -204,9 +225,11 @@ module Google
|
|
204
225
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
205
226
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
206
227
|
|
207
|
-
header_params = {
|
208
|
-
|
209
|
-
|
228
|
+
header_params = {}
|
229
|
+
if request.parent
|
230
|
+
header_params["parent"] = request.parent
|
231
|
+
end
|
232
|
+
|
210
233
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
211
234
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
212
235
|
|
@@ -263,6 +286,21 @@ module Google
|
|
263
286
|
#
|
264
287
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
265
288
|
#
|
289
|
+
# @example Basic example
|
290
|
+
# require "google/cloud/dialogflow/v2"
|
291
|
+
#
|
292
|
+
# # Create a client object. The client can be reused for multiple calls.
|
293
|
+
# client = Google::Cloud::Dialogflow::V2::Environments::Client.new
|
294
|
+
#
|
295
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
296
|
+
# request = Google::Cloud::Dialogflow::V2::GetEnvironmentRequest.new
|
297
|
+
#
|
298
|
+
# # Call the get_environment method.
|
299
|
+
# result = client.get_environment request
|
300
|
+
#
|
301
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::Environment.
|
302
|
+
# p result
|
303
|
+
#
|
266
304
|
def get_environment request, options = nil
|
267
305
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
268
306
|
|
@@ -280,9 +318,11 @@ module Google
|
|
280
318
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
281
319
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
282
320
|
|
283
|
-
header_params = {
|
284
|
-
|
285
|
-
|
321
|
+
header_params = {}
|
322
|
+
if request.name
|
323
|
+
header_params["name"] = request.name
|
324
|
+
end
|
325
|
+
|
286
326
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
287
327
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
288
328
|
|
@@ -339,6 +379,21 @@ module Google
|
|
339
379
|
#
|
340
380
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
341
381
|
#
|
382
|
+
# @example Basic example
|
383
|
+
# require "google/cloud/dialogflow/v2"
|
384
|
+
#
|
385
|
+
# # Create a client object. The client can be reused for multiple calls.
|
386
|
+
# client = Google::Cloud::Dialogflow::V2::Environments::Client.new
|
387
|
+
#
|
388
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
389
|
+
# request = Google::Cloud::Dialogflow::V2::CreateEnvironmentRequest.new
|
390
|
+
#
|
391
|
+
# # Call the create_environment method.
|
392
|
+
# result = client.create_environment request
|
393
|
+
#
|
394
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::Environment.
|
395
|
+
# p result
|
396
|
+
#
|
342
397
|
def create_environment request, options = nil
|
343
398
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
344
399
|
|
@@ -356,9 +411,11 @@ module Google
|
|
356
411
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
357
412
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
358
413
|
|
359
|
-
header_params = {
|
360
|
-
|
361
|
-
|
414
|
+
header_params = {}
|
415
|
+
if request.parent
|
416
|
+
header_params["parent"] = request.parent
|
417
|
+
end
|
418
|
+
|
362
419
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
363
420
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
364
421
|
|
@@ -425,6 +482,21 @@ module Google
|
|
425
482
|
#
|
426
483
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
427
484
|
#
|
485
|
+
# @example Basic example
|
486
|
+
# require "google/cloud/dialogflow/v2"
|
487
|
+
#
|
488
|
+
# # Create a client object. The client can be reused for multiple calls.
|
489
|
+
# client = Google::Cloud::Dialogflow::V2::Environments::Client.new
|
490
|
+
#
|
491
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
492
|
+
# request = Google::Cloud::Dialogflow::V2::UpdateEnvironmentRequest.new
|
493
|
+
#
|
494
|
+
# # Call the update_environment method.
|
495
|
+
# result = client.update_environment request
|
496
|
+
#
|
497
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::Environment.
|
498
|
+
# p result
|
499
|
+
#
|
428
500
|
def update_environment request, options = nil
|
429
501
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
430
502
|
|
@@ -442,9 +514,11 @@ module Google
|
|
442
514
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
443
515
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
444
516
|
|
445
|
-
header_params = {
|
446
|
-
|
447
|
-
|
517
|
+
header_params = {}
|
518
|
+
if request.environment&.name
|
519
|
+
header_params["environment.name"] = request.environment.name
|
520
|
+
end
|
521
|
+
|
448
522
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
449
523
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
450
524
|
|
@@ -500,6 +574,21 @@ module Google
|
|
500
574
|
#
|
501
575
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
502
576
|
#
|
577
|
+
# @example Basic example
|
578
|
+
# require "google/cloud/dialogflow/v2"
|
579
|
+
#
|
580
|
+
# # Create a client object. The client can be reused for multiple calls.
|
581
|
+
# client = Google::Cloud::Dialogflow::V2::Environments::Client.new
|
582
|
+
#
|
583
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
584
|
+
# request = Google::Cloud::Dialogflow::V2::DeleteEnvironmentRequest.new
|
585
|
+
#
|
586
|
+
# # Call the delete_environment method.
|
587
|
+
# result = client.delete_environment request
|
588
|
+
#
|
589
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
590
|
+
# p result
|
591
|
+
#
|
503
592
|
def delete_environment request, options = nil
|
504
593
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
505
594
|
|
@@ -517,9 +606,11 @@ module Google
|
|
517
606
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
518
607
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
519
608
|
|
520
|
-
header_params = {
|
521
|
-
|
522
|
-
|
609
|
+
header_params = {}
|
610
|
+
if request.name
|
611
|
+
header_params["name"] = request.name
|
612
|
+
end
|
613
|
+
|
523
614
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
524
615
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
525
616
|
|
@@ -580,6 +671,27 @@ module Google
|
|
580
671
|
#
|
581
672
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
582
673
|
#
|
674
|
+
# @example Basic example
|
675
|
+
# require "google/cloud/dialogflow/v2"
|
676
|
+
#
|
677
|
+
# # Create a client object. The client can be reused for multiple calls.
|
678
|
+
# client = Google::Cloud::Dialogflow::V2::Environments::Client.new
|
679
|
+
#
|
680
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
681
|
+
# request = Google::Cloud::Dialogflow::V2::GetEnvironmentHistoryRequest.new
|
682
|
+
#
|
683
|
+
# # Call the get_environment_history method.
|
684
|
+
# result = client.get_environment_history request
|
685
|
+
#
|
686
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
687
|
+
# # iterate over all elements by calling #each, and the enumerable
|
688
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
689
|
+
# # methods are also available for managing paging directly.
|
690
|
+
# result.each do |response|
|
691
|
+
# # Each element is of type ::Google::Cloud::Dialogflow::V2::EnvironmentHistory::Entry.
|
692
|
+
# p response
|
693
|
+
# end
|
694
|
+
#
|
583
695
|
def get_environment_history request, options = nil
|
584
696
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
585
697
|
|
@@ -597,9 +709,11 @@ module Google
|
|
597
709
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
598
710
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
599
711
|
|
600
|
-
header_params = {
|
601
|
-
|
602
|
-
|
712
|
+
header_params = {}
|
713
|
+
if request.parent
|
714
|
+
header_params["parent"] = request.parent
|
715
|
+
end
|
716
|
+
|
603
717
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
604
718
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
605
719
|
|
@@ -179,6 +179,21 @@ module Google
|
|
179
179
|
#
|
180
180
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
181
181
|
#
|
182
|
+
# @example Basic example
|
183
|
+
# require "google/cloud/dialogflow/v2"
|
184
|
+
#
|
185
|
+
# # Create a client object. The client can be reused for multiple calls.
|
186
|
+
# client = Google::Cloud::Dialogflow::V2::Fulfillments::Client.new
|
187
|
+
#
|
188
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
189
|
+
# request = Google::Cloud::Dialogflow::V2::GetFulfillmentRequest.new
|
190
|
+
#
|
191
|
+
# # Call the get_fulfillment method.
|
192
|
+
# result = client.get_fulfillment request
|
193
|
+
#
|
194
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::Fulfillment.
|
195
|
+
# p result
|
196
|
+
#
|
182
197
|
def get_fulfillment request, options = nil
|
183
198
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
184
199
|
|
@@ -196,9 +211,11 @@ module Google
|
|
196
211
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
197
212
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
198
213
|
|
199
|
-
header_params = {
|
200
|
-
|
201
|
-
|
214
|
+
header_params = {}
|
215
|
+
if request.name
|
216
|
+
header_params["name"] = request.name
|
217
|
+
end
|
218
|
+
|
202
219
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
203
220
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
204
221
|
|
@@ -250,6 +267,21 @@ module Google
|
|
250
267
|
#
|
251
268
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
252
269
|
#
|
270
|
+
# @example Basic example
|
271
|
+
# require "google/cloud/dialogflow/v2"
|
272
|
+
#
|
273
|
+
# # Create a client object. The client can be reused for multiple calls.
|
274
|
+
# client = Google::Cloud::Dialogflow::V2::Fulfillments::Client.new
|
275
|
+
#
|
276
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
277
|
+
# request = Google::Cloud::Dialogflow::V2::UpdateFulfillmentRequest.new
|
278
|
+
#
|
279
|
+
# # Call the update_fulfillment method.
|
280
|
+
# result = client.update_fulfillment request
|
281
|
+
#
|
282
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::Fulfillment.
|
283
|
+
# p result
|
284
|
+
#
|
253
285
|
def update_fulfillment request, options = nil
|
254
286
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
255
287
|
|
@@ -267,9 +299,11 @@ module Google
|
|
267
299
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
268
300
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
269
301
|
|
270
|
-
header_params = {
|
271
|
-
|
272
|
-
|
302
|
+
header_params = {}
|
303
|
+
if request.fulfillment&.name
|
304
|
+
header_params["fulfillment.name"] = request.fulfillment.name
|
305
|
+
end
|
306
|
+
|
273
307
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
274
308
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
275
309
|
|
@@ -7,6 +7,9 @@ require 'google/protobuf'
|
|
7
7
|
|
8
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
9
|
add_file("google/cloud/dialogflow/v2/gcs.proto", :syntax => :proto3) do
|
10
|
+
add_message "google.cloud.dialogflow.v2.GcsDestination" do
|
11
|
+
optional :uri, :string, 1
|
12
|
+
end
|
10
13
|
end
|
11
14
|
end
|
12
15
|
|
@@ -14,6 +17,7 @@ module Google
|
|
14
17
|
module Cloud
|
15
18
|
module Dialogflow
|
16
19
|
module V2
|
20
|
+
GcsDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.GcsDestination").msgclass
|
17
21
|
end
|
18
22
|
end
|
19
23
|
end
|
@@ -140,6 +140,7 @@ module Google
|
|
140
140
|
|
141
141
|
@operations_client = Operations.new do |config|
|
142
142
|
config.credentials = credentials
|
143
|
+
config.quota_project = @quota_project_id
|
143
144
|
config.endpoint = @config.endpoint
|
144
145
|
end
|
145
146
|
|
@@ -212,6 +213,27 @@ module Google
|
|
212
213
|
#
|
213
214
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
214
215
|
#
|
216
|
+
# @example Basic example
|
217
|
+
# require "google/cloud/dialogflow/v2"
|
218
|
+
#
|
219
|
+
# # Create a client object. The client can be reused for multiple calls.
|
220
|
+
# client = Google::Cloud::Dialogflow::V2::Intents::Client.new
|
221
|
+
#
|
222
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
223
|
+
# request = Google::Cloud::Dialogflow::V2::ListIntentsRequest.new
|
224
|
+
#
|
225
|
+
# # Call the list_intents method.
|
226
|
+
# result = client.list_intents request
|
227
|
+
#
|
228
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
229
|
+
# # iterate over all elements by calling #each, and the enumerable
|
230
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
231
|
+
# # methods are also available for managing paging directly.
|
232
|
+
# result.each do |response|
|
233
|
+
# # Each element is of type ::Google::Cloud::Dialogflow::V2::Intent.
|
234
|
+
# p response
|
235
|
+
# end
|
236
|
+
#
|
215
237
|
def list_intents request, options = nil
|
216
238
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
217
239
|
|
@@ -229,9 +251,11 @@ module Google
|
|
229
251
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
230
252
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
231
253
|
|
232
|
-
header_params = {
|
233
|
-
|
234
|
-
|
254
|
+
header_params = {}
|
255
|
+
if request.parent
|
256
|
+
header_params["parent"] = request.parent
|
257
|
+
end
|
258
|
+
|
235
259
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
236
260
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
237
261
|
|
@@ -290,6 +314,21 @@ module Google
|
|
290
314
|
#
|
291
315
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
292
316
|
#
|
317
|
+
# @example Basic example
|
318
|
+
# require "google/cloud/dialogflow/v2"
|
319
|
+
#
|
320
|
+
# # Create a client object. The client can be reused for multiple calls.
|
321
|
+
# client = Google::Cloud::Dialogflow::V2::Intents::Client.new
|
322
|
+
#
|
323
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
324
|
+
# request = Google::Cloud::Dialogflow::V2::GetIntentRequest.new
|
325
|
+
#
|
326
|
+
# # Call the get_intent method.
|
327
|
+
# result = client.get_intent request
|
328
|
+
#
|
329
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::Intent.
|
330
|
+
# p result
|
331
|
+
#
|
293
332
|
def get_intent request, options = nil
|
294
333
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
295
334
|
|
@@ -307,9 +346,11 @@ module Google
|
|
307
346
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
308
347
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
309
348
|
|
310
|
-
header_params = {
|
311
|
-
|
312
|
-
|
349
|
+
header_params = {}
|
350
|
+
if request.name
|
351
|
+
header_params["name"] = request.name
|
352
|
+
end
|
353
|
+
|
313
354
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
314
355
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
315
356
|
|
@@ -373,6 +414,21 @@ module Google
|
|
373
414
|
#
|
374
415
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
375
416
|
#
|
417
|
+
# @example Basic example
|
418
|
+
# require "google/cloud/dialogflow/v2"
|
419
|
+
#
|
420
|
+
# # Create a client object. The client can be reused for multiple calls.
|
421
|
+
# client = Google::Cloud::Dialogflow::V2::Intents::Client.new
|
422
|
+
#
|
423
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
424
|
+
# request = Google::Cloud::Dialogflow::V2::CreateIntentRequest.new
|
425
|
+
#
|
426
|
+
# # Call the create_intent method.
|
427
|
+
# result = client.create_intent request
|
428
|
+
#
|
429
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::Intent.
|
430
|
+
# p result
|
431
|
+
#
|
376
432
|
def create_intent request, options = nil
|
377
433
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
378
434
|
|
@@ -390,9 +446,11 @@ module Google
|
|
390
446
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
391
447
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
392
448
|
|
393
|
-
header_params = {
|
394
|
-
|
395
|
-
|
449
|
+
header_params = {}
|
450
|
+
if request.parent
|
451
|
+
header_params["parent"] = request.parent
|
452
|
+
end
|
453
|
+
|
396
454
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
397
455
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
398
456
|
|
@@ -455,6 +513,21 @@ module Google
|
|
455
513
|
#
|
456
514
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
457
515
|
#
|
516
|
+
# @example Basic example
|
517
|
+
# require "google/cloud/dialogflow/v2"
|
518
|
+
#
|
519
|
+
# # Create a client object. The client can be reused for multiple calls.
|
520
|
+
# client = Google::Cloud::Dialogflow::V2::Intents::Client.new
|
521
|
+
#
|
522
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
523
|
+
# request = Google::Cloud::Dialogflow::V2::UpdateIntentRequest.new
|
524
|
+
#
|
525
|
+
# # Call the update_intent method.
|
526
|
+
# result = client.update_intent request
|
527
|
+
#
|
528
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::Intent.
|
529
|
+
# p result
|
530
|
+
#
|
458
531
|
def update_intent request, options = nil
|
459
532
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
460
533
|
|
@@ -472,9 +545,11 @@ module Google
|
|
472
545
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
473
546
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
474
547
|
|
475
|
-
header_params = {
|
476
|
-
|
477
|
-
|
548
|
+
header_params = {}
|
549
|
+
if request.intent&.name
|
550
|
+
header_params["intent.name"] = request.intent.name
|
551
|
+
end
|
552
|
+
|
478
553
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
479
554
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
480
555
|
|
@@ -529,6 +604,21 @@ module Google
|
|
529
604
|
#
|
530
605
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
531
606
|
#
|
607
|
+
# @example Basic example
|
608
|
+
# require "google/cloud/dialogflow/v2"
|
609
|
+
#
|
610
|
+
# # Create a client object. The client can be reused for multiple calls.
|
611
|
+
# client = Google::Cloud::Dialogflow::V2::Intents::Client.new
|
612
|
+
#
|
613
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
614
|
+
# request = Google::Cloud::Dialogflow::V2::DeleteIntentRequest.new
|
615
|
+
#
|
616
|
+
# # Call the delete_intent method.
|
617
|
+
# result = client.delete_intent request
|
618
|
+
#
|
619
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
620
|
+
# p result
|
621
|
+
#
|
532
622
|
def delete_intent request, options = nil
|
533
623
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
534
624
|
|
@@ -546,9 +636,11 @@ module Google
|
|
546
636
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
547
637
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
548
638
|
|
549
|
-
header_params = {
|
550
|
-
|
551
|
-
|
639
|
+
header_params = {}
|
640
|
+
if request.name
|
641
|
+
header_params["name"] = request.name
|
642
|
+
end
|
643
|
+
|
552
644
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
553
645
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
554
646
|
|
@@ -626,6 +718,28 @@ module Google
|
|
626
718
|
#
|
627
719
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
628
720
|
#
|
721
|
+
# @example Basic example
|
722
|
+
# require "google/cloud/dialogflow/v2"
|
723
|
+
#
|
724
|
+
# # Create a client object. The client can be reused for multiple calls.
|
725
|
+
# client = Google::Cloud::Dialogflow::V2::Intents::Client.new
|
726
|
+
#
|
727
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
728
|
+
# request = Google::Cloud::Dialogflow::V2::BatchUpdateIntentsRequest.new
|
729
|
+
#
|
730
|
+
# # Call the batch_update_intents method.
|
731
|
+
# result = client.batch_update_intents request
|
732
|
+
#
|
733
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
734
|
+
# # object to check the status of an operation, cancel it, or wait
|
735
|
+
# # for results. Here is how to block until completion:
|
736
|
+
# result.wait_until_done! timeout: 60
|
737
|
+
# if result.response?
|
738
|
+
# p result.response
|
739
|
+
# else
|
740
|
+
# puts "Error!"
|
741
|
+
# end
|
742
|
+
#
|
629
743
|
def batch_update_intents request, options = nil
|
630
744
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
631
745
|
|
@@ -643,9 +757,11 @@ module Google
|
|
643
757
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
644
758
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
645
759
|
|
646
|
-
header_params = {
|
647
|
-
|
648
|
-
|
760
|
+
header_params = {}
|
761
|
+
if request.parent
|
762
|
+
header_params["parent"] = request.parent
|
763
|
+
end
|
764
|
+
|
649
765
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
650
766
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
651
767
|
|
@@ -712,6 +828,28 @@ module Google
|
|
712
828
|
#
|
713
829
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
714
830
|
#
|
831
|
+
# @example Basic example
|
832
|
+
# require "google/cloud/dialogflow/v2"
|
833
|
+
#
|
834
|
+
# # Create a client object. The client can be reused for multiple calls.
|
835
|
+
# client = Google::Cloud::Dialogflow::V2::Intents::Client.new
|
836
|
+
#
|
837
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
838
|
+
# request = Google::Cloud::Dialogflow::V2::BatchDeleteIntentsRequest.new
|
839
|
+
#
|
840
|
+
# # Call the batch_delete_intents method.
|
841
|
+
# result = client.batch_delete_intents request
|
842
|
+
#
|
843
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
844
|
+
# # object to check the status of an operation, cancel it, or wait
|
845
|
+
# # for results. Here is how to block until completion:
|
846
|
+
# result.wait_until_done! timeout: 60
|
847
|
+
# if result.response?
|
848
|
+
# p result.response
|
849
|
+
# else
|
850
|
+
# puts "Error!"
|
851
|
+
# end
|
852
|
+
#
|
715
853
|
def batch_delete_intents request, options = nil
|
716
854
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
717
855
|
|
@@ -729,9 +867,11 @@ module Google
|
|
729
867
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
730
868
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
731
869
|
|
732
|
-
header_params = {
|
733
|
-
|
734
|
-
|
870
|
+
header_params = {}
|
871
|
+
if request.parent
|
872
|
+
header_params["parent"] = request.parent
|
873
|
+
end
|
874
|
+
|
735
875
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
736
876
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
737
877
|
|