blob: d52ac922ad0e08b3e9027622f722624c2de3440d [file] [log] [blame]
Bu Sun Kim65020912020-05-20 12:08:20 -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.environments.html">environments</a> . <a href="dialogflow_v2.projects.agent.environments.users.html">users</a> . <a href="dialogflow_v2.projects.agent.environments.users.sessions.html">sessions</a> . <a href="dialogflow_v2.projects.agent.environments.users.sessions.contexts.html">contexts</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Creates a context.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes the specified context.</p>
83<p class="toc_element">
84 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
85<p class="firstline">Retrieves the specified context.</p>
86<p class="toc_element">
87 <code><a href="#list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
88<p class="firstline">Returns the list of all contexts in the specified session.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
93 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
94<p class="firstline">Updates the specified context.</p>
95<h3>Method Details</h3>
96<div class="method">
97 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
98 <pre>Creates a context.
99
100If the specified context already exists, overrides the context.
101
102Args:
103 parent: string, Required. The session to create a context for.
104Format: `projects/&lt;Project ID&gt;/agent/sessions/&lt;Session ID&gt;` or
105`projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;/users/&lt;User
106ID&gt;/sessions/&lt;Session ID&gt;`.
107If `Environment ID` is not specified, we assume default &#x27;draft&#x27;
108environment. If `User ID` is not specified, we assume default &#x27;-&#x27; user. (required)
109 body: object, The request body.
110 The object takes the form of:
111
112{ # Represents a context.
113 &quot;lifespanCount&quot;: 42, # Optional. The number of conversational query requests after which the
114 # context expires. The default is `0`. If set to `0`, the context expires
115 # immediately. Contexts expire automatically after 20 minutes if there
116 # are no matching queries.
117 &quot;name&quot;: &quot;A String&quot;, # Required. The unique identifier of the context. Format:
118 # `projects/&lt;Project ID&gt;/agent/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`,
119 # or `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;/users/&lt;User
120 # ID&gt;/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`.
121 #
122 # The `Context ID` is always converted to lowercase, may only contain
123 # characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
124 #
125 # If `Environment ID` is not specified, we assume default &#x27;draft&#x27;
126 # environment. If `User ID` is not specified, we assume default &#x27;-&#x27; user.
127 #
128 # The following context names are reserved for internal use by Dialogflow.
129 # You should not use these contexts or create contexts with these names:
130 #
131 # * `__system_counters__`
132 # * `*_id_dialog_context`
133 # * `*_dialog_params_size`
134 &quot;parameters&quot;: { # Optional. The collection of parameters associated with this context.
135 #
136 # Depending on your protocol or client library language, this is a
137 # map, associative array, symbol table, dictionary, or JSON object
138 # composed of a collection of (MapKey, MapValue) pairs:
139 #
140 # - MapKey type: string
141 # - MapKey value: parameter name
142 # - MapValue type:
143 # - If parameter&#x27;s entity type is a composite entity: map
144 # - Else: string or number, depending on parameter value type
145 # - MapValue value:
146 # - If parameter&#x27;s entity type is a composite entity:
147 # map from composite entity property names to property values
148 # - Else: parameter value
149 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
150 },
151}
152
153 x__xgafv: string, V1 error format.
154 Allowed values
155 1 - v1 error format
156 2 - v2 error format
157
158Returns:
159 An object of the form:
160
161 { # Represents a context.
162 &quot;lifespanCount&quot;: 42, # Optional. The number of conversational query requests after which the
163 # context expires. The default is `0`. If set to `0`, the context expires
164 # immediately. Contexts expire automatically after 20 minutes if there
165 # are no matching queries.
166 &quot;name&quot;: &quot;A String&quot;, # Required. The unique identifier of the context. Format:
167 # `projects/&lt;Project ID&gt;/agent/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`,
168 # or `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;/users/&lt;User
169 # ID&gt;/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`.
170 #
171 # The `Context ID` is always converted to lowercase, may only contain
172 # characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
173 #
174 # If `Environment ID` is not specified, we assume default &#x27;draft&#x27;
175 # environment. If `User ID` is not specified, we assume default &#x27;-&#x27; user.
176 #
177 # The following context names are reserved for internal use by Dialogflow.
178 # You should not use these contexts or create contexts with these names:
179 #
180 # * `__system_counters__`
181 # * `*_id_dialog_context`
182 # * `*_dialog_params_size`
183 &quot;parameters&quot;: { # Optional. The collection of parameters associated with this context.
184 #
185 # Depending on your protocol or client library language, this is a
186 # map, associative array, symbol table, dictionary, or JSON object
187 # composed of a collection of (MapKey, MapValue) pairs:
188 #
189 # - MapKey type: string
190 # - MapKey value: parameter name
191 # - MapValue type:
192 # - If parameter&#x27;s entity type is a composite entity: map
193 # - Else: string or number, depending on parameter value type
194 # - MapValue value:
195 # - If parameter&#x27;s entity type is a composite entity:
196 # map from composite entity property names to property values
197 # - Else: parameter value
198 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
199 },
200 }</pre>
201</div>
202
203<div class="method">
204 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
205 <pre>Deletes the specified context.
206
207Args:
208 name: string, Required. The name of the context to delete. Format:
209`projects/&lt;Project ID&gt;/agent/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`
210or `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;/users/&lt;User
211ID&gt;/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`.
212If `Environment ID` is not specified, we assume default &#x27;draft&#x27;
213environment. If `User ID` is not specified, we assume default &#x27;-&#x27; user. (required)
214 x__xgafv: string, V1 error format.
215 Allowed values
216 1 - v1 error format
217 2 - v2 error format
218
219Returns:
220 An object of the form:
221
222 { # A generic empty message that you can re-use to avoid defining duplicated
223 # empty messages in your APIs. A typical example is to use it as the request
224 # or the response type of an API method. For instance:
225 #
226 # service Foo {
227 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
228 # }
229 #
230 # The JSON representation for `Empty` is empty JSON object `{}`.
231 }</pre>
232</div>
233
234<div class="method">
235 <code class="details" id="get">get(name, x__xgafv=None)</code>
236 <pre>Retrieves the specified context.
237
238Args:
239 name: string, Required. The name of the context. Format:
240`projects/&lt;Project ID&gt;/agent/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`
241or `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;/users/&lt;User
242ID&gt;/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`.
243If `Environment ID` is not specified, we assume default &#x27;draft&#x27;
244environment. If `User ID` is not specified, we assume default &#x27;-&#x27; user. (required)
245 x__xgafv: string, V1 error format.
246 Allowed values
247 1 - v1 error format
248 2 - v2 error format
249
250Returns:
251 An object of the form:
252
253 { # Represents a context.
254 &quot;lifespanCount&quot;: 42, # Optional. The number of conversational query requests after which the
255 # context expires. The default is `0`. If set to `0`, the context expires
256 # immediately. Contexts expire automatically after 20 minutes if there
257 # are no matching queries.
258 &quot;name&quot;: &quot;A String&quot;, # Required. The unique identifier of the context. Format:
259 # `projects/&lt;Project ID&gt;/agent/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`,
260 # or `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;/users/&lt;User
261 # ID&gt;/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`.
262 #
263 # The `Context ID` is always converted to lowercase, may only contain
264 # characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
265 #
266 # If `Environment ID` is not specified, we assume default &#x27;draft&#x27;
267 # environment. If `User ID` is not specified, we assume default &#x27;-&#x27; user.
268 #
269 # The following context names are reserved for internal use by Dialogflow.
270 # You should not use these contexts or create contexts with these names:
271 #
272 # * `__system_counters__`
273 # * `*_id_dialog_context`
274 # * `*_dialog_params_size`
275 &quot;parameters&quot;: { # Optional. The collection of parameters associated with this context.
276 #
277 # Depending on your protocol or client library language, this is a
278 # map, associative array, symbol table, dictionary, or JSON object
279 # composed of a collection of (MapKey, MapValue) pairs:
280 #
281 # - MapKey type: string
282 # - MapKey value: parameter name
283 # - MapValue type:
284 # - If parameter&#x27;s entity type is a composite entity: map
285 # - Else: string or number, depending on parameter value type
286 # - MapValue value:
287 # - If parameter&#x27;s entity type is a composite entity:
288 # map from composite entity property names to property values
289 # - Else: parameter value
290 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
291 },
292 }</pre>
293</div>
294
295<div class="method">
296 <code class="details" id="list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</code>
297 <pre>Returns the list of all contexts in the specified session.
298
299Args:
300 parent: string, Required. The session to list all contexts from.
301Format: `projects/&lt;Project ID&gt;/agent/sessions/&lt;Session ID&gt;` or
302`projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;/users/&lt;User
303ID&gt;/sessions/&lt;Session ID&gt;`.
304If `Environment ID` is not specified, we assume default &#x27;draft&#x27;
305environment. If `User ID` is not specified, we assume default &#x27;-&#x27; user. (required)
306 pageToken: string, Optional. The next_page_token value returned from a previous list request.
307 pageSize: integer, Optional. The maximum number of items to return in a single page. By
308default 100 and at most 1000.
309 x__xgafv: string, V1 error format.
310 Allowed values
311 1 - v1 error format
312 2 - v2 error format
313
314Returns:
315 An object of the form:
316
317 { # The response message for Contexts.ListContexts.
318 &quot;nextPageToken&quot;: &quot;A String&quot;, # Token to retrieve the next page of results, or empty if there are no
319 # more results in the list.
320 &quot;contexts&quot;: [ # The list of contexts. There will be a maximum number of items
321 # returned based on the page_size field in the request.
322 { # Represents a context.
323 &quot;lifespanCount&quot;: 42, # Optional. The number of conversational query requests after which the
324 # context expires. The default is `0`. If set to `0`, the context expires
325 # immediately. Contexts expire automatically after 20 minutes if there
326 # are no matching queries.
327 &quot;name&quot;: &quot;A String&quot;, # Required. The unique identifier of the context. Format:
328 # `projects/&lt;Project ID&gt;/agent/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`,
329 # or `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;/users/&lt;User
330 # ID&gt;/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`.
331 #
332 # The `Context ID` is always converted to lowercase, may only contain
333 # characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
334 #
335 # If `Environment ID` is not specified, we assume default &#x27;draft&#x27;
336 # environment. If `User ID` is not specified, we assume default &#x27;-&#x27; user.
337 #
338 # The following context names are reserved for internal use by Dialogflow.
339 # You should not use these contexts or create contexts with these names:
340 #
341 # * `__system_counters__`
342 # * `*_id_dialog_context`
343 # * `*_dialog_params_size`
344 &quot;parameters&quot;: { # Optional. The collection of parameters associated with this context.
345 #
346 # Depending on your protocol or client library language, this is a
347 # map, associative array, symbol table, dictionary, or JSON object
348 # composed of a collection of (MapKey, MapValue) pairs:
349 #
350 # - MapKey type: string
351 # - MapKey value: parameter name
352 # - MapValue type:
353 # - If parameter&#x27;s entity type is a composite entity: map
354 # - Else: string or number, depending on parameter value type
355 # - MapValue value:
356 # - If parameter&#x27;s entity type is a composite entity:
357 # map from composite entity property names to property values
358 # - Else: parameter value
359 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
360 },
361 },
362 ],
363 }</pre>
364</div>
365
366<div class="method">
367 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
368 <pre>Retrieves the next page of results.
369
370Args:
371 previous_request: The request for the previous page. (required)
372 previous_response: The response from the request for the previous page. (required)
373
374Returns:
375 A request object that you can call &#x27;execute()&#x27; on to request the next
376 page. Returns None if there are no more items in the collection.
377 </pre>
378</div>
379
380<div class="method">
381 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
382 <pre>Updates the specified context.
383
384Args:
385 name: string, Required. The unique identifier of the context. Format:
386`projects/&lt;Project ID&gt;/agent/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`,
387or `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;/users/&lt;User
388ID&gt;/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`.
389
390The `Context ID` is always converted to lowercase, may only contain
391characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
392
393If `Environment ID` is not specified, we assume default &#x27;draft&#x27;
394environment. If `User ID` is not specified, we assume default &#x27;-&#x27; user.
395
396The following context names are reserved for internal use by Dialogflow.
397You should not use these contexts or create contexts with these names:
398
399* `__system_counters__`
400* `*_id_dialog_context`
401* `*_dialog_params_size` (required)
402 body: object, The request body.
403 The object takes the form of:
404
405{ # Represents a context.
406 &quot;lifespanCount&quot;: 42, # Optional. The number of conversational query requests after which the
407 # context expires. The default is `0`. If set to `0`, the context expires
408 # immediately. Contexts expire automatically after 20 minutes if there
409 # are no matching queries.
410 &quot;name&quot;: &quot;A String&quot;, # Required. The unique identifier of the context. Format:
411 # `projects/&lt;Project ID&gt;/agent/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`,
412 # or `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;/users/&lt;User
413 # ID&gt;/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`.
414 #
415 # The `Context ID` is always converted to lowercase, may only contain
416 # characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
417 #
418 # If `Environment ID` is not specified, we assume default &#x27;draft&#x27;
419 # environment. If `User ID` is not specified, we assume default &#x27;-&#x27; user.
420 #
421 # The following context names are reserved for internal use by Dialogflow.
422 # You should not use these contexts or create contexts with these names:
423 #
424 # * `__system_counters__`
425 # * `*_id_dialog_context`
426 # * `*_dialog_params_size`
427 &quot;parameters&quot;: { # Optional. The collection of parameters associated with this context.
428 #
429 # Depending on your protocol or client library language, this is a
430 # map, associative array, symbol table, dictionary, or JSON object
431 # composed of a collection of (MapKey, MapValue) pairs:
432 #
433 # - MapKey type: string
434 # - MapKey value: parameter name
435 # - MapValue type:
436 # - If parameter&#x27;s entity type is a composite entity: map
437 # - Else: string or number, depending on parameter value type
438 # - MapValue value:
439 # - If parameter&#x27;s entity type is a composite entity:
440 # map from composite entity property names to property values
441 # - Else: parameter value
442 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
443 },
444}
445
446 updateMask: string, Optional. The mask to control which fields get updated.
447 x__xgafv: string, V1 error format.
448 Allowed values
449 1 - v1 error format
450 2 - v2 error format
451
452Returns:
453 An object of the form:
454
455 { # Represents a context.
456 &quot;lifespanCount&quot;: 42, # Optional. The number of conversational query requests after which the
457 # context expires. The default is `0`. If set to `0`, the context expires
458 # immediately. Contexts expire automatically after 20 minutes if there
459 # are no matching queries.
460 &quot;name&quot;: &quot;A String&quot;, # Required. The unique identifier of the context. Format:
461 # `projects/&lt;Project ID&gt;/agent/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`,
462 # or `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;/users/&lt;User
463 # ID&gt;/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`.
464 #
465 # The `Context ID` is always converted to lowercase, may only contain
466 # characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
467 #
468 # If `Environment ID` is not specified, we assume default &#x27;draft&#x27;
469 # environment. If `User ID` is not specified, we assume default &#x27;-&#x27; user.
470 #
471 # The following context names are reserved for internal use by Dialogflow.
472 # You should not use these contexts or create contexts with these names:
473 #
474 # * `__system_counters__`
475 # * `*_id_dialog_context`
476 # * `*_dialog_params_size`
477 &quot;parameters&quot;: { # Optional. The collection of parameters associated with this context.
478 #
479 # Depending on your protocol or client library language, this is a
480 # map, associative array, symbol table, dictionary, or JSON object
481 # composed of a collection of (MapKey, MapValue) pairs:
482 #
483 # - MapKey type: string
484 # - MapKey value: parameter name
485 # - MapValue type:
486 # - If parameter&#x27;s entity type is a composite entity: map
487 # - Else: string or number, depending on parameter value type
488 # - MapValue value:
489 # - If parameter&#x27;s entity type is a composite entity:
490 # map from composite entity property names to property values
491 # - Else: parameter value
492 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
493 },
494 }</pre>
495</div>
496
497</body></html>