Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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.sessions.html">sessions</a> . <a href="dialogflow_v2beta1.projects.agent.sessions.contexts.html">contexts</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 78 | <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 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"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 87 | <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 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"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 93 | <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 94 | <p class="firstline">Updates the specified context.</p> |
| 95 | <h3>Method Details</h3> |
| 96 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 97 | <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 98 | <pre>Creates a context. |
| 99 | |
| 100 | If the specified context already exists, overrides the context. |
| 101 | |
| 102 | Args: |
| 103 | parent: string, Required. The session to create a context for. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 104 | Format: `projects/<Project ID>/agent/sessions/<Session ID>` or |
| 105 | `projects/<Project ID>/agent/environments/<Environment ID>/users/<User |
| 106 | ID>/sessions/<Session ID>`. If `Environment ID` is not specified, we assume |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 107 | default 'draft' environment. If `User ID` is not specified, we assume |
| 108 | default '-' user. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 109 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 110 | The object takes the form of: |
| 111 | |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 112 | { # Dialogflow contexts are similar to natural language context. If a person says |
| 113 | # to you "they are orange", you need context in order to understand what "they" |
| 114 | # is referring to. Similarly, for Dialogflow to handle an end-user expression |
| 115 | # like that, it needs to be provided with context in order to correctly match |
| 116 | # an intent. |
| 117 | # |
| 118 | # Using contexts, you can control the flow of a conversation. You can configure |
| 119 | # contexts for an intent by setting input and output contexts, which are |
| 120 | # identified by string names. When an intent is matched, any configured output |
| 121 | # contexts for that intent become active. While any contexts are active, |
| 122 | # Dialogflow is more likely to match intents that are configured with input |
| 123 | # contexts that correspond to the currently active contexts. |
| 124 | # |
| 125 | # For more information about context, see the |
| 126 | # [Contexts guide](https://cloud.google.com/dialogflow/docs/contexts-overview). |
| 127 | "parameters": { # Optional. The collection of parameters associated with this context. |
| 128 | # |
| 129 | # Depending on your protocol or client library language, this is a |
| 130 | # map, associative array, symbol table, dictionary, or JSON object |
| 131 | # composed of a collection of (MapKey, MapValue) pairs: |
| 132 | # |
| 133 | # - MapKey type: string |
| 134 | # - MapKey value: parameter name |
| 135 | # - MapValue type: |
| 136 | # - If parameter's entity type is a composite entity: map |
| 137 | # - Else: string or number, depending on parameter value type |
| 138 | # - MapValue value: |
| 139 | # - If parameter's entity type is a composite entity: |
| 140 | # map from composite entity property names to property values |
| 141 | # - Else: parameter value |
| 142 | "a_key": "", # Properties of the object. |
| 143 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 144 | "lifespanCount": 42, # Optional. The number of conversational query requests after which the |
| 145 | # context expires. The default is `0`. If set to `0`, the context expires |
| 146 | # immediately. Contexts expire automatically after 20 minutes if there |
| 147 | # are no matching queries. |
| 148 | "name": "A String", # Required. The unique identifier of the context. Format: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 149 | # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`, |
| 150 | # or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User |
| 151 | # ID>/sessions/<Session ID>/contexts/<Context ID>`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 152 | # |
| 153 | # The `Context ID` is always converted to lowercase, may only contain |
| 154 | # characters in a-zA-Z0-9_-% and may be at most 250 bytes long. |
| 155 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 156 | # If `Environment ID` is not specified, we assume default 'draft' |
| 157 | # environment. If `User ID` is not specified, we assume default '-' user. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 158 | # |
| 159 | # The following context names are reserved for internal use by Dialogflow. |
| 160 | # You should not use these contexts or create contexts with these names: |
| 161 | # |
| 162 | # * `__system_counters__` |
| 163 | # * `*_id_dialog_context` |
| 164 | # * `*_dialog_params_size` |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 165 | } |
| 166 | |
| 167 | x__xgafv: string, V1 error format. |
| 168 | Allowed values |
| 169 | 1 - v1 error format |
| 170 | 2 - v2 error format |
| 171 | |
| 172 | Returns: |
| 173 | An object of the form: |
| 174 | |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 175 | { # Dialogflow contexts are similar to natural language context. If a person says |
| 176 | # to you "they are orange", you need context in order to understand what "they" |
| 177 | # is referring to. Similarly, for Dialogflow to handle an end-user expression |
| 178 | # like that, it needs to be provided with context in order to correctly match |
| 179 | # an intent. |
| 180 | # |
| 181 | # Using contexts, you can control the flow of a conversation. You can configure |
| 182 | # contexts for an intent by setting input and output contexts, which are |
| 183 | # identified by string names. When an intent is matched, any configured output |
| 184 | # contexts for that intent become active. While any contexts are active, |
| 185 | # Dialogflow is more likely to match intents that are configured with input |
| 186 | # contexts that correspond to the currently active contexts. |
| 187 | # |
| 188 | # For more information about context, see the |
| 189 | # [Contexts guide](https://cloud.google.com/dialogflow/docs/contexts-overview). |
| 190 | "parameters": { # Optional. The collection of parameters associated with this context. |
| 191 | # |
| 192 | # Depending on your protocol or client library language, this is a |
| 193 | # map, associative array, symbol table, dictionary, or JSON object |
| 194 | # composed of a collection of (MapKey, MapValue) pairs: |
| 195 | # |
| 196 | # - MapKey type: string |
| 197 | # - MapKey value: parameter name |
| 198 | # - MapValue type: |
| 199 | # - If parameter's entity type is a composite entity: map |
| 200 | # - Else: string or number, depending on parameter value type |
| 201 | # - MapValue value: |
| 202 | # - If parameter's entity type is a composite entity: |
| 203 | # map from composite entity property names to property values |
| 204 | # - Else: parameter value |
| 205 | "a_key": "", # Properties of the object. |
| 206 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 207 | "lifespanCount": 42, # Optional. The number of conversational query requests after which the |
| 208 | # context expires. The default is `0`. If set to `0`, the context expires |
| 209 | # immediately. Contexts expire automatically after 20 minutes if there |
| 210 | # are no matching queries. |
| 211 | "name": "A String", # Required. The unique identifier of the context. Format: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 212 | # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`, |
| 213 | # or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User |
| 214 | # ID>/sessions/<Session ID>/contexts/<Context ID>`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 215 | # |
| 216 | # The `Context ID` is always converted to lowercase, may only contain |
| 217 | # characters in a-zA-Z0-9_-% and may be at most 250 bytes long. |
| 218 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 219 | # If `Environment ID` is not specified, we assume default 'draft' |
| 220 | # environment. If `User ID` is not specified, we assume default '-' user. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 221 | # |
| 222 | # The following context names are reserved for internal use by Dialogflow. |
| 223 | # You should not use these contexts or create contexts with these names: |
| 224 | # |
| 225 | # * `__system_counters__` |
| 226 | # * `*_id_dialog_context` |
| 227 | # * `*_dialog_params_size` |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 228 | }</pre> |
| 229 | </div> |
| 230 | |
| 231 | <div class="method"> |
| 232 | <code class="details" id="delete">delete(name, x__xgafv=None)</code> |
| 233 | <pre>Deletes the specified context. |
| 234 | |
| 235 | Args: |
| 236 | name: string, Required. The name of the context to delete. Format: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 237 | `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>` |
| 238 | or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User |
| 239 | ID>/sessions/<Session ID>/contexts/<Context ID>`. If `Environment ID` is |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 240 | not specified, we assume default 'draft' environment. If `User ID` is not |
| 241 | specified, we assume default '-' user. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 242 | x__xgafv: string, V1 error format. |
| 243 | Allowed values |
| 244 | 1 - v1 error format |
| 245 | 2 - v2 error format |
| 246 | |
| 247 | Returns: |
| 248 | An object of the form: |
| 249 | |
| 250 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 251 | # empty messages in your APIs. A typical example is to use it as the request |
| 252 | # or the response type of an API method. For instance: |
| 253 | # |
| 254 | # service Foo { |
| 255 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 256 | # } |
| 257 | # |
| 258 | # The JSON representation for `Empty` is empty JSON object `{}`. |
| 259 | }</pre> |
| 260 | </div> |
| 261 | |
| 262 | <div class="method"> |
| 263 | <code class="details" id="get">get(name, x__xgafv=None)</code> |
| 264 | <pre>Retrieves the specified context. |
| 265 | |
| 266 | Args: |
| 267 | name: string, Required. The name of the context. Format: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 268 | `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>` |
| 269 | or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User |
| 270 | ID>/sessions/<Session ID>/contexts/<Context ID>`. If `Environment ID` is |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 271 | not specified, we assume default 'draft' environment. If `User ID` is not |
| 272 | specified, we assume default '-' user. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 273 | x__xgafv: string, V1 error format. |
| 274 | Allowed values |
| 275 | 1 - v1 error format |
| 276 | 2 - v2 error format |
| 277 | |
| 278 | Returns: |
| 279 | An object of the form: |
| 280 | |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 281 | { # Dialogflow contexts are similar to natural language context. If a person says |
| 282 | # to you "they are orange", you need context in order to understand what "they" |
| 283 | # is referring to. Similarly, for Dialogflow to handle an end-user expression |
| 284 | # like that, it needs to be provided with context in order to correctly match |
| 285 | # an intent. |
| 286 | # |
| 287 | # Using contexts, you can control the flow of a conversation. You can configure |
| 288 | # contexts for an intent by setting input and output contexts, which are |
| 289 | # identified by string names. When an intent is matched, any configured output |
| 290 | # contexts for that intent become active. While any contexts are active, |
| 291 | # Dialogflow is more likely to match intents that are configured with input |
| 292 | # contexts that correspond to the currently active contexts. |
| 293 | # |
| 294 | # For more information about context, see the |
| 295 | # [Contexts guide](https://cloud.google.com/dialogflow/docs/contexts-overview). |
| 296 | "parameters": { # Optional. The collection of parameters associated with this context. |
| 297 | # |
| 298 | # Depending on your protocol or client library language, this is a |
| 299 | # map, associative array, symbol table, dictionary, or JSON object |
| 300 | # composed of a collection of (MapKey, MapValue) pairs: |
| 301 | # |
| 302 | # - MapKey type: string |
| 303 | # - MapKey value: parameter name |
| 304 | # - MapValue type: |
| 305 | # - If parameter's entity type is a composite entity: map |
| 306 | # - Else: string or number, depending on parameter value type |
| 307 | # - MapValue value: |
| 308 | # - If parameter's entity type is a composite entity: |
| 309 | # map from composite entity property names to property values |
| 310 | # - Else: parameter value |
| 311 | "a_key": "", # Properties of the object. |
| 312 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 313 | "lifespanCount": 42, # Optional. The number of conversational query requests after which the |
| 314 | # context expires. The default is `0`. If set to `0`, the context expires |
| 315 | # immediately. Contexts expire automatically after 20 minutes if there |
| 316 | # are no matching queries. |
| 317 | "name": "A String", # Required. The unique identifier of the context. Format: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 318 | # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`, |
| 319 | # or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User |
| 320 | # ID>/sessions/<Session ID>/contexts/<Context ID>`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 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 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 325 | # If `Environment ID` is not specified, we assume default 'draft' |
| 326 | # environment. If `User ID` is not specified, we assume default '-' user. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 327 | # |
| 328 | # The following context names are reserved for internal use by Dialogflow. |
| 329 | # You should not use these contexts or create contexts with these names: |
| 330 | # |
| 331 | # * `__system_counters__` |
| 332 | # * `*_id_dialog_context` |
| 333 | # * `*_dialog_params_size` |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 334 | }</pre> |
| 335 | </div> |
| 336 | |
| 337 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 338 | <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 339 | <pre>Returns the list of all contexts in the specified session. |
| 340 | |
| 341 | Args: |
| 342 | parent: string, Required. The session to list all contexts from. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 343 | Format: `projects/<Project ID>/agent/sessions/<Session ID>` or |
| 344 | `projects/<Project ID>/agent/environments/<Environment ID>/users/<User |
| 345 | ID>/sessions/<Session ID>`. If `Environment ID` is not specified, we assume |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 346 | default 'draft' environment. If `User ID` is not specified, we assume |
| 347 | default '-' user. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 348 | pageSize: integer, Optional. The maximum number of items to return in a single page. By |
| 349 | default 100 and at most 1000. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 350 | pageToken: string, Optional. The next_page_token value returned from a previous list request. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 351 | x__xgafv: string, V1 error format. |
| 352 | Allowed values |
| 353 | 1 - v1 error format |
| 354 | 2 - v2 error format |
| 355 | |
| 356 | Returns: |
| 357 | An object of the form: |
| 358 | |
| 359 | { # The response message for Contexts.ListContexts. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 360 | "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no |
| 361 | # more results in the list. |
| 362 | "contexts": [ # The list of contexts. There will be a maximum number of items |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 363 | # returned based on the page_size field in the request. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 364 | { # Dialogflow contexts are similar to natural language context. If a person says |
| 365 | # to you "they are orange", you need context in order to understand what "they" |
| 366 | # is referring to. Similarly, for Dialogflow to handle an end-user expression |
| 367 | # like that, it needs to be provided with context in order to correctly match |
| 368 | # an intent. |
| 369 | # |
| 370 | # Using contexts, you can control the flow of a conversation. You can configure |
| 371 | # contexts for an intent by setting input and output contexts, which are |
| 372 | # identified by string names. When an intent is matched, any configured output |
| 373 | # contexts for that intent become active. While any contexts are active, |
| 374 | # Dialogflow is more likely to match intents that are configured with input |
| 375 | # contexts that correspond to the currently active contexts. |
| 376 | # |
| 377 | # For more information about context, see the |
| 378 | # [Contexts guide](https://cloud.google.com/dialogflow/docs/contexts-overview). |
| 379 | "parameters": { # Optional. The collection of parameters associated with this context. |
| 380 | # |
| 381 | # Depending on your protocol or client library language, this is a |
| 382 | # map, associative array, symbol table, dictionary, or JSON object |
| 383 | # composed of a collection of (MapKey, MapValue) pairs: |
| 384 | # |
| 385 | # - MapKey type: string |
| 386 | # - MapKey value: parameter name |
| 387 | # - MapValue type: |
| 388 | # - If parameter's entity type is a composite entity: map |
| 389 | # - Else: string or number, depending on parameter value type |
| 390 | # - MapValue value: |
| 391 | # - If parameter's entity type is a composite entity: |
| 392 | # map from composite entity property names to property values |
| 393 | # - Else: parameter value |
| 394 | "a_key": "", # Properties of the object. |
| 395 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 396 | "lifespanCount": 42, # Optional. The number of conversational query requests after which the |
| 397 | # context expires. The default is `0`. If set to `0`, the context expires |
| 398 | # immediately. Contexts expire automatically after 20 minutes if there |
| 399 | # are no matching queries. |
| 400 | "name": "A String", # Required. The unique identifier of the context. Format: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 401 | # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`, |
| 402 | # or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User |
| 403 | # ID>/sessions/<Session ID>/contexts/<Context ID>`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 404 | # |
| 405 | # The `Context ID` is always converted to lowercase, may only contain |
| 406 | # characters in a-zA-Z0-9_-% and may be at most 250 bytes long. |
| 407 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 408 | # If `Environment ID` is not specified, we assume default 'draft' |
| 409 | # environment. If `User ID` is not specified, we assume default '-' user. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 410 | # |
| 411 | # The following context names are reserved for internal use by Dialogflow. |
| 412 | # You should not use these contexts or create contexts with these names: |
| 413 | # |
| 414 | # * `__system_counters__` |
| 415 | # * `*_id_dialog_context` |
| 416 | # * `*_dialog_params_size` |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 417 | }, |
| 418 | ], |
| 419 | }</pre> |
| 420 | </div> |
| 421 | |
| 422 | <div class="method"> |
| 423 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 424 | <pre>Retrieves the next page of results. |
| 425 | |
| 426 | Args: |
| 427 | previous_request: The request for the previous page. (required) |
| 428 | previous_response: The response from the request for the previous page. (required) |
| 429 | |
| 430 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 431 | A request object that you can call 'execute()' on to request the next |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 432 | page. Returns None if there are no more items in the collection. |
| 433 | </pre> |
| 434 | </div> |
| 435 | |
| 436 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 437 | <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 438 | <pre>Updates the specified context. |
| 439 | |
| 440 | Args: |
| 441 | name: string, Required. The unique identifier of the context. Format: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 442 | `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`, |
| 443 | or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User |
| 444 | ID>/sessions/<Session ID>/contexts/<Context ID>`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 445 | |
| 446 | The `Context ID` is always converted to lowercase, may only contain |
| 447 | characters in a-zA-Z0-9_-% and may be at most 250 bytes long. |
| 448 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 449 | If `Environment ID` is not specified, we assume default 'draft' |
| 450 | environment. If `User ID` is not specified, we assume default '-' user. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 451 | |
| 452 | The following context names are reserved for internal use by Dialogflow. |
| 453 | You should not use these contexts or create contexts with these names: |
| 454 | |
| 455 | * `__system_counters__` |
| 456 | * `*_id_dialog_context` |
| 457 | * `*_dialog_params_size` (required) |
| 458 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 459 | The object takes the form of: |
| 460 | |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 461 | { # Dialogflow contexts are similar to natural language context. If a person says |
| 462 | # to you "they are orange", you need context in order to understand what "they" |
| 463 | # is referring to. Similarly, for Dialogflow to handle an end-user expression |
| 464 | # like that, it needs to be provided with context in order to correctly match |
| 465 | # an intent. |
| 466 | # |
| 467 | # Using contexts, you can control the flow of a conversation. You can configure |
| 468 | # contexts for an intent by setting input and output contexts, which are |
| 469 | # identified by string names. When an intent is matched, any configured output |
| 470 | # contexts for that intent become active. While any contexts are active, |
| 471 | # Dialogflow is more likely to match intents that are configured with input |
| 472 | # contexts that correspond to the currently active contexts. |
| 473 | # |
| 474 | # For more information about context, see the |
| 475 | # [Contexts guide](https://cloud.google.com/dialogflow/docs/contexts-overview). |
| 476 | "parameters": { # Optional. The collection of parameters associated with this context. |
| 477 | # |
| 478 | # Depending on your protocol or client library language, this is a |
| 479 | # map, associative array, symbol table, dictionary, or JSON object |
| 480 | # composed of a collection of (MapKey, MapValue) pairs: |
| 481 | # |
| 482 | # - MapKey type: string |
| 483 | # - MapKey value: parameter name |
| 484 | # - MapValue type: |
| 485 | # - If parameter's entity type is a composite entity: map |
| 486 | # - Else: string or number, depending on parameter value type |
| 487 | # - MapValue value: |
| 488 | # - If parameter's entity type is a composite entity: |
| 489 | # map from composite entity property names to property values |
| 490 | # - Else: parameter value |
| 491 | "a_key": "", # Properties of the object. |
| 492 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 493 | "lifespanCount": 42, # Optional. The number of conversational query requests after which the |
| 494 | # context expires. The default is `0`. If set to `0`, the context expires |
| 495 | # immediately. Contexts expire automatically after 20 minutes if there |
| 496 | # are no matching queries. |
| 497 | "name": "A String", # Required. The unique identifier of the context. Format: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 498 | # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`, |
| 499 | # or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User |
| 500 | # ID>/sessions/<Session ID>/contexts/<Context ID>`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 501 | # |
| 502 | # The `Context ID` is always converted to lowercase, may only contain |
| 503 | # characters in a-zA-Z0-9_-% and may be at most 250 bytes long. |
| 504 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 505 | # If `Environment ID` is not specified, we assume default 'draft' |
| 506 | # environment. If `User ID` is not specified, we assume default '-' user. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 507 | # |
| 508 | # The following context names are reserved for internal use by Dialogflow. |
| 509 | # You should not use these contexts or create contexts with these names: |
| 510 | # |
| 511 | # * `__system_counters__` |
| 512 | # * `*_id_dialog_context` |
| 513 | # * `*_dialog_params_size` |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 514 | } |
| 515 | |
| 516 | updateMask: string, Optional. The mask to control which fields get updated. |
| 517 | x__xgafv: string, V1 error format. |
| 518 | Allowed values |
| 519 | 1 - v1 error format |
| 520 | 2 - v2 error format |
| 521 | |
| 522 | Returns: |
| 523 | An object of the form: |
| 524 | |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 525 | { # Dialogflow contexts are similar to natural language context. If a person says |
| 526 | # to you "they are orange", you need context in order to understand what "they" |
| 527 | # is referring to. Similarly, for Dialogflow to handle an end-user expression |
| 528 | # like that, it needs to be provided with context in order to correctly match |
| 529 | # an intent. |
| 530 | # |
| 531 | # Using contexts, you can control the flow of a conversation. You can configure |
| 532 | # contexts for an intent by setting input and output contexts, which are |
| 533 | # identified by string names. When an intent is matched, any configured output |
| 534 | # contexts for that intent become active. While any contexts are active, |
| 535 | # Dialogflow is more likely to match intents that are configured with input |
| 536 | # contexts that correspond to the currently active contexts. |
| 537 | # |
| 538 | # For more information about context, see the |
| 539 | # [Contexts guide](https://cloud.google.com/dialogflow/docs/contexts-overview). |
| 540 | "parameters": { # Optional. The collection of parameters associated with this context. |
| 541 | # |
| 542 | # Depending on your protocol or client library language, this is a |
| 543 | # map, associative array, symbol table, dictionary, or JSON object |
| 544 | # composed of a collection of (MapKey, MapValue) pairs: |
| 545 | # |
| 546 | # - MapKey type: string |
| 547 | # - MapKey value: parameter name |
| 548 | # - MapValue type: |
| 549 | # - If parameter's entity type is a composite entity: map |
| 550 | # - Else: string or number, depending on parameter value type |
| 551 | # - MapValue value: |
| 552 | # - If parameter's entity type is a composite entity: |
| 553 | # map from composite entity property names to property values |
| 554 | # - Else: parameter value |
| 555 | "a_key": "", # Properties of the object. |
| 556 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 557 | "lifespanCount": 42, # Optional. The number of conversational query requests after which the |
| 558 | # context expires. The default is `0`. If set to `0`, the context expires |
| 559 | # immediately. Contexts expire automatically after 20 minutes if there |
| 560 | # are no matching queries. |
| 561 | "name": "A String", # Required. The unique identifier of the context. Format: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 562 | # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`, |
| 563 | # or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User |
| 564 | # ID>/sessions/<Session ID>/contexts/<Context ID>`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 565 | # |
| 566 | # The `Context ID` is always converted to lowercase, may only contain |
| 567 | # characters in a-zA-Z0-9_-% and may be at most 250 bytes long. |
| 568 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 569 | # If `Environment ID` is not specified, we assume default 'draft' |
| 570 | # environment. If `User ID` is not specified, we assume default '-' user. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 571 | # |
| 572 | # The following context names are reserved for internal use by Dialogflow. |
| 573 | # You should not use these contexts or create contexts with these names: |
| 574 | # |
| 575 | # * `__system_counters__` |
| 576 | # * `*_id_dialog_context` |
| 577 | # * `*_dialog_params_size` |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 578 | }</pre> |
| 579 | </div> |
| 580 | |
| 581 | </body></html> |