google-cloud-dialogflow-cx-v3 0.2.0 → 0.5.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.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/AUTHENTICATION.md +7 -25
  4. data/lib/google/cloud/dialogflow/cx/v3/agents/client.rb +201 -27
  5. data/lib/google/cloud/dialogflow/cx/v3/agents/operations.rb +115 -12
  6. data/lib/google/cloud/dialogflow/cx/v3/changelog_pb.rb +52 -0
  7. data/lib/google/cloud/dialogflow/cx/v3/changelog_services_pb.rb +49 -0
  8. data/lib/google/cloud/dialogflow/cx/v3/changelogs/client.rb +522 -0
  9. data/lib/google/cloud/dialogflow/cx/v3/changelogs/credentials.rb +54 -0
  10. data/lib/google/cloud/dialogflow/cx/v3/changelogs/paths.rb +75 -0
  11. data/lib/google/cloud/dialogflow/cx/v3/changelogs.rb +51 -0
  12. data/lib/google/cloud/dialogflow/cx/v3/deployments/client.rb +46 -6
  13. data/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb +106 -15
  14. data/lib/google/cloud/dialogflow/cx/v3/environment_pb.rb +1 -0
  15. data/lib/google/cloud/dialogflow/cx/v3/environments/client.rb +227 -27
  16. data/lib/google/cloud/dialogflow/cx/v3/environments/operations.rb +115 -12
  17. data/lib/google/cloud/dialogflow/cx/v3/experiments/client.rb +146 -21
  18. data/lib/google/cloud/dialogflow/cx/v3/flows/client.rb +228 -30
  19. data/lib/google/cloud/dialogflow/cx/v3/flows/operations.rb +115 -12
  20. data/lib/google/cloud/dialogflow/cx/v3/intents/client.rb +106 -15
  21. data/lib/google/cloud/dialogflow/cx/v3/pages/client.rb +106 -15
  22. data/lib/google/cloud/dialogflow/cx/v3/response_message_pb.rb +7 -0
  23. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/client.rb +106 -15
  24. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/client.rb +106 -15
  25. data/lib/google/cloud/dialogflow/cx/v3/sessions/client.rb +84 -9
  26. data/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb +281 -36
  27. data/lib/google/cloud/dialogflow/cx/v3/test_cases/operations.rb +115 -12
  28. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/client.rb +106 -15
  29. data/lib/google/cloud/dialogflow/cx/v3/version.rb +1 -1
  30. data/lib/google/cloud/dialogflow/cx/v3/version_pb.rb +12 -0
  31. data/lib/google/cloud/dialogflow/cx/v3/version_services_pb.rb +2 -0
  32. data/lib/google/cloud/dialogflow/cx/v3/versions/client.rb +250 -18
  33. data/lib/google/cloud/dialogflow/cx/v3/versions/operations.rb +115 -12
  34. data/lib/google/cloud/dialogflow/cx/v3/webhook_pb.rb +2 -0
  35. data/lib/google/cloud/dialogflow/cx/v3/webhooks/client.rb +106 -15
  36. data/lib/google/cloud/dialogflow/cx/v3.rb +2 -1
  37. data/proto_docs/google/api/resource.rb +10 -71
  38. data/proto_docs/google/cloud/dialogflow/cx/v3/changelog.rb +122 -0
  39. data/proto_docs/google/cloud/dialogflow/cx/v3/response_message.rb +15 -0
  40. data/proto_docs/google/cloud/dialogflow/cx/v3/security_settings.rb +11 -1
  41. data/proto_docs/google/cloud/dialogflow/cx/v3/session.rb +54 -42
  42. data/proto_docs/google/cloud/dialogflow/cx/v3/version.rb +43 -0
  43. data/proto_docs/google/cloud/dialogflow/cx/v3/webhook.rb +17 -0
  44. metadata +10 -3
@@ -0,0 +1,75 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Dialogflow
23
+ module CX
24
+ module V3
25
+ module Changelogs
26
+ # Path helper methods for the Changelogs API.
27
+ module Paths
28
+ ##
29
+ # Create a fully-qualified Agent resource string.
30
+ #
31
+ # The resource will be in the following format:
32
+ #
33
+ # `projects/{project}/locations/{location}/agents/{agent}`
34
+ #
35
+ # @param project [String]
36
+ # @param location [String]
37
+ # @param agent [String]
38
+ #
39
+ # @return [::String]
40
+ def agent_path project:, location:, agent:
41
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
42
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
43
+
44
+ "projects/#{project}/locations/#{location}/agents/#{agent}"
45
+ end
46
+
47
+ ##
48
+ # Create a fully-qualified Changelog resource string.
49
+ #
50
+ # The resource will be in the following format:
51
+ #
52
+ # `projects/{project}/locations/{location}/agents/{agent}/changelogs/{changelog}`
53
+ #
54
+ # @param project [String]
55
+ # @param location [String]
56
+ # @param agent [String]
57
+ # @param changelog [String]
58
+ #
59
+ # @return [::String]
60
+ def changelog_path project:, location:, agent:, changelog:
61
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
62
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
63
+ raise ::ArgumentError, "agent cannot contain /" if agent.to_s.include? "/"
64
+
65
+ "projects/#{project}/locations/#{location}/agents/#{agent}/changelogs/#{changelog}"
66
+ end
67
+
68
+ extend self
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/dialogflow/cx/v3/version"
24
+
25
+ require "google/cloud/dialogflow/cx/v3/changelogs/credentials"
26
+ require "google/cloud/dialogflow/cx/v3/changelogs/paths"
27
+ require "google/cloud/dialogflow/cx/v3/changelogs/client"
28
+
29
+ module Google
30
+ module Cloud
31
+ module Dialogflow
32
+ module CX
33
+ module V3
34
+ ##
35
+ # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Changelog Changelogs}.
36
+ #
37
+ # To load this service and instantiate a client:
38
+ #
39
+ # require "google/cloud/dialogflow/cx/v3/changelogs"
40
+ # client = ::Google::Cloud::Dialogflow::CX::V3::Changelogs::Client.new
41
+ #
42
+ module Changelogs
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+
50
+ helper_path = ::File.join __dir__, "changelogs", "helpers.rb"
51
+ require "google/cloud/dialogflow/cx/v3/changelogs/helpers" if ::File.file? helper_path
@@ -186,6 +186,27 @@ module Google
186
186
  #
187
187
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
188
188
  #
189
+ # @example Basic example
190
+ # require "google/cloud/dialogflow/cx/v3"
191
+ #
192
+ # # Create a client object. The client can be reused for multiple calls.
193
+ # client = Google::Cloud::Dialogflow::CX::V3::Deployments::Client.new
194
+ #
195
+ # # Create a request. To set request fields, pass in keyword arguments.
196
+ # request = Google::Cloud::Dialogflow::CX::V3::ListDeploymentsRequest.new
197
+ #
198
+ # # Call the list_deployments method.
199
+ # result = client.list_deployments request
200
+ #
201
+ # # The returned object is of type Gapic::PagedEnumerable. You can
202
+ # # iterate over all elements by calling #each, and the enumerable
203
+ # # will lazily make API calls to fetch subsequent pages. Other
204
+ # # methods are also available for managing paging directly.
205
+ # result.each do |response|
206
+ # # Each element is of type ::Google::Cloud::Dialogflow::CX::V3::Deployment.
207
+ # p response
208
+ # end
209
+ #
189
210
  def list_deployments request, options = nil
190
211
  raise ::ArgumentError, "request must be provided" if request.nil?
191
212
 
@@ -203,9 +224,11 @@ module Google
203
224
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
204
225
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
205
226
 
206
- header_params = {
207
- "parent" => request.parent
208
- }
227
+ header_params = {}
228
+ if request.parent
229
+ header_params["parent"] = request.parent
230
+ end
231
+
209
232
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
210
233
  metadata[:"x-goog-request-params"] ||= request_params_header
211
234
 
@@ -257,6 +280,21 @@ module Google
257
280
  #
258
281
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
259
282
  #
283
+ # @example Basic example
284
+ # require "google/cloud/dialogflow/cx/v3"
285
+ #
286
+ # # Create a client object. The client can be reused for multiple calls.
287
+ # client = Google::Cloud::Dialogflow::CX::V3::Deployments::Client.new
288
+ #
289
+ # # Create a request. To set request fields, pass in keyword arguments.
290
+ # request = Google::Cloud::Dialogflow::CX::V3::GetDeploymentRequest.new
291
+ #
292
+ # # Call the get_deployment method.
293
+ # result = client.get_deployment request
294
+ #
295
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Deployment.
296
+ # p result
297
+ #
260
298
  def get_deployment request, options = nil
261
299
  raise ::ArgumentError, "request must be provided" if request.nil?
262
300
 
@@ -274,9 +312,11 @@ module Google
274
312
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
275
313
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
276
314
 
277
- header_params = {
278
- "name" => request.name
279
- }
315
+ header_params = {}
316
+ if request.name
317
+ header_params["name"] = request.name
318
+ end
319
+
280
320
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
281
321
  metadata[:"x-goog-request-params"] ||= request_params_header
282
322
 
@@ -198,6 +198,27 @@ module Google
198
198
  #
199
199
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
200
200
  #
201
+ # @example Basic example
202
+ # require "google/cloud/dialogflow/cx/v3"
203
+ #
204
+ # # Create a client object. The client can be reused for multiple calls.
205
+ # client = Google::Cloud::Dialogflow::CX::V3::EntityTypes::Client.new
206
+ #
207
+ # # Create a request. To set request fields, pass in keyword arguments.
208
+ # request = Google::Cloud::Dialogflow::CX::V3::ListEntityTypesRequest.new
209
+ #
210
+ # # Call the list_entity_types method.
211
+ # result = client.list_entity_types request
212
+ #
213
+ # # The returned object is of type Gapic::PagedEnumerable. You can
214
+ # # iterate over all elements by calling #each, and the enumerable
215
+ # # will lazily make API calls to fetch subsequent pages. Other
216
+ # # methods are also available for managing paging directly.
217
+ # result.each do |response|
218
+ # # Each element is of type ::Google::Cloud::Dialogflow::CX::V3::EntityType.
219
+ # p response
220
+ # end
221
+ #
201
222
  def list_entity_types request, options = nil
202
223
  raise ::ArgumentError, "request must be provided" if request.nil?
203
224
 
@@ -215,9 +236,11 @@ module Google
215
236
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
216
237
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
217
238
 
218
- header_params = {
219
- "parent" => request.parent
220
- }
239
+ header_params = {}
240
+ if request.parent
241
+ header_params["parent"] = request.parent
242
+ end
243
+
221
244
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
222
245
  metadata[:"x-goog-request-params"] ||= request_params_header
223
246
 
@@ -282,6 +305,21 @@ module Google
282
305
  #
283
306
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
284
307
  #
308
+ # @example Basic example
309
+ # require "google/cloud/dialogflow/cx/v3"
310
+ #
311
+ # # Create a client object. The client can be reused for multiple calls.
312
+ # client = Google::Cloud::Dialogflow::CX::V3::EntityTypes::Client.new
313
+ #
314
+ # # Create a request. To set request fields, pass in keyword arguments.
315
+ # request = Google::Cloud::Dialogflow::CX::V3::GetEntityTypeRequest.new
316
+ #
317
+ # # Call the get_entity_type method.
318
+ # result = client.get_entity_type request
319
+ #
320
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::EntityType.
321
+ # p result
322
+ #
285
323
  def get_entity_type request, options = nil
286
324
  raise ::ArgumentError, "request must be provided" if request.nil?
287
325
 
@@ -299,9 +337,11 @@ module Google
299
337
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
300
338
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
301
339
 
302
- header_params = {
303
- "name" => request.name
304
- }
340
+ header_params = {}
341
+ if request.name
342
+ header_params["name"] = request.name
343
+ end
344
+
305
345
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
306
346
  metadata[:"x-goog-request-params"] ||= request_params_header
307
347
 
@@ -369,6 +409,21 @@ module Google
369
409
  #
370
410
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
371
411
  #
412
+ # @example Basic example
413
+ # require "google/cloud/dialogflow/cx/v3"
414
+ #
415
+ # # Create a client object. The client can be reused for multiple calls.
416
+ # client = Google::Cloud::Dialogflow::CX::V3::EntityTypes::Client.new
417
+ #
418
+ # # Create a request. To set request fields, pass in keyword arguments.
419
+ # request = Google::Cloud::Dialogflow::CX::V3::CreateEntityTypeRequest.new
420
+ #
421
+ # # Call the create_entity_type method.
422
+ # result = client.create_entity_type request
423
+ #
424
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::EntityType.
425
+ # p result
426
+ #
372
427
  def create_entity_type request, options = nil
373
428
  raise ::ArgumentError, "request must be provided" if request.nil?
374
429
 
@@ -386,9 +441,11 @@ module Google
386
441
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
387
442
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
388
443
 
389
- header_params = {
390
- "parent" => request.parent
391
- }
444
+ header_params = {}
445
+ if request.parent
446
+ header_params["parent"] = request.parent
447
+ end
448
+
392
449
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
393
450
  metadata[:"x-goog-request-params"] ||= request_params_header
394
451
 
@@ -455,6 +512,21 @@ module Google
455
512
  #
456
513
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
457
514
  #
515
+ # @example Basic example
516
+ # require "google/cloud/dialogflow/cx/v3"
517
+ #
518
+ # # Create a client object. The client can be reused for multiple calls.
519
+ # client = Google::Cloud::Dialogflow::CX::V3::EntityTypes::Client.new
520
+ #
521
+ # # Create a request. To set request fields, pass in keyword arguments.
522
+ # request = Google::Cloud::Dialogflow::CX::V3::UpdateEntityTypeRequest.new
523
+ #
524
+ # # Call the update_entity_type method.
525
+ # result = client.update_entity_type request
526
+ #
527
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::EntityType.
528
+ # p result
529
+ #
458
530
  def update_entity_type request, options = nil
459
531
  raise ::ArgumentError, "request must be provided" if request.nil?
460
532
 
@@ -472,9 +544,11 @@ module Google
472
544
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
473
545
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
474
546
 
475
- header_params = {
476
- "entity_type.name" => request.entity_type.name
477
- }
547
+ header_params = {}
548
+ if request.entity_type&.name
549
+ header_params["entity_type.name"] = request.entity_type.name
550
+ end
551
+
478
552
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
479
553
  metadata[:"x-goog-request-params"] ||= request_params_header
480
554
 
@@ -540,6 +614,21 @@ module Google
540
614
  #
541
615
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
542
616
  #
617
+ # @example Basic example
618
+ # require "google/cloud/dialogflow/cx/v3"
619
+ #
620
+ # # Create a client object. The client can be reused for multiple calls.
621
+ # client = Google::Cloud::Dialogflow::CX::V3::EntityTypes::Client.new
622
+ #
623
+ # # Create a request. To set request fields, pass in keyword arguments.
624
+ # request = Google::Cloud::Dialogflow::CX::V3::DeleteEntityTypeRequest.new
625
+ #
626
+ # # Call the delete_entity_type method.
627
+ # result = client.delete_entity_type request
628
+ #
629
+ # # The returned object is of type Google::Protobuf::Empty.
630
+ # p result
631
+ #
543
632
  def delete_entity_type request, options = nil
544
633
  raise ::ArgumentError, "request must be provided" if request.nil?
545
634
 
@@ -557,9 +646,11 @@ module Google
557
646
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
558
647
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
559
648
 
560
- header_params = {
561
- "name" => request.name
562
- }
649
+ header_params = {}
650
+ if request.name
651
+ header_params["name"] = request.name
652
+ end
653
+
563
654
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
564
655
  metadata[:"x-goog-request-params"] ||= request_params_header
565
656
 
@@ -6,6 +6,7 @@ require 'google/api/client_pb'
6
6
  require 'google/api/field_behavior_pb'
7
7
  require 'google/api/resource_pb'
8
8
  require 'google/cloud/dialogflow/cx/v3/test_case_pb'
9
+ require 'google/cloud/dialogflow/cx/v3/webhook_pb'
9
10
  require 'google/longrunning/operations_pb'
10
11
  require 'google/protobuf/empty_pb'
11
12
  require 'google/protobuf/field_mask_pb'