google-cloud-dialogflow-v2 0.6.4 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +188 -190
  3. data/README.md +66 -2
  4. data/lib/google/cloud/dialogflow/v2.rb +11 -2
  5. data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +9 -9
  6. data/lib/google/cloud/dialogflow/v2/agents/client.rb +24 -18
  7. data/lib/google/cloud/dialogflow/v2/agents/operations.rb +96 -11
  8. data/lib/google/cloud/dialogflow/v2/answer_record_pb.rb +100 -0
  9. data/lib/google/cloud/dialogflow/v2/answer_record_services_pb.rb +49 -0
  10. data/lib/google/cloud/dialogflow/v2/answer_records.rb +50 -0
  11. data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +479 -0
  12. data/lib/google/cloud/dialogflow/v2/answer_records/credentials.rb +52 -0
  13. data/lib/google/cloud/dialogflow/v2/answer_records/paths.rb +105 -0
  14. data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +7 -0
  15. data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +7 -24
  16. data/lib/google/cloud/dialogflow/v2/contexts.rb +1 -18
  17. data/lib/google/cloud/dialogflow/v2/contexts/client.rb +22 -33
  18. data/lib/google/cloud/dialogflow/v2/contexts/paths.rb +2 -2
  19. data/lib/google/cloud/dialogflow/v2/conversation_event_pb.rb +39 -0
  20. data/lib/google/cloud/dialogflow/v2/conversation_pb.rb +89 -0
  21. data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +182 -0
  22. data/lib/google/cloud/dialogflow/v2/conversation_profile_services_pb.rb +61 -0
  23. data/lib/google/cloud/dialogflow/v2/conversation_profiles.rb +49 -0
  24. data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +699 -0
  25. data/lib/google/cloud/dialogflow/v2/conversation_profiles/credentials.rb +52 -0
  26. data/lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb +205 -0
  27. data/lib/google/cloud/dialogflow/v2/conversation_services_pb.rb +75 -0
  28. data/lib/google/cloud/dialogflow/v2/conversations.rb +49 -0
  29. data/lib/google/cloud/dialogflow/v2/conversations/client.rb +757 -0
  30. data/lib/google/cloud/dialogflow/v2/conversations/credentials.rb +52 -0
  31. data/lib/google/cloud/dialogflow/v2/conversations/paths.rb +146 -0
  32. data/lib/google/cloud/dialogflow/v2/document_pb.rb +99 -0
  33. data/lib/google/cloud/dialogflow/v2/document_services_pb.rb +73 -0
  34. data/lib/google/cloud/dialogflow/v2/documents.rb +50 -0
  35. data/lib/google/cloud/dialogflow/v2/documents/client.rb +810 -0
  36. data/lib/google/cloud/dialogflow/v2/documents/credentials.rb +52 -0
  37. data/lib/google/cloud/dialogflow/v2/documents/operations.rb +655 -0
  38. data/lib/google/cloud/dialogflow/v2/documents/paths.rb +119 -0
  39. data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +11 -38
  40. data/lib/google/cloud/dialogflow/v2/entity_types.rb +1 -28
  41. data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +26 -47
  42. data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +96 -11
  43. data/lib/google/cloud/dialogflow/v2/environment_services_pb.rb +2 -2
  44. data/lib/google/cloud/dialogflow/v2/environments.rb +1 -1
  45. data/lib/google/cloud/dialogflow/v2/environments/client.rb +17 -11
  46. data/lib/google/cloud/dialogflow/v2/gcs_pb.rb +20 -0
  47. data/lib/google/cloud/dialogflow/v2/human_agent_assistant_event_pb.rb +26 -0
  48. data/lib/google/cloud/dialogflow/v2/intent_pb.rb +2 -0
  49. data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +8 -39
  50. data/lib/google/cloud/dialogflow/v2/intents.rb +1 -32
  51. data/lib/google/cloud/dialogflow/v2/intents/client.rb +23 -48
  52. data/lib/google/cloud/dialogflow/v2/intents/operations.rb +96 -11
  53. data/lib/google/cloud/dialogflow/v2/intents/paths.rb +1 -1
  54. data/lib/google/cloud/dialogflow/v2/knowledge_base_pb.rb +60 -0
  55. data/lib/google/cloud/dialogflow/v2/knowledge_base_services_pb.rb +53 -0
  56. data/lib/google/cloud/dialogflow/v2/knowledge_bases.rb +49 -0
  57. data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +696 -0
  58. data/lib/google/cloud/dialogflow/v2/knowledge_bases/credentials.rb +52 -0
  59. data/lib/google/cloud/dialogflow/v2/knowledge_bases/paths.rb +105 -0
  60. data/lib/google/cloud/dialogflow/v2/participant_pb.rb +172 -0
  61. data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +64 -0
  62. data/lib/google/cloud/dialogflow/v2/participants.rb +49 -0
  63. data/lib/google/cloud/dialogflow/v2/participants/client.rb +894 -0
  64. data/lib/google/cloud/dialogflow/v2/participants/credentials.rb +52 -0
  65. data/lib/google/cloud/dialogflow/v2/participants/paths.rb +258 -0
  66. data/lib/google/cloud/dialogflow/v2/session_entity_type_services_pb.rb +6 -22
  67. data/lib/google/cloud/dialogflow/v2/session_entity_types.rb +1 -17
  68. data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +21 -31
  69. data/lib/google/cloud/dialogflow/v2/session_entity_types/paths.rb +2 -2
  70. data/lib/google/cloud/dialogflow/v2/session_pb.rb +1 -0
  71. data/lib/google/cloud/dialogflow/v2/session_services_pb.rb +14 -6
  72. data/lib/google/cloud/dialogflow/v2/sessions.rb +4 -4
  73. data/lib/google/cloud/dialogflow/v2/sessions/client.rb +43 -21
  74. data/lib/google/cloud/dialogflow/v2/sessions/paths.rb +3 -3
  75. data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
  76. data/proto_docs/google/api/field_behavior.rb +6 -0
  77. data/proto_docs/google/api/resource.rb +50 -14
  78. data/proto_docs/google/cloud/dialogflow/v2/agent.rb +1 -2
  79. data/proto_docs/google/cloud/dialogflow/v2/answer_record.rb +259 -0
  80. data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +25 -0
  81. data/proto_docs/google/cloud/dialogflow/v2/context.rb +17 -2
  82. data/proto_docs/google/cloud/dialogflow/v2/conversation.rb +253 -0
  83. data/proto_docs/google/cloud/dialogflow/v2/conversation_event.rb +83 -0
  84. data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +510 -0
  85. data/proto_docs/google/cloud/dialogflow/v2/document.rb +267 -0
  86. data/proto_docs/google/cloud/dialogflow/v2/entity_type.rb +12 -3
  87. data/proto_docs/google/cloud/dialogflow/v2/environment.rb +18 -1
  88. data/proto_docs/google/cloud/dialogflow/v2/human_agent_assistant_event.rb +45 -0
  89. data/proto_docs/google/cloud/dialogflow/v2/intent.rb +20 -3
  90. data/proto_docs/google/cloud/dialogflow/v2/knowledge_base.rb +139 -0
  91. data/proto_docs/google/cloud/dialogflow/v2/participant.rb +503 -0
  92. data/proto_docs/google/cloud/dialogflow/v2/session.rb +52 -7
  93. data/proto_docs/google/cloud/dialogflow/v2/session_entity_type.rb +7 -6
  94. data/proto_docs/google/cloud/dialogflow/v2/validation_result.rb +1 -1
  95. data/proto_docs/google/cloud/dialogflow/v2/webhook.rb +2 -2
  96. data/proto_docs/google/longrunning/operations.rb +17 -3
  97. data/proto_docs/google/protobuf/any.rb +5 -2
  98. data/proto_docs/google/protobuf/timestamp.rb +10 -1
  99. data/proto_docs/google/type/latlng.rb +2 -2
  100. metadata +59 -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,510 @@
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
+ # Optional. 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
+ # @!attribute [rw] notification_config
49
+ # @return [::Google::Cloud::Dialogflow::V2::NotificationConfig]
50
+ # Configuration for publishing conversation lifecycle events.
51
+ # @!attribute [rw] logging_config
52
+ # @return [::Google::Cloud::Dialogflow::V2::LoggingConfig]
53
+ # Configuration for logging conversation lifecycle events.
54
+ # @!attribute [rw] new_message_event_notification_config
55
+ # @return [::Google::Cloud::Dialogflow::V2::NotificationConfig]
56
+ # Configuration for publishing new message events. Event will be sent in
57
+ # format of {::Google::Cloud::Dialogflow::V2::ConversationEvent ConversationEvent}
58
+ # @!attribute [rw] stt_config
59
+ # @return [::Google::Cloud::Dialogflow::V2::SpeechToTextConfig]
60
+ # Settings for speech transcription.
61
+ # @!attribute [rw] language_code
62
+ # @return [::String]
63
+ # Language which represents the conversationProfile.
64
+ # If unspecified, the default language code en-us applies. Users need to
65
+ # create a ConversationProfile for each language they want to support.
66
+ class ConversationProfile
67
+ include ::Google::Protobuf::MessageExts
68
+ extend ::Google::Protobuf::MessageExts::ClassMethods
69
+ end
70
+
71
+ # The request message for {::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client#list_conversation_profiles ConversationProfiles.ListConversationProfiles}.
72
+ # @!attribute [rw] parent
73
+ # @return [::String]
74
+ # Required. The project to list all conversation profiles from.
75
+ # Format: `projects/<Project ID>/locations/<Location ID>`.
76
+ # @!attribute [rw] page_size
77
+ # @return [::Integer]
78
+ # The maximum number of items to return in a single page. By
79
+ # default 100 and at most 1000.
80
+ # @!attribute [rw] page_token
81
+ # @return [::String]
82
+ # The next_page_token value returned from a previous list request.
83
+ class ListConversationProfilesRequest
84
+ include ::Google::Protobuf::MessageExts
85
+ extend ::Google::Protobuf::MessageExts::ClassMethods
86
+ end
87
+
88
+ # The response message for {::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client#list_conversation_profiles ConversationProfiles.ListConversationProfiles}.
89
+ # @!attribute [rw] conversation_profiles
90
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::ConversationProfile>]
91
+ # The list of project conversation profiles. There is a maximum number
92
+ # of items returned based on the page_size field in the request.
93
+ # @!attribute [rw] next_page_token
94
+ # @return [::String]
95
+ # Token to retrieve the next page of results, or empty if there are no
96
+ # more results in the list.
97
+ class ListConversationProfilesResponse
98
+ include ::Google::Protobuf::MessageExts
99
+ extend ::Google::Protobuf::MessageExts::ClassMethods
100
+ end
101
+
102
+ # The request message for {::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client#get_conversation_profile ConversationProfiles.GetConversationProfile}.
103
+ # @!attribute [rw] name
104
+ # @return [::String]
105
+ # Required. The resource name of the conversation profile.
106
+ # Format: `projects/<Project ID>/locations/<Location
107
+ # ID>/conversationProfiles/<Conversation Profile ID>`.
108
+ class GetConversationProfileRequest
109
+ include ::Google::Protobuf::MessageExts
110
+ extend ::Google::Protobuf::MessageExts::ClassMethods
111
+ end
112
+
113
+ # The request message for {::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client#create_conversation_profile ConversationProfiles.CreateConversationProfile}.
114
+ # @!attribute [rw] parent
115
+ # @return [::String]
116
+ # Required. The project to create a conversation profile for.
117
+ # Format: `projects/<Project ID>/locations/<Location ID>`.
118
+ # @!attribute [rw] conversation_profile
119
+ # @return [::Google::Cloud::Dialogflow::V2::ConversationProfile]
120
+ # Required. The conversation profile to create.
121
+ class CreateConversationProfileRequest
122
+ include ::Google::Protobuf::MessageExts
123
+ extend ::Google::Protobuf::MessageExts::ClassMethods
124
+ end
125
+
126
+ # The request message for {::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client#update_conversation_profile ConversationProfiles.UpdateConversationProfile}.
127
+ # @!attribute [rw] conversation_profile
128
+ # @return [::Google::Cloud::Dialogflow::V2::ConversationProfile]
129
+ # Required. The conversation profile to update.
130
+ # @!attribute [rw] update_mask
131
+ # @return [::Google::Protobuf::FieldMask]
132
+ # Required. The mask to control which fields to update.
133
+ class UpdateConversationProfileRequest
134
+ include ::Google::Protobuf::MessageExts
135
+ extend ::Google::Protobuf::MessageExts::ClassMethods
136
+ end
137
+
138
+ # The request message for {::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client#delete_conversation_profile ConversationProfiles.DeleteConversationProfile}.
139
+ #
140
+ # This operation fails if the conversation profile is still referenced from
141
+ # a phone number.
142
+ # @!attribute [rw] name
143
+ # @return [::String]
144
+ # Required. The name of the conversation profile to delete.
145
+ # Format: `projects/<Project ID>/locations/<Location
146
+ # ID>/conversationProfiles/<Conversation Profile ID>`.
147
+ class DeleteConversationProfileRequest
148
+ include ::Google::Protobuf::MessageExts
149
+ extend ::Google::Protobuf::MessageExts::ClassMethods
150
+ end
151
+
152
+ # Defines the Automated Agent to connect to a conversation.
153
+ # @!attribute [rw] agent
154
+ # @return [::String]
155
+ # Required. ID of the Dialogflow agent environment to use.
156
+ #
157
+ # This project needs to either be the same project as the conversation or you
158
+ # need to grant `service-<Conversation Project
159
+ # Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API
160
+ # Service Agent` role in this project.
161
+ #
162
+ # Format: `projects/<Project ID>/locations/<Location
163
+ # ID>/agent/environments/<Environment ID or '-'>`. If environment is not
164
+ # specified, the default `draft` environment is used. Refer to
165
+ # [DetectIntentRequest](/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.DetectIntentRequest)
166
+ # for more details.
167
+ class AutomatedAgentConfig
168
+ include ::Google::Protobuf::MessageExts
169
+ extend ::Google::Protobuf::MessageExts::ClassMethods
170
+ end
171
+
172
+ # Defines the Human Agent Assist to connect to a conversation.
173
+ # @!attribute [rw] notification_config
174
+ # @return [::Google::Cloud::Dialogflow::V2::NotificationConfig]
175
+ # Pub/Sub topic on which to publish new agent assistant events.
176
+ # @!attribute [rw] human_agent_suggestion_config
177
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionConfig]
178
+ # Configuration for agent assistance of human agent participant.
179
+ # @!attribute [rw] end_user_suggestion_config
180
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionConfig]
181
+ # Configuration for agent assistance of end user participant.
182
+ # @!attribute [rw] message_analysis_config
183
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::MessageAnalysisConfig]
184
+ # Configuration for message analysis.
185
+ class HumanAgentAssistantConfig
186
+ include ::Google::Protobuf::MessageExts
187
+ extend ::Google::Protobuf::MessageExts::ClassMethods
188
+
189
+ # Settings of suggestion trigger.
190
+ # @!attribute [rw] no_smalltalk
191
+ # @return [::Boolean]
192
+ # Do not trigger if last utterance is small talk.
193
+ # @!attribute [rw] only_end_user
194
+ # @return [::Boolean]
195
+ # Only trigger suggestion if participant role of last utterance is
196
+ # END_USER.
197
+ class SuggestionTriggerSettings
198
+ include ::Google::Protobuf::MessageExts
199
+ extend ::Google::Protobuf::MessageExts::ClassMethods
200
+ end
201
+
202
+ # Config for suggestion features.
203
+ # @!attribute [rw] suggestion_feature
204
+ # @return [::Google::Cloud::Dialogflow::V2::SuggestionFeature]
205
+ # The suggestion feature.
206
+ # @!attribute [rw] enable_event_based_suggestion
207
+ # @return [::Boolean]
208
+ # Automatically iterates all participants and tries to compile
209
+ # suggestions.
210
+ #
211
+ # Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST.
212
+ # @!attribute [rw] suggestion_trigger_settings
213
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionTriggerSettings]
214
+ # Settings of suggestion trigger.
215
+ #
216
+ # Currently, only ARTICLE_SUGGESTION and FAQ will use this field.
217
+ # @!attribute [rw] query_config
218
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionQueryConfig]
219
+ # Configs of query.
220
+ # @!attribute [rw] conversation_model_config
221
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::ConversationModelConfig]
222
+ # Configs of custom conversation model.
223
+ class SuggestionFeatureConfig
224
+ include ::Google::Protobuf::MessageExts
225
+ extend ::Google::Protobuf::MessageExts::ClassMethods
226
+ end
227
+
228
+ # Detail human agent assistant config.
229
+ # @!attribute [rw] feature_configs
230
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionFeatureConfig>]
231
+ # Configuration of different suggestion features. One feature can have only
232
+ # one config.
233
+ # @!attribute [rw] group_suggestion_responses
234
+ # @return [::Boolean]
235
+ # If `group_suggestion_responses` is false, and there are multiple
236
+ # `feature_configs` in `event based suggestion` or
237
+ # StreamingAnalyzeContent, we will try to deliver suggestions to customers
238
+ # as soon as we get new suggestion. Different type of suggestions based on
239
+ # the same context will be in separate Pub/Sub event or
240
+ # `StreamingAnalyzeContentResponse`.
241
+ #
242
+ # If `group_suggestion_responses` set to true. All the suggestions to the
243
+ # same participant based on the same context will be grouped into a single
244
+ # Pub/Sub event or StreamingAnalyzeContentResponse.
245
+ class SuggestionConfig
246
+ include ::Google::Protobuf::MessageExts
247
+ extend ::Google::Protobuf::MessageExts::ClassMethods
248
+ end
249
+
250
+ # Config for suggestion query.
251
+ # @!attribute [rw] knowledge_base_query_source
252
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionQueryConfig::KnowledgeBaseQuerySource]
253
+ # Query from knowledgebase. It is used by:
254
+ # ARTICLE_SUGGESTION, FAQ.
255
+ # @!attribute [rw] document_query_source
256
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionQueryConfig::DocumentQuerySource]
257
+ # Query from knowledge base document. It is used by:
258
+ # SMART_REPLY, SMART_COMPOSE.
259
+ # @!attribute [rw] dialogflow_query_source
260
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionQueryConfig::DialogflowQuerySource]
261
+ # Query from Dialogflow agent. It is used by DIALOGFLOW_ASSIST.
262
+ # @!attribute [rw] max_results
263
+ # @return [::Integer]
264
+ # Maximum number of results to return. Currently, if unset, defaults to 10.
265
+ # And the max number is 20.
266
+ # @!attribute [rw] confidence_threshold
267
+ # @return [::Float]
268
+ # Confidence threshold of query result.
269
+ #
270
+ # Agent Assist gives each suggestion a score in the range [0.0, 1.0], based
271
+ # on the relevance between the suggestion and the current conversation
272
+ # context. A score of 0.0 has no relevance, while a score of 1.0 has high
273
+ # relevance. Only suggestions with a score greater than or equal to the
274
+ # value of this field are included in the results.
275
+ #
276
+ # For a baseline model (the default), the recommended value is in the range
277
+ # [0.05, 0.1].
278
+ #
279
+ # For a custom model, there is no recommended value. Tune this value by
280
+ # starting from a very low value and slowly increasing until you have
281
+ # desired results.
282
+ #
283
+ # If this field is not set, it defaults to 0.0, which means that all
284
+ # suggestions are returned.
285
+ #
286
+ # Supported features: ARTICLE_SUGGESTION.
287
+ # @!attribute [rw] context_filter_settings
288
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionQueryConfig::ContextFilterSettings]
289
+ # Determines how recent conversation context is filtered when generating
290
+ # suggestions. If unspecified, no messages will be dropped.
291
+ class SuggestionQueryConfig
292
+ include ::Google::Protobuf::MessageExts
293
+ extend ::Google::Protobuf::MessageExts::ClassMethods
294
+
295
+ # Knowledge base source settings.
296
+ #
297
+ # Supported features: ARTICLE_SUGGESTION, FAQ.
298
+ # @!attribute [rw] knowledge_bases
299
+ # @return [::Array<::String>]
300
+ # Required. Knowledge bases to query. Format:
301
+ # `projects/<Project ID>/locations/<Location
302
+ # ID>/knowledgeBases/<Knowledge Base ID>`. Currently, at most 5 knowledge
303
+ # bases are supported.
304
+ class KnowledgeBaseQuerySource
305
+ include ::Google::Protobuf::MessageExts
306
+ extend ::Google::Protobuf::MessageExts::ClassMethods
307
+ end
308
+
309
+ # Document source settings.
310
+ #
311
+ # Supported features: SMART_REPLY, SMART_COMPOSE.
312
+ # @!attribute [rw] documents
313
+ # @return [::Array<::String>]
314
+ # Required. Knowledge documents to query from. Format:
315
+ # `projects/<Project ID>/locations/<Location
316
+ # ID>/knowledgeBases/<KnowledgeBase ID>/documents/<Document ID>`.
317
+ # Currently, at most 5 documents are supported.
318
+ class DocumentQuerySource
319
+ include ::Google::Protobuf::MessageExts
320
+ extend ::Google::Protobuf::MessageExts::ClassMethods
321
+ end
322
+
323
+ # Dialogflow source setting.
324
+ #
325
+ # Supported feature: DIALOGFLOW_ASSIST.
326
+ # @!attribute [rw] agent
327
+ # @return [::String]
328
+ # Required. The name of a Dialogflow virtual agent used for end user side intent
329
+ # detection and suggestion. Format: `projects/<Project Number/
330
+ # ID>/locations/<Location ID>/agent`. When multiple agents are allowed in
331
+ # the same Dialogflow project.
332
+ class DialogflowQuerySource
333
+ include ::Google::Protobuf::MessageExts
334
+ extend ::Google::Protobuf::MessageExts::ClassMethods
335
+ end
336
+
337
+ # Settings that determine how to filter recent conversation context when
338
+ # generating suggestions.
339
+ # @!attribute [rw] drop_handoff_messages
340
+ # @return [::Boolean]
341
+ # If set to true, the last message from virtual agent (hand off message)
342
+ # and the message before it (trigger message of hand off) are dropped.
343
+ # @!attribute [rw] drop_virtual_agent_messages
344
+ # @return [::Boolean]
345
+ # If set to true, all messages from virtual agent are dropped.
346
+ # @!attribute [rw] drop_ivr_messages
347
+ # @return [::Boolean]
348
+ # If set to true, all messages from ivr stage are dropped.
349
+ class ContextFilterSettings
350
+ include ::Google::Protobuf::MessageExts
351
+ extend ::Google::Protobuf::MessageExts::ClassMethods
352
+ end
353
+ end
354
+
355
+ # Custom conversation models used in agent assist feature.
356
+ #
357
+ # Supported feature: ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY.
358
+ # @!attribute [rw] model
359
+ # @return [::String]
360
+ # Required. Conversation model resource name. Format: `projects/<Project
361
+ # ID>/conversationModels/<Model ID>`.
362
+ class ConversationModelConfig
363
+ include ::Google::Protobuf::MessageExts
364
+ extend ::Google::Protobuf::MessageExts::ClassMethods
365
+ end
366
+
367
+ # Configuration for analyses to run on each conversation message.
368
+ # @!attribute [rw] enable_entity_extraction
369
+ # @return [::Boolean]
370
+ # Enable entity extraction in conversation messages on [agent assist
371
+ # stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages).
372
+ # If unspecified, defaults to false.
373
+ # @!attribute [rw] enable_sentiment_analysis
374
+ # @return [::Boolean]
375
+ # Enable sentiment analysis in conversation messages on [agent assist
376
+ # stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages).
377
+ # If unspecified, defaults to false. Sentiment analysis inspects user input
378
+ # and identifies the prevailing subjective opinion, especially to determine
379
+ # a user's attitude as positive, negative, or neutral:
380
+ # https://cloud.google.com/natural-language/docs/basics#sentiment_analysis
381
+ # For [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] method, result will be in
382
+ # [StreamingAnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.message].
383
+ # For {::Google::Cloud::Dialogflow::V2::Participants::Client#analyze_content Participants.AnalyzeContent} method, result will be in
384
+ # {::Google::Cloud::Dialogflow::V2::AnalyzeContentResponse#message AnalyzeContentResponse.message.SentimentAnalysisResult}
385
+ # For {::Google::Cloud::Dialogflow::V2::Conversations::Client#list_messages Conversations.ListMessages} method, result will be in
386
+ # {::Google::Cloud::Dialogflow::V2::ListMessagesResponse#messages ListMessagesResponse.messages.SentimentAnalysisResult}
387
+ # If Pub/Sub notification is configured, result will be in
388
+ # {::Google::Cloud::Dialogflow::V2::ConversationEvent#new_message_payload ConversationEvent.new_message_payload.SentimentAnalysisResult}.
389
+ class MessageAnalysisConfig
390
+ include ::Google::Protobuf::MessageExts
391
+ extend ::Google::Protobuf::MessageExts::ClassMethods
392
+ end
393
+ end
394
+
395
+ # Defines the hand off to a live agent, typically on which external agent
396
+ # service provider to connect to a conversation.
397
+ # @!attribute [rw] live_person_config
398
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentHandoffConfig::LivePersonConfig]
399
+ # Uses LivePerson (https://www.liveperson.com).
400
+ # @!attribute [rw] salesforce_live_agent_config
401
+ # @return [::Google::Cloud::Dialogflow::V2::HumanAgentHandoffConfig::SalesforceLiveAgentConfig]
402
+ # Uses Salesforce Live Agent.
403
+ class HumanAgentHandoffConfig
404
+ include ::Google::Protobuf::MessageExts
405
+ extend ::Google::Protobuf::MessageExts::ClassMethods
406
+
407
+ # Configuration specific to LivePerson (https://www.liveperson.com).
408
+ # @!attribute [rw] account_number
409
+ # @return [::String]
410
+ # Required. Account number of the LivePerson account to connect. This is
411
+ # the account number you input at the login page.
412
+ class LivePersonConfig
413
+ include ::Google::Protobuf::MessageExts
414
+ extend ::Google::Protobuf::MessageExts::ClassMethods
415
+ end
416
+
417
+ # Configuration specific to Salesforce Live Agent.
418
+ # @!attribute [rw] organization_id
419
+ # @return [::String]
420
+ # Required. The organization ID of the Salesforce account.
421
+ # @!attribute [rw] deployment_id
422
+ # @return [::String]
423
+ # Required. Live Agent deployment ID.
424
+ # @!attribute [rw] button_id
425
+ # @return [::String]
426
+ # Required. Live Agent chat button ID.
427
+ # @!attribute [rw] endpoint_domain
428
+ # @return [::String]
429
+ # Required. Domain of the Live Agent endpoint for this agent. You can find
430
+ # the endpoint URL in the `Live Agent settings` page. For example if URL
431
+ # has the form https://d.la4-c2-phx.salesforceliveagent.com/...,
432
+ # you should fill in d.la4-c2-phx.salesforceliveagent.com.
433
+ class SalesforceLiveAgentConfig
434
+ include ::Google::Protobuf::MessageExts
435
+ extend ::Google::Protobuf::MessageExts::ClassMethods
436
+ end
437
+ end
438
+
439
+ # Defines notification behavior.
440
+ # @!attribute [rw] topic
441
+ # @return [::String]
442
+ # Name of the Pub/Sub topic to publish conversation
443
+ # events like
444
+ # {::Google::Cloud::Dialogflow::V2::ConversationEvent::Type::CONVERSATION_STARTED CONVERSATION_STARTED} as
445
+ # serialized {::Google::Cloud::Dialogflow::V2::ConversationEvent ConversationEvent} protos.
446
+ #
447
+ # Notification works for phone calls, if this topic either is in the same
448
+ # project as the conversation or you grant `service-<Conversation Project
449
+ # Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow Service
450
+ # Agent` role in the topic project.
451
+ #
452
+ # Format: `projects/<Project ID>/locations/<Location ID>/topics/<Topic ID>`.
453
+ # @!attribute [rw] message_format
454
+ # @return [::Google::Cloud::Dialogflow::V2::NotificationConfig::MessageFormat]
455
+ # Format of message.
456
+ class NotificationConfig
457
+ include ::Google::Protobuf::MessageExts
458
+ extend ::Google::Protobuf::MessageExts::ClassMethods
459
+
460
+ # Format of cloud pub/sub message.
461
+ module MessageFormat
462
+ # If it is unspeified, PROTO will be used.
463
+ MESSAGE_FORMAT_UNSPECIFIED = 0
464
+
465
+ # Pubsub message will be serialized proto.
466
+ PROTO = 1
467
+
468
+ # Pubsub message will be json.
469
+ JSON = 2
470
+ end
471
+ end
472
+
473
+ # Defines logging behavior for conversation lifecycle events.
474
+ # @!attribute [rw] enable_stackdriver_logging
475
+ # @return [::Boolean]
476
+ # Whether to log conversation events like
477
+ # {::Google::Cloud::Dialogflow::V2::ConversationEvent::Type::CONVERSATION_STARTED CONVERSATION_STARTED} to
478
+ # Stackdriver in the conversation project as JSON format
479
+ # {::Google::Cloud::Dialogflow::V2::ConversationEvent ConversationEvent} protos.
480
+ class LoggingConfig
481
+ include ::Google::Protobuf::MessageExts
482
+ extend ::Google::Protobuf::MessageExts::ClassMethods
483
+ end
484
+
485
+ # The type of Human Agent Assistant API suggestion to perform, and the maximum
486
+ # number of results to return for that type. Multiple `Feature` objects can
487
+ # be specified in the `features` list.
488
+ # @!attribute [rw] type
489
+ # @return [::Google::Cloud::Dialogflow::V2::SuggestionFeature::Type]
490
+ # Type of Human Agent Assistant API feature to request.
491
+ class SuggestionFeature
492
+ include ::Google::Protobuf::MessageExts
493
+ extend ::Google::Protobuf::MessageExts::ClassMethods
494
+
495
+ # Defines the type of Human Agent Assistant feature.
496
+ module Type
497
+ # Unspecified feature type.
498
+ TYPE_UNSPECIFIED = 0
499
+
500
+ # Run article suggestion model.
501
+ ARTICLE_SUGGESTION = 1
502
+
503
+ # Run FAQ model.
504
+ FAQ = 2
505
+ end
506
+ end
507
+ end
508
+ end
509
+ end
510
+ end