blob: aae05ae2b3c83f882de56be449b496f22947b7b9 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="dialogflow_v2.html">Dialogflow API</a> . <a href="dialogflow_v2.projects.html">projects</a> . <a href="dialogflow_v2.projects.agent.html">agent</a> . <a href="dialogflow_v2.projects.agent.sessions.html">sessions</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="dialogflow_v2.projects.agent.sessions.contexts.html">contexts()</a></code>
79</p>
80<p class="firstline">Returns the contexts Resource.</p>
81
82<p class="toc_element">
83 <code><a href="dialogflow_v2.projects.agent.sessions.entityTypes.html">entityTypes()</a></code>
84</p>
85<p class="firstline">Returns the entityTypes Resource.</p>
86
87<p class="toc_element">
88 <code><a href="#deleteContexts">deleteContexts(parent, x__xgafv=None)</a></code></p>
89<p class="firstline">Deletes all active contexts in the specified session.</p>
90<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070091 <code><a href="#detectIntent">detectIntent(session, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070092<p class="firstline">Processes a natural language query and returns structured, actionable data</p>
93<h3>Method Details</h3>
94<div class="method">
95 <code class="details" id="deleteContexts">deleteContexts(parent, x__xgafv=None)</code>
96 <pre>Deletes all active contexts in the specified session.
97
98Args:
99 parent: string, Required. The name of the session to delete all contexts from. Format:
Dan O'Mearadd494642020-05-01 07:42:23 -0700100`projects/&lt;Project ID&gt;/agent/sessions/&lt;Session ID&gt;` or `projects/&lt;Project
101ID&gt;/agent/environments/&lt;Environment ID&gt;/users/&lt;User ID&gt;/sessions/&lt;Session
102ID&gt;`.
103If `Environment ID` is not specified we assume default 'draft' environment.
104If `User ID` is not specified, we assume default '-' user. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700105 x__xgafv: string, V1 error format.
106 Allowed values
107 1 - v1 error format
108 2 - v2 error format
109
110Returns:
111 An object of the form:
112
113 { # A generic empty message that you can re-use to avoid defining duplicated
114 # empty messages in your APIs. A typical example is to use it as the request
115 # or the response type of an API method. For instance:
116 #
117 # service Foo {
118 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
119 # }
120 #
121 # The JSON representation for `Empty` is empty JSON object `{}`.
122 }</pre>
123</div>
124
125<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700126 <code class="details" id="detectIntent">detectIntent(session, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700127 <pre>Processes a natural language query and returns structured, actionable data
128as a result. This method is not idempotent, because it may cause contexts
129and session entity types to be updated, which in turn might affect
130results of future queries.
131
132Args:
133 session: string, Required. The name of the session this query is sent to. Format:
Dan O'Mearadd494642020-05-01 07:42:23 -0700134`projects/&lt;Project ID&gt;/agent/sessions/&lt;Session ID&gt;`, or
135`projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;/users/&lt;User
136ID&gt;/sessions/&lt;Session ID&gt;`. If `Environment ID` is not specified, we assume
137default 'draft' environment. If `User ID` is not specified, we are using
138"-". It's up to the API caller to choose an appropriate `Session ID` and
139`User Id`. They can be a random number or some type of user and session
140identifiers (preferably hashed). The length of the `Session ID` and
141`User ID` must not exceed 36 characters. (required)
142 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700143 The object takes the form of:
144
145{ # The request to detect user's intent.
Dan O'Mearadd494642020-05-01 07:42:23 -0700146 "outputAudioConfig": { # Instructs the speech synthesizer on how to generate the output audio content. # Instructs the speech synthesizer how to generate the output
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700147 # audio. If this field is not set and agent-level speech synthesizer is not
148 # configured, no output audio is generated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700149 # If this audio config is supplied in a request, it overrides all existing
150 # text-to-speech settings applied to the agent.
151 "sampleRateHertz": 42, # The synthesis sample rate (in hertz) for this audio. If not
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700152 # provided, then the synthesizer will use the default sample rate based on
153 # the audio encoding. If this is different from the voice's natural sample
154 # rate, then the synthesizer will honor this request by converting to the
155 # desired sample rate (which might result in worse audio quality).
156 "audioEncoding": "A String", # Required. Audio encoding of the synthesized audio content.
Dan O'Mearadd494642020-05-01 07:42:23 -0700157 "synthesizeSpeechConfig": { # Configuration of how speech should be synthesized. # Configuration of how speech should be synthesized.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700158 "effectsProfileId": [ # Optional. An identifier which selects 'audio effects' profiles that are
159 # applied on (post synthesized) text to speech. Effects are applied on top of
160 # each other in the order they are given.
161 "A String",
162 ],
163 "voice": { # Description of which voice to use for speech synthesis. # Optional. The desired voice of the synthesized audio.
164 "ssmlGender": "A String", # Optional. The preferred gender of the voice. If not set, the service will
165 # choose a voice based on the other parameters such as language_code and
166 # name. Note that this is only a preference, not requirement. If a
167 # voice of the appropriate gender is not available, the synthesizer should
168 # substitute a voice with a different gender rather than failing the request.
169 "name": "A String", # Optional. The name of the voice. If not set, the service will choose a
Dan O'Mearadd494642020-05-01 07:42:23 -0700170 # voice based on the other parameters such as language_code and
171 # ssml_gender.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700172 },
173 "speakingRate": 3.14, # Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal
174 # native speed supported by the specific voice. 2.0 is twice as fast, and
175 # 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any
Dan O'Mearadd494642020-05-01 07:42:23 -0700176 # other values &lt; 0.25 or &gt; 4.0 will return an error.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700177 "volumeGainDb": 3.14, # Optional. Volume gain (in dB) of the normal native volume supported by the
178 # specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of
179 # 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB)
180 # will play at approximately half the amplitude of the normal native signal
181 # amplitude. A value of +6.0 (dB) will play at approximately twice the
182 # amplitude of the normal native signal amplitude. We strongly recommend not
183 # to exceed +10 (dB) as there's usually no effective increase in loudness for
184 # any value greater than that.
185 "pitch": 3.14, # Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20
186 # semitones from the original pitch. -20 means decrease 20 semitones from the
187 # original pitch.
188 },
189 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700190 "inputAudio": "A String", # The natural language speech audio to be processed. This field
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700191 # should be populated iff `query_input` is set to an input audio config.
192 # A single request can contain up to 1 minute of speech audio data.
Dan O'Mearadd494642020-05-01 07:42:23 -0700193 "outputAudioConfigMask": "A String", # Mask for output_audio_config indicating which settings in this
194 # request-level config should override speech synthesizer settings defined at
195 # agent-level.
196 #
197 # If unspecified or empty, output_audio_config replaces the agent-level
198 # config in its entirety.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700199 "queryInput": { # Represents the query input. It can contain either: # Required. The input specification. It can be set to:
200 #
201 # 1. an audio config
202 # which instructs the speech recognizer how to process the speech audio,
203 #
204 # 2. a conversational query in the form of text, or
205 #
206 # 3. an event that specifies which intent to trigger.
207 #
208 # 1. An audio config which
209 # instructs the speech recognizer how to process the speech audio.
210 #
211 # 2. A conversational query in the form of text,.
212 #
213 # 3. An event that specifies which intent to trigger.
214 "text": { # Represents the natural language text to be processed. # The natural language text to be processed.
215 "text": "A String", # Required. The UTF-8 encoded natural language text to be processed.
216 # Text length must not exceed 256 characters.
217 "languageCode": "A String", # Required. The language of this conversational query. See [Language
Dan O'Mearadd494642020-05-01 07:42:23 -0700218 # Support](https://cloud.google.com/dialogflow/docs/reference/language)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700219 # for a list of the currently supported language codes. Note that queries in
220 # the same session do not necessarily need to specify the same language.
221 },
222 "event": { # Events allow for matching intents by event name instead of the natural # The event to be processed.
Dan O'Mearadd494642020-05-01 07:42:23 -0700223 # language input. For instance, input `&lt;event: { name: "welcome_event",
224 # parameters: { name: "Sam" } }&gt;` can trigger a personalized welcome response.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700225 # The parameter `name` may be used by the agent in the response:
226 # `"Hello #welcome_event.name! What can I do for you today?"`.
227 "languageCode": "A String", # Required. The language of this query. See [Language
Dan O'Mearadd494642020-05-01 07:42:23 -0700228 # Support](https://cloud.google.com/dialogflow/docs/reference/language)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700229 # for a list of the currently supported language codes. Note that queries in
230 # the same session do not necessarily need to specify the same language.
231 "name": "A String", # Required. The unique identifier of the event.
Dan O'Mearadd494642020-05-01 07:42:23 -0700232 "parameters": { # The collection of parameters associated with the event.
233 #
234 # Depending on your protocol or client library language, this is a
235 # map, associative array, symbol table, dictionary, or JSON object
236 # composed of a collection of (MapKey, MapValue) pairs:
237 #
238 # - MapKey type: string
239 # - MapKey value: parameter name
240 # - MapValue type:
241 # - If parameter's entity type is a composite entity: map
242 # - Else: string or number, depending on parameter value type
243 # - MapValue value:
244 # - If parameter's entity type is a composite entity:
245 # map from composite entity property names to property values
246 # - Else: parameter value
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700247 "a_key": "", # Properties of the object.
248 },
249 },
250 "audioConfig": { # Instructs the speech recognizer how to process the audio content. # Instructs the speech recognizer how to process the speech audio.
Dan O'Mearadd494642020-05-01 07:42:23 -0700251 "languageCode": "A String", # Required. The language of the supplied audio. Dialogflow does not do
252 # translations. See [Language
253 # Support](https://cloud.google.com/dialogflow/docs/reference/language)
254 # for a list of the currently supported language codes. Note that queries in
255 # the same session do not necessarily need to specify the same language.
256 "audioEncoding": "A String", # Required. Audio encoding of the audio content to process.
257 "phraseHints": [ # A list of strings containing words and phrases that the speech
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700258 # recognizer should recognize with higher likelihood.
259 #
260 # See [the Cloud Speech
261 # documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
262 # for more details.
Dan O'Mearadd494642020-05-01 07:42:23 -0700263 #
264 # This field is deprecated. Please use [speech_contexts]() instead. If you
265 # specify both [phrase_hints]() and [speech_contexts](), Dialogflow will
266 # treat the [phrase_hints]() as a single additional [SpeechContext]().
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700267 "A String",
268 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700269 "enableWordInfo": True or False, # If `true`, Dialogflow returns SpeechWordInfo in
270 # StreamingRecognitionResult with information about the recognized speech
271 # words, e.g. start and end time offsets. If false or unspecified, Speech
272 # doesn't return any word-level information.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700273 "sampleRateHertz": 42, # Required. Sample rate (in Hertz) of the audio content sent in the query.
274 # Refer to
275 # [Cloud Speech API
276 # documentation](https://cloud.google.com/speech-to-text/docs/basics) for
277 # more details.
Dan O'Mearadd494642020-05-01 07:42:23 -0700278 "modelVariant": "A String", # Which variant of the Speech model to use.
279 "model": "A String", # Which Speech model to select for the given request. Select the
280 # model best suited to your domain to get best results. If a model is not
281 # explicitly specified, then we auto-select a model based on the parameters
282 # in the InputAudioConfig.
283 # If enhanced speech model is enabled for the agent and an enhanced
284 # version of the specified model for the language does not exist, then the
285 # speech is recognized using the standard version of the specified model.
286 # Refer to
287 # [Cloud Speech API
288 # documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
289 # for more details.
290 "speechContexts": [ # Context information to assist speech recognition.
291 #
292 # See [the Cloud Speech
293 # documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
294 # for more details.
295 { # Hints for the speech recognizer to help with recognition in a specific
296 # conversation state.
297 "phrases": [ # Optional. A list of strings containing words and phrases that the speech
298 # recognizer should recognize with higher likelihood.
299 #
300 # This list can be used to:
301 # * improve accuracy for words and phrases you expect the user to say,
302 # e.g. typical commands for your Dialogflow agent
303 # * add additional words to the speech recognizer vocabulary
304 # * ...
305 #
306 # See the [Cloud Speech
307 # documentation](https://cloud.google.com/speech-to-text/quotas) for usage
308 # limits.
309 "A String",
310 ],
311 "boost": 3.14, # Optional. Boost for this context compared to other contexts:
312 # * If the boost is positive, Dialogflow will increase the probability that
313 # the phrases in this context are recognized over similar sounding phrases.
314 # * If the boost is unspecified or non-positive, Dialogflow will not apply
315 # any boost.
316 #
317 # Dialogflow recommends that you use boosts in the range (0, 20] and that you
318 # find a value that fits your use case with binary search.
319 },
320 ],
321 "singleUtterance": True or False, # If `false` (default), recognition does not cease until the
322 # client closes the stream.
323 # If `true`, the recognizer will detect a single spoken utterance in input
324 # audio. Recognition ceases when it detects the audio's voice has
325 # stopped or paused. In this case, once a detected intent is received, the
326 # client should close the stream and start a new request with a new stream as
327 # needed.
328 # Note: This setting is relevant only for streaming methods.
329 # Note: When specified, InputAudioConfig.single_utterance takes precedence
330 # over StreamingDetectIntentRequest.single_utterance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700331 },
332 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700333 "queryParams": { # Represents the parameters of the conversational query. # The parameters of this query.
334 "geoLocation": { # An object representing a latitude/longitude pair. This is expressed as a pair # The geo location of this conversational query.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700335 # of doubles representing degrees latitude and degrees longitude. Unless
336 # specified otherwise, this must conform to the
Dan O'Mearadd494642020-05-01 07:42:23 -0700337 # &lt;a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf"&gt;WGS84
338 # standard&lt;/a&gt;. Values must be within normalized ranges.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700339 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
340 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
341 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700342 "contexts": [ # The collection of contexts to be activated before this query is
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700343 # executed.
344 { # Represents a context.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700345 "name": "A String", # Required. The unique identifier of the context. Format:
Dan O'Mearadd494642020-05-01 07:42:23 -0700346 # `projects/&lt;Project ID&gt;/agent/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`,
347 # or `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;/users/&lt;User
348 # ID&gt;/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700349 #
350 # The `Context ID` is always converted to lowercase, may only contain
Dan O'Mearadd494642020-05-01 07:42:23 -0700351 # characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
352 #
353 # If `Environment ID` is not specified, we assume default 'draft'
354 # environment. If `User ID` is not specified, we assume default '-' user.
355 #
356 # The following context names are reserved for internal use by Dialogflow.
357 # You should not use these contexts or create contexts with these names:
358 #
359 # * `__system_counters__`
360 # * `*_id_dialog_context`
361 # * `*_dialog_params_size`
362 "parameters": { # Optional. The collection of parameters associated with this context.
363 #
364 # Depending on your protocol or client library language, this is a
365 # map, associative array, symbol table, dictionary, or JSON object
366 # composed of a collection of (MapKey, MapValue) pairs:
367 #
368 # - MapKey type: string
369 # - MapKey value: parameter name
370 # - MapValue type:
371 # - If parameter's entity type is a composite entity: map
372 # - Else: string or number, depending on parameter value type
373 # - MapValue value:
374 # - If parameter's entity type is a composite entity:
375 # map from composite entity property names to property values
376 # - Else: parameter value
377 "a_key": "", # Properties of the object.
378 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700379 "lifespanCount": 42, # Optional. The number of conversational query requests after which the
Dan O'Mearadd494642020-05-01 07:42:23 -0700380 # context expires. The default is `0`. If set to `0`, the context expires
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700381 # immediately. Contexts expire automatically after 20 minutes if there
382 # are no matching queries.
383 },
384 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700385 "sentimentAnalysisRequestConfig": { # Configures the types of sentiment analysis to perform. # Configures the type of sentiment analysis to perform. If not
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700386 # provided, sentiment analysis is not performed.
Dan O'Mearadd494642020-05-01 07:42:23 -0700387 "analyzeQueryTextSentiment": True or False, # Instructs the service to perform sentiment analysis on
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700388 # `query_text`. If not provided, sentiment analysis is not performed on
389 # `query_text`.
390 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700391 "resetContexts": True or False, # Specifies whether to delete all contexts in the current session
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700392 # before the new ones are activated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700393 "timeZone": "A String", # The time zone of this conversational query from the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700394 # [time zone database](https://www.iana.org/time-zones), e.g.,
395 # America/New_York, Europe/Paris. If not provided, the time zone specified in
396 # agent settings is used.
Dan O'Mearadd494642020-05-01 07:42:23 -0700397 "payload": { # This field can be used to pass custom data to your webhook.
398 # Arbitrary JSON objects are supported.
399 # If supplied, the value is used to populate the
400 # `WebhookRequest.original_detect_intent_request.payload`
401 # field sent to your webhook.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700402 "a_key": "", # Properties of the object.
403 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700404 "sessionEntityTypes": [ # Additional session entity types to replace or extend developer
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700405 # entity types with. The entity synonyms apply to all languages and persist
406 # for the session of this query.
407 { # Represents a session entity type.
408 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700409 # Extends or replaces a custom entity type at the user session level (we
410 # refer to the entity types defined at the agent level as "custom entity
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700411 # types").
412 #
413 # Note: session entity types apply to all queries, regardless of the language.
414 "entities": [ # Required. The collection of entities associated with this session entity
415 # type.
416 { # An **entity entry** for an associated entity type.
417 "synonyms": [ # Required. A collection of value synonyms. For example, if the entity type
418 # is *vegetable*, and `value` is *scallions*, a synonym could be *green
419 # onions*.
420 #
421 # For `KIND_LIST` entity types:
422 #
423 # * This collection must contain exactly one synonym equal to `value`.
424 "A String",
425 ],
426 "value": "A String", # Required. The primary value associated with this entity entry.
427 # For example, if the entity type is *vegetable*, the value could be
428 # *scallions*.
429 #
430 # For `KIND_MAP` entity types:
431 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700432 # * A reference value to be used in place of synonyms.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700433 #
434 # For `KIND_LIST` entity types:
435 #
436 # * A string that can contain references to other entity types (with or
437 # without aliases).
438 },
439 ],
440 "name": "A String", # Required. The unique identifier of this session entity type. Format:
Dan O'Mearadd494642020-05-01 07:42:23 -0700441 # `projects/&lt;Project ID&gt;/agent/sessions/&lt;Session ID&gt;/entityTypes/&lt;Entity Type
442 # Display Name&gt;`, or `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment
443 # ID&gt;/users/&lt;User ID&gt;/sessions/&lt;Session ID&gt;/entityTypes/&lt;Entity Type Display
444 # Name&gt;`.
445 # If `Environment ID` is not specified, we assume default 'draft'
446 # environment. If `User ID` is not specified, we assume default '-' user.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700447 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700448 # `&lt;Entity Type Display Name&gt;` must be the display name of an existing entity
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700449 # type in the same agent that will be overridden or supplemented.
450 "entityOverrideMode": "A String", # Required. Indicates whether the additional data should override or
Dan O'Mearadd494642020-05-01 07:42:23 -0700451 # supplement the custom entity type definition.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700452 },
453 ],
454 },
455 }
456
457 x__xgafv: string, V1 error format.
458 Allowed values
459 1 - v1 error format
460 2 - v2 error format
461
462Returns:
463 An object of the form:
464
465 { # The message returned from the DetectIntent method.
466 "outputAudioConfig": { # Instructs the speech synthesizer on how to generate the output audio content. # The config used by the speech synthesizer to generate the output audio.
Dan O'Mearadd494642020-05-01 07:42:23 -0700467 # If this audio config is supplied in a request, it overrides all existing
468 # text-to-speech settings applied to the agent.
469 "sampleRateHertz": 42, # The synthesis sample rate (in hertz) for this audio. If not
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700470 # provided, then the synthesizer will use the default sample rate based on
471 # the audio encoding. If this is different from the voice's natural sample
472 # rate, then the synthesizer will honor this request by converting to the
473 # desired sample rate (which might result in worse audio quality).
474 "audioEncoding": "A String", # Required. Audio encoding of the synthesized audio content.
Dan O'Mearadd494642020-05-01 07:42:23 -0700475 "synthesizeSpeechConfig": { # Configuration of how speech should be synthesized. # Configuration of how speech should be synthesized.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700476 "effectsProfileId": [ # Optional. An identifier which selects 'audio effects' profiles that are
477 # applied on (post synthesized) text to speech. Effects are applied on top of
478 # each other in the order they are given.
479 "A String",
480 ],
481 "voice": { # Description of which voice to use for speech synthesis. # Optional. The desired voice of the synthesized audio.
482 "ssmlGender": "A String", # Optional. The preferred gender of the voice. If not set, the service will
483 # choose a voice based on the other parameters such as language_code and
484 # name. Note that this is only a preference, not requirement. If a
485 # voice of the appropriate gender is not available, the synthesizer should
486 # substitute a voice with a different gender rather than failing the request.
487 "name": "A String", # Optional. The name of the voice. If not set, the service will choose a
Dan O'Mearadd494642020-05-01 07:42:23 -0700488 # voice based on the other parameters such as language_code and
489 # ssml_gender.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700490 },
491 "speakingRate": 3.14, # Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal
492 # native speed supported by the specific voice. 2.0 is twice as fast, and
493 # 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any
Dan O'Mearadd494642020-05-01 07:42:23 -0700494 # other values &lt; 0.25 or &gt; 4.0 will return an error.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700495 "volumeGainDb": 3.14, # Optional. Volume gain (in dB) of the normal native volume supported by the
496 # specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of
497 # 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB)
498 # will play at approximately half the amplitude of the normal native signal
499 # amplitude. A value of +6.0 (dB) will play at approximately twice the
500 # amplitude of the normal native signal amplitude. We strongly recommend not
501 # to exceed +10 (dB) as there's usually no effective increase in loudness for
502 # any value greater than that.
503 "pitch": 3.14, # Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20
504 # semitones from the original pitch. -20 means decrease 20 semitones from the
505 # original pitch.
506 },
507 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700508 "queryResult": { # Represents the result of conversational query or event processing. # The selected results of the conversational query or event processing.
509 # See `alternative_query_results` for additional potential results.
510 "sentimentAnalysisResult": { # The result of sentiment analysis as configured by # The sentiment analysis result, which depends on the
511 # `sentiment_analysis_request_config` specified in the request.
512 # `sentiment_analysis_request_config`.
513 "queryTextSentiment": { # The sentiment, such as positive/negative feeling or association, for a unit # The sentiment analysis result for `query_text`.
514 # of analysis, such as the query text.
515 "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
516 # sentiment).
517 "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents the absolute
518 # magnitude of sentiment, regardless of score (positive or negative).
519 },
520 },
521 "fulfillmentText": "A String", # The text to be pronounced to the user or shown on the screen.
522 # Note: This is a legacy field, `fulfillment_messages` should be preferred.
523 "allRequiredParamsPresent": True or False, # This field is set to:
524 #
525 # - `false` if the matched intent has required parameters and not all of
526 # the required parameter values have been collected.
527 # - `true` if all required parameter values have been collected, or if the
528 # matched intent doesn't contain any required parameters.
529 "parameters": { # The collection of extracted parameters.
Dan O'Mearadd494642020-05-01 07:42:23 -0700530 #
531 # Depending on your protocol or client library language, this is a
532 # map, associative array, symbol table, dictionary, or JSON object
533 # composed of a collection of (MapKey, MapValue) pairs:
534 #
535 # - MapKey type: string
536 # - MapKey value: parameter name
537 # - MapValue type:
538 # - If parameter's entity type is a composite entity: map
539 # - Else: string or number, depending on parameter value type
540 # - MapValue value:
541 # - If parameter's entity type is a composite entity:
542 # map from composite entity property names to property values
543 # - Else: parameter value
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700544 "a_key": "", # Properties of the object.
545 },
546 "languageCode": "A String", # The language that was triggered during intent detection.
547 # See [Language
Dan O'Mearadd494642020-05-01 07:42:23 -0700548 # Support](https://cloud.google.com/dialogflow/docs/reference/language)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700549 # for a list of the currently supported language codes.
550 "speechRecognitionConfidence": 3.14, # The Speech recognition confidence between 0.0 and 1.0. A higher number
551 # indicates an estimated greater likelihood that the recognized words are
552 # correct. The default of 0.0 is a sentinel value indicating that confidence
553 # was not set.
554 #
555 # This field is not guaranteed to be accurate or set. In particular this
556 # field isn't set for StreamingDetectIntent since the streaming endpoint has
557 # separate confidence estimates per portion of the audio in
558 # StreamingRecognitionResult.
559 "intentDetectionConfidence": 3.14, # The intent detection confidence. Values range from 0.0
560 # (completely uncertain) to 1.0 (completely certain).
Dan O'Mearadd494642020-05-01 07:42:23 -0700561 # This value is for informational purpose only and is only used to
562 # help match the best intent within the classification threshold.
563 # This value may change for the same end-user expression at any time due to a
564 # model retraining or change in implementation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700565 # If there are `multiple knowledge_answers` messages, this value is set to
566 # the greatest `knowledgeAnswers.match_confidence` value in the list.
567 "action": "A String", # The action name from the matched intent.
568 "intent": { # Represents an intent. # The intent that matched the conversational query. Some, not
569 # all fields are filled in this message, including but not limited to:
Dan O'Mearadd494642020-05-01 07:42:23 -0700570 # `name`, `display_name`, `end_interaction` and `is_fallback`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700571 # Intents convert a number of user expressions or patterns into an action. An
572 # action is an extraction of a user command or sentence semantics.
573 "isFallback": True or False, # Optional. Indicates whether this is a fallback intent.
574 "mlDisabled": True or False, # Optional. Indicates whether Machine Learning is disabled for the intent.
Dan O'Mearadd494642020-05-01 07:42:23 -0700575 # Note: If `ml_disabled` setting is set to true, then this intent is not
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700576 # taken into account during inference in `ML ONLY` match mode. Also,
577 # auto-markup in the UI is turned off.
578 "displayName": "A String", # Required. The name of this intent.
Dan O'Mearadd494642020-05-01 07:42:23 -0700579 "name": "A String", # Optional. The unique identifier of this intent.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700580 # Required for Intents.UpdateIntent and Intents.BatchUpdateIntents
581 # methods.
Dan O'Mearadd494642020-05-01 07:42:23 -0700582 # Format: `projects/&lt;Project ID&gt;/agent/intents/&lt;Intent ID&gt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700583 "parameters": [ # Optional. The collection of parameters associated with the intent.
584 { # Represents intent parameters.
585 "displayName": "A String", # Required. The name of the parameter.
586 "name": "A String", # The unique identifier of this parameter.
587 "defaultValue": "A String", # Optional. The default value to use when the `value` yields an empty
588 # result.
589 # Default values can be extracted from contexts by using the following
590 # syntax: `#context_name.parameter_name`.
591 "entityTypeDisplayName": "A String", # Optional. The name of the entity type, prefixed with `@`, that
592 # describes values of the parameter. If the parameter is
593 # required, this must be provided.
594 "value": "A String", # Optional. The definition of the parameter value. It can be:
595 # - a constant string,
596 # - a parameter value defined as `$parameter_name`,
597 # - an original parameter value defined as `$parameter_name.original`,
598 # - a parameter value from some context defined as
599 # `#context_name.parameter_name`.
600 "prompts": [ # Optional. The collection of prompts that the agent can present to the
Dan O'Mearadd494642020-05-01 07:42:23 -0700601 # user in order to collect a value for the parameter.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700602 "A String",
603 ],
604 "isList": True or False, # Optional. Indicates whether the parameter represents a list of values.
605 "mandatory": True or False, # Optional. Indicates whether the parameter is required. That is,
606 # whether the intent cannot be completed without collecting the parameter
607 # value.
608 },
609 ],
610 "trainingPhrases": [ # Optional. The collection of examples that the agent is
611 # trained on.
612 { # Represents an example that the agent is trained on.
613 "parts": [ # Required. The ordered list of training phrase parts.
614 # The parts are concatenated in order to form the training phrase.
615 #
616 # Note: The API does not automatically annotate training phrases like the
617 # Dialogflow Console does.
618 #
619 # Note: Do not forget to include whitespace at part boundaries,
620 # so the training phrase is well formatted when the parts are concatenated.
621 #
622 # If the training phrase does not need to be annotated with parameters,
623 # you just need a single part with only the Part.text field set.
624 #
625 # If you want to annotate the training phrase, you must create multiple
626 # parts, where the fields of each part are populated in one of two ways:
627 #
628 # - `Part.text` is set to a part of the phrase that has no parameters.
629 # - `Part.text` is set to a part of the phrase that you want to annotate,
630 # and the `entity_type`, `alias`, and `user_defined` fields are all
631 # set.
632 { # Represents a part of a training phrase.
633 "alias": "A String", # Optional. The parameter name for the value extracted from the
634 # annotated part of the example.
635 # This field is required for annotated parts of the training phrase.
636 "entityType": "A String", # Optional. The entity type name prefixed with `@`.
637 # This field is required for annotated parts of the training phrase.
638 "text": "A String", # Required. The text for this part.
639 "userDefined": True or False, # Optional. Indicates whether the text was manually annotated.
640 # This field is set to true when the Dialogflow Console is used to
641 # manually annotate the part. When creating an annotated part with the
642 # API, you must set this to true.
643 },
644 ],
645 "type": "A String", # Required. The type of the training phrase.
646 "name": "A String", # Output only. The unique identifier of this training phrase.
647 "timesAddedCount": 42, # Optional. Indicates how many times this example was added to
648 # the intent. Each time a developer adds an existing sample by editing an
649 # intent or training, this counter is increased.
650 },
651 ],
652 "followupIntentInfo": [ # Read-only. Information about all followup intents that have this intent as
653 # a direct or indirect parent. We populate this field only in the output.
654 { # Represents a single followup intent in the chain.
655 "followupIntentName": "A String", # The unique identifier of the followup intent.
Dan O'Mearadd494642020-05-01 07:42:23 -0700656 # Format: `projects/&lt;Project ID&gt;/agent/intents/&lt;Intent ID&gt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700657 "parentFollowupIntentName": "A String", # The unique identifier of the followup intent's parent.
Dan O'Mearadd494642020-05-01 07:42:23 -0700658 # Format: `projects/&lt;Project ID&gt;/agent/intents/&lt;Intent ID&gt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700659 },
660 ],
661 "webhookState": "A String", # Optional. Indicates whether webhooks are enabled for the intent.
Dan O'Mearadd494642020-05-01 07:42:23 -0700662 "parentFollowupIntentName": "A String", # Read-only after creation. The unique identifier of the parent intent in the
663 # chain of followup intents. You can set this field when creating an intent,
664 # for example with CreateIntent or
665 # BatchUpdateIntents, in order to make this
666 # intent a followup intent.
667 #
668 # It identifies the parent followup intent.
669 # Format: `projects/&lt;Project ID&gt;/agent/intents/&lt;Intent ID&gt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700670 "messages": [ # Optional. The collection of rich messages corresponding to the
671 # `Response` field in the Dialogflow console.
Dan O'Mearadd494642020-05-01 07:42:23 -0700672 { # A rich response message.
673 # Corresponds to the intent `Response` field in the Dialogflow console.
674 # For more information, see
675 # [Rich response
676 # messages](https://cloud.google.com/dialogflow/docs/intents-rich-messages).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700677 "simpleResponses": { # The collection of simple response candidates. # The voice and text-only responses for Actions on Google.
678 # This message in `QueryResult.fulfillment_messages` and
679 # `WebhookResponse.fulfillment_messages` should contain only one
680 # `SimpleResponse`.
681 "simpleResponses": [ # Required. The list of simple responses.
682 { # The simple response message containing speech or text.
683 "textToSpeech": "A String", # One of text_to_speech or ssml must be provided. The plain text of the
684 # speech output. Mutually exclusive with ssml.
685 "displayText": "A String", # Optional. The text to display.
686 "ssml": "A String", # One of text_to_speech or ssml must be provided. Structured spoken
687 # response to the user in the SSML format. Mutually exclusive with
688 # text_to_speech.
689 },
690 ],
691 },
692 "quickReplies": { # The quick replies response message. # The quick replies response.
693 "quickReplies": [ # Optional. The collection of quick replies.
694 "A String",
695 ],
696 "title": "A String", # Optional. The title of the collection of quick replies.
697 },
698 "platform": "A String", # Optional. The platform that this message is intended for.
699 "text": { # The text response message. # The text response.
700 "text": [ # Optional. The collection of the agent's responses.
701 "A String",
702 ],
703 },
704 "image": { # The image response message. # The image response.
705 "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility,
706 # e.g., screen readers.
707 "imageUri": "A String", # Optional. The public URI to an image file.
708 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700709 "mediaContent": { # The media content card for Actions on Google. # The media content card for Actions on Google.
710 "mediaObjects": [ # Required. List of media objects.
711 { # Response media object for media content card.
712 "contentUrl": "A String", # Required. Url where the media is stored.
713 "description": "A String", # Optional. Description of media card.
714 "name": "A String", # Required. Name of media card.
715 "largeImage": { # The image response message. # Optional. Image to display above media content.
716 "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility,
717 # e.g., screen readers.
718 "imageUri": "A String", # Optional. The public URI to an image file.
719 },
720 "icon": { # The image response message. # Optional. Icon to display above media content.
721 "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility,
722 # e.g., screen readers.
723 "imageUri": "A String", # Optional. The public URI to an image file.
724 },
725 },
726 ],
727 "mediaType": "A String", # Optional. What type of media is the content (ie "audio").
728 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700729 "suggestions": { # The collection of suggestions. # The suggestion chips for Actions on Google.
730 "suggestions": [ # Required. The list of suggested replies.
731 { # The suggestion chip message that the user can tap to quickly post a reply
732 # to the conversation.
733 "title": "A String", # Required. The text shown the in the suggestion chip.
734 },
735 ],
736 },
737 "linkOutSuggestion": { # The suggestion chip message that allows the user to jump out to the app # The link out suggestion chip for Actions on Google.
738 # or website associated with this agent.
739 "uri": "A String", # Required. The URI of the app or site to open when the user taps the
740 # suggestion chip.
741 "destinationName": "A String", # Required. The name of the app or site this chip is linking to.
742 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700743 "browseCarouselCard": { # Browse Carousel Card for Actions on Google. # Browse carousel card for Actions on Google.
744 # https://developers.google.com/actions/assistant/responses#browsing_carousel
745 "items": [ # Required. List of items in the Browse Carousel Card. Minimum of two
746 # items, maximum of ten.
747 { # Browsing carousel tile
748 "image": { # The image response message. # Optional. Hero image for the carousel item.
749 "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility,
750 # e.g., screen readers.
751 "imageUri": "A String", # Optional. The public URI to an image file.
752 },
753 "title": "A String", # Required. Title of the carousel item. Maximum of two lines of text.
754 "description": "A String", # Optional. Description of the carousel item. Maximum of four lines of
755 # text.
756 "openUriAction": { # Actions on Google action to open a given url. # Required. Action to present to the user.
757 "url": "A String", # Required. URL
758 "urlTypeHint": "A String", # Optional. Specifies the type of viewer that is used when opening
759 # the URL. Defaults to opening via web browser.
760 },
761 "footer": "A String", # Optional. Text that appears at the bottom of the Browse Carousel
762 # Card. Maximum of one line of text.
763 },
764 ],
765 "imageDisplayOptions": "A String", # Optional. Settings for displaying the image. Applies to every image in
766 # items.
767 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700768 "basicCard": { # The basic card message. Useful for displaying information. # The basic card response for Actions on Google.
769 "buttons": [ # Optional. The collection of card buttons.
770 { # The button object that appears at the bottom of a card.
771 "openUriAction": { # Opens the given URI. # Required. Action to take when a user taps on the button.
772 "uri": "A String", # Required. The HTTP or HTTPS scheme URI.
773 },
774 "title": "A String", # Required. The title of the button.
775 },
776 ],
777 "subtitle": "A String", # Optional. The subtitle of the card.
778 "image": { # The image response message. # Optional. The image for the card.
779 "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility,
780 # e.g., screen readers.
781 "imageUri": "A String", # Optional. The public URI to an image file.
782 },
783 "formattedText": "A String", # Required, unless image is present. The body text of the card.
784 "title": "A String", # Optional. The title of the card.
785 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700786 "tableCard": { # Table card for Actions on Google. # Table card for Actions on Google.
787 "rows": [ # Optional. Rows in this table of data.
788 { # Row of TableCard.
789 "cells": [ # Optional. List of cells that make up this row.
790 { # Cell of TableCardRow.
791 "text": "A String", # Required. Text in this cell.
792 },
793 ],
794 "dividerAfter": True or False, # Optional. Whether to add a visual divider after this row.
795 },
796 ],
797 "subtitle": "A String", # Optional. Subtitle to the title.
798 "title": "A String", # Required. Title of the card.
799 "image": { # The image response message. # Optional. Image which should be displayed on the card.
800 "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility,
801 # e.g., screen readers.
802 "imageUri": "A String", # Optional. The public URI to an image file.
803 },
804 "columnProperties": [ # Optional. Display properties for the columns in this table.
805 { # Column properties for TableCard.
806 "header": "A String", # Required. Column heading.
807 "horizontalAlignment": "A String", # Optional. Defines text alignment for all cells in this column.
808 },
809 ],
810 "buttons": [ # Optional. List of buttons for the card.
811 { # The button object that appears at the bottom of a card.
812 "openUriAction": { # Opens the given URI. # Required. Action to take when a user taps on the button.
813 "uri": "A String", # Required. The HTTP or HTTPS scheme URI.
814 },
815 "title": "A String", # Required. The title of the button.
816 },
817 ],
818 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700819 "carouselSelect": { # The card for presenting a carousel of options to select from. # The carousel card response for Actions on Google.
820 "items": [ # Required. Carousel items.
821 { # An item in the carousel.
822 "info": { # Additional info about the select item for when it is triggered in a # Required. Additional info about the option item.
823 # dialog.
824 "synonyms": [ # Optional. A list of synonyms that can also be used to trigger this
825 # item in dialog.
826 "A String",
827 ],
828 "key": "A String", # Required. A unique key that will be sent back to the agent if this
829 # response is given.
830 },
831 "image": { # The image response message. # Optional. The image to display.
832 "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility,
833 # e.g., screen readers.
834 "imageUri": "A String", # Optional. The public URI to an image file.
835 },
836 "description": "A String", # Optional. The body text of the card.
837 "title": "A String", # Required. Title of the carousel item.
838 },
839 ],
840 },
841 "listSelect": { # The card for presenting a list of options to select from. # The list card response for Actions on Google.
842 "items": [ # Required. List items.
843 { # An item in the list.
844 "info": { # Additional info about the select item for when it is triggered in a # Required. Additional information about this option.
845 # dialog.
846 "synonyms": [ # Optional. A list of synonyms that can also be used to trigger this
847 # item in dialog.
848 "A String",
849 ],
850 "key": "A String", # Required. A unique key that will be sent back to the agent if this
851 # response is given.
852 },
853 "image": { # The image response message. # Optional. The image to display.
854 "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility,
855 # e.g., screen readers.
856 "imageUri": "A String", # Optional. The public URI to an image file.
857 },
858 "description": "A String", # Optional. The main text describing the item.
859 "title": "A String", # Required. The title of the list item.
860 },
861 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700862 "subtitle": "A String", # Optional. Subtitle of the list.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700863 "title": "A String", # Optional. The overall title of the list.
864 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700865 "payload": { # A custom platform-specific response.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700866 "a_key": "", # Properties of the object.
867 },
868 "card": { # The card response message. # The card response.
869 "buttons": [ # Optional. The collection of card buttons.
Dan O'Mearadd494642020-05-01 07:42:23 -0700870 { # Contains information about a button.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700871 "text": "A String", # Optional. The text to show on the button.
872 "postback": "A String", # Optional. The text to send back to the Dialogflow API or a URI to
873 # open.
874 },
875 ],
876 "title": "A String", # Optional. The title of the card.
877 "subtitle": "A String", # Optional. The subtitle of the card.
878 "imageUri": "A String", # Optional. The public URI to an image file for the card.
879 },
880 },
881 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700882 "defaultResponsePlatforms": [ # Optional. The list of platforms for which the first responses will be
883 # copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform).
884 "A String",
885 ],
886 "priority": 42, # Optional. The priority of this intent. Higher numbers represent higher
Dan O'Mearadd494642020-05-01 07:42:23 -0700887 # priorities.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700888 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700889 # - If the supplied value is unspecified or 0, the service
890 # translates the value to 500,000, which corresponds to the
891 # `Normal` priority in the console.
892 # - If the supplied value is negative, the intent is ignored
893 # in runtime detect intent requests.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700894 "rootFollowupIntentName": "A String", # Read-only. The unique identifier of the root intent in the chain of
895 # followup intents. It identifies the correct followup intents chain for
896 # this intent. We populate this field only in the output.
897 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700898 # Format: `projects/&lt;Project ID&gt;/agent/intents/&lt;Intent ID&gt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700899 "action": "A String", # Optional. The name of the action associated with the intent.
900 # Note: The action name must not contain whitespaces.
Dan O'Mearadd494642020-05-01 07:42:23 -0700901 "resetContexts": True or False, # Optional. Indicates whether to delete all contexts in the current
902 # session when this intent is matched.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700903 "outputContexts": [ # Optional. The collection of contexts that are activated when the intent
904 # is matched. Context messages in this collection should not set the
905 # parameters field. Setting the `lifespan_count` to 0 will reset the context
906 # when the intent is matched.
Dan O'Mearadd494642020-05-01 07:42:23 -0700907 # Format: `projects/&lt;Project ID&gt;/agent/sessions/-/contexts/&lt;Context ID&gt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700908 { # Represents a context.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700909 "name": "A String", # Required. The unique identifier of the context. Format:
Dan O'Mearadd494642020-05-01 07:42:23 -0700910 # `projects/&lt;Project ID&gt;/agent/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`,
911 # or `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;/users/&lt;User
912 # ID&gt;/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700913 #
914 # The `Context ID` is always converted to lowercase, may only contain
Dan O'Mearadd494642020-05-01 07:42:23 -0700915 # characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
916 #
917 # If `Environment ID` is not specified, we assume default 'draft'
918 # environment. If `User ID` is not specified, we assume default '-' user.
919 #
920 # The following context names are reserved for internal use by Dialogflow.
921 # You should not use these contexts or create contexts with these names:
922 #
923 # * `__system_counters__`
924 # * `*_id_dialog_context`
925 # * `*_dialog_params_size`
926 "parameters": { # Optional. The collection of parameters associated with this context.
927 #
928 # Depending on your protocol or client library language, this is a
929 # map, associative array, symbol table, dictionary, or JSON object
930 # composed of a collection of (MapKey, MapValue) pairs:
931 #
932 # - MapKey type: string
933 # - MapKey value: parameter name
934 # - MapValue type:
935 # - If parameter's entity type is a composite entity: map
936 # - Else: string or number, depending on parameter value type
937 # - MapValue value:
938 # - If parameter's entity type is a composite entity:
939 # map from composite entity property names to property values
940 # - Else: parameter value
941 "a_key": "", # Properties of the object.
942 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700943 "lifespanCount": 42, # Optional. The number of conversational query requests after which the
Dan O'Mearadd494642020-05-01 07:42:23 -0700944 # context expires. The default is `0`. If set to `0`, the context expires
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700945 # immediately. Contexts expire automatically after 20 minutes if there
946 # are no matching queries.
947 },
948 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700949 "inputContextNames": [ # Optional. The list of context names required for this intent to be
950 # triggered.
951 # Format: `projects/&lt;Project ID&gt;/agent/sessions/-/contexts/&lt;Context ID&gt;`.
952 "A String",
953 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700954 "events": [ # Optional. The collection of event names that trigger the intent.
955 # If the collection of input contexts is not empty, all of the contexts must
956 # be present in the active user session for an event to trigger this intent.
Dan O'Mearadd494642020-05-01 07:42:23 -0700957 # Event names are limited to 150 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700958 "A String",
959 ],
960 },
961 "fulfillmentMessages": [ # The collection of rich messages to present to the user.
Dan O'Mearadd494642020-05-01 07:42:23 -0700962 { # A rich response message.
963 # Corresponds to the intent `Response` field in the Dialogflow console.
964 # For more information, see
965 # [Rich response
966 # messages](https://cloud.google.com/dialogflow/docs/intents-rich-messages).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700967 "simpleResponses": { # The collection of simple response candidates. # The voice and text-only responses for Actions on Google.
968 # This message in `QueryResult.fulfillment_messages` and
969 # `WebhookResponse.fulfillment_messages` should contain only one
970 # `SimpleResponse`.
971 "simpleResponses": [ # Required. The list of simple responses.
972 { # The simple response message containing speech or text.
973 "textToSpeech": "A String", # One of text_to_speech or ssml must be provided. The plain text of the
974 # speech output. Mutually exclusive with ssml.
975 "displayText": "A String", # Optional. The text to display.
976 "ssml": "A String", # One of text_to_speech or ssml must be provided. Structured spoken
977 # response to the user in the SSML format. Mutually exclusive with
978 # text_to_speech.
979 },
980 ],
981 },
982 "quickReplies": { # The quick replies response message. # The quick replies response.
983 "quickReplies": [ # Optional. The collection of quick replies.
984 "A String",
985 ],
986 "title": "A String", # Optional. The title of the collection of quick replies.
987 },
988 "platform": "A String", # Optional. The platform that this message is intended for.
989 "text": { # The text response message. # The text response.
990 "text": [ # Optional. The collection of the agent's responses.
991 "A String",
992 ],
993 },
994 "image": { # The image response message. # The image response.
995 "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility,
996 # e.g., screen readers.
997 "imageUri": "A String", # Optional. The public URI to an image file.
998 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700999 "mediaContent": { # The media content card for Actions on Google. # The media content card for Actions on Google.
1000 "mediaObjects": [ # Required. List of media objects.
1001 { # Response media object for media content card.
1002 "contentUrl": "A String", # Required. Url where the media is stored.
1003 "description": "A String", # Optional. Description of media card.
1004 "name": "A String", # Required. Name of media card.
1005 "largeImage": { # The image response message. # Optional. Image to display above media content.
1006 "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility,
1007 # e.g., screen readers.
1008 "imageUri": "A String", # Optional. The public URI to an image file.
1009 },
1010 "icon": { # The image response message. # Optional. Icon to display above media content.
1011 "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility,
1012 # e.g., screen readers.
1013 "imageUri": "A String", # Optional. The public URI to an image file.
1014 },
1015 },
1016 ],
1017 "mediaType": "A String", # Optional. What type of media is the content (ie "audio").
1018 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001019 "suggestions": { # The collection of suggestions. # The suggestion chips for Actions on Google.
1020 "suggestions": [ # Required. The list of suggested replies.
1021 { # The suggestion chip message that the user can tap to quickly post a reply
1022 # to the conversation.
1023 "title": "A String", # Required. The text shown the in the suggestion chip.
1024 },
1025 ],
1026 },
1027 "linkOutSuggestion": { # The suggestion chip message that allows the user to jump out to the app # The link out suggestion chip for Actions on Google.
1028 # or website associated with this agent.
1029 "uri": "A String", # Required. The URI of the app or site to open when the user taps the
1030 # suggestion chip.
1031 "destinationName": "A String", # Required. The name of the app or site this chip is linking to.
1032 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001033 "browseCarouselCard": { # Browse Carousel Card for Actions on Google. # Browse carousel card for Actions on Google.
1034 # https://developers.google.com/actions/assistant/responses#browsing_carousel
1035 "items": [ # Required. List of items in the Browse Carousel Card. Minimum of two
1036 # items, maximum of ten.
1037 { # Browsing carousel tile
1038 "image": { # The image response message. # Optional. Hero image for the carousel item.
1039 "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility,
1040 # e.g., screen readers.
1041 "imageUri": "A String", # Optional. The public URI to an image file.
1042 },
1043 "title": "A String", # Required. Title of the carousel item. Maximum of two lines of text.
1044 "description": "A String", # Optional. Description of the carousel item. Maximum of four lines of
1045 # text.
1046 "openUriAction": { # Actions on Google action to open a given url. # Required. Action to present to the user.
1047 "url": "A String", # Required. URL
1048 "urlTypeHint": "A String", # Optional. Specifies the type of viewer that is used when opening
1049 # the URL. Defaults to opening via web browser.
1050 },
1051 "footer": "A String", # Optional. Text that appears at the bottom of the Browse Carousel
1052 # Card. Maximum of one line of text.
1053 },
1054 ],
1055 "imageDisplayOptions": "A String", # Optional. Settings for displaying the image. Applies to every image in
1056 # items.
1057 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001058 "basicCard": { # The basic card message. Useful for displaying information. # The basic card response for Actions on Google.
1059 "buttons": [ # Optional. The collection of card buttons.
1060 { # The button object that appears at the bottom of a card.
1061 "openUriAction": { # Opens the given URI. # Required. Action to take when a user taps on the button.
1062 "uri": "A String", # Required. The HTTP or HTTPS scheme URI.
1063 },
1064 "title": "A String", # Required. The title of the button.
1065 },
1066 ],
1067 "subtitle": "A String", # Optional. The subtitle of the card.
1068 "image": { # The image response message. # Optional. The image for the card.
1069 "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility,
1070 # e.g., screen readers.
1071 "imageUri": "A String", # Optional. The public URI to an image file.
1072 },
1073 "formattedText": "A String", # Required, unless image is present. The body text of the card.
1074 "title": "A String", # Optional. The title of the card.
1075 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001076 "tableCard": { # Table card for Actions on Google. # Table card for Actions on Google.
1077 "rows": [ # Optional. Rows in this table of data.
1078 { # Row of TableCard.
1079 "cells": [ # Optional. List of cells that make up this row.
1080 { # Cell of TableCardRow.
1081 "text": "A String", # Required. Text in this cell.
1082 },
1083 ],
1084 "dividerAfter": True or False, # Optional. Whether to add a visual divider after this row.
1085 },
1086 ],
1087 "subtitle": "A String", # Optional. Subtitle to the title.
1088 "title": "A String", # Required. Title of the card.
1089 "image": { # The image response message. # Optional. Image which should be displayed on the card.
1090 "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility,
1091 # e.g., screen readers.
1092 "imageUri": "A String", # Optional. The public URI to an image file.
1093 },
1094 "columnProperties": [ # Optional. Display properties for the columns in this table.
1095 { # Column properties for TableCard.
1096 "header": "A String", # Required. Column heading.
1097 "horizontalAlignment": "A String", # Optional. Defines text alignment for all cells in this column.
1098 },
1099 ],
1100 "buttons": [ # Optional. List of buttons for the card.
1101 { # The button object that appears at the bottom of a card.
1102 "openUriAction": { # Opens the given URI. # Required. Action to take when a user taps on the button.
1103 "uri": "A String", # Required. The HTTP or HTTPS scheme URI.
1104 },
1105 "title": "A String", # Required. The title of the button.
1106 },
1107 ],
1108 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001109 "carouselSelect": { # The card for presenting a carousel of options to select from. # The carousel card response for Actions on Google.
1110 "items": [ # Required. Carousel items.
1111 { # An item in the carousel.
1112 "info": { # Additional info about the select item for when it is triggered in a # Required. Additional info about the option item.
1113 # dialog.
1114 "synonyms": [ # Optional. A list of synonyms that can also be used to trigger this
1115 # item in dialog.
1116 "A String",
1117 ],
1118 "key": "A String", # Required. A unique key that will be sent back to the agent if this
1119 # response is given.
1120 },
1121 "image": { # The image response message. # Optional. The image to display.
1122 "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility,
1123 # e.g., screen readers.
1124 "imageUri": "A String", # Optional. The public URI to an image file.
1125 },
1126 "description": "A String", # Optional. The body text of the card.
1127 "title": "A String", # Required. Title of the carousel item.
1128 },
1129 ],
1130 },
1131 "listSelect": { # The card for presenting a list of options to select from. # The list card response for Actions on Google.
1132 "items": [ # Required. List items.
1133 { # An item in the list.
1134 "info": { # Additional info about the select item for when it is triggered in a # Required. Additional information about this option.
1135 # dialog.
1136 "synonyms": [ # Optional. A list of synonyms that can also be used to trigger this
1137 # item in dialog.
1138 "A String",
1139 ],
1140 "key": "A String", # Required. A unique key that will be sent back to the agent if this
1141 # response is given.
1142 },
1143 "image": { # The image response message. # Optional. The image to display.
1144 "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility,
1145 # e.g., screen readers.
1146 "imageUri": "A String", # Optional. The public URI to an image file.
1147 },
1148 "description": "A String", # Optional. The main text describing the item.
1149 "title": "A String", # Required. The title of the list item.
1150 },
1151 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001152 "subtitle": "A String", # Optional. Subtitle of the list.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001153 "title": "A String", # Optional. The overall title of the list.
1154 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001155 "payload": { # A custom platform-specific response.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001156 "a_key": "", # Properties of the object.
1157 },
1158 "card": { # The card response message. # The card response.
1159 "buttons": [ # Optional. The collection of card buttons.
Dan O'Mearadd494642020-05-01 07:42:23 -07001160 { # Contains information about a button.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001161 "text": "A String", # Optional. The text to show on the button.
1162 "postback": "A String", # Optional. The text to send back to the Dialogflow API or a URI to
1163 # open.
1164 },
1165 ],
1166 "title": "A String", # Optional. The title of the card.
1167 "subtitle": "A String", # Optional. The subtitle of the card.
1168 "imageUri": "A String", # Optional. The public URI to an image file for the card.
1169 },
1170 },
1171 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001172 "diagnosticInfo": { # Free-form diagnostic information for the associated detect intent request.
1173 # The fields of this data can change without notice, so you should not write
1174 # code that depends on its structure.
1175 # The data may contain:
1176 #
1177 # - webhook call latency
1178 # - webhook errors
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001179 "a_key": "", # Properties of the object.
1180 },
1181 "queryText": "A String", # The original conversational query text:
1182 #
1183 # - If natural language text was provided as input, `query_text` contains
1184 # a copy of the input.
1185 # - If natural language speech audio was provided as input, `query_text`
1186 # contains the speech recognition result. If speech recognizer produced
1187 # multiple alternatives, a particular one is picked.
1188 # - If automatic spell correction is enabled, `query_text` will contain the
1189 # corrected user input.
1190 "webhookSource": "A String", # If the query was fulfilled by a webhook call, this field is set to the
1191 # value of the `source` field returned in the webhook response.
1192 "outputContexts": [ # The collection of output contexts. If applicable,
1193 # `output_contexts.parameters` contains entries with name
Dan O'Mearadd494642020-05-01 07:42:23 -07001194 # `&lt;parameter name&gt;.original` containing the original parameter values
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001195 # before the query.
1196 { # Represents a context.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001197 "name": "A String", # Required. The unique identifier of the context. Format:
Dan O'Mearadd494642020-05-01 07:42:23 -07001198 # `projects/&lt;Project ID&gt;/agent/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`,
1199 # or `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;/users/&lt;User
1200 # ID&gt;/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001201 #
1202 # The `Context ID` is always converted to lowercase, may only contain
Dan O'Mearadd494642020-05-01 07:42:23 -07001203 # characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
1204 #
1205 # If `Environment ID` is not specified, we assume default 'draft'
1206 # environment. If `User ID` is not specified, we assume default '-' user.
1207 #
1208 # The following context names are reserved for internal use by Dialogflow.
1209 # You should not use these contexts or create contexts with these names:
1210 #
1211 # * `__system_counters__`
1212 # * `*_id_dialog_context`
1213 # * `*_dialog_params_size`
1214 "parameters": { # Optional. The collection of parameters associated with this context.
1215 #
1216 # Depending on your protocol or client library language, this is a
1217 # map, associative array, symbol table, dictionary, or JSON object
1218 # composed of a collection of (MapKey, MapValue) pairs:
1219 #
1220 # - MapKey type: string
1221 # - MapKey value: parameter name
1222 # - MapValue type:
1223 # - If parameter's entity type is a composite entity: map
1224 # - Else: string or number, depending on parameter value type
1225 # - MapValue value:
1226 # - If parameter's entity type is a composite entity:
1227 # map from composite entity property names to property values
1228 # - Else: parameter value
1229 "a_key": "", # Properties of the object.
1230 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001231 "lifespanCount": 42, # Optional. The number of conversational query requests after which the
Dan O'Mearadd494642020-05-01 07:42:23 -07001232 # context expires. The default is `0`. If set to `0`, the context expires
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001233 # immediately. Contexts expire automatically after 20 minutes if there
1234 # are no matching queries.
1235 },
1236 ],
1237 "webhookPayload": { # If the query was fulfilled by a webhook call, this field is set to the
1238 # value of the `payload` field returned in the webhook response.
1239 "a_key": "", # Properties of the object.
1240 },
1241 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001242 "webhookStatus": { # The `Status` type defines a logical error model that is suitable for # Specifies the status of the webhook request.
1243 # different programming environments, including REST APIs and RPC APIs. It is
1244 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1245 # three pieces of data: error code, error message, and error details.
1246 #
1247 # You can find out more about this error model and how to work with it in the
1248 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1249 "message": "A String", # A developer-facing error message, which should be in English. Any
1250 # user-facing error message should be localized and sent in the
1251 # google.rpc.Status.details field, or localized by the client.
1252 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
1253 "details": [ # A list of messages that carry the error details. There is a common set of
1254 # message types for APIs to use.
1255 {
1256 "a_key": "", # Properties of the object. Contains field @type with type URL.
1257 },
1258 ],
1259 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001260 "responseId": "A String", # The unique identifier of the response. It can be used to
1261 # locate a response in the training example set or for reporting issues.
Dan O'Mearadd494642020-05-01 07:42:23 -07001262 "outputAudio": "A String", # The audio data bytes encoded as specified in the request.
1263 # Note: The output audio is generated based on the values of default platform
1264 # text responses found in the `query_result.fulfillment_messages` field. If
1265 # multiple default text responses exist, they will be concatenated when
1266 # generating audio. If no default platform text responses exist, the
1267 # generated audio content will be empty.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001268 }</pre>
1269</div>
1270
1271</body></html>