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></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="dialogflow_v2beta1.projects.agent.entityTypes.html">entityTypes()</a></code> 79</p> 80<p class="firstline">Returns the entityTypes Resource.</p> 81 82<p class="toc_element"> 83 <code><a href="dialogflow_v2beta1.projects.agent.environments.html">environments()</a></code> 84</p> 85<p class="firstline">Returns the environments Resource.</p> 86 87<p class="toc_element"> 88 <code><a href="dialogflow_v2beta1.projects.agent.intents.html">intents()</a></code> 89</p> 90<p class="firstline">Returns the intents Resource.</p> 91 92<p class="toc_element"> 93 <code><a href="dialogflow_v2beta1.projects.agent.knowledgeBases.html">knowledgeBases()</a></code> 94</p> 95<p class="firstline">Returns the knowledgeBases Resource.</p> 96 97<p class="toc_element"> 98 <code><a href="dialogflow_v2beta1.projects.agent.sessions.html">sessions()</a></code> 99</p> 100<p class="firstline">Returns the sessions Resource.</p> 101 102<p class="toc_element"> 103 <code><a href="#export">export(parent, body, x__xgafv=None)</a></code></p> 104<p class="firstline">Exports the specified agent to a ZIP file.</p> 105<p class="toc_element"> 106 <code><a href="#import_">import_(parent, body, x__xgafv=None)</a></code></p> 107<p class="firstline">Imports the specified agent from a ZIP file.</p> 108<p class="toc_element"> 109 <code><a href="#restore">restore(parent, body, x__xgafv=None)</a></code></p> 110<p class="firstline">Restores the specified agent from a ZIP file.</p> 111<p class="toc_element"> 112 <code><a href="#search">search(parent, pageToken=None, x__xgafv=None, pageSize=None)</a></code></p> 113<p class="firstline">Returns the list of agents.</p> 114<p class="toc_element"> 115 <code><a href="#search_next">search_next(previous_request, previous_response)</a></code></p> 116<p class="firstline">Retrieves the next page of results.</p> 117<p class="toc_element"> 118 <code><a href="#train">train(parent, body=None, x__xgafv=None)</a></code></p> 119<p class="firstline">Trains the specified agent.</p> 120<h3>Method Details</h3> 121<div class="method"> 122 <code class="details" id="export">export(parent, body, x__xgafv=None)</code> 123 <pre>Exports the specified agent to a ZIP file. 124 125 126Operation <response: ExportAgentResponse> 127 128Args: 129 parent: string, Required. The project that the agent to export is associated with. 130Format: `projects/<Project ID>`. (required) 131 body: object, The request body. (required) 132 The object takes the form of: 133 134{ # The request message for Agents.ExportAgent. 135 "agentUri": "A String", # Optional. The 136 # [Google Cloud Storage](https://cloud.google.com/storage/docs/) 137 # URI to export the agent to. 138 # The format of this URI must be `gs://<bucket-name>/<object-name>`. 139 # If left unspecified, the serialized agent is returned inline. 140 } 141 142 x__xgafv: string, V1 error format. 143 Allowed values 144 1 - v1 error format 145 2 - v2 error format 146 147Returns: 148 An object of the form: 149 150 { # This resource represents a long-running operation that is the result of a 151 # network API call. 152 "metadata": { # Service-specific metadata associated with the operation. It typically 153 # contains progress information and common metadata such as create time. 154 # Some services might not provide such metadata. Any method that returns a 155 # long-running operation should document the metadata type, if any. 156 "a_key": "", # Properties of the object. Contains field @type with type URL. 157 }, 158 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation. 159 # different programming environments, including REST APIs and RPC APIs. It is 160 # used by [gRPC](https://github.com/grpc). Each `Status` message contains 161 # three pieces of data: error code, error message, and error details. 162 # 163 # You can find out more about this error model and how to work with it in the 164 # [API Design Guide](https://cloud.google.com/apis/design/errors). 165 "message": "A String", # A developer-facing error message, which should be in English. Any 166 # user-facing error message should be localized and sent in the 167 # google.rpc.Status.details field, or localized by the client. 168 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 169 "details": [ # A list of messages that carry the error details. There is a common set of 170 # message types for APIs to use. 171 { 172 "a_key": "", # Properties of the object. Contains field @type with type URL. 173 }, 174 ], 175 }, 176 "done": True or False, # If the value is `false`, it means the operation is still in progress. 177 # If `true`, the operation is completed, and either `error` or `response` is 178 # available. 179 "response": { # The normal response of the operation in case of success. If the original 180 # method returns no data on success, such as `Delete`, the response is 181 # `google.protobuf.Empty`. If the original method is standard 182 # `Get`/`Create`/`Update`, the response should be the resource. For other 183 # methods, the response should have the type `XxxResponse`, where `Xxx` 184 # is the original method name. For example, if the original method name 185 # is `TakeSnapshot()`, the inferred response type is 186 # `TakeSnapshotResponse`. 187 "a_key": "", # Properties of the object. Contains field @type with type URL. 188 }, 189 "name": "A String", # The server-assigned name, which is only unique within the same service that 190 # originally returns it. If you use the default HTTP mapping, the 191 # `name` should be a resource name ending with `operations/{unique_id}`. 192 }</pre> 193</div> 194 195<div class="method"> 196 <code class="details" id="import_">import_(parent, body, x__xgafv=None)</code> 197 <pre>Imports the specified agent from a ZIP file. 198 199Uploads new intents and entity types without deleting the existing ones. 200Intents and entity types with the same name are replaced with the new 201versions from ImportAgentRequest. 202 203 204Operation <response: google.protobuf.Empty> 205 206Args: 207 parent: string, Required. The project that the agent to import is associated with. 208Format: `projects/<Project ID>`. (required) 209 body: object, The request body. (required) 210 The object takes the form of: 211 212{ # The request message for Agents.ImportAgent. 213 "agentUri": "A String", # The URI to a Google Cloud Storage file containing the agent to import. 214 # Note: The URI must start with "gs://". 215 "agentContent": "A String", # The agent to import. 216 # 217 # Example for how to import an agent via the command line: 218 # <pre>curl \ 219 # 'https://dialogflow.googleapis.com/v2beta1/projects/<project_name>/agent:import\ 220 # -X POST \ 221 # -H 'Authorization: Bearer '$(gcloud auth application-default 222 # print-access-token) \ 223 # -H 'Accept: application/json' \ 224 # -H 'Content-Type: application/json' \ 225 # --compressed \ 226 # --data-binary "{ 227 # 'agentContent': '$(cat <agent zip file> | base64 -w 0)' 228 # }"</pre> 229 } 230 231 x__xgafv: string, V1 error format. 232 Allowed values 233 1 - v1 error format 234 2 - v2 error format 235 236Returns: 237 An object of the form: 238 239 { # This resource represents a long-running operation that is the result of a 240 # network API call. 241 "metadata": { # Service-specific metadata associated with the operation. It typically 242 # contains progress information and common metadata such as create time. 243 # Some services might not provide such metadata. Any method that returns a 244 # long-running operation should document the metadata type, if any. 245 "a_key": "", # Properties of the object. Contains field @type with type URL. 246 }, 247 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation. 248 # different programming environments, including REST APIs and RPC APIs. It is 249 # used by [gRPC](https://github.com/grpc). Each `Status` message contains 250 # three pieces of data: error code, error message, and error details. 251 # 252 # You can find out more about this error model and how to work with it in the 253 # [API Design Guide](https://cloud.google.com/apis/design/errors). 254 "message": "A String", # A developer-facing error message, which should be in English. Any 255 # user-facing error message should be localized and sent in the 256 # google.rpc.Status.details field, or localized by the client. 257 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 258 "details": [ # A list of messages that carry the error details. There is a common set of 259 # message types for APIs to use. 260 { 261 "a_key": "", # Properties of the object. Contains field @type with type URL. 262 }, 263 ], 264 }, 265 "done": True or False, # If the value is `false`, it means the operation is still in progress. 266 # If `true`, the operation is completed, and either `error` or `response` is 267 # available. 268 "response": { # The normal response of the operation in case of success. If the original 269 # method returns no data on success, such as `Delete`, the response is 270 # `google.protobuf.Empty`. If the original method is standard 271 # `Get`/`Create`/`Update`, the response should be the resource. For other 272 # methods, the response should have the type `XxxResponse`, where `Xxx` 273 # is the original method name. For example, if the original method name 274 # is `TakeSnapshot()`, the inferred response type is 275 # `TakeSnapshotResponse`. 276 "a_key": "", # Properties of the object. Contains field @type with type URL. 277 }, 278 "name": "A String", # The server-assigned name, which is only unique within the same service that 279 # originally returns it. If you use the default HTTP mapping, the 280 # `name` should be a resource name ending with `operations/{unique_id}`. 281 }</pre> 282</div> 283 284<div class="method"> 285 <code class="details" id="restore">restore(parent, body, x__xgafv=None)</code> 286 <pre>Restores the specified agent from a ZIP file. 287 288Replaces the current agent version with a new one. All the intents and 289entity types in the older version are deleted. 290 291 292Operation <response: google.protobuf.Empty> 293 294Args: 295 parent: string, Required. The project that the agent to restore is associated with. 296Format: `projects/<Project ID>`. (required) 297 body: object, The request body. (required) 298 The object takes the form of: 299 300{ # The request message for Agents.RestoreAgent. 301 "agentUri": "A String", # The URI to a Google Cloud Storage file containing the agent to restore. 302 # Note: The URI must start with "gs://". 303 "agentContent": "A String", # The agent to restore. 304 # 305 # Example for how to restore an agent via the command line: 306 # <pre>curl \ 307 # 'https://dialogflow.googleapis.com/v2beta1/projects/<project_name>/agent:restore\ 308 # -X POST \ 309 # -H 'Authorization: Bearer '$(gcloud auth application-default 310 # print-access-token) \ 311 # -H 'Accept: application/json' \ 312 # -H 'Content-Type: application/json' \ 313 # --compressed \ 314 # --data-binary "{ 315 # 'agentContent': '$(cat <agent zip file> | base64 -w 0)' 316 # }"</pre> 317 } 318 319 x__xgafv: string, V1 error format. 320 Allowed values 321 1 - v1 error format 322 2 - v2 error format 323 324Returns: 325 An object of the form: 326 327 { # This resource represents a long-running operation that is the result of a 328 # network API call. 329 "metadata": { # Service-specific metadata associated with the operation. It typically 330 # contains progress information and common metadata such as create time. 331 # Some services might not provide such metadata. Any method that returns a 332 # long-running operation should document the metadata type, if any. 333 "a_key": "", # Properties of the object. Contains field @type with type URL. 334 }, 335 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation. 336 # different programming environments, including REST APIs and RPC APIs. It is 337 # used by [gRPC](https://github.com/grpc). Each `Status` message contains 338 # three pieces of data: error code, error message, and error details. 339 # 340 # You can find out more about this error model and how to work with it in the 341 # [API Design Guide](https://cloud.google.com/apis/design/errors). 342 "message": "A String", # A developer-facing error message, which should be in English. Any 343 # user-facing error message should be localized and sent in the 344 # google.rpc.Status.details field, or localized by the client. 345 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 346 "details": [ # A list of messages that carry the error details. There is a common set of 347 # message types for APIs to use. 348 { 349 "a_key": "", # Properties of the object. Contains field @type with type URL. 350 }, 351 ], 352 }, 353 "done": True or False, # If the value is `false`, it means the operation is still in progress. 354 # If `true`, the operation is completed, and either `error` or `response` is 355 # available. 356 "response": { # The normal response of the operation in case of success. If the original 357 # method returns no data on success, such as `Delete`, the response is 358 # `google.protobuf.Empty`. If the original method is standard 359 # `Get`/`Create`/`Update`, the response should be the resource. For other 360 # methods, the response should have the type `XxxResponse`, where `Xxx` 361 # is the original method name. For example, if the original method name 362 # is `TakeSnapshot()`, the inferred response type is 363 # `TakeSnapshotResponse`. 364 "a_key": "", # Properties of the object. Contains field @type with type URL. 365 }, 366 "name": "A String", # The server-assigned name, which is only unique within the same service that 367 # originally returns it. If you use the default HTTP mapping, the 368 # `name` should be a resource name ending with `operations/{unique_id}`. 369 }</pre> 370</div> 371 372<div class="method"> 373 <code class="details" id="search">search(parent, pageToken=None, x__xgafv=None, pageSize=None)</code> 374 <pre>Returns the list of agents. 375 376Since there is at most one conversational agent per project, this method is 377useful primarily for listing all agents across projects the caller has 378access to. One can achieve that with a wildcard project collection id "-". 379Refer to [List 380Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections). 381 382Args: 383 parent: string, Required. The project to list agents from. 384Format: `projects/<Project ID or '-'>`. (required) 385 pageToken: string, Optional. The next_page_token value returned from a previous list request. 386 x__xgafv: string, V1 error format. 387 Allowed values 388 1 - v1 error format 389 2 - v2 error format 390 pageSize: integer, Optional. The maximum number of items to return in a single page. By 391default 100 and at most 1000. 392 393Returns: 394 An object of the form: 395 396 { # The response message for Agents.SearchAgents. 397 "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no 398 # more results in the list. 399 "agents": [ # The list of agents. There will be a maximum number of items returned based 400 # on the page_size field in the request. 401 { # Represents a conversational agent. 402 "avatarUri": "A String", # Optional. The URI of the agent's avatar. 403 # Avatars are used throughout the Dialogflow console and in the self-hosted 404 # [Web 405 # Demo](https://cloud.google.com/dialogflow-enterprise/docs/integrations/web-demo) 406 # integration. 407 "displayName": "A String", # Required. The name of this agent. 408 "description": "A String", # Optional. The description of this agent. 409 # The maximum length is 500 characters. If exceeded, the request is rejected. 410 "parent": "A String", # Required. The project of this agent. 411 # Format: `projects/<Project ID>`. 412 "defaultLanguageCode": "A String", # Required. The default language of the agent as a language tag. See 413 # [Language 414 # Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) 415 # for a list of the currently supported language codes. This field cannot be 416 # set by the `Update` method. 417 "apiVersion": "A String", # Optional. API version displayed in Dialogflow console. If not specified, 418 # V2 API is assumed. Clients are free to query different service endpoints 419 # for different API versions. However, bots connectors and webhook calls will 420 # follow the specified API version. 421 "enableLogging": True or False, # Optional. Determines whether this agent should log conversation queries. 422 "matchMode": "A String", # Optional. Determines how intents are detected from user queries. 423 "supportedLanguageCodes": [ # Optional. The list of all languages supported by this agent (except for the 424 # `default_language_code`). 425 "A String", 426 ], 427 "tier": "A String", # Optional. The agent tier. If not specified, TIER_STANDARD is assumed. 428 "timeZone": "A String", # Required. The time zone of this agent from the 429 # [time zone database](https://www.iana.org/time-zones), e.g., 430 # America/New_York, Europe/Paris. 431 "classificationThreshold": 3.14, # Optional. To filter out false positive results and still get variety in 432 # matched natural language inputs for your agent, you can tune the machine 433 # learning classification threshold. If the returned score value is less than 434 # the threshold value, then a fallback intent will be triggered or, if there 435 # are no fallback intents defined, no intent will be triggered. The score 436 # values range from 0.0 (completely uncertain) to 1.0 (completely certain). 437 # If set to 0.0, the default of 0.3 is used. 438 }, 439 ], 440 }</pre> 441</div> 442 443<div class="method"> 444 <code class="details" id="search_next">search_next(previous_request, previous_response)</code> 445 <pre>Retrieves the next page of results. 446 447Args: 448 previous_request: The request for the previous page. (required) 449 previous_response: The response from the request for the previous page. (required) 450 451Returns: 452 A request object that you can call 'execute()' on to request the next 453 page. Returns None if there are no more items in the collection. 454 </pre> 455</div> 456 457<div class="method"> 458 <code class="details" id="train">train(parent, body=None, x__xgafv=None)</code> 459 <pre>Trains the specified agent. 460 461 462Operation <response: google.protobuf.Empty> 463 464Args: 465 parent: string, Required. The project that the agent to train is associated with. 466Format: `projects/<Project ID>`. (required) 467 body: object, The request body. 468 The object takes the form of: 469 470{ # The request message for Agents.TrainAgent. 471 } 472 473 x__xgafv: string, V1 error format. 474 Allowed values 475 1 - v1 error format 476 2 - v2 error format 477 478Returns: 479 An object of the form: 480 481 { # This resource represents a long-running operation that is the result of a 482 # network API call. 483 "metadata": { # Service-specific metadata associated with the operation. It typically 484 # contains progress information and common metadata such as create time. 485 # Some services might not provide such metadata. Any method that returns a 486 # long-running operation should document the metadata type, if any. 487 "a_key": "", # Properties of the object. Contains field @type with type URL. 488 }, 489 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation. 490 # different programming environments, including REST APIs and RPC APIs. It is 491 # used by [gRPC](https://github.com/grpc). Each `Status` message contains 492 # three pieces of data: error code, error message, and error details. 493 # 494 # You can find out more about this error model and how to work with it in the 495 # [API Design Guide](https://cloud.google.com/apis/design/errors). 496 "message": "A String", # A developer-facing error message, which should be in English. Any 497 # user-facing error message should be localized and sent in the 498 # google.rpc.Status.details field, or localized by the client. 499 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 500 "details": [ # A list of messages that carry the error details. There is a common set of 501 # message types for APIs to use. 502 { 503 "a_key": "", # Properties of the object. Contains field @type with type URL. 504 }, 505 ], 506 }, 507 "done": True or False, # If the value is `false`, it means the operation is still in progress. 508 # If `true`, the operation is completed, and either `error` or `response` is 509 # available. 510 "response": { # The normal response of the operation in case of success. If the original 511 # method returns no data on success, such as `Delete`, the response is 512 # `google.protobuf.Empty`. If the original method is standard 513 # `Get`/`Create`/`Update`, the response should be the resource. For other 514 # methods, the response should have the type `XxxResponse`, where `Xxx` 515 # is the original method name. For example, if the original method name 516 # is `TakeSnapshot()`, the inferred response type is 517 # `TakeSnapshotResponse`. 518 "a_key": "", # Properties of the object. Contains field @type with type URL. 519 }, 520 "name": "A String", # The server-assigned name, which is only unique within the same service that 521 # originally returns it. If you use the default HTTP mapping, the 522 # `name` should be a resource name ending with `operations/{unique_id}`. 523 }</pre> 524</div> 525 526</body></html>