@@ -116,6 +116,33 @@ service Flows {
116116 };
117117 option (google.api.method_signature ) = "name" ;
118118 }
119+
120+ // Imports the specified flow to the specified agent from a binary file.
121+ rpc ImportFlow (ImportFlowRequest ) returns (google.longrunning.Operation ) {
122+ option (google.api.http ) = {
123+ post : "/v3/{parent=projects/*/locations/*/agents/*}/flows:import"
124+ body : "*"
125+ };
126+ option (google.longrunning.operation_info ) = {
127+ response_type : "ImportFlowResponse"
128+ metadata_type : "google.protobuf.Struct"
129+ };
130+ }
131+
132+ // Exports the specified flow to a binary file.
133+ //
134+ // Note that resources (e.g. intents, entities, webhooks) that the flow
135+ // references will also be exported.
136+ rpc ExportFlow (ExportFlowRequest ) returns (google.longrunning.Operation ) {
137+ option (google.api.http ) = {
138+ post : "/v3/{name=projects/*/locations/*/agents/*/flows/*}:export"
139+ body : "*"
140+ };
141+ option (google.longrunning.operation_info ) = {
142+ response_type : "ExportFlowResponse"
143+ metadata_type : "google.protobuf.Struct"
144+ };
145+ }
119146}
120147
121148// Settings related to NLU.
@@ -260,7 +287,9 @@ message CreateFlowRequest {
260287 // The language of the following fields in `flow`:
261288 //
262289 // * `Flow.event_handlers.trigger_fulfillment.messages`
290+ // * `Flow.event_handlers.trigger_fulfillment.conditional_cases`
263291 // * `Flow.transition_routes.trigger_fulfillment.messages`
292+ // * `Flow.transition_routes.trigger_fulfillment.conditional_cases`
264293 //
265294 // If not specified, the agent's default language is used.
266295 // [Many
@@ -317,7 +346,9 @@ message ListFlowsRequest {
317346 // dependent:
318347 //
319348 // * `Flow.event_handlers.trigger_fulfillment.messages`
349+ // * `Flow.event_handlers.trigger_fulfillment.conditional_cases`
320350 // * `Flow.transition_routes.trigger_fulfillment.messages`
351+ // * `Flow.transition_routes.trigger_fulfillment.conditional_cases`
321352 //
322353 // If not specified, the agent's default language is used.
323354 // [Many
@@ -354,7 +385,9 @@ message GetFlowRequest {
354385 // dependent:
355386 //
356387 // * `Flow.event_handlers.trigger_fulfillment.messages`
388+ // * `Flow.event_handlers.trigger_fulfillment.conditional_cases`
357389 // * `Flow.transition_routes.trigger_fulfillment.messages`
390+ // * `Flow.transition_routes.trigger_fulfillment.conditional_cases`
358391 //
359392 // If not specified, the agent's default language is used.
360393 // [Many
@@ -376,7 +409,9 @@ message UpdateFlowRequest {
376409 // The language of the following fields in `flow`:
377410 //
378411 // * `Flow.event_handlers.trigger_fulfillment.messages`
412+ // * `Flow.event_handlers.trigger_fulfillment.conditional_cases`
379413 // * `Flow.transition_routes.trigger_fulfillment.messages`
414+ // * `Flow.transition_routes.trigger_fulfillment.conditional_cases`
380415 //
381416 // If not specified, the agent's default language is used.
382417 // [Many
@@ -449,3 +484,90 @@ message FlowValidationResult {
449484 // Last time the flow was validated.
450485 google.protobuf.Timestamp update_time = 3 ;
451486}
487+
488+ // The request message for [Flows.ImportFlow][google.cloud.dialogflow.cx.v3.Flows.ImportFlow].
489+ message ImportFlowRequest {
490+ // Import option.
491+ enum ImportOption {
492+ // Unspecified. Treated as `KEEP`.
493+ IMPORT_OPTION_UNSPECIFIED = 0 ;
494+
495+ // Always respect settings in exported flow content. It may cause a
496+ // import failure if some settings (e.g. custom NLU) are not supported in
497+ // the agent to import into.
498+ KEEP = 1 ;
499+
500+ // Fallback to default settings if some settings are not supported in the
501+ // agent to import into. E.g. Standard NLU will be used if custom NLU is
502+ // not available.
503+ FALLBACK = 2 ;
504+ }
505+
506+ // Required. The agent to import the flow into.
507+ // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
508+ string parent = 1 [
509+ (google.api.field_behavior ) = REQUIRED ,
510+ (google.api.resource_reference ) = {
511+ child_type : "dialogflow.googleapis.com/Flow"
512+ }
513+ ];
514+
515+ // Required. The flow to import.
516+ oneof flow {
517+ // The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
518+ // to import flow from. The format of this URI must be
519+ // `gs://<bucket-name>/<object-name>`.
520+ string flow_uri = 2 ;
521+
522+ // Uncompressed raw byte content for flow.
523+ bytes flow_content = 3 ;
524+ }
525+
526+ // Flow import mode. If not specified, `KEEP` is assumed.
527+ ImportOption import_option = 4 ;
528+ }
529+
530+ // The response message for [Flows.ImportFlow][google.cloud.dialogflow.cx.v3.Flows.ImportFlow].
531+ message ImportFlowResponse {
532+ // The unique identifier of the new flow.
533+ // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
534+ // ID>/flows/<Flow ID>`.
535+ string flow = 1 [(google.api.resource_reference ) = {
536+ type : "dialogflow.googleapis.com/Flow"
537+ }];
538+ }
539+
540+ // The request message for [Flows.ExportFlow][google.cloud.dialogflow.cx.v3.Flows.ExportFlow].
541+ message ExportFlowRequest {
542+ // Required. The name of the flow to export.
543+ // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
544+ // ID>/flows/<Flow ID>`.
545+ string name = 1 [
546+ (google.api.field_behavior ) = REQUIRED ,
547+ (google.api.resource_reference ) = {
548+ type : "dialogflow.googleapis.com/Flow"
549+ }
550+ ];
551+
552+ // Optional. The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to
553+ // export the flow to. The format of this URI must be
554+ // `gs://<bucket-name>/<object-name>`.
555+ // If left unspecified, the serialized flow is returned inline.
556+ string flow_uri = 2 [(google.api.field_behavior ) = OPTIONAL ];
557+
558+ // Optional. Whether to export flows referenced by the specified flow.
559+ bool include_referenced_flows = 4 [(google.api.field_behavior ) = OPTIONAL ];
560+ }
561+
562+ // The response message for [Flows.ExportFlow][google.cloud.dialogflow.cx.v3.Flows.ExportFlow].
563+ message ExportFlowResponse {
564+ // The exported flow.
565+ oneof flow {
566+ // The URI to a file containing the exported flow. This field is populated
567+ // only if `flow_uri` is specified in [ExportFlowRequest][google.cloud.dialogflow.cx.v3.ExportFlowRequest].
568+ string flow_uri = 1 ;
569+
570+ // Uncompressed raw byte content for flow.
571+ bytes flow_content = 2 ;
572+ }
573+ }
0 commit comments