google-cloud-dialogflow-v2 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +6 -6
- data/README.md +1 -1
- data/lib/google/cloud/dialogflow/v2.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/agents.rb +5 -5
- data/lib/google/cloud/dialogflow/v2/agents/client.rb +203 -203
- data/lib/google/cloud/dialogflow/v2/agents/credentials.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/agents/operations.rb +100 -100
- data/lib/google/cloud/dialogflow/v2/agents/paths.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/contexts.rb +3 -3
- data/lib/google/cloud/dialogflow/v2/contexts/client.rb +139 -139
- data/lib/google/cloud/dialogflow/v2/contexts/credentials.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/contexts/paths.rb +14 -14
- data/lib/google/cloud/dialogflow/v2/entity_types.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +229 -229
- data/lib/google/cloud/dialogflow/v2/entity_types/credentials.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +100 -100
- data/lib/google/cloud/dialogflow/v2/entity_types/paths.rb +3 -3
- data/lib/google/cloud/dialogflow/v2/environments.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/environments/client.rb +55 -55
- data/lib/google/cloud/dialogflow/v2/environments/credentials.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/environments/paths.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/intents.rb +3 -3
- data/lib/google/cloud/dialogflow/v2/intents/client.rb +174 -174
- data/lib/google/cloud/dialogflow/v2/intents/credentials.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/intents/operations.rb +100 -100
- data/lib/google/cloud/dialogflow/v2/intents/paths.rb +11 -11
- data/lib/google/cloud/dialogflow/v2/session_entity_types.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +121 -121
- data/lib/google/cloud/dialogflow/v2/session_entity_types/credentials.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/session_entity_types/paths.rb +14 -14
- data/lib/google/cloud/dialogflow/v2/sessions.rb +3 -3
- data/lib/google/cloud/dialogflow/v2/sessions/client.rb +77 -77
- data/lib/google/cloud/dialogflow/v2/sessions/credentials.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/sessions/paths.rb +22 -22
- data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
- data/proto_docs/google/api/resource.rb +12 -12
- data/proto_docs/google/cloud/dialogflow/v2/agent.rb +69 -69
- data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +45 -44
- data/proto_docs/google/cloud/dialogflow/v2/context.rb +38 -38
- data/proto_docs/google/cloud/dialogflow/v2/entity_type.rb +86 -86
- data/proto_docs/google/cloud/dialogflow/v2/environment.rb +18 -18
- data/proto_docs/google/cloud/dialogflow/v2/intent.rb +250 -250
- data/proto_docs/google/cloud/dialogflow/v2/session.rb +106 -106
- data/proto_docs/google/cloud/dialogflow/v2/session_entity_type.rb +35 -35
- data/proto_docs/google/cloud/dialogflow/v2/validation_result.rb +8 -8
- data/proto_docs/google/cloud/dialogflow/v2/webhook.rb +27 -27
- data/proto_docs/google/longrunning/operations.rb +30 -30
- data/proto_docs/google/protobuf/any.rb +4 -4
- data/proto_docs/google/protobuf/duration.rb +4 -4
- data/proto_docs/google/protobuf/empty.rb +2 -2
- data/proto_docs/google/protobuf/field_mask.rb +3 -3
- data/proto_docs/google/protobuf/struct.rb +18 -18
- data/proto_docs/google/protobuf/timestamp.rb +4 -4
- data/proto_docs/google/rpc/status.rb +6 -6
- data/proto_docs/google/type/latlng.rb +4 -4
- metadata +2 -2
@@ -23,7 +23,7 @@ module Google
|
|
23
23
|
module V2
|
24
24
|
# The request to detect user's intent.
|
25
25
|
# @!attribute [rw] session
|
26
|
-
# @return [String]
|
26
|
+
# @return [::String]
|
27
27
|
# Required. The name of the session this query is sent to. Format:
|
28
28
|
# `projects/<Project ID>/agent/sessions/<Session ID>`, or
|
29
29
|
# `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
|
@@ -34,10 +34,10 @@ module Google
|
|
34
34
|
# identifiers (preferably hashed). The length of the `Session ID` and
|
35
35
|
# `User ID` must not exceed 36 characters.
|
36
36
|
# @!attribute [rw] query_params
|
37
|
-
# @return [Google::Cloud::Dialogflow::V2::QueryParameters]
|
37
|
+
# @return [::Google::Cloud::Dialogflow::V2::QueryParameters]
|
38
38
|
# The parameters of this query.
|
39
39
|
# @!attribute [rw] query_input
|
40
|
-
# @return [Google::Cloud::Dialogflow::V2::QueryInput]
|
40
|
+
# @return [::Google::Cloud::Dialogflow::V2::QueryInput]
|
41
41
|
# Required. The input specification. It can be set to:
|
42
42
|
#
|
43
43
|
# 1. an audio config
|
@@ -47,42 +47,42 @@ module Google
|
|
47
47
|
#
|
48
48
|
# 3. an event that specifies which intent to trigger.
|
49
49
|
# @!attribute [rw] output_audio_config
|
50
|
-
# @return [Google::Cloud::Dialogflow::V2::OutputAudioConfig]
|
50
|
+
# @return [::Google::Cloud::Dialogflow::V2::OutputAudioConfig]
|
51
51
|
# Instructs the speech synthesizer how to generate the output
|
52
52
|
# audio. If this field is not set and agent-level speech synthesizer is not
|
53
53
|
# configured, no output audio is generated.
|
54
54
|
# @!attribute [rw] output_audio_config_mask
|
55
|
-
# @return [Google::Protobuf::FieldMask]
|
56
|
-
# Mask for {Google::Cloud::Dialogflow::V2::DetectIntentRequest#output_audio_config output_audio_config} indicating which settings in this
|
55
|
+
# @return [::Google::Protobuf::FieldMask]
|
56
|
+
# Mask for {::Google::Cloud::Dialogflow::V2::DetectIntentRequest#output_audio_config output_audio_config} indicating which settings in this
|
57
57
|
# request-level config should override speech synthesizer settings defined at
|
58
58
|
# agent-level.
|
59
59
|
#
|
60
|
-
# If unspecified or empty, {Google::Cloud::Dialogflow::V2::DetectIntentRequest#output_audio_config output_audio_config} replaces the agent-level
|
60
|
+
# If unspecified or empty, {::Google::Cloud::Dialogflow::V2::DetectIntentRequest#output_audio_config output_audio_config} replaces the agent-level
|
61
61
|
# config in its entirety.
|
62
62
|
# @!attribute [rw] input_audio
|
63
|
-
# @return [String]
|
63
|
+
# @return [::String]
|
64
64
|
# The natural language speech audio to be processed. This field
|
65
65
|
# should be populated iff `query_input` is set to an input audio config.
|
66
66
|
# A single request can contain up to 1 minute of speech audio data.
|
67
67
|
class DetectIntentRequest
|
68
|
-
include Google::Protobuf::MessageExts
|
69
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
68
|
+
include ::Google::Protobuf::MessageExts
|
69
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
70
70
|
end
|
71
71
|
|
72
72
|
# The message returned from the DetectIntent method.
|
73
73
|
# @!attribute [rw] response_id
|
74
|
-
# @return [String]
|
74
|
+
# @return [::String]
|
75
75
|
# The unique identifier of the response. It can be used to
|
76
76
|
# locate a response in the training example set or for reporting issues.
|
77
77
|
# @!attribute [rw] query_result
|
78
|
-
# @return [Google::Cloud::Dialogflow::V2::QueryResult]
|
78
|
+
# @return [::Google::Cloud::Dialogflow::V2::QueryResult]
|
79
79
|
# The selected results of the conversational query or event processing.
|
80
80
|
# See `alternative_query_results` for additional potential results.
|
81
81
|
# @!attribute [rw] webhook_status
|
82
|
-
# @return [Google::Rpc::Status]
|
82
|
+
# @return [::Google::Rpc::Status]
|
83
83
|
# Specifies the status of the webhook request.
|
84
84
|
# @!attribute [rw] output_audio
|
85
|
-
# @return [String]
|
85
|
+
# @return [::String]
|
86
86
|
# The audio data bytes encoded as specified in the request.
|
87
87
|
# Note: The output audio is generated based on the values of default platform
|
88
88
|
# text responses found in the `query_result.fulfillment_messages` field. If
|
@@ -90,50 +90,50 @@ module Google
|
|
90
90
|
# generating audio. If no default platform text responses exist, the
|
91
91
|
# generated audio content will be empty.
|
92
92
|
# @!attribute [rw] output_audio_config
|
93
|
-
# @return [Google::Cloud::Dialogflow::V2::OutputAudioConfig]
|
93
|
+
# @return [::Google::Cloud::Dialogflow::V2::OutputAudioConfig]
|
94
94
|
# The config used by the speech synthesizer to generate the output audio.
|
95
95
|
class DetectIntentResponse
|
96
|
-
include Google::Protobuf::MessageExts
|
97
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
96
|
+
include ::Google::Protobuf::MessageExts
|
97
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
98
98
|
end
|
99
99
|
|
100
100
|
# Represents the parameters of the conversational query.
|
101
101
|
# @!attribute [rw] time_zone
|
102
|
-
# @return [String]
|
102
|
+
# @return [::String]
|
103
103
|
# The time zone of this conversational query from the
|
104
104
|
# [time zone database](https://www.iana.org/time-zones), e.g.,
|
105
105
|
# America/New_York, Europe/Paris. If not provided, the time zone specified in
|
106
106
|
# agent settings is used.
|
107
107
|
# @!attribute [rw] geo_location
|
108
|
-
# @return [Google::Type::LatLng]
|
108
|
+
# @return [::Google::Type::LatLng]
|
109
109
|
# The geo location of this conversational query.
|
110
110
|
# @!attribute [rw] contexts
|
111
|
-
# @return [Array
|
111
|
+
# @return [::Array<::Google::Cloud::Dialogflow::V2::Context>]
|
112
112
|
# The collection of contexts to be activated before this query is
|
113
113
|
# executed.
|
114
114
|
# @!attribute [rw] reset_contexts
|
115
|
-
# @return [Boolean]
|
115
|
+
# @return [::Boolean]
|
116
116
|
# Specifies whether to delete all contexts in the current session
|
117
117
|
# before the new ones are activated.
|
118
118
|
# @!attribute [rw] session_entity_types
|
119
|
-
# @return [Array
|
119
|
+
# @return [::Array<::Google::Cloud::Dialogflow::V2::SessionEntityType>]
|
120
120
|
# Additional session entity types to replace or extend developer
|
121
121
|
# entity types with. The entity synonyms apply to all languages and persist
|
122
122
|
# for the session of this query.
|
123
123
|
# @!attribute [rw] payload
|
124
|
-
# @return [Google::Protobuf::Struct]
|
124
|
+
# @return [::Google::Protobuf::Struct]
|
125
125
|
# This field can be used to pass custom data to your webhook.
|
126
126
|
# Arbitrary JSON objects are supported.
|
127
127
|
# If supplied, the value is used to populate the
|
128
128
|
# `WebhookRequest.original_detect_intent_request.payload`
|
129
129
|
# field sent to your webhook.
|
130
130
|
# @!attribute [rw] sentiment_analysis_request_config
|
131
|
-
# @return [Google::Cloud::Dialogflow::V2::SentimentAnalysisRequestConfig]
|
131
|
+
# @return [::Google::Cloud::Dialogflow::V2::SentimentAnalysisRequestConfig]
|
132
132
|
# Configures the type of sentiment analysis to perform. If not
|
133
133
|
# provided, sentiment analysis is not performed.
|
134
134
|
class QueryParameters
|
135
|
-
include Google::Protobuf::MessageExts
|
136
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
135
|
+
include ::Google::Protobuf::MessageExts
|
136
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
137
137
|
end
|
138
138
|
|
139
139
|
# Represents the query input. It can contain either:
|
@@ -145,22 +145,22 @@ module Google
|
|
145
145
|
#
|
146
146
|
# 3. An event that specifies which intent to trigger.
|
147
147
|
# @!attribute [rw] audio_config
|
148
|
-
# @return [Google::Cloud::Dialogflow::V2::InputAudioConfig]
|
148
|
+
# @return [::Google::Cloud::Dialogflow::V2::InputAudioConfig]
|
149
149
|
# Instructs the speech recognizer how to process the speech audio.
|
150
150
|
# @!attribute [rw] text
|
151
|
-
# @return [Google::Cloud::Dialogflow::V2::TextInput]
|
151
|
+
# @return [::Google::Cloud::Dialogflow::V2::TextInput]
|
152
152
|
# The natural language text to be processed.
|
153
153
|
# @!attribute [rw] event
|
154
|
-
# @return [Google::Cloud::Dialogflow::V2::EventInput]
|
154
|
+
# @return [::Google::Cloud::Dialogflow::V2::EventInput]
|
155
155
|
# The event to be processed.
|
156
156
|
class QueryInput
|
157
|
-
include Google::Protobuf::MessageExts
|
158
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
157
|
+
include ::Google::Protobuf::MessageExts
|
158
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
159
159
|
end
|
160
160
|
|
161
161
|
# Represents the result of conversational query or event processing.
|
162
162
|
# @!attribute [rw] query_text
|
163
|
-
# @return [String]
|
163
|
+
# @return [::String]
|
164
164
|
# The original conversational query text:
|
165
165
|
#
|
166
166
|
# - If natural language text was provided as input, `query_text` contains
|
@@ -171,13 +171,13 @@ module Google
|
|
171
171
|
# - If automatic spell correction is enabled, `query_text` will contain the
|
172
172
|
# corrected user input.
|
173
173
|
# @!attribute [rw] language_code
|
174
|
-
# @return [String]
|
174
|
+
# @return [::String]
|
175
175
|
# The language that was triggered during intent detection.
|
176
176
|
# See [Language
|
177
177
|
# Support](https://cloud.google.com/dialogflow/docs/reference/language)
|
178
178
|
# for a list of the currently supported language codes.
|
179
179
|
# @!attribute [rw] speech_recognition_confidence
|
180
|
-
# @return [Float]
|
180
|
+
# @return [::Float]
|
181
181
|
# The Speech recognition confidence between 0.0 and 1.0. A higher number
|
182
182
|
# indicates an estimated greater likelihood that the recognized words are
|
183
183
|
# correct. The default of 0.0 is a sentinel value indicating that confidence
|
@@ -188,10 +188,10 @@ module Google
|
|
188
188
|
# separate confidence estimates per portion of the audio in
|
189
189
|
# StreamingRecognitionResult.
|
190
190
|
# @!attribute [rw] action
|
191
|
-
# @return [String]
|
191
|
+
# @return [::String]
|
192
192
|
# The action name from the matched intent.
|
193
193
|
# @!attribute [rw] parameters
|
194
|
-
# @return [Google::Protobuf::Struct]
|
194
|
+
# @return [::Google::Protobuf::Struct]
|
195
195
|
# The collection of extracted parameters.
|
196
196
|
#
|
197
197
|
# Depending on your protocol or client library language, this is a
|
@@ -208,7 +208,7 @@ module Google
|
|
208
208
|
# map from composite entity property names to property values
|
209
209
|
# - Else: parameter value
|
210
210
|
# @!attribute [rw] all_required_params_present
|
211
|
-
# @return [Boolean]
|
211
|
+
# @return [::Boolean]
|
212
212
|
# This field is set to:
|
213
213
|
#
|
214
214
|
# - `false` if the matched intent has required parameters and not all of
|
@@ -216,33 +216,33 @@ module Google
|
|
216
216
|
# - `true` if all required parameter values have been collected, or if the
|
217
217
|
# matched intent doesn't contain any required parameters.
|
218
218
|
# @!attribute [rw] fulfillment_text
|
219
|
-
# @return [String]
|
219
|
+
# @return [::String]
|
220
220
|
# The text to be pronounced to the user or shown on the screen.
|
221
221
|
# Note: This is a legacy field, `fulfillment_messages` should be preferred.
|
222
222
|
# @!attribute [rw] fulfillment_messages
|
223
|
-
# @return [Array
|
223
|
+
# @return [::Array<::Google::Cloud::Dialogflow::V2::Intent::Message>]
|
224
224
|
# The collection of rich messages to present to the user.
|
225
225
|
# @!attribute [rw] webhook_source
|
226
|
-
# @return [String]
|
226
|
+
# @return [::String]
|
227
227
|
# If the query was fulfilled by a webhook call, this field is set to the
|
228
228
|
# value of the `source` field returned in the webhook response.
|
229
229
|
# @!attribute [rw] webhook_payload
|
230
|
-
# @return [Google::Protobuf::Struct]
|
230
|
+
# @return [::Google::Protobuf::Struct]
|
231
231
|
# If the query was fulfilled by a webhook call, this field is set to the
|
232
232
|
# value of the `payload` field returned in the webhook response.
|
233
233
|
# @!attribute [rw] output_contexts
|
234
|
-
# @return [Array
|
234
|
+
# @return [::Array<::Google::Cloud::Dialogflow::V2::Context>]
|
235
235
|
# The collection of output contexts. If applicable,
|
236
236
|
# `output_contexts.parameters` contains entries with name
|
237
237
|
# `<parameter name>.original` containing the original parameter values
|
238
238
|
# before the query.
|
239
239
|
# @!attribute [rw] intent
|
240
|
-
# @return [Google::Cloud::Dialogflow::V2::Intent]
|
240
|
+
# @return [::Google::Cloud::Dialogflow::V2::Intent]
|
241
241
|
# The intent that matched the conversational query. Some, not
|
242
242
|
# all fields are filled in this message, including but not limited to:
|
243
243
|
# `name`, `display_name`, `end_interaction` and `is_fallback`.
|
244
244
|
# @!attribute [rw] intent_detection_confidence
|
245
|
-
# @return [Float]
|
245
|
+
# @return [::Float]
|
246
246
|
# The intent detection confidence. Values range from 0.0
|
247
247
|
# (completely uncertain) to 1.0 (completely certain).
|
248
248
|
# This value is for informational purpose only and is only used to
|
@@ -252,7 +252,7 @@ module Google
|
|
252
252
|
# If there are `multiple knowledge_answers` messages, this value is set to
|
253
253
|
# the greatest `knowledgeAnswers.match_confidence` value in the list.
|
254
254
|
# @!attribute [rw] diagnostic_info
|
255
|
-
# @return [Google::Protobuf::Struct]
|
255
|
+
# @return [::Google::Protobuf::Struct]
|
256
256
|
# Free-form diagnostic information for the associated detect intent request.
|
257
257
|
# The fields of this data can change without notice, so you should not write
|
258
258
|
# code that depends on its structure.
|
@@ -261,35 +261,35 @@ module Google
|
|
261
261
|
# - webhook call latency
|
262
262
|
# - webhook errors
|
263
263
|
# @!attribute [rw] sentiment_analysis_result
|
264
|
-
# @return [Google::Cloud::Dialogflow::V2::SentimentAnalysisResult]
|
264
|
+
# @return [::Google::Cloud::Dialogflow::V2::SentimentAnalysisResult]
|
265
265
|
# The sentiment analysis result, which depends on the
|
266
266
|
# `sentiment_analysis_request_config` specified in the request.
|
267
267
|
class QueryResult
|
268
|
-
include Google::Protobuf::MessageExts
|
269
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
268
|
+
include ::Google::Protobuf::MessageExts
|
269
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
270
270
|
end
|
271
271
|
|
272
272
|
# The top-level message sent by the client to the
|
273
|
-
# {Google::Cloud::Dialogflow::V2::Sessions::Client#streaming_detect_intent Sessions.StreamingDetectIntent} method.
|
273
|
+
# {::Google::Cloud::Dialogflow::V2::Sessions::Client#streaming_detect_intent Sessions.StreamingDetectIntent} method.
|
274
274
|
#
|
275
275
|
# Multiple request messages should be sent in order:
|
276
276
|
#
|
277
277
|
# 1. The first message must contain
|
278
|
-
# {Google::Cloud::Dialogflow::V2::StreamingDetectIntentRequest#session session},
|
279
|
-
# {Google::Cloud::Dialogflow::V2::StreamingDetectIntentRequest#query_input query_input} plus optionally
|
280
|
-
# {Google::Cloud::Dialogflow::V2::StreamingDetectIntentRequest#query_params query_params}. If the client
|
278
|
+
# {::Google::Cloud::Dialogflow::V2::StreamingDetectIntentRequest#session session},
|
279
|
+
# {::Google::Cloud::Dialogflow::V2::StreamingDetectIntentRequest#query_input query_input} plus optionally
|
280
|
+
# {::Google::Cloud::Dialogflow::V2::StreamingDetectIntentRequest#query_params query_params}. If the client
|
281
281
|
# wants to receive an audio response, it should also contain
|
282
|
-
# {Google::Cloud::Dialogflow::V2::StreamingDetectIntentRequest#output_audio_config output_audio_config}.
|
282
|
+
# {::Google::Cloud::Dialogflow::V2::StreamingDetectIntentRequest#output_audio_config output_audio_config}.
|
283
283
|
# The message must not contain
|
284
|
-
# {Google::Cloud::Dialogflow::V2::StreamingDetectIntentRequest#input_audio input_audio}.
|
285
|
-
# 2. If {Google::Cloud::Dialogflow::V2::StreamingDetectIntentRequest#query_input query_input} was set to
|
286
|
-
# {Google::Cloud::Dialogflow::V2::InputAudioConfig query_input.audio_config}, all subsequent
|
284
|
+
# {::Google::Cloud::Dialogflow::V2::StreamingDetectIntentRequest#input_audio input_audio}.
|
285
|
+
# 2. If {::Google::Cloud::Dialogflow::V2::StreamingDetectIntentRequest#query_input query_input} was set to
|
286
|
+
# {::Google::Cloud::Dialogflow::V2::InputAudioConfig query_input.audio_config}, all subsequent
|
287
287
|
# messages must contain
|
288
|
-
# {Google::Cloud::Dialogflow::V2::StreamingDetectIntentRequest#input_audio input_audio} to continue with
|
288
|
+
# {::Google::Cloud::Dialogflow::V2::StreamingDetectIntentRequest#input_audio input_audio} to continue with
|
289
289
|
# Speech recognition.
|
290
290
|
# If you decide to rather detect an intent from text input after you
|
291
291
|
# already started Speech recognition, please send a message with
|
292
|
-
# {Google::Cloud::Dialogflow::V2::QueryInput#text query_input.text}.
|
292
|
+
# {::Google::Cloud::Dialogflow::V2::QueryInput#text query_input.text}.
|
293
293
|
#
|
294
294
|
# However, note that:
|
295
295
|
#
|
@@ -300,7 +300,7 @@ module Google
|
|
300
300
|
#
|
301
301
|
# After you sent all input, you must half-close or abort the request stream.
|
302
302
|
# @!attribute [rw] session
|
303
|
-
# @return [String]
|
303
|
+
# @return [::String]
|
304
304
|
# Required. The name of the session the query is sent to.
|
305
305
|
# Format of the session name:
|
306
306
|
# `projects/<Project ID>/agent/sessions/<Session ID>`, or
|
@@ -312,10 +312,10 @@ module Google
|
|
312
312
|
# identifiers (preferably hashed). The length of the `Session ID` and
|
313
313
|
# `User ID` must not exceed 36 characters.
|
314
314
|
# @!attribute [rw] query_params
|
315
|
-
# @return [Google::Cloud::Dialogflow::V2::QueryParameters]
|
315
|
+
# @return [::Google::Cloud::Dialogflow::V2::QueryParameters]
|
316
316
|
# The parameters of this query.
|
317
317
|
# @!attribute [rw] query_input
|
318
|
-
# @return [Google::Cloud::Dialogflow::V2::QueryInput]
|
318
|
+
# @return [::Google::Cloud::Dialogflow::V2::QueryInput]
|
319
319
|
# Required. The input specification. It can be set to:
|
320
320
|
#
|
321
321
|
# 1. an audio config which instructs the speech recognizer how to process
|
@@ -325,8 +325,8 @@ module Google
|
|
325
325
|
#
|
326
326
|
# 3. an event that specifies which intent to trigger.
|
327
327
|
# @!attribute [rw] single_utterance
|
328
|
-
# @return [Boolean]
|
329
|
-
# Please use {Google::Cloud::Dialogflow::V2::InputAudioConfig#single_utterance InputAudioConfig.single_utterance} instead.
|
328
|
+
# @return [::Boolean]
|
329
|
+
# Please use {::Google::Cloud::Dialogflow::V2::InputAudioConfig#single_utterance InputAudioConfig.single_utterance} instead.
|
330
330
|
# If `false` (default), recognition does not cease until
|
331
331
|
# the client closes the stream. If `true`, the recognizer will detect a
|
332
332
|
# single spoken utterance in input audio. Recognition ceases when it detects
|
@@ -335,26 +335,26 @@ module Google
|
|
335
335
|
# request with a new stream as needed.
|
336
336
|
# This setting is ignored when `query_input` is a piece of text or an event.
|
337
337
|
# @!attribute [rw] output_audio_config
|
338
|
-
# @return [Google::Cloud::Dialogflow::V2::OutputAudioConfig]
|
338
|
+
# @return [::Google::Cloud::Dialogflow::V2::OutputAudioConfig]
|
339
339
|
# Instructs the speech synthesizer how to generate the output
|
340
340
|
# audio. If this field is not set and agent-level speech synthesizer is not
|
341
341
|
# configured, no output audio is generated.
|
342
342
|
# @!attribute [rw] output_audio_config_mask
|
343
|
-
# @return [Google::Protobuf::FieldMask]
|
344
|
-
# Mask for {Google::Cloud::Dialogflow::V2::StreamingDetectIntentRequest#output_audio_config output_audio_config} indicating which settings in this
|
343
|
+
# @return [::Google::Protobuf::FieldMask]
|
344
|
+
# Mask for {::Google::Cloud::Dialogflow::V2::StreamingDetectIntentRequest#output_audio_config output_audio_config} indicating which settings in this
|
345
345
|
# request-level config should override speech synthesizer settings defined at
|
346
346
|
# agent-level.
|
347
347
|
#
|
348
|
-
# If unspecified or empty, {Google::Cloud::Dialogflow::V2::StreamingDetectIntentRequest#output_audio_config output_audio_config} replaces the agent-level
|
348
|
+
# If unspecified or empty, {::Google::Cloud::Dialogflow::V2::StreamingDetectIntentRequest#output_audio_config output_audio_config} replaces the agent-level
|
349
349
|
# config in its entirety.
|
350
350
|
# @!attribute [rw] input_audio
|
351
|
-
# @return [String]
|
351
|
+
# @return [::String]
|
352
352
|
# The input audio content to be recognized. Must be sent if
|
353
353
|
# `query_input` was set to a streaming input audio config. The complete audio
|
354
354
|
# over all streaming messages must not exceed 1 minute.
|
355
355
|
class StreamingDetectIntentRequest
|
356
|
-
include Google::Protobuf::MessageExts
|
357
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
356
|
+
include ::Google::Protobuf::MessageExts
|
357
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
358
358
|
end
|
359
359
|
|
360
360
|
# The top-level message returned from the
|
@@ -370,20 +370,20 @@ module Google
|
|
370
370
|
# 2. The next message contains `response_id`, `query_result`
|
371
371
|
# and optionally `webhook_status` if a WebHook was called.
|
372
372
|
# @!attribute [rw] response_id
|
373
|
-
# @return [String]
|
373
|
+
# @return [::String]
|
374
374
|
# The unique identifier of the response. It can be used to
|
375
375
|
# locate a response in the training example set or for reporting issues.
|
376
376
|
# @!attribute [rw] recognition_result
|
377
|
-
# @return [Google::Cloud::Dialogflow::V2::StreamingRecognitionResult]
|
377
|
+
# @return [::Google::Cloud::Dialogflow::V2::StreamingRecognitionResult]
|
378
378
|
# The result of speech recognition.
|
379
379
|
# @!attribute [rw] query_result
|
380
|
-
# @return [Google::Cloud::Dialogflow::V2::QueryResult]
|
380
|
+
# @return [::Google::Cloud::Dialogflow::V2::QueryResult]
|
381
381
|
# The result of the conversational query or event processing.
|
382
382
|
# @!attribute [rw] webhook_status
|
383
|
-
# @return [Google::Rpc::Status]
|
383
|
+
# @return [::Google::Rpc::Status]
|
384
384
|
# Specifies the status of the webhook request.
|
385
385
|
# @!attribute [rw] output_audio
|
386
|
-
# @return [String]
|
386
|
+
# @return [::String]
|
387
387
|
# The audio data bytes encoded as specified in the request.
|
388
388
|
# Note: The output audio is generated based on the values of default platform
|
389
389
|
# text responses found in the `query_result.fulfillment_messages` field. If
|
@@ -391,11 +391,11 @@ module Google
|
|
391
391
|
# generating audio. If no default platform text responses exist, the
|
392
392
|
# generated audio content will be empty.
|
393
393
|
# @!attribute [rw] output_audio_config
|
394
|
-
# @return [Google::Cloud::Dialogflow::V2::OutputAudioConfig]
|
394
|
+
# @return [::Google::Cloud::Dialogflow::V2::OutputAudioConfig]
|
395
395
|
# The config used by the speech synthesizer to generate the output audio.
|
396
396
|
class StreamingDetectIntentResponse
|
397
|
-
include Google::Protobuf::MessageExts
|
398
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
397
|
+
include ::Google::Protobuf::MessageExts
|
398
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
399
399
|
end
|
400
400
|
|
401
401
|
# Contains a speech recognition result corresponding to a portion of the audio
|
@@ -432,20 +432,20 @@ module Google
|
|
432
432
|
#
|
433
433
|
# * for `END_OF_SINGLE_UTTERANCE`: only `message_type`.
|
434
434
|
# @!attribute [rw] message_type
|
435
|
-
# @return [Google::Cloud::Dialogflow::V2::StreamingRecognitionResult::MessageType]
|
435
|
+
# @return [::Google::Cloud::Dialogflow::V2::StreamingRecognitionResult::MessageType]
|
436
436
|
# Type of the result message.
|
437
437
|
# @!attribute [rw] transcript
|
438
|
-
# @return [String]
|
438
|
+
# @return [::String]
|
439
439
|
# Transcript text representing the words that the user spoke.
|
440
440
|
# Populated if and only if `message_type` = `TRANSCRIPT`.
|
441
441
|
# @!attribute [rw] is_final
|
442
|
-
# @return [Boolean]
|
442
|
+
# @return [::Boolean]
|
443
443
|
# If `false`, the `StreamingRecognitionResult` represents an
|
444
444
|
# interim result that may change. If `true`, the recognizer will not return
|
445
445
|
# any further hypotheses about this piece of the audio. May only be populated
|
446
446
|
# for `message_type` = `TRANSCRIPT`.
|
447
447
|
# @!attribute [rw] confidence
|
448
|
-
# @return [Float]
|
448
|
+
# @return [::Float]
|
449
449
|
# The Speech confidence between 0.0 and 1.0 for the current portion of audio.
|
450
450
|
# A higher number indicates an estimated greater likelihood that the
|
451
451
|
# recognized words are correct. The default of 0.0 is a sentinel value
|
@@ -454,17 +454,17 @@ module Google
|
|
454
454
|
# This field is typically only provided if `is_final` is true and you should
|
455
455
|
# not rely on it being accurate or even set.
|
456
456
|
# @!attribute [rw] speech_word_info
|
457
|
-
# @return [Array
|
457
|
+
# @return [::Array<::Google::Cloud::Dialogflow::V2::SpeechWordInfo>]
|
458
458
|
# Word-specific information for the words recognized by Speech in
|
459
|
-
# {Google::Cloud::Dialogflow::V2::StreamingRecognitionResult#transcript transcript}. Populated if and only if `message_type` = `TRANSCRIPT` and
|
459
|
+
# {::Google::Cloud::Dialogflow::V2::StreamingRecognitionResult#transcript transcript}. Populated if and only if `message_type` = `TRANSCRIPT` and
|
460
460
|
# [InputAudioConfig.enable_word_info] is set.
|
461
461
|
# @!attribute [rw] speech_end_offset
|
462
|
-
# @return [Google::Protobuf::Duration]
|
462
|
+
# @return [::Google::Protobuf::Duration]
|
463
463
|
# Time offset of the end of this Speech recognition result relative to the
|
464
464
|
# beginning of the audio. Only populated for `message_type` = `TRANSCRIPT`.
|
465
465
|
class StreamingRecognitionResult
|
466
|
-
include Google::Protobuf::MessageExts
|
467
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
466
|
+
include ::Google::Protobuf::MessageExts
|
467
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
468
468
|
|
469
469
|
# Type of the response message.
|
470
470
|
module MessageType
|
@@ -487,18 +487,18 @@ module Google
|
|
487
487
|
|
488
488
|
# Represents the natural language text to be processed.
|
489
489
|
# @!attribute [rw] text
|
490
|
-
# @return [String]
|
490
|
+
# @return [::String]
|
491
491
|
# Required. The UTF-8 encoded natural language text to be processed.
|
492
492
|
# Text length must not exceed 256 characters.
|
493
493
|
# @!attribute [rw] language_code
|
494
|
-
# @return [String]
|
494
|
+
# @return [::String]
|
495
495
|
# Required. The language of this conversational query. See [Language
|
496
496
|
# Support](https://cloud.google.com/dialogflow/docs/reference/language)
|
497
497
|
# for a list of the currently supported language codes. Note that queries in
|
498
498
|
# the same session do not necessarily need to specify the same language.
|
499
499
|
class TextInput
|
500
|
-
include Google::Protobuf::MessageExts
|
501
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
500
|
+
include ::Google::Protobuf::MessageExts
|
501
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
502
502
|
end
|
503
503
|
|
504
504
|
# Events allow for matching intents by event name instead of the natural
|
@@ -507,10 +507,10 @@ module Google
|
|
507
507
|
# The parameter `name` may be used by the agent in the response:
|
508
508
|
# `"Hello #welcome_event.name! What can I do for you today?"`.
|
509
509
|
# @!attribute [rw] name
|
510
|
-
# @return [String]
|
510
|
+
# @return [::String]
|
511
511
|
# Required. The unique identifier of the event.
|
512
512
|
# @!attribute [rw] parameters
|
513
|
-
# @return [Google::Protobuf::Struct]
|
513
|
+
# @return [::Google::Protobuf::Struct]
|
514
514
|
# The collection of parameters associated with the event.
|
515
515
|
#
|
516
516
|
# Depending on your protocol or client library language, this is a
|
@@ -527,50 +527,50 @@ module Google
|
|
527
527
|
# map from composite entity property names to property values
|
528
528
|
# - Else: parameter value
|
529
529
|
# @!attribute [rw] language_code
|
530
|
-
# @return [String]
|
530
|
+
# @return [::String]
|
531
531
|
# Required. The language of this query. See [Language
|
532
532
|
# Support](https://cloud.google.com/dialogflow/docs/reference/language)
|
533
533
|
# for a list of the currently supported language codes. Note that queries in
|
534
534
|
# the same session do not necessarily need to specify the same language.
|
535
535
|
class EventInput
|
536
|
-
include Google::Protobuf::MessageExts
|
537
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
536
|
+
include ::Google::Protobuf::MessageExts
|
537
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
538
538
|
end
|
539
539
|
|
540
540
|
# Configures the types of sentiment analysis to perform.
|
541
541
|
# @!attribute [rw] analyze_query_text_sentiment
|
542
|
-
# @return [Boolean]
|
542
|
+
# @return [::Boolean]
|
543
543
|
# Instructs the service to perform sentiment analysis on
|
544
544
|
# `query_text`. If not provided, sentiment analysis is not performed on
|
545
545
|
# `query_text`.
|
546
546
|
class SentimentAnalysisRequestConfig
|
547
|
-
include Google::Protobuf::MessageExts
|
548
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
547
|
+
include ::Google::Protobuf::MessageExts
|
548
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
549
549
|
end
|
550
550
|
|
551
551
|
# The result of sentiment analysis as configured by
|
552
552
|
# `sentiment_analysis_request_config`.
|
553
553
|
# @!attribute [rw] query_text_sentiment
|
554
|
-
# @return [Google::Cloud::Dialogflow::V2::Sentiment]
|
554
|
+
# @return [::Google::Cloud::Dialogflow::V2::Sentiment]
|
555
555
|
# The sentiment analysis result for `query_text`.
|
556
556
|
class SentimentAnalysisResult
|
557
|
-
include Google::Protobuf::MessageExts
|
558
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
557
|
+
include ::Google::Protobuf::MessageExts
|
558
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
559
559
|
end
|
560
560
|
|
561
561
|
# The sentiment, such as positive/negative feeling or association, for a unit
|
562
562
|
# of analysis, such as the query text.
|
563
563
|
# @!attribute [rw] score
|
564
|
-
# @return [Float]
|
564
|
+
# @return [::Float]
|
565
565
|
# Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
|
566
566
|
# sentiment).
|
567
567
|
# @!attribute [rw] magnitude
|
568
|
-
# @return [Float]
|
568
|
+
# @return [::Float]
|
569
569
|
# A non-negative number in the [0, +inf) range, which represents the absolute
|
570
570
|
# magnitude of sentiment, regardless of score (positive or negative).
|
571
571
|
class Sentiment
|
572
|
-
include Google::Protobuf::MessageExts
|
573
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
572
|
+
include ::Google::Protobuf::MessageExts
|
573
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
574
574
|
end
|
575
575
|
end
|
576
576
|
end
|