flow.proto 24 KB

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