google-cloud-dialogflow-v2 0.4.1 → 0.6.2

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