• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<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> . <a href="dialogflow_v2.projects.agent.sessions.contexts.html">contexts</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#create">create(parent, body, 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, pageSize=None, pageToken=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, 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, 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/<Project ID>/agent/sessions/<Session ID>`. (required)
105  body: object, The request body. (required)
106    The object takes the form of:
107
108{ # Represents a context.
109  "parameters": { # Optional. The collection of parameters associated with this context.
110      # Refer to [this
111      # doc](https://cloud.google.com/dialogflow-enterprise/docs/intents-actions-parameters)
112      # for syntax.
113    "a_key": "", # Properties of the object.
114  },
115  "name": "A String", # Required. The unique identifier of the context. Format:
116      # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
117      #
118      # The `Context ID` is always converted to lowercase, may only contain
119      # characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long.
120  "lifespanCount": 42, # Optional. The number of conversational query requests after which the
121      # context expires. If set to `0` (the default) the context expires
122      # immediately. Contexts expire automatically after 20 minutes if there
123      # are no matching queries.
124}
125
126  x__xgafv: string, V1 error format.
127    Allowed values
128      1 - v1 error format
129      2 - v2 error format
130
131Returns:
132  An object of the form:
133
134    { # Represents a context.
135    "parameters": { # Optional. The collection of parameters associated with this context.
136        # Refer to [this
137        # doc](https://cloud.google.com/dialogflow-enterprise/docs/intents-actions-parameters)
138        # for syntax.
139      "a_key": "", # Properties of the object.
140    },
141    "name": "A String", # Required. The unique identifier of the context. Format:
142        # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
143        #
144        # The `Context ID` is always converted to lowercase, may only contain
145        # characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long.
146    "lifespanCount": 42, # Optional. The number of conversational query requests after which the
147        # context expires. If set to `0` (the default) the context expires
148        # immediately. Contexts expire automatically after 20 minutes if there
149        # are no matching queries.
150  }</pre>
151</div>
152
153<div class="method">
154    <code class="details" id="delete">delete(name, x__xgafv=None)</code>
155  <pre>Deletes the specified context.
156
157Args:
158  name: string, Required. The name of the context to delete. Format:
159`projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`. (required)
160  x__xgafv: string, V1 error format.
161    Allowed values
162      1 - v1 error format
163      2 - v2 error format
164
165Returns:
166  An object of the form:
167
168    { # A generic empty message that you can re-use to avoid defining duplicated
169      # empty messages in your APIs. A typical example is to use it as the request
170      # or the response type of an API method. For instance:
171      #
172      #     service Foo {
173      #       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
174      #     }
175      #
176      # The JSON representation for `Empty` is empty JSON object `{}`.
177  }</pre>
178</div>
179
180<div class="method">
181    <code class="details" id="get">get(name, x__xgafv=None)</code>
182  <pre>Retrieves the specified context.
183
184Args:
185  name: string, Required. The name of the context. Format:
186`projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`. (required)
187  x__xgafv: string, V1 error format.
188    Allowed values
189      1 - v1 error format
190      2 - v2 error format
191
192Returns:
193  An object of the form:
194
195    { # Represents a context.
196    "parameters": { # Optional. The collection of parameters associated with this context.
197        # Refer to [this
198        # doc](https://cloud.google.com/dialogflow-enterprise/docs/intents-actions-parameters)
199        # for syntax.
200      "a_key": "", # Properties of the object.
201    },
202    "name": "A String", # Required. The unique identifier of the context. Format:
203        # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
204        #
205        # The `Context ID` is always converted to lowercase, may only contain
206        # characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long.
207    "lifespanCount": 42, # Optional. The number of conversational query requests after which the
208        # context expires. If set to `0` (the default) the context expires
209        # immediately. Contexts expire automatically after 20 minutes if there
210        # are no matching queries.
211  }</pre>
212</div>
213
214<div class="method">
215    <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
216  <pre>Returns the list of all contexts in the specified session.
217
218Args:
219  parent: string, Required. The session to list all contexts from.
220Format: `projects/<Project ID>/agent/sessions/<Session ID>`. (required)
221  pageSize: integer, Optional. The maximum number of items to return in a single page. By
222default 100 and at most 1000.
223  pageToken: string, Optional. The next_page_token value returned from a previous list request.
224  x__xgafv: string, V1 error format.
225    Allowed values
226      1 - v1 error format
227      2 - v2 error format
228
229Returns:
230  An object of the form:
231
232    { # The response message for Contexts.ListContexts.
233    "contexts": [ # The list of contexts. There will be a maximum number of items
234        # returned based on the page_size field in the request.
235      { # Represents a context.
236        "parameters": { # Optional. The collection of parameters associated with this context.
237            # Refer to [this
238            # doc](https://cloud.google.com/dialogflow-enterprise/docs/intents-actions-parameters)
239            # for syntax.
240          "a_key": "", # Properties of the object.
241        },
242        "name": "A String", # Required. The unique identifier of the context. Format:
243            # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
244            #
245            # The `Context ID` is always converted to lowercase, may only contain
246            # characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long.
247        "lifespanCount": 42, # Optional. The number of conversational query requests after which the
248            # context expires. If set to `0` (the default) the context expires
249            # immediately. Contexts expire automatically after 20 minutes if there
250            # are no matching queries.
251      },
252    ],
253    "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no
254        # more results in the list.
255  }</pre>
256</div>
257
258<div class="method">
259    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
260  <pre>Retrieves the next page of results.
261
262Args:
263  previous_request: The request for the previous page. (required)
264  previous_response: The response from the request for the previous page. (required)
265
266Returns:
267  A request object that you can call 'execute()' on to request the next
268  page. Returns None if there are no more items in the collection.
269    </pre>
270</div>
271
272<div class="method">
273    <code class="details" id="patch">patch(name, body, updateMask=None, x__xgafv=None)</code>
274  <pre>Updates the specified context.
275
276Args:
277  name: string, Required. The unique identifier of the context. Format:
278`projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
279
280The `Context ID` is always converted to lowercase, may only contain
281characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long. (required)
282  body: object, The request body. (required)
283    The object takes the form of:
284
285{ # Represents a context.
286  "parameters": { # Optional. The collection of parameters associated with this context.
287      # Refer to [this
288      # doc](https://cloud.google.com/dialogflow-enterprise/docs/intents-actions-parameters)
289      # for syntax.
290    "a_key": "", # Properties of the object.
291  },
292  "name": "A String", # Required. The unique identifier of the context. Format:
293      # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
294      #
295      # The `Context ID` is always converted to lowercase, may only contain
296      # characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long.
297  "lifespanCount": 42, # Optional. The number of conversational query requests after which the
298      # context expires. If set to `0` (the default) the context expires
299      # immediately. Contexts expire automatically after 20 minutes if there
300      # are no matching queries.
301}
302
303  updateMask: string, Optional. The mask to control which fields get updated.
304  x__xgafv: string, V1 error format.
305    Allowed values
306      1 - v1 error format
307      2 - v2 error format
308
309Returns:
310  An object of the form:
311
312    { # Represents a context.
313    "parameters": { # Optional. The collection of parameters associated with this context.
314        # Refer to [this
315        # doc](https://cloud.google.com/dialogflow-enterprise/docs/intents-actions-parameters)
316        # for syntax.
317      "a_key": "", # Properties of the object.
318    },
319    "name": "A String", # Required. The unique identifier of the context. Format:
320        # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
321        #
322        # The `Context ID` is always converted to lowercase, may only contain
323        # characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long.
324    "lifespanCount": 42, # Optional. The number of conversational query requests after which the
325        # context expires. If set to `0` (the default) the context expires
326        # immediately. Contexts expire automatically after 20 minutes if there
327        # are no matching queries.
328  }</pre>
329</div>
330
331</body></html>