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