1// Copyright 2023 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.cloud.dialogflow.cx.v3; 18 19import "google/api/annotations.proto"; 20import "google/api/client.proto"; 21import "google/api/field_behavior.proto"; 22import "google/api/resource.proto"; 23import "google/cloud/dialogflow/cx/v3/advanced_settings.proto"; 24import "google/cloud/dialogflow/cx/v3/import_strategy.proto"; 25import "google/cloud/dialogflow/cx/v3/page.proto"; 26import "google/cloud/dialogflow/cx/v3/validation_message.proto"; 27import "google/longrunning/operations.proto"; 28import "google/protobuf/empty.proto"; 29import "google/protobuf/field_mask.proto"; 30import "google/protobuf/struct.proto"; 31import "google/protobuf/timestamp.proto"; 32 33option cc_enable_arenas = true; 34option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; 35option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb"; 36option java_multiple_files = true; 37option java_outer_classname = "FlowProto"; 38option java_package = "com.google.cloud.dialogflow.cx.v3"; 39option objc_class_prefix = "DF"; 40option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; 41 42// Service for managing [Flows][google.cloud.dialogflow.cx.v3.Flow]. 43service Flows { 44 option (google.api.default_host) = "dialogflow.googleapis.com"; 45 option (google.api.oauth_scopes) = 46 "https://www.googleapis.com/auth/cloud-platform," 47 "https://www.googleapis.com/auth/dialogflow"; 48 49 // Creates a flow in the specified agent. 50 // 51 // Note: You should always train a flow prior to sending it queries. See the 52 // [training 53 // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). 54 rpc CreateFlow(CreateFlowRequest) returns (Flow) { 55 option (google.api.http) = { 56 post: "/v3/{parent=projects/*/locations/*/agents/*}/flows" 57 body: "flow" 58 }; 59 option (google.api.method_signature) = "parent,flow"; 60 } 61 62 // Deletes a specified flow. 63 rpc DeleteFlow(DeleteFlowRequest) returns (google.protobuf.Empty) { 64 option (google.api.http) = { 65 delete: "/v3/{name=projects/*/locations/*/agents/*/flows/*}" 66 }; 67 option (google.api.method_signature) = "name"; 68 } 69 70 // Returns the list of all flows in the specified agent. 71 rpc ListFlows(ListFlowsRequest) returns (ListFlowsResponse) { 72 option (google.api.http) = { 73 get: "/v3/{parent=projects/*/locations/*/agents/*}/flows" 74 }; 75 option (google.api.method_signature) = "parent"; 76 } 77 78 // Retrieves the specified flow. 79 rpc GetFlow(GetFlowRequest) returns (Flow) { 80 option (google.api.http) = { 81 get: "/v3/{name=projects/*/locations/*/agents/*/flows/*}" 82 }; 83 option (google.api.method_signature) = "name"; 84 } 85 86 // Updates the specified flow. 87 // 88 // Note: You should always train a flow prior to sending it queries. See the 89 // [training 90 // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). 91 rpc UpdateFlow(UpdateFlowRequest) returns (Flow) { 92 option (google.api.http) = { 93 patch: "/v3/{flow.name=projects/*/locations/*/agents/*/flows/*}" 94 body: "flow" 95 }; 96 option (google.api.method_signature) = "flow,update_mask"; 97 } 98 99 // Trains the specified flow. Note that only the flow in 'draft' environment 100 // is trained. 101 // 102 // This method is a [long-running 103 // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). 104 // The returned `Operation` type has the following method-specific fields: 105 // 106 // - `metadata`: An empty [Struct 107 // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) 108 // - `response`: An [Empty 109 // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) 110 // 111 // Note: You should always train a flow prior to sending it queries. See the 112 // [training 113 // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). 114 rpc TrainFlow(TrainFlowRequest) returns (google.longrunning.Operation) { 115 option (google.api.http) = { 116 post: "/v3/{name=projects/*/locations/*/agents/*/flows/*}:train" 117 body: "*" 118 }; 119 option (google.api.method_signature) = "name"; 120 option (google.longrunning.operation_info) = { 121 response_type: "google.protobuf.Empty" 122 metadata_type: "google.protobuf.Struct" 123 }; 124 } 125 126 // Validates the specified flow and creates or updates validation results. 127 // Please call this API after the training is completed to get the complete 128 // validation results. 129 rpc ValidateFlow(ValidateFlowRequest) returns (FlowValidationResult) { 130 option (google.api.http) = { 131 post: "/v3/{name=projects/*/locations/*/agents/*/flows/*}:validate" 132 body: "*" 133 }; 134 } 135 136 // Gets the latest flow validation result. Flow validation is performed 137 // when ValidateFlow is called. 138 rpc GetFlowValidationResult(GetFlowValidationResultRequest) 139 returns (FlowValidationResult) { 140 option (google.api.http) = { 141 get: "/v3/{name=projects/*/locations/*/agents/*/flows/*/validationResult}" 142 }; 143 option (google.api.method_signature) = "name"; 144 } 145 146 // Imports the specified flow to the specified agent from a binary file. 147 // 148 // This method is a [long-running 149 // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). 150 // The returned `Operation` type has the following method-specific fields: 151 // 152 // - `metadata`: An empty [Struct 153 // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) 154 // - `response`: 155 // [ImportFlowResponse][google.cloud.dialogflow.cx.v3.ImportFlowResponse] 156 // 157 // Note: You should always train a flow prior to sending it queries. See the 158 // [training 159 // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). 160 rpc ImportFlow(ImportFlowRequest) returns (google.longrunning.Operation) { 161 option (google.api.http) = { 162 post: "/v3/{parent=projects/*/locations/*/agents/*}/flows:import" 163 body: "*" 164 }; 165 option (google.longrunning.operation_info) = { 166 response_type: "ImportFlowResponse" 167 metadata_type: "google.protobuf.Struct" 168 }; 169 } 170 171 // Exports the specified flow to a binary file. 172 // 173 // This method is a [long-running 174 // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). 175 // The returned `Operation` type has the following method-specific fields: 176 // 177 // - `metadata`: An empty [Struct 178 // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) 179 // - `response`: 180 // [ExportFlowResponse][google.cloud.dialogflow.cx.v3.ExportFlowResponse] 181 // 182 // Note that resources (e.g. intents, entities, webhooks) that the flow 183 // references will also be exported. 184 rpc ExportFlow(ExportFlowRequest) returns (google.longrunning.Operation) { 185 option (google.api.http) = { 186 post: "/v3/{name=projects/*/locations/*/agents/*/flows/*}:export" 187 body: "*" 188 }; 189 option (google.longrunning.operation_info) = { 190 response_type: "ExportFlowResponse" 191 metadata_type: "google.protobuf.Struct" 192 }; 193 } 194} 195 196// Settings related to NLU. 197message NluSettings { 198 // NLU model type. 199 enum ModelType { 200 // Not specified. `MODEL_TYPE_STANDARD` will be used. 201 MODEL_TYPE_UNSPECIFIED = 0; 202 203 // Use standard NLU model. 204 MODEL_TYPE_STANDARD = 1; 205 206 // Use advanced NLU model. 207 MODEL_TYPE_ADVANCED = 3; 208 } 209 210 // NLU model training mode. 211 enum ModelTrainingMode { 212 // Not specified. `MODEL_TRAINING_MODE_AUTOMATIC` will be used. 213 MODEL_TRAINING_MODE_UNSPECIFIED = 0; 214 215 // NLU model training is automatically triggered when a flow gets modified. 216 // User can also manually trigger model training in this mode. 217 MODEL_TRAINING_MODE_AUTOMATIC = 1; 218 219 // User needs to manually trigger NLU model training. Best for large flows 220 // whose models take long time to train. 221 MODEL_TRAINING_MODE_MANUAL = 2; 222 } 223 224 // Indicates the type of NLU model. 225 ModelType model_type = 1; 226 227 // To filter out false positive results and still get variety in matched 228 // natural language inputs for your agent, you can tune the machine learning 229 // classification threshold. If the returned score value is less than the 230 // threshold value, then a no-match event will be triggered. The score values 231 // range from 0.0 (completely uncertain) to 1.0 (completely certain). If set 232 // to 0.0, the default of 0.3 is used. 233 float classification_threshold = 3; 234 235 // Indicates NLU model training mode. 236 ModelTrainingMode model_training_mode = 4; 237} 238 239// Flows represents the conversation flows when you build your chatbot agent. 240// 241// A flow consists of many pages connected by the transition routes. 242// Conversations always start with the built-in Start Flow (with an all-0 ID). 243// Transition routes can direct the conversation session from the current flow 244// (parent flow) to another flow (sub flow). When the sub flow is finished, 245// Dialogflow will bring the session back to the parent flow, where the sub flow 246// is started. 247// 248// Usually, when a transition route is followed by a matched intent, the intent 249// will be "consumed". This means the intent won't activate more transition 250// routes. However, when the followed transition route moves the conversation 251// session into a different flow, the matched intent can be carried over and to 252// be consumed in the target flow. 253message Flow { 254 option (google.api.resource) = { 255 type: "dialogflow.googleapis.com/Flow" 256 pattern: "projects/{project}/locations/{location}/agents/{agent}/flows/{flow}" 257 }; 258 259 // The unique identifier of the flow. 260 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 261 // ID>/flows/<Flow ID>`. 262 string name = 1; 263 264 // Required. The human-readable name of the flow. 265 string display_name = 2 [(google.api.field_behavior) = REQUIRED]; 266 267 // The description of the flow. The maximum length is 500 characters. If 268 // exceeded, the request is rejected. 269 string description = 3; 270 271 // A flow's transition routes serve two purposes: 272 // 273 // * They are responsible for matching the user's first utterances in the 274 // flow. 275 // * They are inherited by every page's [transition 276 // routes][Page.transition_routes] and can support use cases such as the user 277 // saying "help" or "can I talk to a human?", which can be handled in a common 278 // way regardless of the current page. Transition routes defined in the page 279 // have higher priority than those defined in the flow. 280 // 281 // TransitionRoutes are evalauted in the following order: 282 // 283 // * TransitionRoutes with intent specified. 284 // * TransitionRoutes with only condition specified. 285 // 286 // TransitionRoutes with intent specified are inherited by pages in the flow. 287 repeated TransitionRoute transition_routes = 4; 288 289 // A flow's event handlers serve two purposes: 290 // 291 // * They are responsible for handling events (e.g. no match, 292 // webhook errors) in the flow. 293 // * They are inherited by every page's [event 294 // handlers][Page.event_handlers], which can be used to handle common events 295 // regardless of the current page. Event handlers defined in the page 296 // have higher priority than those defined in the flow. 297 // 298 // Unlike 299 // [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes], 300 // these handlers are evaluated on a first-match basis. The first one that 301 // matches the event get executed, with the rest being ignored. 302 repeated EventHandler event_handlers = 10; 303 304 // A flow's transition route group serve two purposes: 305 // 306 // * They are responsible for matching the user's first utterances in the 307 // flow. 308 // * They are inherited by every page's [transition 309 // route groups][Page.transition_route_groups]. Transition route groups 310 // defined in the page have higher priority than those defined in the flow. 311 // 312 // Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent 313 // ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` 314 // or `projects/<Project ID>/locations/<Location ID>/agents/<Agent 315 // ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level 316 // groups. 317 repeated string transition_route_groups = 15 318 [(google.api.resource_reference) = { 319 type: "dialogflow.googleapis.com/TransitionRouteGroup" 320 }]; 321 322 // NLU related settings of the flow. 323 NluSettings nlu_settings = 11; 324 325 // Hierarchical advanced settings for this flow. The settings exposed at the 326 // lower level overrides the settings exposed at the higher level. 327 AdvancedSettings advanced_settings = 14; 328 329 // Optional. Knowledge connector configuration. 330 KnowledgeConnectorSettings knowledge_connector_settings = 18 331 [(google.api.field_behavior) = OPTIONAL]; 332} 333 334// The request message for 335// [Flows.CreateFlow][google.cloud.dialogflow.cx.v3.Flows.CreateFlow]. 336message CreateFlowRequest { 337 // Required. The agent to create a flow for. 338 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`. 339 string parent = 1 [ 340 (google.api.field_behavior) = REQUIRED, 341 (google.api.resource_reference) = { 342 child_type: "dialogflow.googleapis.com/Flow" 343 } 344 ]; 345 346 // Required. The flow to create. 347 Flow flow = 2 [(google.api.field_behavior) = REQUIRED]; 348 349 // The language of the following fields in `flow`: 350 // 351 // * `Flow.event_handlers.trigger_fulfillment.messages` 352 // * `Flow.event_handlers.trigger_fulfillment.conditional_cases` 353 // * `Flow.transition_routes.trigger_fulfillment.messages` 354 // * `Flow.transition_routes.trigger_fulfillment.conditional_cases` 355 // 356 // If not specified, the agent's default language is used. 357 // [Many 358 // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) 359 // are supported. 360 // Note: languages must be enabled in the agent before they can be used. 361 string language_code = 3; 362} 363 364// The request message for 365// [Flows.DeleteFlow][google.cloud.dialogflow.cx.v3.Flows.DeleteFlow]. 366message DeleteFlowRequest { 367 // Required. The name of the flow to delete. 368 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 369 // ID>/flows/<Flow ID>`. 370 string name = 1 [ 371 (google.api.field_behavior) = REQUIRED, 372 (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } 373 ]; 374 375 // This field has no effect for flows with no incoming transitions. 376 // For flows with incoming transitions: 377 // 378 // * If `force` is set to false, an error will be returned with message 379 // indicating the incoming transitions. 380 // * If `force` is set to true, Dialogflow will remove the flow, as well as 381 // any transitions to the flow (i.e. [Target 382 // flow][EventHandler.target_flow] in event handlers or [Target 383 // flow][TransitionRoute.target_flow] in transition routes that point to 384 // this flow will be cleared). 385 bool force = 2; 386} 387 388// The request message for 389// [Flows.ListFlows][google.cloud.dialogflow.cx.v3.Flows.ListFlows]. 390message ListFlowsRequest { 391 // Required. The agent containing the flows. 392 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`. 393 string parent = 1 [ 394 (google.api.field_behavior) = REQUIRED, 395 (google.api.resource_reference) = { 396 child_type: "dialogflow.googleapis.com/Flow" 397 } 398 ]; 399 400 // The maximum number of items to return in a single page. By default 100 and 401 // at most 1000. 402 int32 page_size = 2; 403 404 // The next_page_token value returned from a previous list request. 405 string page_token = 3; 406 407 // The language to list flows for. The following fields are language 408 // dependent: 409 // 410 // * `Flow.event_handlers.trigger_fulfillment.messages` 411 // * `Flow.event_handlers.trigger_fulfillment.conditional_cases` 412 // * `Flow.transition_routes.trigger_fulfillment.messages` 413 // * `Flow.transition_routes.trigger_fulfillment.conditional_cases` 414 // 415 // If not specified, the agent's default language is used. 416 // [Many 417 // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) 418 // are supported. 419 // Note: languages must be enabled in the agent before they can be used. 420 string language_code = 4; 421} 422 423// The response message for 424// [Flows.ListFlows][google.cloud.dialogflow.cx.v3.Flows.ListFlows]. 425message ListFlowsResponse { 426 // The list of flows. There will be a maximum number of items returned based 427 // on the page_size field in the request. 428 repeated Flow flows = 1; 429 430 // Token to retrieve the next page of results, or empty if there are no more 431 // results in the list. 432 string next_page_token = 2; 433} 434 435// The response message for 436// [Flows.GetFlow][google.cloud.dialogflow.cx.v3.Flows.GetFlow]. 437message GetFlowRequest { 438 // Required. The name of the flow to get. 439 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 440 // ID>/flows/<Flow ID>`. 441 string name = 1 [ 442 (google.api.field_behavior) = REQUIRED, 443 (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } 444 ]; 445 446 // The language to retrieve the flow for. The following fields are language 447 // dependent: 448 // 449 // * `Flow.event_handlers.trigger_fulfillment.messages` 450 // * `Flow.event_handlers.trigger_fulfillment.conditional_cases` 451 // * `Flow.transition_routes.trigger_fulfillment.messages` 452 // * `Flow.transition_routes.trigger_fulfillment.conditional_cases` 453 // 454 // If not specified, the agent's default language is used. 455 // [Many 456 // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) 457 // are supported. 458 // Note: languages must be enabled in the agent before they can be used. 459 string language_code = 2; 460} 461 462// The request message for 463// [Flows.UpdateFlow][google.cloud.dialogflow.cx.v3.Flows.UpdateFlow]. 464message UpdateFlowRequest { 465 // Required. The flow to update. 466 Flow flow = 1 [(google.api.field_behavior) = REQUIRED]; 467 468 // The mask to control which fields get updated. If the mask is not present, 469 // all fields will be updated. 470 google.protobuf.FieldMask update_mask = 2; 471 472 // The language of the following fields in `flow`: 473 // 474 // * `Flow.event_handlers.trigger_fulfillment.messages` 475 // * `Flow.event_handlers.trigger_fulfillment.conditional_cases` 476 // * `Flow.transition_routes.trigger_fulfillment.messages` 477 // * `Flow.transition_routes.trigger_fulfillment.conditional_cases` 478 // 479 // If not specified, the agent's default language is used. 480 // [Many 481 // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) 482 // are supported. 483 // Note: languages must be enabled in the agent before they can be used. 484 string language_code = 3; 485} 486 487// The request message for 488// [Flows.TrainFlow][google.cloud.dialogflow.cx.v3.Flows.TrainFlow]. 489message TrainFlowRequest { 490 // Required. The flow to train. 491 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 492 // ID>/flows/<Flow ID>`. 493 string name = 1 [ 494 (google.api.field_behavior) = REQUIRED, 495 (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } 496 ]; 497} 498 499// The request message for 500// [Flows.ValidateFlow][google.cloud.dialogflow.cx.v3.Flows.ValidateFlow]. 501message ValidateFlowRequest { 502 // Required. The flow to validate. 503 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 504 // ID>/flows/<Flow ID>`. 505 string name = 1 [ 506 (google.api.field_behavior) = REQUIRED, 507 (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } 508 ]; 509 510 // If not specified, the agent's default language is used. 511 string language_code = 2; 512} 513 514// The request message for 515// [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3.Flows.GetFlowValidationResult]. 516message GetFlowValidationResultRequest { 517 // Required. The flow name. 518 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 519 // ID>/flows/<Flow ID>/validationResult`. 520 string name = 1 [ 521 (google.api.field_behavior) = REQUIRED, 522 (google.api.resource_reference) = { 523 type: "dialogflow.googleapis.com/FlowValidationResult" 524 } 525 ]; 526 527 // If not specified, the agent's default language is used. 528 string language_code = 2; 529} 530 531// The response message for 532// [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3.Flows.GetFlowValidationResult]. 533message FlowValidationResult { 534 option (google.api.resource) = { 535 type: "dialogflow.googleapis.com/FlowValidationResult" 536 pattern: "projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/validationResult" 537 }; 538 539 // The unique identifier of the flow validation result. 540 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 541 // ID>/flows/<Flow ID>/validationResult`. 542 string name = 1; 543 544 // Contains all validation messages. 545 repeated ValidationMessage validation_messages = 2; 546 547 // Last time the flow was validated. 548 google.protobuf.Timestamp update_time = 3; 549} 550 551// The request message for 552// [Flows.ImportFlow][google.cloud.dialogflow.cx.v3.Flows.ImportFlow]. 553message ImportFlowRequest { 554 // Import option. 555 enum ImportOption { 556 // Unspecified. Treated as `KEEP`. 557 IMPORT_OPTION_UNSPECIFIED = 0; 558 559 // Always respect settings in exported flow content. It may cause a 560 // import failure if some settings (e.g. custom NLU) are not supported in 561 // the agent to import into. 562 KEEP = 1; 563 564 // Fallback to default settings if some settings are not supported in the 565 // agent to import into. E.g. Standard NLU will be used if custom NLU is 566 // not available. 567 FALLBACK = 2; 568 } 569 570 // Required. The agent to import the flow into. 571 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`. 572 string parent = 1 [ 573 (google.api.field_behavior) = REQUIRED, 574 (google.api.resource_reference) = { 575 child_type: "dialogflow.googleapis.com/Flow" 576 } 577 ]; 578 579 // Required. The flow to import. 580 oneof flow { 581 // The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI 582 // to import flow from. The format of this URI must be 583 // `gs://<bucket-name>/<object-name>`. 584 // 585 // Dialogflow performs a read operation for the Cloud Storage object 586 // on the caller's behalf, so your request authentication must 587 // have read permissions for the object. For more information, see 588 // [Dialogflow access 589 // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). 590 string flow_uri = 2; 591 592 // Uncompressed raw byte content for flow. 593 bytes flow_content = 3; 594 } 595 596 // Flow import mode. If not specified, `KEEP` is assumed. 597 ImportOption import_option = 4; 598 599 // Optional. Specifies the import strategy used when resolving resource 600 // conflicts. 601 FlowImportStrategy flow_import_strategy = 5 602 [(google.api.field_behavior) = OPTIONAL]; 603} 604 605// The flow import strategy used for resource conflict resolution associated 606// with an [ImportFlowRequest][google.cloud.dialogflow.cx.v3.ImportFlowRequest]. 607message FlowImportStrategy { 608 // Optional. Import strategy for resource conflict resolution, applied 609 // globally throughout the flow. It will be applied for all display name 610 // conflicts in the imported content. If not specified, 'CREATE_NEW' is 611 // assumed. 612 ImportStrategy global_import_strategy = 1 613 [(google.api.field_behavior) = OPTIONAL]; 614} 615 616// The response message for 617// [Flows.ImportFlow][google.cloud.dialogflow.cx.v3.Flows.ImportFlow]. 618message ImportFlowResponse { 619 // The unique identifier of the new flow. 620 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 621 // ID>/flows/<Flow ID>`. 622 string flow = 1 [ 623 (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } 624 ]; 625} 626 627// The request message for 628// [Flows.ExportFlow][google.cloud.dialogflow.cx.v3.Flows.ExportFlow]. 629message ExportFlowRequest { 630 // Required. The name of the flow to export. 631 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 632 // ID>/flows/<Flow ID>`. 633 string name = 1 [ 634 (google.api.field_behavior) = REQUIRED, 635 (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } 636 ]; 637 638 // Optional. The [Google Cloud 639 // Storage](https://cloud.google.com/storage/docs/) URI to export the flow to. 640 // The format of this URI must be `gs://<bucket-name>/<object-name>`. If left 641 // unspecified, the serialized flow is returned inline. 642 // 643 // Dialogflow performs a write operation for the Cloud Storage object 644 // on the caller's behalf, so your request authentication must 645 // have write permissions for the object. For more information, see 646 // [Dialogflow access 647 // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). 648 string flow_uri = 2 [(google.api.field_behavior) = OPTIONAL]; 649 650 // Optional. Whether to export flows referenced by the specified flow. 651 bool include_referenced_flows = 4 [(google.api.field_behavior) = OPTIONAL]; 652} 653 654// The response message for 655// [Flows.ExportFlow][google.cloud.dialogflow.cx.v3.Flows.ExportFlow]. 656message ExportFlowResponse { 657 // The exported flow. 658 oneof flow { 659 // The URI to a file containing the exported flow. This field is populated 660 // only if `flow_uri` is specified in 661 // [ExportFlowRequest][google.cloud.dialogflow.cx.v3.ExportFlowRequest]. 662 string flow_uri = 1; 663 664 // Uncompressed raw byte content for flow. 665 bytes flow_content = 2; 666 } 667} 668