google-cloud-dialogflow-v2 0.11.4 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/AUTHENTICATION.md +7 -25
  4. data/lib/google/cloud/dialogflow/v2/agents/client.rb +215 -27
  5. data/lib/google/cloud/dialogflow/v2/agents/operations.rb +115 -12
  6. data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +46 -6
  7. data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +1 -1
  8. data/lib/google/cloud/dialogflow/v2/contexts/client.rb +126 -18
  9. data/lib/google/cloud/dialogflow/v2/conversation_event_pb.rb +1 -1
  10. data/lib/google/cloud/dialogflow/v2/conversation_pb.rb +2 -0
  11. data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +9 -0
  12. data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +106 -15
  13. data/lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb +19 -0
  14. data/lib/google/cloud/dialogflow/v2/conversations/client.rb +112 -15
  15. data/lib/google/cloud/dialogflow/v2/document_pb.rb +33 -0
  16. data/lib/google/cloud/dialogflow/v2/document_services_pb.rb +21 -0
  17. data/lib/google/cloud/dialogflow/v2/documents/client.rb +426 -20
  18. data/lib/google/cloud/dialogflow/v2/documents/operations.rb +115 -12
  19. data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +242 -30
  20. data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +115 -12
  21. data/lib/google/cloud/dialogflow/v2/environments/client.rb +132 -18
  22. data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +40 -6
  23. data/lib/google/cloud/dialogflow/v2/gcs_pb.rb +9 -1
  24. data/lib/google/cloud/dialogflow/v2/human_agent_assistant_event_pb.rb +1 -1
  25. data/lib/google/cloud/dialogflow/v2/intents/client.rb +161 -21
  26. data/lib/google/cloud/dialogflow/v2/intents/operations.rb +115 -12
  27. data/lib/google/cloud/dialogflow/v2/knowledge_base_pb.rb +1 -0
  28. data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +134 -16
  29. data/lib/google/cloud/dialogflow/v2/participant_pb.rb +31 -0
  30. data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +3 -0
  31. data/lib/google/cloud/dialogflow/v2/participants/client.rb +268 -28
  32. data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +106 -15
  33. data/lib/google/cloud/dialogflow/v2/session_pb.rb +1 -0
  34. data/lib/google/cloud/dialogflow/v2/sessions/client.rb +44 -3
  35. data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
  36. data/lib/google/cloud/dialogflow/v2/versions/client.rb +106 -15
  37. data/lib/google/cloud/dialogflow/v2/webhook_pb.rb +1 -1
  38. data/lib/google/cloud/dialogflow/v2.rb +1 -1
  39. data/proto_docs/google/api/resource.rb +10 -71
  40. data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +4 -1
  41. data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +41 -8
  42. data/proto_docs/google/cloud/dialogflow/v2/document.rb +118 -0
  43. data/proto_docs/google/cloud/dialogflow/v2/gcs.rb +50 -0
  44. data/proto_docs/google/cloud/dialogflow/v2/knowledge_base.rb +28 -0
  45. data/proto_docs/google/cloud/dialogflow/v2/participant.rb +157 -6
  46. metadata +4 -3
@@ -0,0 +1,50 @@
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 V2
24
+ # Google Cloud Storage location for the inputs.
25
+ # @!attribute [rw] uris
26
+ # @return [::Array<::String>]
27
+ # Required. Google Cloud Storage URIs for the inputs. A URI is of the form:
28
+ # gs://bucket/object-prefix-or-name
29
+ # Whether a prefix or name is used depends on the use case.
30
+ class GcsSources
31
+ include ::Google::Protobuf::MessageExts
32
+ extend ::Google::Protobuf::MessageExts::ClassMethods
33
+ end
34
+
35
+ # Google Cloud Storage location for the output.
36
+ # @!attribute [rw] uri
37
+ # @return [::String]
38
+ # The Google Cloud Storage URIs for the output. A URI is of the
39
+ # form:
40
+ # gs://bucket/object-prefix-or-name
41
+ # Whether a prefix or name is used depends on the use case. The requesting
42
+ # user must have "write-permission" to the bucket.
43
+ class GcsDestination
44
+ include ::Google::Protobuf::MessageExts
45
+ extend ::Google::Protobuf::MessageExts::ClassMethods
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
@@ -63,6 +63,34 @@ module Google
63
63
  # @!attribute [rw] page_token
64
64
  # @return [::String]
65
65
  # The next_page_token value returned from a previous list request.
66
+ # @!attribute [rw] filter
67
+ # @return [::String]
68
+ # The filter expression used to filter knowledge bases returned by the list
69
+ # method. The expression has the following syntax:
70
+ #
71
+ # <field> <operator> <value> [AND <field> <operator> <value>] ...
72
+ #
73
+ # The following fields and operators are supported:
74
+ #
75
+ # * display_name with has(:) operator
76
+ # * language_code with equals(=) operator
77
+ #
78
+ # Examples:
79
+ #
80
+ # * 'language_code=en-us' matches knowledge bases with en-us language code.
81
+ # * 'display_name:articles' matches knowledge bases whose display name
82
+ # contains "articles".
83
+ # * 'display_name:"Best Articles"' matches knowledge bases whose display
84
+ # name contains "Best Articles".
85
+ # * 'language_code=en-gb AND display_name=articles' matches all knowledge
86
+ # bases whose display name contains "articles" and whose language code is
87
+ # "en-gb".
88
+ #
89
+ # Note: An empty filter string (i.e. "") is a no-op and will result in no
90
+ # filtering.
91
+ #
92
+ # For more information about filtering, see
93
+ # [API Filtering](https://aip.dev/160).
66
94
  class ListKnowledgeBasesRequest
67
95
  include ::Google::Protobuf::MessageExts
68
96
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -36,10 +36,37 @@ module Google
36
36
  # Optional. Label applied to streams representing this participant in SIPREC
37
37
  # XML metadata and SDP. This is used to assign transcriptions from that
38
38
  # media stream to this participant. This field can be updated.
39
+ # @!attribute [rw] documents_metadata_filters
40
+ # @return [::Google::Protobuf::Map{::String => ::String}]
41
+ # Optional. Key-value filters on the metadata of documents returned by article
42
+ # suggestion. If specified, article suggestion only returns suggested
43
+ # documents that match all filters in their {::Google::Cloud::Dialogflow::V2::Document#metadata Document.metadata}. Multiple
44
+ # values for a metadata key should be concatenated by comma. For example,
45
+ # filters to match all documents that have 'US' or 'CA' in their market
46
+ # metadata values and 'agent' in their user metadata values will be
47
+ # ```
48
+ # documents_metadata_filters {
49
+ # key: "market"
50
+ # value: "US,CA"
51
+ # }
52
+ # documents_metadata_filters {
53
+ # key: "user"
54
+ # value: "agent"
55
+ # }
56
+ # ```
39
57
  class Participant
40
58
  include ::Google::Protobuf::MessageExts
41
59
  extend ::Google::Protobuf::MessageExts::ClassMethods
42
60
 
61
+ # @!attribute [rw] key
62
+ # @return [::String]
63
+ # @!attribute [rw] value
64
+ # @return [::String]
65
+ class DocumentsMetadataFiltersEntry
66
+ include ::Google::Protobuf::MessageExts
67
+ extend ::Google::Protobuf::MessageExts::ClassMethods
68
+ end
69
+
43
70
  # Enumeration of the roles a participant can play in a conversation.
44
71
  module Role
45
72
  # Participant role not set.
@@ -60,7 +87,7 @@ module Google
60
87
  # Represents a message posted into a conversation.
61
88
  # @!attribute [rw] name
62
89
  # @return [::String]
63
- # The unique identifier of the message.
90
+ # Optional. The unique identifier of the message.
64
91
  # Format: `projects/<Project ID>/locations/<Location
65
92
  # ID>/conversations/<Conversation ID>/messages/<Message ID>`.
66
93
  # @!attribute [rw] content
@@ -79,10 +106,16 @@ module Google
79
106
  # Output only. The role of the participant.
80
107
  # @!attribute [r] create_time
81
108
  # @return [::Google::Protobuf::Timestamp]
82
- # Output only. The time when the message was created.
109
+ # Output only. The time when the message was created in Contact Center AI.
110
+ # @!attribute [rw] send_time
111
+ # @return [::Google::Protobuf::Timestamp]
112
+ # Optional. The time when the message was sent.
83
113
  # @!attribute [r] message_annotation
84
114
  # @return [::Google::Cloud::Dialogflow::V2::MessageAnnotation]
85
115
  # Output only. The annotation for the message.
116
+ # @!attribute [r] sentiment_analysis
117
+ # @return [::Google::Cloud::Dialogflow::V2::SentimentAnalysisResult]
118
+ # Output only. The sentiment analysis result for the message.
86
119
  class Message
87
120
  include ::Google::Protobuf::MessageExts
88
121
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -179,6 +212,9 @@ module Google
179
212
  # @!attribute [rw] query_params
180
213
  # @return [::Google::Cloud::Dialogflow::V2::QueryParameters]
181
214
  # Parameters for a Dialogflow virtual-agent query.
215
+ # @!attribute [rw] assist_query_params
216
+ # @return [::Google::Cloud::Dialogflow::V2::AssistQueryParameters]
217
+ # Parameters for a human assist query.
182
218
  # @!attribute [rw] request_id
183
219
  # @return [::String]
184
220
  # A unique identifier for this request. Restricted to 36 ASCII characters.
@@ -252,16 +288,19 @@ module Google
252
288
  # ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
253
289
  # @!attribute [rw] latest_message
254
290
  # @return [::String]
255
- # The name of the latest conversation message to compile suggestion
291
+ # Optional. The name of the latest conversation message to compile suggestion
256
292
  # for. If empty, it will be the latest message of the conversation.
257
293
  #
258
294
  # Format: `projects/<Project ID>/locations/<Location
259
295
  # ID>/conversations/<Conversation ID>/messages/<Message ID>`.
260
296
  # @!attribute [rw] context_size
261
297
  # @return [::Integer]
262
- # Max number of messages prior to and including
298
+ # Optional. Max number of messages prior to and including
263
299
  # {::Google::Cloud::Dialogflow::V2::SuggestArticlesRequest#latest_message latest_message} to use as context
264
300
  # when compiling the suggestion. By default 20 and at most 50.
301
+ # @!attribute [rw] assist_query_params
302
+ # @return [::Google::Cloud::Dialogflow::V2::AssistQueryParameters]
303
+ # Parameters for a human assist query.
265
304
  class SuggestArticlesRequest
266
305
  include ::Google::Protobuf::MessageExts
267
306
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -298,16 +337,19 @@ module Google
298
337
  # ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
299
338
  # @!attribute [rw] latest_message
300
339
  # @return [::String]
301
- # The name of the latest conversation message to compile suggestion
340
+ # Optional. The name of the latest conversation message to compile suggestion
302
341
  # for. If empty, it will be the latest message of the conversation.
303
342
  #
304
343
  # Format: `projects/<Project ID>/locations/<Location
305
344
  # ID>/conversations/<Conversation ID>/messages/<Message ID>`.
306
345
  # @!attribute [rw] context_size
307
346
  # @return [::Integer]
308
- # Max number of messages prior to and including
347
+ # Optional. Max number of messages prior to and including
309
348
  # [latest_message] to use as context when compiling the
310
349
  # suggestion. By default 20 and at most 50.
350
+ # @!attribute [rw] assist_query_params
351
+ # @return [::Google::Cloud::Dialogflow::V2::AssistQueryParameters]
352
+ # Parameters for a human assist query.
311
353
  class SuggestFaqAnswersRequest
312
354
  include ::Google::Protobuf::MessageExts
313
355
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -336,6 +378,59 @@ module Google
336
378
  extend ::Google::Protobuf::MessageExts::ClassMethods
337
379
  end
338
380
 
381
+ # The request message for {::Google::Cloud::Dialogflow::V2::Participants::Client#suggest_smart_replies Participants.SuggestSmartReplies}.
382
+ # @!attribute [rw] parent
383
+ # @return [::String]
384
+ # Required. The name of the participant to fetch suggestion for.
385
+ # Format: `projects/<Project ID>/locations/<Location
386
+ # ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
387
+ # @!attribute [rw] current_text_input
388
+ # @return [::Google::Cloud::Dialogflow::V2::TextInput]
389
+ # The current natural language text segment to compile suggestion
390
+ # for. This provides a way for user to get follow up smart reply suggestion
391
+ # after a smart reply selection, without sending a text message.
392
+ # @!attribute [rw] latest_message
393
+ # @return [::String]
394
+ # The name of the latest conversation message to compile suggestion
395
+ # for. If empty, it will be the latest message of the conversation.
396
+ #
397
+ # Format: `projects/<Project ID>/locations/<Location
398
+ # ID>/conversations/<Conversation ID>/messages/<Message ID>`.
399
+ # @!attribute [rw] context_size
400
+ # @return [::Integer]
401
+ # Max number of messages prior to and including
402
+ # [latest_message] to use as context when compiling the
403
+ # suggestion. By default 20 and at most 50.
404
+ class SuggestSmartRepliesRequest
405
+ include ::Google::Protobuf::MessageExts
406
+ extend ::Google::Protobuf::MessageExts::ClassMethods
407
+ end
408
+
409
+ # The response message for {::Google::Cloud::Dialogflow::V2::Participants::Client#suggest_smart_replies Participants.SuggestSmartReplies}.
410
+ # @!attribute [r] smart_reply_answers
411
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::SmartReplyAnswer>]
412
+ # Output only. Multiple reply options provided by smart reply service. The
413
+ # order is based on the rank of the model prediction.
414
+ # The maximum number of the returned replies is set in SmartReplyConfig.
415
+ # @!attribute [rw] latest_message
416
+ # @return [::String]
417
+ # The name of the latest conversation message used to compile
418
+ # suggestion for.
419
+ #
420
+ # Format: `projects/<Project ID>/locations/<Location
421
+ # ID>/conversations/<Conversation ID>/messages/<Message ID>`.
422
+ # @!attribute [rw] context_size
423
+ # @return [::Integer]
424
+ # Number of messages prior to and including
425
+ # {::Google::Cloud::Dialogflow::V2::SuggestSmartRepliesResponse#latest_message latest_message} to compile the
426
+ # suggestion. It may be smaller than the
427
+ # {::Google::Cloud::Dialogflow::V2::SuggestSmartRepliesRequest#context_size SuggestSmartRepliesRequest.context_size} field in the request if there
428
+ # aren't that many messages in the conversation.
429
+ class SuggestSmartRepliesResponse
430
+ include ::Google::Protobuf::MessageExts
431
+ extend ::Google::Protobuf::MessageExts::ClassMethods
432
+ end
433
+
339
434
  # Represents the natural language speech audio to be played to the end user.
340
435
  # @!attribute [rw] config
341
436
  # @return [::Google::Cloud::Dialogflow::V2::OutputAudioConfig]
@@ -460,6 +555,26 @@ module Google
460
555
  end
461
556
  end
462
557
 
558
+ # Represents a smart reply answer.
559
+ # @!attribute [rw] reply
560
+ # @return [::String]
561
+ # The content of the reply.
562
+ # @!attribute [rw] confidence
563
+ # @return [::Float]
564
+ # Smart reply confidence.
565
+ # The system's confidence score that this reply is a good match for
566
+ # this conversation, as a value from 0.0 (completely uncertain) to 1.0
567
+ # (completely certain).
568
+ # @!attribute [rw] answer_record
569
+ # @return [::String]
570
+ # The name of answer record, in the format of
571
+ # "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
572
+ # ID>"
573
+ class SmartReplyAnswer
574
+ include ::Google::Protobuf::MessageExts
575
+ extend ::Google::Protobuf::MessageExts::ClassMethods
576
+ end
577
+
463
578
  # One response of different type of suggestion response which is used in
464
579
  # the response of {::Google::Cloud::Dialogflow::V2::Participants::Client#analyze_content Participants.AnalyzeContent} and
465
580
  # {::Google::Cloud::Dialogflow::V2::Participants::Client#analyze_content Participants.AnalyzeContent}, as well as {::Google::Cloud::Dialogflow::V2::HumanAgentAssistantEvent HumanAgentAssistantEvent}.
@@ -472,6 +587,9 @@ module Google
472
587
  # @!attribute [rw] suggest_faq_answers_response
473
588
  # @return [::Google::Cloud::Dialogflow::V2::SuggestFaqAnswersResponse]
474
589
  # SuggestFaqAnswersResponse if request is for FAQ_ANSWER.
590
+ # @!attribute [rw] suggest_smart_replies_response
591
+ # @return [::Google::Cloud::Dialogflow::V2::SuggestSmartRepliesResponse]
592
+ # SuggestSmartRepliesResponse if request is for SMART_REPLY.
475
593
  class SuggestionResult
476
594
  include ::Google::Protobuf::MessageExts
477
595
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -519,6 +637,39 @@ module Google
519
637
  include ::Google::Protobuf::MessageExts
520
638
  extend ::Google::Protobuf::MessageExts::ClassMethods
521
639
  end
640
+
641
+ # Represents the parameters of human assist query.
642
+ # @!attribute [rw] documents_metadata_filters
643
+ # @return [::Google::Protobuf::Map{::String => ::String}]
644
+ # Key-value filters on the metadata of documents returned by article
645
+ # suggestion. If specified, article suggestion only returns suggested
646
+ # documents that match all filters in their {::Google::Cloud::Dialogflow::V2::Document#metadata Document.metadata}. Multiple
647
+ # values for a metadata key should be concatenated by comma. For example,
648
+ # filters to match all documents that have 'US' or 'CA' in their market
649
+ # metadata values and 'agent' in their user metadata values will be
650
+ # ```
651
+ # documents_metadata_filters {
652
+ # key: "market"
653
+ # value: "US,CA"
654
+ # }
655
+ # documents_metadata_filters {
656
+ # key: "user"
657
+ # value: "agent"
658
+ # }
659
+ # ```
660
+ class AssistQueryParameters
661
+ include ::Google::Protobuf::MessageExts
662
+ extend ::Google::Protobuf::MessageExts::ClassMethods
663
+
664
+ # @!attribute [rw] key
665
+ # @return [::String]
666
+ # @!attribute [rw] value
667
+ # @return [::String]
668
+ class DocumentsMetadataFiltersEntry
669
+ include ::Google::Protobuf::MessageExts
670
+ extend ::Google::Protobuf::MessageExts::ClassMethods
671
+ end
672
+ end
522
673
  end
523
674
  end
524
675
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-dialogflow-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.4
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-28 00:00:00.000000000 Z
11
+ date: 2022-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -290,6 +290,7 @@ files:
290
290
  - proto_docs/google/cloud/dialogflow/v2/entity_type.rb
291
291
  - proto_docs/google/cloud/dialogflow/v2/environment.rb
292
292
  - proto_docs/google/cloud/dialogflow/v2/fulfillment.rb
293
+ - proto_docs/google/cloud/dialogflow/v2/gcs.rb
293
294
  - proto_docs/google/cloud/dialogflow/v2/human_agent_assistant_event.rb
294
295
  - proto_docs/google/cloud/dialogflow/v2/intent.rb
295
296
  - proto_docs/google/cloud/dialogflow/v2/knowledge_base.rb
@@ -327,7 +328,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
327
328
  - !ruby/object:Gem::Version
328
329
  version: '0'
329
330
  requirements: []
330
- rubygems_version: 3.2.17
331
+ rubygems_version: 3.3.5
331
332
  signing_key:
332
333
  specification_version: 4
333
334
  summary: API Client library for the Dialogflow V2 API