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.v3beta1; 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/v3beta1/advanced_settings.proto"; 24import "google/cloud/dialogflow/cx/v3beta1/import_strategy.proto"; 25import "google/cloud/dialogflow/cx/v3beta1/page.proto"; 26import "google/cloud/dialogflow/cx/v3beta1/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.V3Beta1"; 35option go_package = "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb;cxpb"; 36option java_multiple_files = true; 37option java_outer_classname = "FlowProto"; 38option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; 39option objc_class_prefix = "DF"; 40option ruby_package = "Google::Cloud::Dialogflow::CX::V3beta1"; 41 42// Service for managing [Flows][google.cloud.dialogflow.cx.v3beta1.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: "/v3beta1/{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: "/v3beta1/{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: "/v3beta1/{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: "/v3beta1/{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: "/v3beta1/{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: "/v3beta1/{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: "/v3beta1/{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: "/v3beta1/{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.v3beta1.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: "/v3beta1/{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.v3beta1.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: "/v3beta1/{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 // Settings for multi-lingual agents. 260 message MultiLanguageSettings { 261 // Optional. Enable multi-language detection for this flow. This can be set 262 // only if [agent level multi language 263 // setting][Agent.enable_multi_language_training] is enabled. 264 bool enable_multi_language_detection = 1 265 [(google.api.field_behavior) = OPTIONAL]; 266 267 // Optional. Agent will respond in the detected language if the detected 268 // language code is in the supported resolved languages for this flow. This 269 // will be used only if multi-language training is enabled in the 270 // [agent][google.cloud.dialogflow.cx.v3beta1.Agent.enable_multi_language_training] 271 // and multi-language detection is enabled in the 272 // [flow][google.cloud.dialogflow.cx.v3beta1.Flow.MultiLanguageSettings.enable_multi_language_detection]. 273 // The supported languages must be a subset of the languages supported by 274 // the agent. 275 repeated string supported_response_language_codes = 2 276 [(google.api.field_behavior) = OPTIONAL]; 277 } 278 279 // The unique identifier of the flow. 280 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 281 // ID>/flows/<Flow ID>`. 282 string name = 1; 283 284 // Required. The human-readable name of the flow. 285 string display_name = 2 [(google.api.field_behavior) = REQUIRED]; 286 287 // The description of the flow. The maximum length is 500 characters. If 288 // exceeded, the request is rejected. 289 string description = 3; 290 291 // A flow's transition routes serve two purposes: 292 // 293 // * They are responsible for matching the user's first utterances in the 294 // flow. 295 // * They are inherited by every page's [transition 296 // routes][Page.transition_routes] and can support use cases such as the user 297 // saying "help" or "can I talk to a human?", which can be handled in a common 298 // way regardless of the current page. Transition routes defined in the page 299 // have higher priority than those defined in the flow. 300 // 301 // TransitionRoutes are evalauted in the following order: 302 // 303 // * TransitionRoutes with intent specified. 304 // * TransitionRoutes with only condition specified. 305 // 306 // TransitionRoutes with intent specified are inherited by pages in the flow. 307 repeated TransitionRoute transition_routes = 4; 308 309 // A flow's event handlers serve two purposes: 310 // 311 // * They are responsible for handling events (e.g. no match, 312 // webhook errors) in the flow. 313 // * They are inherited by every page's [event 314 // handlers][Page.event_handlers], which can be used to handle common events 315 // regardless of the current page. Event handlers defined in the page 316 // have higher priority than those defined in the flow. 317 // 318 // Unlike 319 // [transition_routes][google.cloud.dialogflow.cx.v3beta1.Flow.transition_routes], 320 // these handlers are evaluated on a first-match basis. The first one that 321 // matches the event get executed, with the rest being ignored. 322 repeated EventHandler event_handlers = 10; 323 324 // A flow's transition route group serve two purposes: 325 // 326 // * They are responsible for matching the user's first utterances in the 327 // flow. 328 // * They are inherited by every page's [transition 329 // route groups][Page.transition_route_groups]. Transition route groups 330 // defined in the page have higher priority than those defined in the flow. 331 // 332 // Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent 333 // ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>` 334 // or `projects/<Project ID>/locations/<Location ID>/agents/<Agent 335 // ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level 336 // groups. 337 repeated string transition_route_groups = 15 338 [(google.api.resource_reference) = { 339 type: "dialogflow.googleapis.com/TransitionRouteGroup" 340 }]; 341 342 // NLU related settings of the flow. 343 NluSettings nlu_settings = 11; 344 345 // Hierarchical advanced settings for this flow. The settings exposed at the 346 // lower level overrides the settings exposed at the higher level. 347 AdvancedSettings advanced_settings = 14; 348 349 // Optional. Knowledge connector configuration. 350 KnowledgeConnectorSettings knowledge_connector_settings = 18 351 [(google.api.field_behavior) = OPTIONAL]; 352 353 // Optional. Multi-lingual agent settings for this flow. 354 MultiLanguageSettings multi_language_settings = 28 355 [(google.api.field_behavior) = OPTIONAL]; 356} 357 358// The request message for 359// [Flows.CreateFlow][google.cloud.dialogflow.cx.v3beta1.Flows.CreateFlow]. 360message CreateFlowRequest { 361 // Required. The agent to create a flow for. 362 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`. 363 string parent = 1 [ 364 (google.api.field_behavior) = REQUIRED, 365 (google.api.resource_reference) = { 366 child_type: "dialogflow.googleapis.com/Flow" 367 } 368 ]; 369 370 // Required. The flow to create. 371 Flow flow = 2 [(google.api.field_behavior) = REQUIRED]; 372 373 // The language of the following fields in `flow`: 374 // 375 // * `Flow.event_handlers.trigger_fulfillment.messages` 376 // * `Flow.event_handlers.trigger_fulfillment.conditional_cases` 377 // * `Flow.transition_routes.trigger_fulfillment.messages` 378 // * `Flow.transition_routes.trigger_fulfillment.conditional_cases` 379 // 380 // If not specified, the agent's default language is used. 381 // [Many 382 // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) 383 // are supported. 384 // Note: languages must be enabled in the agent before they can be used. 385 string language_code = 3; 386} 387 388// The request message for 389// [Flows.DeleteFlow][google.cloud.dialogflow.cx.v3beta1.Flows.DeleteFlow]. 390message DeleteFlowRequest { 391 // Required. The name of the flow to delete. 392 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 393 // ID>/flows/<Flow ID>`. 394 string name = 1 [ 395 (google.api.field_behavior) = REQUIRED, 396 (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } 397 ]; 398 399 // This field has no effect for flows with no incoming transitions. 400 // For flows with incoming transitions: 401 // 402 // * If `force` is set to false, an error will be returned with message 403 // indicating the incoming transitions. 404 // * If `force` is set to true, Dialogflow will remove the flow, as well as 405 // any transitions to the flow (i.e. [Target 406 // flow][EventHandler.target_flow] in event handlers or [Target 407 // flow][TransitionRoute.target_flow] in transition routes that point to 408 // this flow will be cleared). 409 bool force = 2; 410} 411 412// The request message for 413// [Flows.ListFlows][google.cloud.dialogflow.cx.v3beta1.Flows.ListFlows]. 414message ListFlowsRequest { 415 // Required. The agent containing the flows. 416 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`. 417 string parent = 1 [ 418 (google.api.field_behavior) = REQUIRED, 419 (google.api.resource_reference) = { 420 child_type: "dialogflow.googleapis.com/Flow" 421 } 422 ]; 423 424 // The maximum number of items to return in a single page. By default 100 and 425 // at most 1000. 426 int32 page_size = 2; 427 428 // The next_page_token value returned from a previous list request. 429 string page_token = 3; 430 431 // The language to list flows for. The following fields are language 432 // dependent: 433 // 434 // * `Flow.event_handlers.trigger_fulfillment.messages` 435 // * `Flow.event_handlers.trigger_fulfillment.conditional_cases` 436 // * `Flow.transition_routes.trigger_fulfillment.messages` 437 // * `Flow.transition_routes.trigger_fulfillment.conditional_cases` 438 // 439 // If not specified, the agent's default language is used. 440 // [Many 441 // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) 442 // are supported. 443 // Note: languages must be enabled in the agent before they can be used. 444 string language_code = 4; 445} 446 447// The response message for 448// [Flows.ListFlows][google.cloud.dialogflow.cx.v3beta1.Flows.ListFlows]. 449message ListFlowsResponse { 450 // The list of flows. There will be a maximum number of items returned based 451 // on the page_size field in the request. 452 repeated Flow flows = 1; 453 454 // Token to retrieve the next page of results, or empty if there are no more 455 // results in the list. 456 string next_page_token = 2; 457} 458 459// The response message for 460// [Flows.GetFlow][google.cloud.dialogflow.cx.v3beta1.Flows.GetFlow]. 461message GetFlowRequest { 462 // Required. The name of the flow to get. 463 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 464 // ID>/flows/<Flow ID>`. 465 string name = 1 [ 466 (google.api.field_behavior) = REQUIRED, 467 (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } 468 ]; 469 470 // The language to retrieve the flow for. The following fields are language 471 // dependent: 472 // 473 // * `Flow.event_handlers.trigger_fulfillment.messages` 474 // * `Flow.event_handlers.trigger_fulfillment.conditional_cases` 475 // * `Flow.transition_routes.trigger_fulfillment.messages` 476 // * `Flow.transition_routes.trigger_fulfillment.conditional_cases` 477 // 478 // If not specified, the agent's default language is used. 479 // [Many 480 // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) 481 // are supported. 482 // Note: languages must be enabled in the agent before they can be used. 483 string language_code = 2; 484} 485 486// The request message for 487// [Flows.UpdateFlow][google.cloud.dialogflow.cx.v3beta1.Flows.UpdateFlow]. 488message UpdateFlowRequest { 489 // Required. The flow to update. 490 Flow flow = 1 [(google.api.field_behavior) = REQUIRED]; 491 492 // The mask to control which fields get updated. If the mask is not present, 493 // all fields will be updated. 494 google.protobuf.FieldMask update_mask = 2; 495 496 // The language of the following fields in `flow`: 497 // 498 // * `Flow.event_handlers.trigger_fulfillment.messages` 499 // * `Flow.event_handlers.trigger_fulfillment.conditional_cases` 500 // * `Flow.transition_routes.trigger_fulfillment.messages` 501 // * `Flow.transition_routes.trigger_fulfillment.conditional_cases` 502 // 503 // If not specified, the agent's default language is used. 504 // [Many 505 // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) 506 // are supported. 507 // Note: languages must be enabled in the agent before they can be used. 508 string language_code = 3; 509} 510 511// The request message for 512// [Flows.TrainFlow][google.cloud.dialogflow.cx.v3beta1.Flows.TrainFlow]. 513message TrainFlowRequest { 514 // Required. The flow to train. 515 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 516 // ID>/flows/<Flow ID>`. 517 string name = 1 [ 518 (google.api.field_behavior) = REQUIRED, 519 (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } 520 ]; 521} 522 523// The request message for 524// [Flows.ValidateFlow][google.cloud.dialogflow.cx.v3beta1.Flows.ValidateFlow]. 525message ValidateFlowRequest { 526 // Required. The flow to validate. 527 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 528 // ID>/flows/<Flow ID>`. 529 string name = 1 [ 530 (google.api.field_behavior) = REQUIRED, 531 (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } 532 ]; 533 534 // If not specified, the agent's default language is used. 535 string language_code = 2; 536} 537 538// The request message for 539// [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowValidationResult]. 540message GetFlowValidationResultRequest { 541 // Required. The flow name. 542 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 543 // ID>/flows/<Flow ID>/validationResult`. 544 string name = 1 [ 545 (google.api.field_behavior) = REQUIRED, 546 (google.api.resource_reference) = { 547 type: "dialogflow.googleapis.com/FlowValidationResult" 548 } 549 ]; 550 551 // If not specified, the agent's default language is used. 552 string language_code = 2; 553} 554 555// The response message for 556// [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowValidationResult]. 557message FlowValidationResult { 558 option (google.api.resource) = { 559 type: "dialogflow.googleapis.com/FlowValidationResult" 560 pattern: "projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/validationResult" 561 }; 562 563 // The unique identifier of the flow validation result. 564 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 565 // ID>/flows/<Flow ID>/validationResult`. 566 string name = 1; 567 568 // Contains all validation messages. 569 repeated ValidationMessage validation_messages = 2; 570 571 // Last time the flow was validated. 572 google.protobuf.Timestamp update_time = 3; 573} 574 575// The request message for 576// [Flows.ImportFlow][google.cloud.dialogflow.cx.v3beta1.Flows.ImportFlow]. 577message ImportFlowRequest { 578 // Import option. 579 enum ImportOption { 580 // Unspecified. Treated as `KEEP`. 581 IMPORT_OPTION_UNSPECIFIED = 0; 582 583 // Always respect settings in exported flow content. It may cause a 584 // import failure if some settings (e.g. custom NLU) are not supported in 585 // the agent to import into. 586 KEEP = 1; 587 588 // Fallback to default settings if some settings are not supported in the 589 // agent to import into. E.g. Standard NLU will be used if custom NLU is 590 // not available. 591 FALLBACK = 2; 592 } 593 594 // Required. The agent to import the flow into. 595 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`. 596 string parent = 1 [ 597 (google.api.field_behavior) = REQUIRED, 598 (google.api.resource_reference) = { 599 child_type: "dialogflow.googleapis.com/Flow" 600 } 601 ]; 602 603 // Required. The flow to import. 604 oneof flow { 605 // The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI 606 // to import flow from. The format of this URI must be 607 // `gs://<bucket-name>/<object-name>`. 608 // 609 // Dialogflow performs a read operation for the Cloud Storage object 610 // on the caller's behalf, so your request authentication must 611 // have read permissions for the object. For more information, see 612 // [Dialogflow access 613 // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). 614 string flow_uri = 2; 615 616 // Uncompressed raw byte content for flow. 617 bytes flow_content = 3; 618 } 619 620 // Flow import mode. If not specified, `KEEP` is assumed. 621 ImportOption import_option = 4; 622 623 // Optional. Specifies the import strategy used when resolving resource 624 // conflicts. 625 FlowImportStrategy flow_import_strategy = 5 626 [(google.api.field_behavior) = OPTIONAL]; 627} 628 629// The flow import strategy used for resource conflict resolution associated 630// with an 631// [ImportFlowRequest][google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest]. 632message FlowImportStrategy { 633 // Optional. Global flow import strategy for resource conflict resolution. The 634 // import Import strategy for resource conflict resolution, applied globally 635 // throughout the flow. It will be applied for all 636 // display name conflicts in the imported content. If not specified, 637 // 'CREATE_NEW' is assumed. 638 ImportStrategy global_import_strategy = 1 639 [(google.api.field_behavior) = OPTIONAL]; 640} 641 642// The response message for 643// [Flows.ImportFlow][google.cloud.dialogflow.cx.v3beta1.Flows.ImportFlow]. 644message ImportFlowResponse { 645 // The unique identifier of the new flow. 646 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 647 // ID>/flows/<Flow ID>`. 648 string flow = 1 [ 649 (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } 650 ]; 651} 652 653// The request message for 654// [Flows.ExportFlow][google.cloud.dialogflow.cx.v3beta1.Flows.ExportFlow]. 655message ExportFlowRequest { 656 // Required. The name of the flow to export. 657 // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent 658 // ID>/flows/<Flow ID>`. 659 string name = 1 [ 660 (google.api.field_behavior) = REQUIRED, 661 (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } 662 ]; 663 664 // Optional. The [Google Cloud 665 // Storage](https://cloud.google.com/storage/docs/) URI to export the flow to. 666 // The format of this URI must be `gs://<bucket-name>/<object-name>`. If left 667 // unspecified, the serialized flow is returned inline. 668 // 669 // Dialogflow performs a write operation for the Cloud Storage object 670 // on the caller's behalf, so your request authentication must 671 // have write permissions for the object. For more information, see 672 // [Dialogflow access 673 // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). 674 string flow_uri = 2 [(google.api.field_behavior) = OPTIONAL]; 675 676 // Optional. Whether to export flows referenced by the specified flow. 677 bool include_referenced_flows = 4 [(google.api.field_behavior) = OPTIONAL]; 678} 679 680// The response message for 681// [Flows.ExportFlow][google.cloud.dialogflow.cx.v3beta1.Flows.ExportFlow]. 682message ExportFlowResponse { 683 // The exported flow. 684 oneof flow { 685 // The URI to a file containing the exported flow. This field is populated 686 // only if `flow_uri` is specified in 687 // [ExportFlowRequest][google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest]. 688 string flow_uri = 1; 689 690 // Uncompressed raw byte content for flow. 691 bytes flow_content = 2; 692 } 693} 694