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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62888f52211fe153212450eeea4fb0887edae78c58f11e7faae2ddda20948def
|
4
|
+
data.tar.gz: 681defd6a49675b731528529fb2e4340236a4b4e313bbd34a68923f5cc51d198
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 236925d5030cf45bbb34938cd7565e5d5db0d9b6758393a58a1ea16c96a86a7d7feaa3bab6f2320ef7a38ece5acc0708f9ac01474c4b127a295252739605c9ec
|
7
|
+
data.tar.gz: e07664eaf7f723c31473c70e094584438699761be72ebc4679ddb6d5ce0016c075f0b0d00dbfafdc33a1a8eeb630d89300d45a2cbb57ca9ffe83e93209102285
|
data/.yardopts
CHANGED
data/AUTHENTICATION.md
CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
121
121
|
*should* only be used during development.
|
122
122
|
|
123
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
124
|
-
[dev-console]: https://console.cloud.google.com/project
|
125
|
-
|
126
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
127
|
-
|
128
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
129
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
130
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
131
|
-
|
132
123
|
## Creating a Service Account
|
133
124
|
|
134
125
|
Google Cloud requires **Service Account Credentials** to
|
@@ -139,31 +130,22 @@ If you are not running this client within
|
|
139
130
|
[Google Cloud Platform environments](#google-cloud-platform-environments), you
|
140
131
|
need a Google Developers service account.
|
141
132
|
|
142
|
-
1. Visit the [Google
|
133
|
+
1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
|
143
134
|
2. Create a new project or click on an existing project.
|
144
|
-
3. Activate the
|
135
|
+
3. Activate the menu in the upper left and select **APIs & Services**. From
|
145
136
|
here, you will enable the APIs that your application requires.
|
146
137
|
|
147
|
-
![Enable the APIs that your application requires][enable-apis]
|
148
|
-
|
149
138
|
*Note: You may need to enable billing in order to use these services.*
|
150
139
|
|
151
140
|
4. Select **Credentials** from the side navigation.
|
152
141
|
|
153
|
-
|
154
|
-
|
155
|
-
![Create a new service account][create-new-service-account]
|
156
|
-
|
157
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
158
|
-
|
159
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
160
|
-
guided through downloading a new JSON key file.
|
142
|
+
Find the "Create credentials" drop down near the top of the page, and select
|
143
|
+
"Service account" to be guided through downloading a new JSON key file.
|
161
144
|
|
162
145
|
If you want to re-use an existing service account, you can easily generate a
|
163
|
-
new key file. Just select the account you wish to re-use,
|
164
|
-
|
165
|
-
|
166
|
-
![Re-use an existing service account][reuse-service-account]
|
146
|
+
new key file. Just select the account you wish to re-use, click the pencil
|
147
|
+
tool on the right side to edit the service account, select the **Keys** tab,
|
148
|
+
and then select **Add Key**.
|
167
149
|
|
168
150
|
The key file you download will be used by this library to authenticate API
|
169
151
|
requests and should be stored in a secure location.
|
@@ -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
|
|
@@ -191,6 +192,21 @@ module Google
|
|
191
192
|
#
|
192
193
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
193
194
|
#
|
195
|
+
# @example Basic example
|
196
|
+
# require "google/cloud/dialogflow/v2"
|
197
|
+
#
|
198
|
+
# # Create a client object. The client can be reused for multiple calls.
|
199
|
+
# client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
200
|
+
#
|
201
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
202
|
+
# request = Google::Cloud::Dialogflow::V2::GetAgentRequest.new
|
203
|
+
#
|
204
|
+
# # Call the get_agent method.
|
205
|
+
# result = client.get_agent request
|
206
|
+
#
|
207
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::Agent.
|
208
|
+
# p result
|
209
|
+
#
|
194
210
|
def get_agent request, options = nil
|
195
211
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
196
212
|
|
@@ -208,9 +224,11 @@ module Google
|
|
208
224
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
209
225
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
210
226
|
|
211
|
-
header_params = {
|
212
|
-
|
213
|
-
|
227
|
+
header_params = {}
|
228
|
+
if request.parent
|
229
|
+
header_params["parent"] = request.parent
|
230
|
+
end
|
231
|
+
|
214
232
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
215
233
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
216
234
|
|
@@ -265,6 +283,21 @@ module Google
|
|
265
283
|
#
|
266
284
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
267
285
|
#
|
286
|
+
# @example Basic example
|
287
|
+
# require "google/cloud/dialogflow/v2"
|
288
|
+
#
|
289
|
+
# # Create a client object. The client can be reused for multiple calls.
|
290
|
+
# client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
291
|
+
#
|
292
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
293
|
+
# request = Google::Cloud::Dialogflow::V2::SetAgentRequest.new
|
294
|
+
#
|
295
|
+
# # Call the set_agent method.
|
296
|
+
# result = client.set_agent request
|
297
|
+
#
|
298
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::Agent.
|
299
|
+
# p result
|
300
|
+
#
|
268
301
|
def set_agent request, options = nil
|
269
302
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
270
303
|
|
@@ -282,9 +315,11 @@ module Google
|
|
282
315
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
283
316
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
284
317
|
|
285
|
-
header_params = {
|
286
|
-
|
287
|
-
|
318
|
+
header_params = {}
|
319
|
+
if request.agent&.parent
|
320
|
+
header_params["agent.parent"] = request.agent.parent
|
321
|
+
end
|
322
|
+
|
288
323
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
289
324
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
290
325
|
|
@@ -334,6 +369,21 @@ module Google
|
|
334
369
|
#
|
335
370
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
336
371
|
#
|
372
|
+
# @example Basic example
|
373
|
+
# require "google/cloud/dialogflow/v2"
|
374
|
+
#
|
375
|
+
# # Create a client object. The client can be reused for multiple calls.
|
376
|
+
# client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
377
|
+
#
|
378
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
379
|
+
# request = Google::Cloud::Dialogflow::V2::DeleteAgentRequest.new
|
380
|
+
#
|
381
|
+
# # Call the delete_agent method.
|
382
|
+
# result = client.delete_agent request
|
383
|
+
#
|
384
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
385
|
+
# p result
|
386
|
+
#
|
337
387
|
def delete_agent request, options = nil
|
338
388
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
339
389
|
|
@@ -351,9 +401,11 @@ module Google
|
|
351
401
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
352
402
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
353
403
|
|
354
|
-
header_params = {
|
355
|
-
|
356
|
-
|
404
|
+
header_params = {}
|
405
|
+
if request.parent
|
406
|
+
header_params["parent"] = request.parent
|
407
|
+
end
|
408
|
+
|
357
409
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
358
410
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
359
411
|
|
@@ -414,6 +466,27 @@ module Google
|
|
414
466
|
#
|
415
467
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
416
468
|
#
|
469
|
+
# @example Basic example
|
470
|
+
# require "google/cloud/dialogflow/v2"
|
471
|
+
#
|
472
|
+
# # Create a client object. The client can be reused for multiple calls.
|
473
|
+
# client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
474
|
+
#
|
475
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
476
|
+
# request = Google::Cloud::Dialogflow::V2::SearchAgentsRequest.new
|
477
|
+
#
|
478
|
+
# # Call the search_agents method.
|
479
|
+
# result = client.search_agents request
|
480
|
+
#
|
481
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
482
|
+
# # iterate over all elements by calling #each, and the enumerable
|
483
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
484
|
+
# # methods are also available for managing paging directly.
|
485
|
+
# result.each do |response|
|
486
|
+
# # Each element is of type ::Google::Cloud::Dialogflow::V2::Agent.
|
487
|
+
# p response
|
488
|
+
# end
|
489
|
+
#
|
417
490
|
def search_agents request, options = nil
|
418
491
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
419
492
|
|
@@ -431,9 +504,11 @@ module Google
|
|
431
504
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
432
505
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
433
506
|
|
434
|
-
header_params = {
|
435
|
-
|
436
|
-
|
507
|
+
header_params = {}
|
508
|
+
if request.parent
|
509
|
+
header_params["parent"] = request.parent
|
510
|
+
end
|
511
|
+
|
437
512
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
438
513
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
439
514
|
|
@@ -497,6 +572,28 @@ module Google
|
|
497
572
|
#
|
498
573
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
499
574
|
#
|
575
|
+
# @example Basic example
|
576
|
+
# require "google/cloud/dialogflow/v2"
|
577
|
+
#
|
578
|
+
# # Create a client object. The client can be reused for multiple calls.
|
579
|
+
# client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
580
|
+
#
|
581
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
582
|
+
# request = Google::Cloud::Dialogflow::V2::TrainAgentRequest.new
|
583
|
+
#
|
584
|
+
# # Call the train_agent method.
|
585
|
+
# result = client.train_agent request
|
586
|
+
#
|
587
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
588
|
+
# # object to check the status of an operation, cancel it, or wait
|
589
|
+
# # for results. Here is how to block until completion:
|
590
|
+
# result.wait_until_done! timeout: 60
|
591
|
+
# if result.response?
|
592
|
+
# p result.response
|
593
|
+
# else
|
594
|
+
# puts "Error!"
|
595
|
+
# end
|
596
|
+
#
|
500
597
|
def train_agent request, options = nil
|
501
598
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
502
599
|
|
@@ -514,9 +611,11 @@ module Google
|
|
514
611
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
515
612
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
516
613
|
|
517
|
-
header_params = {
|
518
|
-
|
519
|
-
|
614
|
+
header_params = {}
|
615
|
+
if request.parent
|
616
|
+
header_params["parent"] = request.parent
|
617
|
+
end
|
618
|
+
|
520
619
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
521
620
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
522
621
|
|
@@ -580,6 +679,28 @@ module Google
|
|
580
679
|
#
|
581
680
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
582
681
|
#
|
682
|
+
# @example Basic example
|
683
|
+
# require "google/cloud/dialogflow/v2"
|
684
|
+
#
|
685
|
+
# # Create a client object. The client can be reused for multiple calls.
|
686
|
+
# client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
687
|
+
#
|
688
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
689
|
+
# request = Google::Cloud::Dialogflow::V2::ExportAgentRequest.new
|
690
|
+
#
|
691
|
+
# # Call the export_agent method.
|
692
|
+
# result = client.export_agent request
|
693
|
+
#
|
694
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
695
|
+
# # object to check the status of an operation, cancel it, or wait
|
696
|
+
# # for results. Here is how to block until completion:
|
697
|
+
# result.wait_until_done! timeout: 60
|
698
|
+
# if result.response?
|
699
|
+
# p result.response
|
700
|
+
# else
|
701
|
+
# puts "Error!"
|
702
|
+
# end
|
703
|
+
#
|
583
704
|
def export_agent request, options = nil
|
584
705
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
585
706
|
|
@@ -597,9 +718,11 @@ module Google
|
|
597
718
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
598
719
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
599
720
|
|
600
|
-
header_params = {
|
601
|
-
|
602
|
-
|
721
|
+
header_params = {}
|
722
|
+
if request.parent
|
723
|
+
header_params["parent"] = request.parent
|
724
|
+
end
|
725
|
+
|
603
726
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
604
727
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
605
728
|
|
@@ -679,6 +802,28 @@ module Google
|
|
679
802
|
#
|
680
803
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
681
804
|
#
|
805
|
+
# @example Basic example
|
806
|
+
# require "google/cloud/dialogflow/v2"
|
807
|
+
#
|
808
|
+
# # Create a client object. The client can be reused for multiple calls.
|
809
|
+
# client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
810
|
+
#
|
811
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
812
|
+
# request = Google::Cloud::Dialogflow::V2::ImportAgentRequest.new
|
813
|
+
#
|
814
|
+
# # Call the import_agent method.
|
815
|
+
# result = client.import_agent request
|
816
|
+
#
|
817
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
818
|
+
# # object to check the status of an operation, cancel it, or wait
|
819
|
+
# # for results. Here is how to block until completion:
|
820
|
+
# result.wait_until_done! timeout: 60
|
821
|
+
# if result.response?
|
822
|
+
# p result.response
|
823
|
+
# else
|
824
|
+
# puts "Error!"
|
825
|
+
# end
|
826
|
+
#
|
682
827
|
def import_agent request, options = nil
|
683
828
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
684
829
|
|
@@ -696,9 +841,11 @@ module Google
|
|
696
841
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
697
842
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
698
843
|
|
699
|
-
header_params = {
|
700
|
-
|
701
|
-
|
844
|
+
header_params = {}
|
845
|
+
if request.parent
|
846
|
+
header_params["parent"] = request.parent
|
847
|
+
end
|
848
|
+
|
702
849
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
703
850
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
704
851
|
|
@@ -777,6 +924,28 @@ module Google
|
|
777
924
|
#
|
778
925
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
779
926
|
#
|
927
|
+
# @example Basic example
|
928
|
+
# require "google/cloud/dialogflow/v2"
|
929
|
+
#
|
930
|
+
# # Create a client object. The client can be reused for multiple calls.
|
931
|
+
# client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
932
|
+
#
|
933
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
934
|
+
# request = Google::Cloud::Dialogflow::V2::RestoreAgentRequest.new
|
935
|
+
#
|
936
|
+
# # Call the restore_agent method.
|
937
|
+
# result = client.restore_agent request
|
938
|
+
#
|
939
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
940
|
+
# # object to check the status of an operation, cancel it, or wait
|
941
|
+
# # for results. Here is how to block until completion:
|
942
|
+
# result.wait_until_done! timeout: 60
|
943
|
+
# if result.response?
|
944
|
+
# p result.response
|
945
|
+
# else
|
946
|
+
# puts "Error!"
|
947
|
+
# end
|
948
|
+
#
|
780
949
|
def restore_agent request, options = nil
|
781
950
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
782
951
|
|
@@ -794,9 +963,11 @@ module Google
|
|
794
963
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
795
964
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
796
965
|
|
797
|
-
header_params = {
|
798
|
-
|
799
|
-
|
966
|
+
header_params = {}
|
967
|
+
if request.parent
|
968
|
+
header_params["parent"] = request.parent
|
969
|
+
end
|
970
|
+
|
800
971
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
801
972
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
802
973
|
|
@@ -854,6 +1025,21 @@ module Google
|
|
854
1025
|
#
|
855
1026
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
856
1027
|
#
|
1028
|
+
# @example Basic example
|
1029
|
+
# require "google/cloud/dialogflow/v2"
|
1030
|
+
#
|
1031
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1032
|
+
# client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
1033
|
+
#
|
1034
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1035
|
+
# request = Google::Cloud::Dialogflow::V2::GetValidationResultRequest.new
|
1036
|
+
#
|
1037
|
+
# # Call the get_validation_result method.
|
1038
|
+
# result = client.get_validation_result request
|
1039
|
+
#
|
1040
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::ValidationResult.
|
1041
|
+
# p result
|
1042
|
+
#
|
857
1043
|
def get_validation_result request, options = nil
|
858
1044
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
859
1045
|
|
@@ -871,9 +1057,11 @@ module Google
|
|
871
1057
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
872
1058
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
873
1059
|
|
874
|
-
header_params = {
|
875
|
-
|
876
|
-
|
1060
|
+
header_params = {}
|
1061
|
+
if request.parent
|
1062
|
+
header_params["parent"] = request.parent
|
1063
|
+
end
|
1064
|
+
|
877
1065
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
878
1066
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
879
1067
|
|
@@ -143,6 +143,27 @@ module Google
|
|
143
143
|
#
|
144
144
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
145
145
|
#
|
146
|
+
# @example Basic example
|
147
|
+
# require "google/longrunning"
|
148
|
+
#
|
149
|
+
# # Create a client object. The client can be reused for multiple calls.
|
150
|
+
# client = Google::Longrunning::Operations::Client.new
|
151
|
+
#
|
152
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
153
|
+
# request = Google::Longrunning::ListOperationsRequest.new
|
154
|
+
#
|
155
|
+
# # Call the list_operations method.
|
156
|
+
# result = client.list_operations request
|
157
|
+
#
|
158
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
159
|
+
# # iterate over all elements by calling #each, and the enumerable
|
160
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
161
|
+
# # methods are also available for managing paging directly.
|
162
|
+
# result.each do |response|
|
163
|
+
# # Each element is of type ::Google::Longrunning::Operation.
|
164
|
+
# p response
|
165
|
+
# end
|
166
|
+
#
|
146
167
|
def list_operations request, options = nil
|
147
168
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
148
169
|
|
@@ -160,9 +181,11 @@ module Google
|
|
160
181
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
161
182
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
162
183
|
|
163
|
-
header_params = {
|
164
|
-
|
165
|
-
|
184
|
+
header_params = {}
|
185
|
+
if request.name
|
186
|
+
header_params["name"] = request.name
|
187
|
+
end
|
188
|
+
|
166
189
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
167
190
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
168
191
|
|
@@ -215,6 +238,28 @@ module Google
|
|
215
238
|
#
|
216
239
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
217
240
|
#
|
241
|
+
# @example Basic example
|
242
|
+
# require "google/longrunning"
|
243
|
+
#
|
244
|
+
# # Create a client object. The client can be reused for multiple calls.
|
245
|
+
# client = Google::Longrunning::Operations::Client.new
|
246
|
+
#
|
247
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
248
|
+
# request = Google::Longrunning::GetOperationRequest.new
|
249
|
+
#
|
250
|
+
# # Call the get_operation method.
|
251
|
+
# result = client.get_operation request
|
252
|
+
#
|
253
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
254
|
+
# # object to check the status of an operation, cancel it, or wait
|
255
|
+
# # for results. Here is how to block until completion:
|
256
|
+
# result.wait_until_done! timeout: 60
|
257
|
+
# if result.response?
|
258
|
+
# p result.response
|
259
|
+
# else
|
260
|
+
# puts "Error!"
|
261
|
+
# end
|
262
|
+
#
|
218
263
|
def get_operation request, options = nil
|
219
264
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
220
265
|
|
@@ -232,9 +277,11 @@ module Google
|
|
232
277
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
233
278
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
234
279
|
|
235
|
-
header_params = {
|
236
|
-
|
237
|
-
|
280
|
+
header_params = {}
|
281
|
+
if request.name
|
282
|
+
header_params["name"] = request.name
|
283
|
+
end
|
284
|
+
|
238
285
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
239
286
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
240
287
|
|
@@ -287,6 +334,21 @@ module Google
|
|
287
334
|
#
|
288
335
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
289
336
|
#
|
337
|
+
# @example Basic example
|
338
|
+
# require "google/longrunning"
|
339
|
+
#
|
340
|
+
# # Create a client object. The client can be reused for multiple calls.
|
341
|
+
# client = Google::Longrunning::Operations::Client.new
|
342
|
+
#
|
343
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
344
|
+
# request = Google::Longrunning::DeleteOperationRequest.new
|
345
|
+
#
|
346
|
+
# # Call the delete_operation method.
|
347
|
+
# result = client.delete_operation request
|
348
|
+
#
|
349
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
350
|
+
# p result
|
351
|
+
#
|
290
352
|
def delete_operation request, options = nil
|
291
353
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
292
354
|
|
@@ -304,9 +366,11 @@ module Google
|
|
304
366
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
305
367
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
306
368
|
|
307
|
-
header_params = {
|
308
|
-
|
309
|
-
|
369
|
+
header_params = {}
|
370
|
+
if request.name
|
371
|
+
header_params["name"] = request.name
|
372
|
+
end
|
373
|
+
|
310
374
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
311
375
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
312
376
|
|
@@ -364,6 +428,21 @@ module Google
|
|
364
428
|
#
|
365
429
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
366
430
|
#
|
431
|
+
# @example Basic example
|
432
|
+
# require "google/longrunning"
|
433
|
+
#
|
434
|
+
# # Create a client object. The client can be reused for multiple calls.
|
435
|
+
# client = Google::Longrunning::Operations::Client.new
|
436
|
+
#
|
437
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
438
|
+
# request = Google::Longrunning::CancelOperationRequest.new
|
439
|
+
#
|
440
|
+
# # Call the cancel_operation method.
|
441
|
+
# result = client.cancel_operation request
|
442
|
+
#
|
443
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
444
|
+
# p result
|
445
|
+
#
|
367
446
|
def cancel_operation request, options = nil
|
368
447
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
369
448
|
|
@@ -381,9 +460,11 @@ module Google
|
|
381
460
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
382
461
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
383
462
|
|
384
|
-
header_params = {
|
385
|
-
|
386
|
-
|
463
|
+
header_params = {}
|
464
|
+
if request.name
|
465
|
+
header_params["name"] = request.name
|
466
|
+
end
|
467
|
+
|
387
468
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
388
469
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
389
470
|
|
@@ -444,6 +525,28 @@ module Google
|
|
444
525
|
#
|
445
526
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
446
527
|
#
|
528
|
+
# @example Basic example
|
529
|
+
# require "google/longrunning"
|
530
|
+
#
|
531
|
+
# # Create a client object. The client can be reused for multiple calls.
|
532
|
+
# client = Google::Longrunning::Operations::Client.new
|
533
|
+
#
|
534
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
535
|
+
# request = Google::Longrunning::WaitOperationRequest.new
|
536
|
+
#
|
537
|
+
# # Call the wait_operation method.
|
538
|
+
# result = client.wait_operation request
|
539
|
+
#
|
540
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
541
|
+
# # object to check the status of an operation, cancel it, or wait
|
542
|
+
# # for results. Here is how to block until completion:
|
543
|
+
# result.wait_until_done! timeout: 60
|
544
|
+
# if result.response?
|
545
|
+
# p result.response
|
546
|
+
# else
|
547
|
+
# puts "Error!"
|
548
|
+
# end
|
549
|
+
#
|
447
550
|
def wait_operation request, options = nil
|
448
551
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
449
552
|
|