google-cloud-dialogflow-v2 0.6.2 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +188 -190
  3. data/README.md +70 -2
  4. data/lib/google/cloud/dialogflow/v2.rb +13 -2
  5. data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +25 -40
  6. data/lib/google/cloud/dialogflow/v2/agents.rb +1 -28
  7. data/lib/google/cloud/dialogflow/v2/agents/client.rb +41 -100
  8. data/lib/google/cloud/dialogflow/v2/agents/operations.rb +96 -11
  9. data/lib/google/cloud/dialogflow/v2/agents/paths.rb +42 -3
  10. data/lib/google/cloud/dialogflow/v2/answer_record_pb.rb +100 -0
  11. data/lib/google/cloud/dialogflow/v2/answer_record_services_pb.rb +48 -0
  12. data/lib/google/cloud/dialogflow/v2/answer_records.rb +49 -0
  13. data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +478 -0
  14. data/lib/google/cloud/dialogflow/v2/answer_records/credentials.rb +52 -0
  15. data/lib/google/cloud/dialogflow/v2/answer_records/paths.rb +105 -0
  16. data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +7 -0
  17. data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +8 -25
  18. data/lib/google/cloud/dialogflow/v2/contexts.rb +1 -18
  19. data/lib/google/cloud/dialogflow/v2/contexts/client.rb +24 -63
  20. data/lib/google/cloud/dialogflow/v2/contexts/paths.rb +74 -2
  21. data/lib/google/cloud/dialogflow/v2/conversation_event_pb.rb +39 -0
  22. data/lib/google/cloud/dialogflow/v2/conversation_pb.rb +89 -0
  23. data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +182 -0
  24. data/lib/google/cloud/dialogflow/v2/conversation_profile_services_pb.rb +61 -0
  25. data/lib/google/cloud/dialogflow/v2/conversation_profiles.rb +49 -0
  26. data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +699 -0
  27. data/lib/google/cloud/dialogflow/v2/conversation_profiles/credentials.rb +52 -0
  28. data/lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb +246 -0
  29. data/lib/google/cloud/dialogflow/v2/conversation_services_pb.rb +75 -0
  30. data/lib/google/cloud/dialogflow/v2/conversations.rb +49 -0
  31. data/lib/google/cloud/dialogflow/v2/conversations/client.rb +757 -0
  32. data/lib/google/cloud/dialogflow/v2/conversations/credentials.rb +52 -0
  33. data/lib/google/cloud/dialogflow/v2/conversations/paths.rb +146 -0
  34. data/lib/google/cloud/dialogflow/v2/document_pb.rb +99 -0
  35. data/lib/google/cloud/dialogflow/v2/document_services_pb.rb +73 -0
  36. data/lib/google/cloud/dialogflow/v2/documents.rb +50 -0
  37. data/lib/google/cloud/dialogflow/v2/documents/client.rb +810 -0
  38. data/lib/google/cloud/dialogflow/v2/documents/credentials.rb +52 -0
  39. data/lib/google/cloud/dialogflow/v2/documents/operations.rb +655 -0
  40. data/lib/google/cloud/dialogflow/v2/documents/paths.rb +119 -0
  41. data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +12 -39
  42. data/lib/google/cloud/dialogflow/v2/entity_types.rb +1 -28
  43. data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +28 -91
  44. data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +96 -11
  45. data/lib/google/cloud/dialogflow/v2/entity_types/paths.rb +58 -12
  46. data/lib/google/cloud/dialogflow/v2/environment_pb.rb +50 -1
  47. data/lib/google/cloud/dialogflow/v2/environment_services_pb.rb +24 -3
  48. data/lib/google/cloud/dialogflow/v2/environments.rb +1 -1
  49. data/lib/google/cloud/dialogflow/v2/environments/client.rb +430 -14
  50. data/lib/google/cloud/dialogflow/v2/environments/paths.rb +104 -5
  51. data/lib/google/cloud/dialogflow/v2/fulfillment_pb.rb +59 -0
  52. data/lib/google/cloud/dialogflow/v2/fulfillment_services_pb.rb +47 -0
  53. data/lib/google/cloud/dialogflow/v2/fulfillments.rb +49 -0
  54. data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +460 -0
  55. data/lib/google/cloud/dialogflow/v2/fulfillments/credentials.rb +52 -0
  56. data/lib/google/cloud/dialogflow/v2/fulfillments/paths.rb +69 -0
  57. data/lib/google/cloud/dialogflow/v2/gcs_pb.rb +20 -0
  58. data/lib/google/cloud/dialogflow/v2/human_agent_assistant_event_pb.rb +26 -0
  59. data/lib/google/cloud/dialogflow/v2/intent_pb.rb +2 -0
  60. data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +9 -40
  61. data/lib/google/cloud/dialogflow/v2/intents.rb +1 -32
  62. data/lib/google/cloud/dialogflow/v2/intents/client.rb +34 -81
  63. data/lib/google/cloud/dialogflow/v2/intents/operations.rb +96 -11
  64. data/lib/google/cloud/dialogflow/v2/intents/paths.rb +97 -13
  65. data/lib/google/cloud/dialogflow/v2/knowledge_base_pb.rb +60 -0
  66. data/lib/google/cloud/dialogflow/v2/knowledge_base_services_pb.rb +53 -0
  67. data/lib/google/cloud/dialogflow/v2/knowledge_bases.rb +49 -0
  68. data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +696 -0
  69. data/lib/google/cloud/dialogflow/v2/knowledge_bases/credentials.rb +52 -0
  70. data/lib/google/cloud/dialogflow/v2/knowledge_bases/paths.rb +105 -0
  71. data/lib/google/cloud/dialogflow/v2/participant_pb.rb +172 -0
  72. data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +64 -0
  73. data/lib/google/cloud/dialogflow/v2/participants.rb +49 -0
  74. data/lib/google/cloud/dialogflow/v2/participants/client.rb +894 -0
  75. data/lib/google/cloud/dialogflow/v2/participants/credentials.rb +52 -0
  76. data/lib/google/cloud/dialogflow/v2/participants/paths.rb +334 -0
  77. data/lib/google/cloud/dialogflow/v2/session_entity_type_services_pb.rb +7 -23
  78. data/lib/google/cloud/dialogflow/v2/session_entity_types.rb +1 -17
  79. data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +23 -53
  80. data/lib/google/cloud/dialogflow/v2/session_entity_types/paths.rb +74 -2
  81. data/lib/google/cloud/dialogflow/v2/session_pb.rb +1 -0
  82. data/lib/google/cloud/dialogflow/v2/session_services_pb.rb +15 -7
  83. data/lib/google/cloud/dialogflow/v2/sessions.rb +4 -4
  84. data/lib/google/cloud/dialogflow/v2/sessions/client.rb +51 -15
  85. data/lib/google/cloud/dialogflow/v2/sessions/paths.rb +113 -3
  86. data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
  87. data/lib/google/cloud/dialogflow/v2/version_pb.rb +69 -0
  88. data/lib/google/cloud/dialogflow/v2/version_services_pb.rb +59 -0
  89. data/lib/google/cloud/dialogflow/v2/versions.rb +49 -0
  90. data/lib/google/cloud/dialogflow/v2/versions/client.rb +709 -0
  91. data/lib/google/cloud/dialogflow/v2/versions/credentials.rb +52 -0
  92. data/lib/google/cloud/dialogflow/v2/versions/paths.rb +110 -0
  93. data/proto_docs/google/api/field_behavior.rb +6 -0
  94. data/proto_docs/google/api/resource.rb +50 -14
  95. data/proto_docs/google/cloud/dialogflow/v2/agent.rb +9 -1
  96. data/proto_docs/google/cloud/dialogflow/v2/answer_record.rb +252 -0
  97. data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +25 -0
  98. data/proto_docs/google/cloud/dialogflow/v2/context.rb +17 -2
  99. data/proto_docs/google/cloud/dialogflow/v2/conversation.rb +253 -0
  100. data/proto_docs/google/cloud/dialogflow/v2/conversation_event.rb +83 -0
  101. data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +522 -0
  102. data/proto_docs/google/cloud/dialogflow/v2/document.rb +267 -0
  103. data/proto_docs/google/cloud/dialogflow/v2/entity_type.rb +12 -3
  104. data/proto_docs/google/cloud/dialogflow/v2/environment.rb +187 -5
  105. data/proto_docs/google/cloud/dialogflow/v2/fulfillment.rb +144 -0
  106. data/proto_docs/google/cloud/dialogflow/v2/human_agent_assistant_event.rb +45 -0
  107. data/proto_docs/google/cloud/dialogflow/v2/intent.rb +29 -4
  108. data/proto_docs/google/cloud/dialogflow/v2/knowledge_base.rb +139 -0
  109. data/proto_docs/google/cloud/dialogflow/v2/participant.rb +503 -0
  110. data/proto_docs/google/cloud/dialogflow/v2/session.rb +52 -7
  111. data/proto_docs/google/cloud/dialogflow/v2/session_entity_type.rb +7 -6
  112. data/proto_docs/google/cloud/dialogflow/v2/validation_result.rb +1 -1
  113. data/proto_docs/google/cloud/dialogflow/v2/version.rb +176 -0
  114. data/proto_docs/google/cloud/dialogflow/v2/webhook.rb +2 -2
  115. data/proto_docs/google/longrunning/operations.rb +17 -3
  116. data/proto_docs/google/protobuf/any.rb +5 -2
  117. data/proto_docs/google/protobuf/timestamp.rb +10 -1
  118. data/proto_docs/google/type/latlng.rb +2 -2
  119. metadata +73 -9
@@ -29,6 +29,7 @@ module Google
29
29
  # recognizer should recognize with higher likelihood.
30
30
  #
31
31
  # This list can be used to:
32
+ #
32
33
  # * improve accuracy for words and phrases you expect the user to say,
33
34
  # e.g. typical commands for your Dialogflow agent
34
35
  # * add additional words to the speech recognizer vocabulary
@@ -152,6 +153,12 @@ module Google
152
153
  # Note: This setting is relevant only for streaming methods.
153
154
  # Note: When specified, InputAudioConfig.single_utterance takes precedence
154
155
  # over StreamingDetectIntentRequest.single_utterance.
156
+ # @!attribute [rw] disable_no_speech_recognized_event
157
+ # @return [::Boolean]
158
+ # Only used in {::Google::Cloud::Dialogflow::V2::Participants::Client#analyze_content Participants.AnalyzeContent} and
159
+ # [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent].
160
+ # If `false` and recognition doesn't return any result, trigger
161
+ # `NO_SPEECH_RECOGNIZED` event to Dialogflow agent.
155
162
  class InputAudioConfig
156
163
  include ::Google::Protobuf::MessageExts
157
164
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -231,6 +238,18 @@ module Google
231
238
  extend ::Google::Protobuf::MessageExts::ClassMethods
232
239
  end
233
240
 
241
+ # Configures speech transcription for {::Google::Cloud::Dialogflow::V2::ConversationProfile ConversationProfile}.
242
+ # @!attribute [rw] speech_model_variant
243
+ # @return [::Google::Cloud::Dialogflow::V2::SpeechModelVariant]
244
+ # Optional. The speech model used in speech to text.
245
+ # `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as
246
+ # `USE_ENHANCED`. It can be overridden in {::Google::Cloud::Dialogflow::V2::AnalyzeContentRequest AnalyzeContentRequest} and
247
+ # [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest] request.
248
+ class SpeechToTextConfig
249
+ include ::Google::Protobuf::MessageExts
250
+ extend ::Google::Protobuf::MessageExts::ClassMethods
251
+ end
252
+
234
253
  # Audio encoding of the audio content sent in the conversational query request.
235
254
  # Refer to the
236
255
  # [Cloud Speech API
@@ -352,11 +371,17 @@ module Google
352
371
  # MP3 audio at 32kbps.
353
372
  OUTPUT_AUDIO_ENCODING_MP3 = 2
354
373
 
374
+ # MP3 audio at 64kbps.
375
+ OUTPUT_AUDIO_ENCODING_MP3_64_KBPS = 4
376
+
355
377
  # Opus encoded audio wrapped in an ogg container. The result will be a
356
378
  # file which can be played natively on Android, and in browsers (at least
357
379
  # Chrome and Firefox). The quality of the encoding is considerably higher
358
380
  # than MP3 while using approximately the same bitrate.
359
381
  OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3
382
+
383
+ # 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
384
+ OUTPUT_AUDIO_ENCODING_MULAW = 5
360
385
  end
361
386
  end
362
387
  end
@@ -21,7 +21,21 @@ module Google
21
21
  module Cloud
22
22
  module Dialogflow
23
23
  module V2
24
- # Represents a context.
24
+ # Dialogflow contexts are similar to natural language context. If a person says
25
+ # to you "they are orange", you need context in order to understand what "they"
26
+ # is referring to. Similarly, for Dialogflow to handle an end-user expression
27
+ # like that, it needs to be provided with context in order to correctly match
28
+ # an intent.
29
+ #
30
+ # Using contexts, you can control the flow of a conversation. You can configure
31
+ # contexts for an intent by setting input and output contexts, which are
32
+ # identified by string names. When an intent is matched, any configured output
33
+ # contexts for that intent become active. While any contexts are active,
34
+ # Dialogflow is more likely to match intents that are configured with input
35
+ # contexts that correspond to the currently active contexts.
36
+ #
37
+ # For more information about context, see the
38
+ # [Contexts guide](https://cloud.google.com/dialogflow/docs/contexts-overview).
25
39
  # @!attribute [rw] name
26
40
  # @return [::String]
27
41
  # Required. The unique identifier of the context. Format:
@@ -59,7 +73,8 @@ module Google
59
73
  # - MapKey value: parameter name
60
74
  # - MapValue type:
61
75
  # - If parameter's entity type is a composite entity: map
62
- # - Else: string or number, depending on parameter value type
76
+ # - Else: depending on parameter value type, could be one of string,
77
+ # number, boolean, null, list or map
63
78
  # - MapValue value:
64
79
  # - If parameter's entity type is a composite entity:
65
80
  # map from composite entity property names to property values
@@ -0,0 +1,253 @@
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
+ # Represents a conversation.
25
+ # A conversation is an interaction between an agent, including live agents
26
+ # and Dialogflow agents, and a support customer. Conversations can
27
+ # include phone calls and text-based chat sessions.
28
+ # @!attribute [r] name
29
+ # @return [::String]
30
+ # Output only. The unique identifier of this conversation.
31
+ # Format: `projects/<Project ID>/locations/<Location
32
+ # ID>/conversations/<Conversation ID>`.
33
+ # @!attribute [r] lifecycle_state
34
+ # @return [::Google::Cloud::Dialogflow::V2::Conversation::LifecycleState]
35
+ # Output only. The current state of the Conversation.
36
+ # @!attribute [rw] conversation_profile
37
+ # @return [::String]
38
+ # Required. The Conversation Profile to be used to configure this
39
+ # Conversation. This field cannot be updated.
40
+ # Format: `projects/<Project ID>/locations/<Location
41
+ # ID>/conversationProfiles/<Conversation Profile ID>`.
42
+ # @!attribute [r] phone_number
43
+ # @return [::Google::Cloud::Dialogflow::V2::ConversationPhoneNumber]
44
+ # Output only. It will not be empty if the conversation is to be connected over
45
+ # telephony.
46
+ # @!attribute [r] start_time
47
+ # @return [::Google::Protobuf::Timestamp]
48
+ # Output only. The time the conversation was started.
49
+ # @!attribute [r] end_time
50
+ # @return [::Google::Protobuf::Timestamp]
51
+ # Output only. The time the conversation was finished.
52
+ # @!attribute [rw] conversation_stage
53
+ # @return [::Google::Cloud::Dialogflow::V2::Conversation::ConversationStage]
54
+ # The stage of a conversation. It indicates whether the virtual agent or a
55
+ # human agent is handling the conversation.
56
+ #
57
+ # If the conversation is created with the conversation profile that has
58
+ # Dialogflow config set, defaults to
59
+ # {::Google::Cloud::Dialogflow::V2::Conversation::ConversationStage::VIRTUAL_AGENT_STAGE ConversationStage.VIRTUAL_AGENT_STAGE}; Otherwise, defaults to
60
+ # {::Google::Cloud::Dialogflow::V2::Conversation::ConversationStage::HUMAN_ASSIST_STAGE ConversationStage.HUMAN_ASSIST_STAGE}.
61
+ #
62
+ # If the conversation is created with the conversation profile that has
63
+ # Dialogflow config set but explicitly sets conversation_stage to
64
+ # {::Google::Cloud::Dialogflow::V2::Conversation::ConversationStage::HUMAN_ASSIST_STAGE ConversationStage.HUMAN_ASSIST_STAGE}, it skips
65
+ # {::Google::Cloud::Dialogflow::V2::Conversation::ConversationStage::VIRTUAL_AGENT_STAGE ConversationStage.VIRTUAL_AGENT_STAGE} stage and directly goes to
66
+ # {::Google::Cloud::Dialogflow::V2::Conversation::ConversationStage::HUMAN_ASSIST_STAGE ConversationStage.HUMAN_ASSIST_STAGE}.
67
+ class Conversation
68
+ include ::Google::Protobuf::MessageExts
69
+ extend ::Google::Protobuf::MessageExts::ClassMethods
70
+
71
+ # Enumeration of the completion status of the conversation.
72
+ module LifecycleState
73
+ # Unknown.
74
+ LIFECYCLE_STATE_UNSPECIFIED = 0
75
+
76
+ # Conversation is currently open for media analysis.
77
+ IN_PROGRESS = 1
78
+
79
+ # Conversation has been completed.
80
+ COMPLETED = 2
81
+ end
82
+
83
+ # Enumeration of the different conversation stages a conversation can be in.
84
+ # Reference:
85
+ # https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages
86
+ module ConversationStage
87
+ # Unknown. Should never be used after a conversation is successfully
88
+ # created.
89
+ CONVERSATION_STAGE_UNSPECIFIED = 0
90
+
91
+ # The conversation should return virtual agent responses into the
92
+ # conversation.
93
+ VIRTUAL_AGENT_STAGE = 1
94
+
95
+ # The conversation should not provide responses, just listen and provide
96
+ # suggestions.
97
+ HUMAN_ASSIST_STAGE = 2
98
+ end
99
+ end
100
+
101
+ # The request message for {::Google::Cloud::Dialogflow::V2::Conversations::Client#create_conversation Conversations.CreateConversation}.
102
+ # @!attribute [rw] parent
103
+ # @return [::String]
104
+ # Required. Resource identifier of the project creating the conversation.
105
+ # Format: `projects/<Project ID>/locations/<Location ID>`.
106
+ # @!attribute [rw] conversation
107
+ # @return [::Google::Cloud::Dialogflow::V2::Conversation]
108
+ # Required. The conversation to create.
109
+ # @!attribute [rw] conversation_id
110
+ # @return [::String]
111
+ # Optional. Identifier of the conversation. Generally it's auto generated by Google.
112
+ # Only set it if you cannot wait for the response to return a
113
+ # auto-generated one to you.
114
+ #
115
+ # The conversation ID must be compliant with the regression fomula
116
+ # "[a-zA-Z][a-zA-Z0-9_-]*" with the characters length in range of [3,64].
117
+ # If the field is provided, the caller is resposible for
118
+ # 1. the uniqueness of the ID, otherwise the request will be rejected.
119
+ # 2. the consistency for whether to use custom ID or not under a project to
120
+ # better ensure uniqueness.
121
+ class CreateConversationRequest
122
+ include ::Google::Protobuf::MessageExts
123
+ extend ::Google::Protobuf::MessageExts::ClassMethods
124
+ end
125
+
126
+ # The request message for {::Google::Cloud::Dialogflow::V2::Conversations::Client#list_conversations Conversations.ListConversations}.
127
+ # @!attribute [rw] parent
128
+ # @return [::String]
129
+ # Required. The project from which to list all conversation.
130
+ # Format: `projects/<Project ID>/locations/<Location ID>`.
131
+ # @!attribute [rw] page_size
132
+ # @return [::Integer]
133
+ # Optional. The maximum number of items to return in a single page. By
134
+ # default 100 and at most 1000.
135
+ # @!attribute [rw] page_token
136
+ # @return [::String]
137
+ # Optional. The next_page_token value returned from a previous list request.
138
+ # @!attribute [rw] filter
139
+ # @return [::String]
140
+ # A filter expression that filters conversations listed in the response. In
141
+ # general, the expression must specify the field name, a comparison operator,
142
+ # and the value to use for filtering:
143
+ # <ul>
144
+ # <li>The value must be a string, a number, or a boolean.</li>
145
+ # <li>The comparison operator must be either `=`,`!=`, `>`, or `<`.</li>
146
+ # <li>To filter on multiple expressions, separate the
147
+ # expressions with `AND` or `OR` (omitting both implies `AND`).</li>
148
+ # <li>For clarity, expressions can be enclosed in parentheses.</li>
149
+ # </ul>
150
+ # Only `lifecycle_state` can be filtered on in this way. For example,
151
+ # the following expression only returns `COMPLETED` conversations:
152
+ #
153
+ # `lifecycle_state = "COMPLETED"`
154
+ #
155
+ # For more information about filtering, see
156
+ # [API Filtering](https://aip.dev/160).
157
+ class ListConversationsRequest
158
+ include ::Google::Protobuf::MessageExts
159
+ extend ::Google::Protobuf::MessageExts::ClassMethods
160
+ end
161
+
162
+ # The response message for {::Google::Cloud::Dialogflow::V2::Conversations::Client#list_conversations Conversations.ListConversations}.
163
+ # @!attribute [rw] conversations
164
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::Conversation>]
165
+ # The list of conversations. There will be a maximum number of items
166
+ # returned based on the page_size field in the request.
167
+ # @!attribute [rw] next_page_token
168
+ # @return [::String]
169
+ # Token to retrieve the next page of results, or empty if there are no
170
+ # more results in the list.
171
+ class ListConversationsResponse
172
+ include ::Google::Protobuf::MessageExts
173
+ extend ::Google::Protobuf::MessageExts::ClassMethods
174
+ end
175
+
176
+ # The request message for {::Google::Cloud::Dialogflow::V2::Conversations::Client#get_conversation Conversations.GetConversation}.
177
+ # @!attribute [rw] name
178
+ # @return [::String]
179
+ # Required. The name of the conversation. Format:
180
+ # `projects/<Project ID>/locations/<Location ID>/conversations/<Conversation
181
+ # ID>`.
182
+ class GetConversationRequest
183
+ include ::Google::Protobuf::MessageExts
184
+ extend ::Google::Protobuf::MessageExts::ClassMethods
185
+ end
186
+
187
+ # The request message for {::Google::Cloud::Dialogflow::V2::Conversations::Client#complete_conversation Conversations.CompleteConversation}.
188
+ # @!attribute [rw] name
189
+ # @return [::String]
190
+ # Required. Resource identifier of the conversation to close.
191
+ # Format: `projects/<Project ID>/locations/<Location
192
+ # ID>/conversations/<Conversation ID>`.
193
+ class CompleteConversationRequest
194
+ include ::Google::Protobuf::MessageExts
195
+ extend ::Google::Protobuf::MessageExts::ClassMethods
196
+ end
197
+
198
+ # The request message for {::Google::Cloud::Dialogflow::V2::Conversations::Client#list_messages Conversations.ListMessages}.
199
+ # @!attribute [rw] parent
200
+ # @return [::String]
201
+ # Required. The name of the conversation to list messages for.
202
+ # Format: `projects/<Project ID>/locations/<Location
203
+ # ID>/conversations/<Conversation ID>`
204
+ # @!attribute [rw] filter
205
+ # @return [::String]
206
+ # Optional. Filter on message fields. Currently predicates on `create_time`
207
+ # and `create_time_epoch_microseconds` are supported. `create_time` only
208
+ # support milliseconds accuracy. E.g.,
209
+ # `create_time_epoch_microseconds > 1551790877964485` or
210
+ # `create_time > 2017-01-15T01:30:15.01Z`.
211
+ #
212
+ # For more information about filtering, see
213
+ # [API Filtering](https://aip.dev/160).
214
+ # @!attribute [rw] page_size
215
+ # @return [::Integer]
216
+ # Optional. The maximum number of items to return in a single page. By
217
+ # default 100 and at most 1000.
218
+ # @!attribute [rw] page_token
219
+ # @return [::String]
220
+ # Optional. The next_page_token value returned from a previous list request.
221
+ class ListMessagesRequest
222
+ include ::Google::Protobuf::MessageExts
223
+ extend ::Google::Protobuf::MessageExts::ClassMethods
224
+ end
225
+
226
+ # The response message for {::Google::Cloud::Dialogflow::V2::Conversations::Client#list_messages Conversations.ListMessages}.
227
+ # @!attribute [rw] messages
228
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::Message>]
229
+ # The list of messages. There will be a maximum number of items
230
+ # returned based on the page_size field in the request.
231
+ # `messages` is sorted by `create_time` in descending order.
232
+ # @!attribute [rw] next_page_token
233
+ # @return [::String]
234
+ # Token to retrieve the next page of results, or empty if there are
235
+ # no more results in the list.
236
+ class ListMessagesResponse
237
+ include ::Google::Protobuf::MessageExts
238
+ extend ::Google::Protobuf::MessageExts::ClassMethods
239
+ end
240
+
241
+ # Represents a phone number for telephony integration. It allows for connecting
242
+ # a particular conversation over telephony.
243
+ # @!attribute [r] phone_number
244
+ # @return [::String]
245
+ # Output only. The phone number to connect to this conversation.
246
+ class ConversationPhoneNumber
247
+ include ::Google::Protobuf::MessageExts
248
+ extend ::Google::Protobuf::MessageExts::ClassMethods
249
+ end
250
+ end
251
+ end
252
+ end
253
+ end
@@ -0,0 +1,83 @@
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
+ # Represents a notification sent to Pub/Sub subscribers for conversation
25
+ # lifecycle events.
26
+ # @!attribute [rw] conversation
27
+ # @return [::String]
28
+ # The unique identifier of the conversation this notification
29
+ # refers to.
30
+ # Format: `projects/<Project ID>/conversations/<Conversation ID>`.
31
+ # @!attribute [rw] type
32
+ # @return [::Google::Cloud::Dialogflow::V2::ConversationEvent::Type]
33
+ # The type of the event that this notification refers to.
34
+ # @!attribute [rw] error_status
35
+ # @return [::Google::Rpc::Status]
36
+ # More detailed information about an error. Only set for type
37
+ # UNRECOVERABLE_ERROR_IN_PHONE_CALL.
38
+ # @!attribute [rw] new_message_payload
39
+ # @return [::Google::Cloud::Dialogflow::V2::Message]
40
+ # Payload of NEW_MESSAGE event.
41
+ class ConversationEvent
42
+ include ::Google::Protobuf::MessageExts
43
+ extend ::Google::Protobuf::MessageExts::ClassMethods
44
+
45
+ # Enumeration of the types of events available.
46
+ module Type
47
+ # Type not set.
48
+ TYPE_UNSPECIFIED = 0
49
+
50
+ # A new conversation has been opened. This is fired when a telephone call
51
+ # is answered, or a conversation is created via the API.
52
+ CONVERSATION_STARTED = 1
53
+
54
+ # An existing conversation has closed. This is fired when a telephone call
55
+ # is terminated, or a conversation is closed via the API.
56
+ CONVERSATION_FINISHED = 2
57
+
58
+ # An existing conversation has received notification from Dialogflow that
59
+ # human intervention is required.
60
+ HUMAN_INTERVENTION_NEEDED = 3
61
+
62
+ # An existing conversation has received a new message, either from API or
63
+ # telephony. It is configured in
64
+ # {::Google::Cloud::Dialogflow::V2::ConversationProfile#new_message_event_notification_config ConversationProfile.new_message_event_notification_config}
65
+ NEW_MESSAGE = 5
66
+
67
+ # Unrecoverable error during a telephone call.
68
+ #
69
+ # In general non-recoverable errors only occur if something was
70
+ # misconfigured in the ConversationProfile corresponding to the call. After
71
+ # a non-recoverable error, Dialogflow may stop responding.
72
+ #
73
+ # We don't fire this event:
74
+ #
75
+ # * in an API call because we can directly return the error, or,
76
+ # * when we can recover from an error.
77
+ UNRECOVERABLE_ERROR = 4
78
+ end
79
+ end
80
+ end
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,522 @@
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
+ # Defines the services to connect to incoming Dialogflow conversations.
25
+ # @!attribute [rw] name
26
+ # @return [::String]
27
+ # The unique identifier of this conversation profile.
28
+ # Format: `projects/<Project ID>/locations/<Location
29
+ # ID>/conversationProfiles/<Conversation Profile ID>`.
30
+ # @!attribute [rw] display_name
31
+ # @return [::String]
32
+ # Required. Human readable name for this profile. Max length 1024 bytes.
33
+ # @!attribute [r] create_time
34
+ # @return [::Google::Protobuf::Timestamp]
35
+ # Output only. Create time of the conversation profile.
36
+ # @!attribute [r] update_time
37
+ # @return [::Google::Protobuf::Timestamp]
38
+ # Output only. Update time of the conversation profile.
39
+ # @!attribute [rw] automated_agent_config
40
+ # @return [::Google::Cloud::Dialogflow::V2::AutomatedAgentConfig]
41
+ # Configuration for an automated agent to use with this profile.
42
+ # @!attribute [rw] human_agent_assistant_config
43
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig]
44
+ # Configuration for agent assistance to use with this profile.
45
+ # @!attribute [rw] human_agent_handoff_config
46
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentHandoffConfig]
47
+ # Configuration for connecting to a live agent.
48
+ #
49
+ # Currently, this feature is not general available, please contact Google
50
+ # to get access.
51
+ # @!attribute [rw] notification_config
52
+ # @return [::Google::Cloud::Dialogflow::V2::NotificationConfig]
53
+ # Configuration for publishing conversation lifecycle events.
54
+ # @!attribute [rw] logging_config
55
+ # @return [::Google::Cloud::Dialogflow::V2::LoggingConfig]
56
+ # Configuration for logging conversation lifecycle events.
57
+ # @!attribute [rw] new_message_event_notification_config
58
+ # @return [::Google::Cloud::Dialogflow::V2::NotificationConfig]
59
+ # Configuration for publishing new message events. Event will be sent in
60
+ # format of {::Google::Cloud::Dialogflow::V2::ConversationEvent ConversationEvent}
61
+ # @!attribute [rw] stt_config
62
+ # @return [::Google::Cloud::Dialogflow::V2::SpeechToTextConfig]
63
+ # Settings for speech transcription.
64
+ # @!attribute [rw] language_code
65
+ # @return [::String]
66
+ # Language which represents the conversationProfile.
67
+ # If unspecified, the default language code en-us applies. Users need to
68
+ # create a ConversationProfile for each language they want to support.
69
+ class ConversationProfile
70
+ include ::Google::Protobuf::MessageExts
71
+ extend ::Google::Protobuf::MessageExts::ClassMethods
72
+ end
73
+
74
+ # The request message for {::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client#list_conversation_profiles ConversationProfiles.ListConversationProfiles}.
75
+ # @!attribute [rw] parent
76
+ # @return [::String]
77
+ # Required. The project to list all conversation profiles from.
78
+ # Format: `projects/<Project ID>/locations/<Location ID>`.
79
+ # @!attribute [rw] page_size
80
+ # @return [::Integer]
81
+ # The maximum number of items to return in a single page. By
82
+ # default 100 and at most 1000.
83
+ # @!attribute [rw] page_token
84
+ # @return [::String]
85
+ # The next_page_token value returned from a previous list request.
86
+ class ListConversationProfilesRequest
87
+ include ::Google::Protobuf::MessageExts
88
+ extend ::Google::Protobuf::MessageExts::ClassMethods
89
+ end
90
+
91
+ # The response message for {::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client#list_conversation_profiles ConversationProfiles.ListConversationProfiles}.
92
+ # @!attribute [rw] conversation_profiles
93
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::ConversationProfile>]
94
+ # The list of project conversation profiles. There is a maximum number
95
+ # of items returned based on the page_size field in the request.
96
+ # @!attribute [rw] next_page_token
97
+ # @return [::String]
98
+ # Token to retrieve the next page of results, or empty if there are no
99
+ # more results in the list.
100
+ class ListConversationProfilesResponse
101
+ include ::Google::Protobuf::MessageExts
102
+ extend ::Google::Protobuf::MessageExts::ClassMethods
103
+ end
104
+
105
+ # The request message for {::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client#get_conversation_profile ConversationProfiles.GetConversationProfile}.
106
+ # @!attribute [rw] name
107
+ # @return [::String]
108
+ # Required. The resource name of the conversation profile.
109
+ # Format: `projects/<Project ID>/locations/<Location
110
+ # ID>/conversationProfiles/<Conversation Profile ID>`.
111
+ class GetConversationProfileRequest
112
+ include ::Google::Protobuf::MessageExts
113
+ extend ::Google::Protobuf::MessageExts::ClassMethods
114
+ end
115
+
116
+ # The request message for {::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client#create_conversation_profile ConversationProfiles.CreateConversationProfile}.
117
+ # @!attribute [rw] parent
118
+ # @return [::String]
119
+ # Required. The project to create a conversation profile for.
120
+ # Format: `projects/<Project ID>/locations/<Location ID>`.
121
+ # @!attribute [rw] conversation_profile
122
+ # @return [::Google::Cloud::Dialogflow::V2::ConversationProfile]
123
+ # Required. The conversation profile to create.
124
+ class CreateConversationProfileRequest
125
+ include ::Google::Protobuf::MessageExts
126
+ extend ::Google::Protobuf::MessageExts::ClassMethods
127
+ end
128
+
129
+ # The request message for {::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client#update_conversation_profile ConversationProfiles.UpdateConversationProfile}.
130
+ # @!attribute [rw] conversation_profile
131
+ # @return [::Google::Cloud::Dialogflow::V2::ConversationProfile]
132
+ # Required. The conversation profile to update.
133
+ # @!attribute [rw] update_mask
134
+ # @return [::Google::Protobuf::FieldMask]
135
+ # Required. The mask to control which fields to update.
136
+ class UpdateConversationProfileRequest
137
+ include ::Google::Protobuf::MessageExts
138
+ extend ::Google::Protobuf::MessageExts::ClassMethods
139
+ end
140
+
141
+ # The request message for {::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client#delete_conversation_profile ConversationProfiles.DeleteConversationProfile}.
142
+ #
143
+ # This operation fails if the conversation profile is still referenced from
144
+ # a phone number.
145
+ # @!attribute [rw] name
146
+ # @return [::String]
147
+ # Required. The name of the conversation profile to delete.
148
+ # Format: `projects/<Project ID>/locations/<Location
149
+ # ID>/conversationProfiles/<Conversation Profile ID>`.
150
+ class DeleteConversationProfileRequest
151
+ include ::Google::Protobuf::MessageExts
152
+ extend ::Google::Protobuf::MessageExts::ClassMethods
153
+ end
154
+
155
+ # Defines the Automated Agent to connect to a conversation.
156
+ # @!attribute [rw] agent
157
+ # @return [::String]
158
+ # Required. ID of the Dialogflow agent environment to use.
159
+ #
160
+ # This project needs to either be the same project as the conversation or you
161
+ # need to grant `service-<Conversation Project
162
+ # Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API
163
+ # Service Agent` role in this project.
164
+ #
165
+ # Format: `projects/<Project ID>/locations/<Location
166
+ # ID>/agent/environments/<Environment ID or '-'>`. If environment is not
167
+ # specified, the default `draft` environment is used. Refer to
168
+ # [DetectIntentRequest](/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.DetectIntentRequest)
169
+ # for more details.
170
+ class AutomatedAgentConfig
171
+ include ::Google::Protobuf::MessageExts
172
+ extend ::Google::Protobuf::MessageExts::ClassMethods
173
+ end
174
+
175
+ # Defines the Human Agent Assist to connect to a conversation.
176
+ # @!attribute [rw] notification_config
177
+ # @return [::Google::Cloud::Dialogflow::V2::NotificationConfig]
178
+ # Pub/Sub topic on which to publish new agent assistant events.
179
+ # @!attribute [rw] human_agent_suggestion_config
180
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionConfig]
181
+ # Configuration for agent assistance of human agent participant.
182
+ # @!attribute [rw] end_user_suggestion_config
183
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionConfig]
184
+ # Configuration for agent assistance of end user participant.
185
+ #
186
+ # Currently, this feature is not general available, please contact Google
187
+ # to get access.
188
+ # @!attribute [rw] message_analysis_config
189
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::MessageAnalysisConfig]
190
+ # Configuration for message analysis.
191
+ class HumanAgentAssistantConfig
192
+ include ::Google::Protobuf::MessageExts
193
+ extend ::Google::Protobuf::MessageExts::ClassMethods
194
+
195
+ # Settings of suggestion trigger.
196
+ # @!attribute [rw] no_smalltalk
197
+ # @return [::Boolean]
198
+ # Do not trigger if last utterance is small talk.
199
+ # @!attribute [rw] only_end_user
200
+ # @return [::Boolean]
201
+ # Only trigger suggestion if participant role of last utterance is
202
+ # END_USER.
203
+ class SuggestionTriggerSettings
204
+ include ::Google::Protobuf::MessageExts
205
+ extend ::Google::Protobuf::MessageExts::ClassMethods
206
+ end
207
+
208
+ # Config for suggestion features.
209
+ # @!attribute [rw] suggestion_feature
210
+ # @return [::Google::Cloud::Dialogflow::V2::SuggestionFeature]
211
+ # The suggestion feature.
212
+ # @!attribute [rw] enable_event_based_suggestion
213
+ # @return [::Boolean]
214
+ # Automatically iterates all participants and tries to compile
215
+ # suggestions.
216
+ #
217
+ # Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST.
218
+ # @!attribute [rw] suggestion_trigger_settings
219
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionTriggerSettings]
220
+ # Settings of suggestion trigger.
221
+ #
222
+ # Currently, only ARTICLE_SUGGESTION and FAQ will use this field.
223
+ # @!attribute [rw] query_config
224
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionQueryConfig]
225
+ # Configs of query.
226
+ # @!attribute [rw] conversation_model_config
227
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::ConversationModelConfig]
228
+ # Configs of custom conversation model.
229
+ class SuggestionFeatureConfig
230
+ include ::Google::Protobuf::MessageExts
231
+ extend ::Google::Protobuf::MessageExts::ClassMethods
232
+ end
233
+
234
+ # Detail human agent assistant config.
235
+ # @!attribute [rw] feature_configs
236
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionFeatureConfig>]
237
+ # Configuration of different suggestion features. One feature can have only
238
+ # one config.
239
+ # @!attribute [rw] group_suggestion_responses
240
+ # @return [::Boolean]
241
+ # If `group_suggestion_responses` is false, and there are multiple
242
+ # `feature_configs` in `event based suggestion` or
243
+ # StreamingAnalyzeContent, we will try to deliver suggestions to customers
244
+ # as soon as we get new suggestion. Different type of suggestions based on
245
+ # the same context will be in separate Pub/Sub event or
246
+ # `StreamingAnalyzeContentResponse`.
247
+ #
248
+ # If `group_suggestion_responses` set to true. All the suggestions to the
249
+ # same participant based on the same context will be grouped into a single
250
+ # Pub/Sub event or StreamingAnalyzeContentResponse.
251
+ class SuggestionConfig
252
+ include ::Google::Protobuf::MessageExts
253
+ extend ::Google::Protobuf::MessageExts::ClassMethods
254
+ end
255
+
256
+ # Config for suggestion query.
257
+ # @!attribute [rw] knowledge_base_query_source
258
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionQueryConfig::KnowledgeBaseQuerySource]
259
+ # Query from knowledgebase. It is used by:
260
+ # ARTICLE_SUGGESTION, FAQ.
261
+ # @!attribute [rw] document_query_source
262
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionQueryConfig::DocumentQuerySource]
263
+ # Query from knowledge base document. It is used by:
264
+ # SMART_REPLY, SMART_COMPOSE.
265
+ # @!attribute [rw] dialogflow_query_source
266
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionQueryConfig::DialogflowQuerySource]
267
+ # Query from Dialogflow agent. It is used by DIALOGFLOW_ASSIST.
268
+ # @!attribute [rw] max_results
269
+ # @return [::Integer]
270
+ # Maximum number of results to return. Currently, if unset, defaults to 10.
271
+ # And the max number is 20.
272
+ # @!attribute [rw] confidence_threshold
273
+ # @return [::Float]
274
+ # Confidence threshold of query result.
275
+ #
276
+ # Agent Assist gives each suggestion a score in the range [0.0, 1.0], based
277
+ # on the relevance between the suggestion and the current conversation
278
+ # context. A score of 0.0 has no relevance, while a score of 1.0 has high
279
+ # relevance. Only suggestions with a score greater than or equal to the
280
+ # value of this field are included in the results.
281
+ #
282
+ # For a baseline model (the default), the recommended value is in the range
283
+ # [0.05, 0.1].
284
+ #
285
+ # For a custom model, there is no recommended value. Tune this value by
286
+ # starting from a very low value and slowly increasing until you have
287
+ # desired results.
288
+ #
289
+ # If this field is not set, it defaults to 0.0, which means that all
290
+ # suggestions are returned.
291
+ #
292
+ # Supported features: ARTICLE_SUGGESTION.
293
+ # @!attribute [rw] context_filter_settings
294
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionQueryConfig::ContextFilterSettings]
295
+ # Determines how recent conversation context is filtered when generating
296
+ # suggestions. If unspecified, no messages will be dropped.
297
+ class SuggestionQueryConfig
298
+ include ::Google::Protobuf::MessageExts
299
+ extend ::Google::Protobuf::MessageExts::ClassMethods
300
+
301
+ # Knowledge base source settings.
302
+ #
303
+ # Supported features: ARTICLE_SUGGESTION, FAQ.
304
+ # @!attribute [rw] knowledge_bases
305
+ # @return [::Array<::String>]
306
+ # Required. Knowledge bases to query. Format:
307
+ # `projects/<Project ID>/locations/<Location
308
+ # ID>/knowledgeBases/<Knowledge Base ID>`. Currently, at most 5 knowledge
309
+ # bases are supported.
310
+ class KnowledgeBaseQuerySource
311
+ include ::Google::Protobuf::MessageExts
312
+ extend ::Google::Protobuf::MessageExts::ClassMethods
313
+ end
314
+
315
+ # Document source settings.
316
+ #
317
+ # Supported features: SMART_REPLY, SMART_COMPOSE.
318
+ # @!attribute [rw] documents
319
+ # @return [::Array<::String>]
320
+ # Required. Knowledge documents to query from. Format:
321
+ # `projects/<Project ID>/locations/<Location
322
+ # ID>/knowledgeBases/<KnowledgeBase ID>/documents/<Document ID>`.
323
+ # Currently, at most 5 documents are supported.
324
+ class DocumentQuerySource
325
+ include ::Google::Protobuf::MessageExts
326
+ extend ::Google::Protobuf::MessageExts::ClassMethods
327
+ end
328
+
329
+ # Dialogflow source setting.
330
+ #
331
+ # Supported feature: DIALOGFLOW_ASSIST.
332
+ # @!attribute [rw] agent
333
+ # @return [::String]
334
+ # Required. The name of a Dialogflow virtual agent used for end user side intent
335
+ # detection and suggestion. Format: `projects/<Project Number/
336
+ # ID>/locations/<Location ID>/agent`. When multiple agents are allowed in
337
+ # the same Dialogflow project.
338
+ class DialogflowQuerySource
339
+ include ::Google::Protobuf::MessageExts
340
+ extend ::Google::Protobuf::MessageExts::ClassMethods
341
+ end
342
+
343
+ # Settings that determine how to filter recent conversation context when
344
+ # generating suggestions.
345
+ # @!attribute [rw] drop_handoff_messages
346
+ # @return [::Boolean]
347
+ # If set to true, the last message from virtual agent (hand off message)
348
+ # and the message before it (trigger message of hand off) are dropped.
349
+ # @!attribute [rw] drop_virtual_agent_messages
350
+ # @return [::Boolean]
351
+ # If set to true, all messages from virtual agent are dropped.
352
+ # @!attribute [rw] drop_ivr_messages
353
+ # @return [::Boolean]
354
+ # If set to true, all messages from ivr stage are dropped.
355
+ class ContextFilterSettings
356
+ include ::Google::Protobuf::MessageExts
357
+ extend ::Google::Protobuf::MessageExts::ClassMethods
358
+ end
359
+ end
360
+
361
+ # Custom conversation models used in agent assist feature.
362
+ #
363
+ # Supported feature: ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY.
364
+ # @!attribute [rw] model
365
+ # @return [::String]
366
+ # Conversation model resource name. Format: `projects/<Project
367
+ # ID>/conversationModels/<Model ID>`.
368
+ class ConversationModelConfig
369
+ include ::Google::Protobuf::MessageExts
370
+ extend ::Google::Protobuf::MessageExts::ClassMethods
371
+ end
372
+
373
+ # Configuration for analyses to run on each conversation message.
374
+ # @!attribute [rw] enable_entity_extraction
375
+ # @return [::Boolean]
376
+ # Enable entity extraction in conversation messages on [agent assist
377
+ # stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages).
378
+ # If unspecified, defaults to false.
379
+ #
380
+ # Currently, this feature is not general available, please contact Google
381
+ # to get access.
382
+ # @!attribute [rw] enable_sentiment_analysis
383
+ # @return [::Boolean]
384
+ # Enable sentiment analysis in conversation messages on [agent assist
385
+ # stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages).
386
+ # If unspecified, defaults to false. Sentiment analysis inspects user input
387
+ # and identifies the prevailing subjective opinion, especially to determine
388
+ # a user's attitude as positive, negative, or neutral:
389
+ # https://cloud.google.com/natural-language/docs/basics#sentiment_analysis
390
+ # For [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] method, result will be in
391
+ # [StreamingAnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.message].
392
+ # For {::Google::Cloud::Dialogflow::V2::Participants::Client#analyze_content Participants.AnalyzeContent} method, result will be in
393
+ # {::Google::Cloud::Dialogflow::V2::AnalyzeContentResponse#message AnalyzeContentResponse.message.SentimentAnalysisResult}
394
+ # For {::Google::Cloud::Dialogflow::V2::Conversations::Client#list_messages Conversations.ListMessages} method, result will be in
395
+ # {::Google::Cloud::Dialogflow::V2::ListMessagesResponse#messages ListMessagesResponse.messages.SentimentAnalysisResult}
396
+ # If Pub/Sub notification is configured, result will be in
397
+ # {::Google::Cloud::Dialogflow::V2::ConversationEvent#new_message_payload ConversationEvent.new_message_payload.SentimentAnalysisResult}.
398
+ class MessageAnalysisConfig
399
+ include ::Google::Protobuf::MessageExts
400
+ extend ::Google::Protobuf::MessageExts::ClassMethods
401
+ end
402
+ end
403
+
404
+ # Defines the hand off to a live agent, typically on which external agent
405
+ # service provider to connect to a conversation.
406
+ #
407
+ # Currently, this feature is not general available, please contact Google
408
+ # to get access.
409
+ # @!attribute [rw] live_person_config
410
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentHandoffConfig::LivePersonConfig]
411
+ # Uses LivePerson (https://www.liveperson.com).
412
+ # @!attribute [rw] salesforce_live_agent_config
413
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentHandoffConfig::SalesforceLiveAgentConfig]
414
+ # Uses Salesforce Live Agent.
415
+ class HumanAgentHandoffConfig
416
+ include ::Google::Protobuf::MessageExts
417
+ extend ::Google::Protobuf::MessageExts::ClassMethods
418
+
419
+ # Configuration specific to LivePerson (https://www.liveperson.com).
420
+ # @!attribute [rw] account_number
421
+ # @return [::String]
422
+ # Required. Account number of the LivePerson account to connect. This is
423
+ # the account number you input at the login page.
424
+ class LivePersonConfig
425
+ include ::Google::Protobuf::MessageExts
426
+ extend ::Google::Protobuf::MessageExts::ClassMethods
427
+ end
428
+
429
+ # Configuration specific to Salesforce Live Agent.
430
+ # @!attribute [rw] organization_id
431
+ # @return [::String]
432
+ # Required. The organization ID of the Salesforce account.
433
+ # @!attribute [rw] deployment_id
434
+ # @return [::String]
435
+ # Required. Live Agent deployment ID.
436
+ # @!attribute [rw] button_id
437
+ # @return [::String]
438
+ # Required. Live Agent chat button ID.
439
+ # @!attribute [rw] endpoint_domain
440
+ # @return [::String]
441
+ # Required. Domain of the Live Agent endpoint for this agent. You can find
442
+ # the endpoint URL in the `Live Agent settings` page. For example if URL
443
+ # has the form https://d.la4-c2-phx.salesforceliveagent.com/...,
444
+ # you should fill in d.la4-c2-phx.salesforceliveagent.com.
445
+ class SalesforceLiveAgentConfig
446
+ include ::Google::Protobuf::MessageExts
447
+ extend ::Google::Protobuf::MessageExts::ClassMethods
448
+ end
449
+ end
450
+
451
+ # Defines notification behavior.
452
+ # @!attribute [rw] topic
453
+ # @return [::String]
454
+ # Name of the Pub/Sub topic to publish conversation
455
+ # events like
456
+ # {::Google::Cloud::Dialogflow::V2::ConversationEvent::Type::CONVERSATION_STARTED CONVERSATION_STARTED} as
457
+ # serialized {::Google::Cloud::Dialogflow::V2::ConversationEvent ConversationEvent} protos.
458
+ #
459
+ # Notification works for phone calls, if this topic either is in the same
460
+ # project as the conversation or you grant `service-<Conversation Project
461
+ # Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow Service
462
+ # Agent` role in the topic project.
463
+ #
464
+ # Format: `projects/<Project ID>/locations/<Location ID>/topics/<Topic ID>`.
465
+ # @!attribute [rw] message_format
466
+ # @return [::Google::Cloud::Dialogflow::V2::NotificationConfig::MessageFormat]
467
+ # Format of message.
468
+ class NotificationConfig
469
+ include ::Google::Protobuf::MessageExts
470
+ extend ::Google::Protobuf::MessageExts::ClassMethods
471
+
472
+ # Format of cloud pub/sub message.
473
+ module MessageFormat
474
+ # If it is unspeified, PROTO will be used.
475
+ MESSAGE_FORMAT_UNSPECIFIED = 0
476
+
477
+ # Pubsub message will be serialized proto.
478
+ PROTO = 1
479
+
480
+ # Pubsub message will be json.
481
+ JSON = 2
482
+ end
483
+ end
484
+
485
+ # Defines logging behavior for conversation lifecycle events.
486
+ # @!attribute [rw] enable_stackdriver_logging
487
+ # @return [::Boolean]
488
+ # Whether to log conversation events like
489
+ # {::Google::Cloud::Dialogflow::V2::ConversationEvent::Type::CONVERSATION_STARTED CONVERSATION_STARTED} to
490
+ # Stackdriver in the conversation project as JSON format
491
+ # {::Google::Cloud::Dialogflow::V2::ConversationEvent ConversationEvent} protos.
492
+ class LoggingConfig
493
+ include ::Google::Protobuf::MessageExts
494
+ extend ::Google::Protobuf::MessageExts::ClassMethods
495
+ end
496
+
497
+ # The type of Human Agent Assistant API suggestion to perform, and the maximum
498
+ # number of results to return for that type. Multiple `Feature` objects can
499
+ # be specified in the `features` list.
500
+ # @!attribute [rw] type
501
+ # @return [::Google::Cloud::Dialogflow::V2::SuggestionFeature::Type]
502
+ # Type of Human Agent Assistant API feature to request.
503
+ class SuggestionFeature
504
+ include ::Google::Protobuf::MessageExts
505
+ extend ::Google::Protobuf::MessageExts::ClassMethods
506
+
507
+ # Defines the type of Human Agent Assistant feature.
508
+ module Type
509
+ # Unspecified feature type.
510
+ TYPE_UNSPECIFIED = 0
511
+
512
+ # Run article suggestion model.
513
+ ARTICLE_SUGGESTION = 1
514
+
515
+ # Run FAQ model.
516
+ FAQ = 2
517
+ end
518
+ end
519
+ end
520
+ end
521
+ end
522
+ end