google-cloud-dialogflow-v2 0.10.1 → 0.11.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/dialogflow/v2/agent_pb.rb +2 -2
  4. data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +39 -5
  5. data/lib/google/cloud/dialogflow/v2/agents/client.rb +94 -49
  6. data/lib/google/cloud/dialogflow/v2/agents/operations.rb +30 -21
  7. data/lib/google/cloud/dialogflow/v2/answer_record_pb.rb +2 -2
  8. data/lib/google/cloud/dialogflow/v2/answer_record_services_pb.rb +1 -1
  9. data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +35 -38
  10. data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +3 -2
  11. data/lib/google/cloud/dialogflow/v2/context_pb.rb +2 -2
  12. data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +1 -1
  13. data/lib/google/cloud/dialogflow/v2/contexts/client.rb +47 -42
  14. data/lib/google/cloud/dialogflow/v2/conversation_event_pb.rb +2 -2
  15. data/lib/google/cloud/dialogflow/v2/conversation_pb.rb +2 -2
  16. data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +2 -2
  17. data/lib/google/cloud/dialogflow/v2/conversation_profile_services_pb.rb +1 -1
  18. data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +44 -41
  19. data/lib/google/cloud/dialogflow/v2/conversation_services_pb.rb +1 -1
  20. data/lib/google/cloud/dialogflow/v2/conversations/client.rb +44 -41
  21. data/lib/google/cloud/dialogflow/v2/document_pb.rb +2 -2
  22. data/lib/google/cloud/dialogflow/v2/document_services_pb.rb +27 -10
  23. data/lib/google/cloud/dialogflow/v2/documents/client.rb +73 -51
  24. data/lib/google/cloud/dialogflow/v2/documents/operations.rb +30 -21
  25. data/lib/google/cloud/dialogflow/v2/entity_type_pb.rb +2 -2
  26. data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +45 -1
  27. data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +102 -46
  28. data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +30 -21
  29. data/lib/google/cloud/dialogflow/v2/environment_pb.rb +2 -2
  30. data/lib/google/cloud/dialogflow/v2/environment_services_pb.rb +7 -7
  31. data/lib/google/cloud/dialogflow/v2/environments/client.rb +67 -51
  32. data/lib/google/cloud/dialogflow/v2/fulfillment_pb.rb +2 -2
  33. data/lib/google/cloud/dialogflow/v2/fulfillment_services_pb.rb +1 -1
  34. data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +35 -38
  35. data/lib/google/cloud/dialogflow/v2/gcs_pb.rb +2 -2
  36. data/lib/google/cloud/dialogflow/v2/human_agent_assistant_event_pb.rb +2 -2
  37. data/lib/google/cloud/dialogflow/v2/intent_pb.rb +2 -2
  38. data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +16 -1
  39. data/lib/google/cloud/dialogflow/v2/intents/client.rb +65 -43
  40. data/lib/google/cloud/dialogflow/v2/intents/operations.rb +30 -21
  41. data/lib/google/cloud/dialogflow/v2/knowledge_base_pb.rb +2 -2
  42. data/lib/google/cloud/dialogflow/v2/knowledge_base_services_pb.rb +1 -1
  43. data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +44 -41
  44. data/lib/google/cloud/dialogflow/v2/participant_pb.rb +2 -2
  45. data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +1 -1
  46. data/lib/google/cloud/dialogflow/v2/participants/client.rb +50 -43
  47. data/lib/google/cloud/dialogflow/v2/session_entity_type_pb.rb +2 -2
  48. data/lib/google/cloud/dialogflow/v2/session_entity_type_services_pb.rb +1 -1
  49. data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +44 -41
  50. data/lib/google/cloud/dialogflow/v2/session_pb.rb +3 -2
  51. data/lib/google/cloud/dialogflow/v2/session_services_pb.rb +15 -1
  52. data/lib/google/cloud/dialogflow/v2/sessions/client.rb +49 -38
  53. data/lib/google/cloud/dialogflow/v2/validation_result_pb.rb +1 -1
  54. data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
  55. data/lib/google/cloud/dialogflow/v2/version_pb.rb +2 -2
  56. data/lib/google/cloud/dialogflow/v2/version_services_pb.rb +1 -1
  57. data/lib/google/cloud/dialogflow/v2/versions/client.rb +49 -41
  58. data/lib/google/cloud/dialogflow/v2/webhook_pb.rb +2 -2
  59. data/proto_docs/google/cloud/dialogflow/v2/environment.rb +22 -4
  60. data/proto_docs/google/cloud/dialogflow/v2/intent.rb +4 -3
  61. data/proto_docs/google/cloud/dialogflow/v2/session.rb +3 -0
  62. data/proto_docs/google/cloud/dialogflow/v2/validation_result.rb +1 -1
  63. data/proto_docs/google/cloud/dialogflow/v2/version.rb +6 -0
  64. metadata +8 -7
@@ -41,13 +41,12 @@ module Google
41
41
  # See {::Google::Cloud::Dialogflow::V2::Participants::Client::Configuration}
42
42
  # for a description of the configuration fields.
43
43
  #
44
- # ## Example
44
+ # @example
45
45
  #
46
- # To modify the configuration for all Participants clients:
47
- #
48
- # ::Google::Cloud::Dialogflow::V2::Participants::Client.configure do |config|
49
- # config.timeout = 10.0
50
- # end
46
+ # # Modify the configuration for all Participants clients
47
+ # ::Google::Cloud::Dialogflow::V2::Participants::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
51
50
  #
52
51
  # @yield [config] Configure the Client client.
53
52
  # @yieldparam config [Client::Configuration]
@@ -104,19 +103,15 @@ module Google
104
103
  ##
105
104
  # Create a new Participants client object.
106
105
  #
107
- # ## Examples
108
- #
109
- # To create a new Participants client with the default
110
- # configuration:
106
+ # @example
111
107
  #
112
- # client = ::Google::Cloud::Dialogflow::V2::Participants::Client.new
108
+ # # Create a client using the default configuration
109
+ # client = ::Google::Cloud::Dialogflow::V2::Participants::Client.new
113
110
  #
114
- # To create a new Participants client with a custom
115
- # configuration:
116
- #
117
- # client = ::Google::Cloud::Dialogflow::V2::Participants::Client.new do |config|
118
- # config.timeout = 10.0
119
- # end
111
+ # # Create a client using a custom configuration
112
+ # client = ::Google::Cloud::Dialogflow::V2::Participants::Client.new do |config|
113
+ # config.timeout = 10.0
114
+ # end
120
115
  #
121
116
  # @yield [config] Configure the Participants client.
122
117
  # @yieldparam config [Client::Configuration]
@@ -136,10 +131,9 @@ module Google
136
131
 
137
132
  # Create credentials
138
133
  credentials = @config.credentials
139
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
134
+ # Use self-signed JWT if the endpoint is unchanged from default,
140
135
  # but only if the default endpoint does not have a region prefix.
141
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
142
- @config.endpoint == Client.configure.endpoint &&
136
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
143
137
  !@config.endpoint.split(".").first.include?("-")
144
138
  credentials ||= Credentials.default scope: @config.scope,
145
139
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -219,7 +213,9 @@ module Google
219
213
  options.apply_defaults timeout: @config.rpcs.create_participant.timeout,
220
214
  metadata: metadata,
221
215
  retry_policy: @config.rpcs.create_participant.retry_policy
222
- options.apply_defaults metadata: @config.metadata,
216
+
217
+ options.apply_defaults timeout: @config.timeout,
218
+ metadata: @config.metadata,
223
219
  retry_policy: @config.retry_policy
224
220
 
225
221
  @participants_stub.call_rpc :create_participant, request, options: options do |response, operation|
@@ -287,7 +283,9 @@ module Google
287
283
  options.apply_defaults timeout: @config.rpcs.get_participant.timeout,
288
284
  metadata: metadata,
289
285
  retry_policy: @config.rpcs.get_participant.retry_policy
290
- options.apply_defaults metadata: @config.metadata,
286
+
287
+ options.apply_defaults timeout: @config.timeout,
288
+ metadata: @config.metadata,
291
289
  retry_policy: @config.retry_policy
292
290
 
293
291
  @participants_stub.call_rpc :get_participant, request, options: options do |response, operation|
@@ -360,7 +358,9 @@ module Google
360
358
  options.apply_defaults timeout: @config.rpcs.list_participants.timeout,
361
359
  metadata: metadata,
362
360
  retry_policy: @config.rpcs.list_participants.retry_policy
363
- options.apply_defaults metadata: @config.metadata,
361
+
362
+ options.apply_defaults timeout: @config.timeout,
363
+ metadata: @config.metadata,
364
364
  retry_policy: @config.retry_policy
365
365
 
366
366
  @participants_stub.call_rpc :list_participants, request, options: options do |response, operation|
@@ -429,7 +429,9 @@ module Google
429
429
  options.apply_defaults timeout: @config.rpcs.update_participant.timeout,
430
430
  metadata: metadata,
431
431
  retry_policy: @config.rpcs.update_participant.retry_policy
432
- options.apply_defaults metadata: @config.metadata,
432
+
433
+ options.apply_defaults timeout: @config.timeout,
434
+ metadata: @config.metadata,
433
435
  retry_policy: @config.retry_policy
434
436
 
435
437
  @participants_stub.call_rpc :update_participant, request, options: options do |response, operation|
@@ -518,7 +520,9 @@ module Google
518
520
  options.apply_defaults timeout: @config.rpcs.analyze_content.timeout,
519
521
  metadata: metadata,
520
522
  retry_policy: @config.rpcs.analyze_content.retry_policy
521
- options.apply_defaults metadata: @config.metadata,
523
+
524
+ options.apply_defaults timeout: @config.timeout,
525
+ metadata: @config.metadata,
522
526
  retry_policy: @config.retry_policy
523
527
 
524
528
  @participants_stub.call_rpc :analyze_content, request, options: options do |response, operation|
@@ -597,7 +601,9 @@ module Google
597
601
  options.apply_defaults timeout: @config.rpcs.suggest_articles.timeout,
598
602
  metadata: metadata,
599
603
  retry_policy: @config.rpcs.suggest_articles.retry_policy
600
- options.apply_defaults metadata: @config.metadata,
604
+
605
+ options.apply_defaults timeout: @config.timeout,
606
+ metadata: @config.metadata,
601
607
  retry_policy: @config.retry_policy
602
608
 
603
609
  @participants_stub.call_rpc :suggest_articles, request, options: options do |response, operation|
@@ -676,7 +682,9 @@ module Google
676
682
  options.apply_defaults timeout: @config.rpcs.suggest_faq_answers.timeout,
677
683
  metadata: metadata,
678
684
  retry_policy: @config.rpcs.suggest_faq_answers.retry_policy
679
- options.apply_defaults metadata: @config.metadata,
685
+
686
+ options.apply_defaults timeout: @config.timeout,
687
+ metadata: @config.metadata,
680
688
  retry_policy: @config.retry_policy
681
689
 
682
690
  @participants_stub.call_rpc :suggest_faq_answers, request, options: options do |response, operation|
@@ -700,22 +708,21 @@ module Google
700
708
  # Configuration can be applied globally to all clients, or to a single client
701
709
  # on construction.
702
710
  #
703
- # # Examples
704
- #
705
- # To modify the global config, setting the timeout for create_participant
706
- # to 20 seconds, and all remaining timeouts to 10 seconds:
707
- #
708
- # ::Google::Cloud::Dialogflow::V2::Participants::Client.configure do |config|
709
- # config.timeout = 10.0
710
- # config.rpcs.create_participant.timeout = 20.0
711
- # end
712
- #
713
- # To apply the above configuration only to a new client:
714
- #
715
- # client = ::Google::Cloud::Dialogflow::V2::Participants::Client.new do |config|
716
- # config.timeout = 10.0
717
- # config.rpcs.create_participant.timeout = 20.0
718
- # end
711
+ # @example
712
+ #
713
+ # # Modify the global config, setting the timeout for
714
+ # # create_participant to 20 seconds,
715
+ # # and all remaining timeouts to 10 seconds.
716
+ # ::Google::Cloud::Dialogflow::V2::Participants::Client.configure do |config|
717
+ # config.timeout = 10.0
718
+ # config.rpcs.create_participant.timeout = 20.0
719
+ # end
720
+ #
721
+ # # Apply the above configuration only to a new client.
722
+ # client = ::Google::Cloud::Dialogflow::V2::Participants::Client.new do |config|
723
+ # config.timeout = 10.0
724
+ # config.rpcs.create_participant.timeout = 20.0
725
+ # end
719
726
  #
720
727
  # @!attribute [rw] endpoint
721
728
  # The hostname or hostname:port of the service endpoint.
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/dialogflow/v2/session_entity_type.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
@@ -10,6 +8,8 @@ require 'google/api/resource_pb'
10
8
  require 'google/cloud/dialogflow/v2/entity_type_pb'
11
9
  require 'google/protobuf/empty_pb'
12
10
  require 'google/protobuf/field_mask_pb'
11
+ require 'google/protobuf'
12
+
13
13
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
14
  add_file("google/cloud/dialogflow/v2/session_entity_type.proto", :syntax => :proto3) do
15
15
  add_message "google.cloud.dialogflow.v2.SessionEntityType" do
@@ -27,7 +27,7 @@ module Google
27
27
  # Service for managing [SessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityType].
28
28
  class Service
29
29
 
30
- include GRPC::GenericService
30
+ include ::GRPC::GenericService
31
31
 
32
32
  self.marshal_class_method = :encode
33
33
  self.unmarshal_class_method = :decode
@@ -41,13 +41,12 @@ module Google
41
41
  # See {::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client::Configuration}
42
42
  # for a description of the configuration fields.
43
43
  #
44
- # ## Example
44
+ # @example
45
45
  #
46
- # To modify the configuration for all SessionEntityTypes clients:
47
- #
48
- # ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.configure do |config|
49
- # config.timeout = 10.0
50
- # end
46
+ # # Modify the configuration for all SessionEntityTypes clients
47
+ # ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
51
50
  #
52
51
  # @yield [config] Configure the Client client.
53
52
  # @yieldparam config [Client::Configuration]
@@ -99,19 +98,15 @@ module Google
99
98
  ##
100
99
  # Create a new SessionEntityTypes client object.
101
100
  #
102
- # ## Examples
103
- #
104
- # To create a new SessionEntityTypes client with the default
105
- # configuration:
106
- #
107
- # client = ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new
101
+ # @example
108
102
  #
109
- # To create a new SessionEntityTypes client with a custom
110
- # configuration:
103
+ # # Create a client using the default configuration
104
+ # client = ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new
111
105
  #
112
- # client = ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new do |config|
113
- # config.timeout = 10.0
114
- # end
106
+ # # Create a client using a custom configuration
107
+ # client = ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new do |config|
108
+ # config.timeout = 10.0
109
+ # end
115
110
  #
116
111
  # @yield [config] Configure the SessionEntityTypes client.
117
112
  # @yieldparam config [Client::Configuration]
@@ -131,10 +126,9 @@ module Google
131
126
 
132
127
  # Create credentials
133
128
  credentials = @config.credentials
134
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
129
+ # Use self-signed JWT if the endpoint is unchanged from default,
135
130
  # but only if the default endpoint does not have a region prefix.
136
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
137
- @config.endpoint == Client.configure.endpoint &&
131
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
138
132
  !@config.endpoint.split(".").first.include?("-")
139
133
  credentials ||= Credentials.default scope: @config.scope,
140
134
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -224,7 +218,9 @@ module Google
224
218
  options.apply_defaults timeout: @config.rpcs.list_session_entity_types.timeout,
225
219
  metadata: metadata,
226
220
  retry_policy: @config.rpcs.list_session_entity_types.retry_policy
227
- options.apply_defaults metadata: @config.metadata,
221
+
222
+ options.apply_defaults timeout: @config.timeout,
223
+ metadata: @config.metadata,
228
224
  retry_policy: @config.retry_policy
229
225
 
230
226
  @session_entity_types_stub.call_rpc :list_session_entity_types, request, options: options do |response, operation|
@@ -301,7 +297,9 @@ module Google
301
297
  options.apply_defaults timeout: @config.rpcs.get_session_entity_type.timeout,
302
298
  metadata: metadata,
303
299
  retry_policy: @config.rpcs.get_session_entity_type.retry_policy
304
- options.apply_defaults metadata: @config.metadata,
300
+
301
+ options.apply_defaults timeout: @config.timeout,
302
+ metadata: @config.metadata,
305
303
  retry_policy: @config.retry_policy
306
304
 
307
305
  @session_entity_types_stub.call_rpc :get_session_entity_type, request, options: options do |response, operation|
@@ -381,7 +379,9 @@ module Google
381
379
  options.apply_defaults timeout: @config.rpcs.create_session_entity_type.timeout,
382
380
  metadata: metadata,
383
381
  retry_policy: @config.rpcs.create_session_entity_type.retry_policy
384
- options.apply_defaults metadata: @config.metadata,
382
+
383
+ options.apply_defaults timeout: @config.timeout,
384
+ metadata: @config.metadata,
385
385
  retry_policy: @config.retry_policy
386
386
 
387
387
  @session_entity_types_stub.call_rpc :create_session_entity_type, request, options: options do |response, operation|
@@ -453,7 +453,9 @@ module Google
453
453
  options.apply_defaults timeout: @config.rpcs.update_session_entity_type.timeout,
454
454
  metadata: metadata,
455
455
  retry_policy: @config.rpcs.update_session_entity_type.retry_policy
456
- options.apply_defaults metadata: @config.metadata,
456
+
457
+ options.apply_defaults timeout: @config.timeout,
458
+ metadata: @config.metadata,
457
459
  retry_policy: @config.retry_policy
458
460
 
459
461
  @session_entity_types_stub.call_rpc :update_session_entity_type, request, options: options do |response, operation|
@@ -529,7 +531,9 @@ module Google
529
531
  options.apply_defaults timeout: @config.rpcs.delete_session_entity_type.timeout,
530
532
  metadata: metadata,
531
533
  retry_policy: @config.rpcs.delete_session_entity_type.retry_policy
532
- options.apply_defaults metadata: @config.metadata,
534
+
535
+ options.apply_defaults timeout: @config.timeout,
536
+ metadata: @config.metadata,
533
537
  retry_policy: @config.retry_policy
534
538
 
535
539
  @session_entity_types_stub.call_rpc :delete_session_entity_type, request, options: options do |response, operation|
@@ -553,22 +557,21 @@ module Google
553
557
  # Configuration can be applied globally to all clients, or to a single client
554
558
  # on construction.
555
559
  #
556
- # # Examples
557
- #
558
- # To modify the global config, setting the timeout for list_session_entity_types
559
- # to 20 seconds, and all remaining timeouts to 10 seconds:
560
- #
561
- # ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.configure do |config|
562
- # config.timeout = 10.0
563
- # config.rpcs.list_session_entity_types.timeout = 20.0
564
- # end
565
- #
566
- # To apply the above configuration only to a new client:
567
- #
568
- # client = ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new do |config|
569
- # config.timeout = 10.0
570
- # config.rpcs.list_session_entity_types.timeout = 20.0
571
- # end
560
+ # @example
561
+ #
562
+ # # Modify the global config, setting the timeout for
563
+ # # list_session_entity_types to 20 seconds,
564
+ # # and all remaining timeouts to 10 seconds.
565
+ # ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.configure do |config|
566
+ # config.timeout = 10.0
567
+ # config.rpcs.list_session_entity_types.timeout = 20.0
568
+ # end
569
+ #
570
+ # # Apply the above configuration only to a new client.
571
+ # client = ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new do |config|
572
+ # config.timeout = 10.0
573
+ # config.rpcs.list_session_entity_types.timeout = 20.0
574
+ # end
572
575
  #
573
576
  # @!attribute [rw] endpoint
574
577
  # The hostname or hostname:port of the service endpoint.
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/dialogflow/v2/session.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
@@ -16,6 +14,8 @@ require 'google/protobuf/field_mask_pb'
16
14
  require 'google/protobuf/struct_pb'
17
15
  require 'google/rpc/status_pb'
18
16
  require 'google/type/latlng_pb'
17
+ require 'google/protobuf'
18
+
19
19
  Google::Protobuf::DescriptorPool.generated_pool.build do
20
20
  add_file("google/cloud/dialogflow/v2/session.proto", :syntax => :proto3) do
21
21
  add_message "google.cloud.dialogflow.v2.DetectIntentRequest" do
@@ -92,6 +92,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
92
92
  optional :confidence, :float, 4
93
93
  repeated :speech_word_info, :message, 7, "google.cloud.dialogflow.v2.SpeechWordInfo"
94
94
  optional :speech_end_offset, :message, 8, "google.protobuf.Duration"
95
+ optional :language_code, :string, 10
95
96
  end
96
97
  add_enum "google.cloud.dialogflow.v2.StreamingRecognitionResult.MessageType" do
97
98
  value :MESSAGE_TYPE_UNSPECIFIED, 0
@@ -30,7 +30,7 @@ module Google
30
30
  # guide](https://cloud.google.com/dialogflow/docs/api-overview).
31
31
  class Service
32
32
 
33
- include GRPC::GenericService
33
+ include ::GRPC::GenericService
34
34
 
35
35
  self.marshal_class_method = :encode
36
36
  self.unmarshal_class_method = :decode
@@ -41,6 +41,13 @@ module Google
41
41
  # and session entity types to be updated, which in turn might affect
42
42
  # results of future queries.
43
43
  #
44
+ # If you might use
45
+ # [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa)
46
+ # or other CCAI products now or in the future, consider using
47
+ # [AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent]
48
+ # instead of `DetectIntent`. `AnalyzeContent` has additional
49
+ # functionality for Agent Assist and other CCAI products.
50
+ #
44
51
  # Note: Always use agent versions for production traffic.
45
52
  # See [Versions and
46
53
  # environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
@@ -49,6 +56,13 @@ module Google
49
56
  # and returns structured, actionable data as a result. This method is only
50
57
  # available via the gRPC API (not REST).
51
58
  #
59
+ # If you might use
60
+ # [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa)
61
+ # or other CCAI products now or in the future, consider using
62
+ # [StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent]
63
+ # instead of `StreamingDetectIntent`. `StreamingAnalyzeContent` has
64
+ # additional functionality for Agent Assist and other CCAI products.
65
+ #
52
66
  # Note: Always use agent versions for production traffic.
53
67
  # See [Versions and
54
68
  # environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
@@ -44,13 +44,12 @@ module Google
44
44
  # See {::Google::Cloud::Dialogflow::V2::Sessions::Client::Configuration}
45
45
  # for a description of the configuration fields.
46
46
  #
47
- # ## Example
47
+ # @example
48
48
  #
49
- # To modify the configuration for all Sessions clients:
50
- #
51
- # ::Google::Cloud::Dialogflow::V2::Sessions::Client.configure do |config|
52
- # config.timeout = 10.0
53
- # end
49
+ # # Modify the configuration for all Sessions clients
50
+ # ::Google::Cloud::Dialogflow::V2::Sessions::Client.configure do |config|
51
+ # config.timeout = 10.0
52
+ # end
54
53
  #
55
54
  # @yield [config] Configure the Client client.
56
55
  # @yieldparam config [Client::Configuration]
@@ -109,19 +108,15 @@ module Google
109
108
  ##
110
109
  # Create a new Sessions client object.
111
110
  #
112
- # ## Examples
113
- #
114
- # To create a new Sessions client with the default
115
- # configuration:
116
- #
117
- # client = ::Google::Cloud::Dialogflow::V2::Sessions::Client.new
111
+ # @example
118
112
  #
119
- # To create a new Sessions client with a custom
120
- # configuration:
113
+ # # Create a client using the default configuration
114
+ # client = ::Google::Cloud::Dialogflow::V2::Sessions::Client.new
121
115
  #
122
- # client = ::Google::Cloud::Dialogflow::V2::Sessions::Client.new do |config|
123
- # config.timeout = 10.0
124
- # end
116
+ # # Create a client using a custom configuration
117
+ # client = ::Google::Cloud::Dialogflow::V2::Sessions::Client.new do |config|
118
+ # config.timeout = 10.0
119
+ # end
125
120
  #
126
121
  # @yield [config] Configure the Sessions client.
127
122
  # @yieldparam config [Client::Configuration]
@@ -141,10 +136,9 @@ module Google
141
136
 
142
137
  # Create credentials
143
138
  credentials = @config.credentials
144
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
139
+ # Use self-signed JWT if the endpoint is unchanged from default,
145
140
  # but only if the default endpoint does not have a region prefix.
146
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
147
- @config.endpoint == Client.configure.endpoint &&
141
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
148
142
  !@config.endpoint.split(".").first.include?("-")
149
143
  credentials ||= Credentials.default scope: @config.scope,
150
144
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -171,6 +165,13 @@ module Google
171
165
  # and session entity types to be updated, which in turn might affect
172
166
  # results of future queries.
173
167
  #
168
+ # If you might use
169
+ # [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa)
170
+ # or other CCAI products now or in the future, consider using
171
+ # {::Google::Cloud::Dialogflow::V2::Participants::Client#analyze_content AnalyzeContent}
172
+ # instead of `DetectIntent`. `AnalyzeContent` has additional
173
+ # functionality for Agent Assist and other CCAI products.
174
+ #
174
175
  # Note: Always use agent versions for production traffic.
175
176
  # See [Versions and
176
177
  # environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
@@ -269,7 +270,9 @@ module Google
269
270
  options.apply_defaults timeout: @config.rpcs.detect_intent.timeout,
270
271
  metadata: metadata,
271
272
  retry_policy: @config.rpcs.detect_intent.retry_policy
272
- options.apply_defaults metadata: @config.metadata,
273
+
274
+ options.apply_defaults timeout: @config.timeout,
275
+ metadata: @config.metadata,
273
276
  retry_policy: @config.retry_policy
274
277
 
275
278
  @sessions_stub.call_rpc :detect_intent, request, options: options do |response, operation|
@@ -285,6 +288,13 @@ module Google
285
288
  # and returns structured, actionable data as a result. This method is only
286
289
  # available via the gRPC API (not REST).
287
290
  #
291
+ # If you might use
292
+ # [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa)
293
+ # or other CCAI products now or in the future, consider using
294
+ # [StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent]
295
+ # instead of `StreamingDetectIntent`. `StreamingAnalyzeContent` has
296
+ # additional functionality for Agent Assist and other CCAI products.
297
+ #
288
298
  # Note: Always use agent versions for production traffic.
289
299
  # See [Versions and
290
300
  # environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
@@ -327,7 +337,9 @@ module Google
327
337
  options.apply_defaults timeout: @config.rpcs.streaming_detect_intent.timeout,
328
338
  metadata: metadata,
329
339
  retry_policy: @config.rpcs.streaming_detect_intent.retry_policy
330
- options.apply_defaults metadata: @config.metadata,
340
+
341
+ options.apply_defaults timeout: @config.timeout,
342
+ metadata: @config.metadata,
331
343
  retry_policy: @config.retry_policy
332
344
 
333
345
  @sessions_stub.call_rpc :streaming_detect_intent, request, options: options do |response, operation|
@@ -351,22 +363,21 @@ module Google
351
363
  # Configuration can be applied globally to all clients, or to a single client
352
364
  # on construction.
353
365
  #
354
- # # Examples
355
- #
356
- # To modify the global config, setting the timeout for detect_intent
357
- # to 20 seconds, and all remaining timeouts to 10 seconds:
358
- #
359
- # ::Google::Cloud::Dialogflow::V2::Sessions::Client.configure do |config|
360
- # config.timeout = 10.0
361
- # config.rpcs.detect_intent.timeout = 20.0
362
- # end
363
- #
364
- # To apply the above configuration only to a new client:
365
- #
366
- # client = ::Google::Cloud::Dialogflow::V2::Sessions::Client.new do |config|
367
- # config.timeout = 10.0
368
- # config.rpcs.detect_intent.timeout = 20.0
369
- # end
366
+ # @example
367
+ #
368
+ # # Modify the global config, setting the timeout for
369
+ # # detect_intent to 20 seconds,
370
+ # # and all remaining timeouts to 10 seconds.
371
+ # ::Google::Cloud::Dialogflow::V2::Sessions::Client.configure do |config|
372
+ # config.timeout = 10.0
373
+ # config.rpcs.detect_intent.timeout = 20.0
374
+ # end
375
+ #
376
+ # # Apply the above configuration only to a new client.
377
+ # client = ::Google::Cloud::Dialogflow::V2::Sessions::Client.new do |config|
378
+ # config.timeout = 10.0
379
+ # config.rpcs.detect_intent.timeout = 20.0
380
+ # end
370
381
  #
371
382
  # @!attribute [rw] endpoint
372
383
  # The hostname or hostname:port of the service endpoint.
@@ -1,9 +1,9 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/dialogflow/v2/validation_result.proto
3
3
 
4
+ require 'google/api/annotations_pb'
4
5
  require 'google/protobuf'
5
6
 
6
- require 'google/api/annotations_pb'
7
7
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
8
  add_file("google/cloud/dialogflow/v2/validation_result.proto", :syntax => :proto3) do
9
9
  add_message "google.cloud.dialogflow.v2.ValidationError" do
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Dialogflow
23
23
  module V2
24
- VERSION = "0.10.1"
24
+ VERSION = "0.11.3"
25
25
  end
26
26
  end
27
27
  end
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/dialogflow/v2/version.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
@@ -10,6 +8,8 @@ require 'google/api/resource_pb'
10
8
  require 'google/protobuf/empty_pb'
11
9
  require 'google/protobuf/field_mask_pb'
12
10
  require 'google/protobuf/timestamp_pb'
11
+ require 'google/protobuf'
12
+
13
13
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
14
  add_file("google/cloud/dialogflow/v2/version.proto", :syntax => :proto3) do
15
15
  add_message "google.cloud.dialogflow.v2.Version" do
@@ -27,7 +27,7 @@ module Google
27
27
  # Service for managing [Versions][google.cloud.dialogflow.v2.Version].
28
28
  class Service
29
29
 
30
- include GRPC::GenericService
30
+ include ::GRPC::GenericService
31
31
 
32
32
  self.marshal_class_method = :encode
33
33
  self.unmarshal_class_method = :decode