transition_route_group.proto 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  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/protobuf/empty.proto";
  22. import "google/protobuf/field_mask.proto";
  23. option cc_enable_arenas = true;
  24. option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1";
  25. option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1;cx";
  26. option java_multiple_files = true;
  27. option java_outer_classname = "TransitionRouteGroupProto";
  28. option java_package = "com.google.cloud.dialogflow.cx.v3beta1";
  29. option objc_class_prefix = "DF";
  30. option ruby_package = "Google::Cloud::Dialogflow::CX::V3beta1";
  31. // Service for managing [TransitionRouteGroups][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
  32. service TransitionRouteGroups {
  33. option (google.api.default_host) = "dialogflow.googleapis.com";
  34. option (google.api.oauth_scopes) =
  35. "https://www.googleapis.com/auth/cloud-platform,"
  36. "https://www.googleapis.com/auth/dialogflow";
  37. // Returns the list of all transition route groups in the specified flow.
  38. rpc ListTransitionRouteGroups(ListTransitionRouteGroupsRequest) returns (ListTransitionRouteGroupsResponse) {
  39. option (google.api.http) = {
  40. get: "/v3beta1/{parent=projects/*/locations/*/agents/*/flows/*}/transitionRouteGroups"
  41. };
  42. option (google.api.method_signature) = "parent";
  43. }
  44. // Retrieves the specified [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
  45. rpc GetTransitionRouteGroup(GetTransitionRouteGroupRequest) returns (TransitionRouteGroup) {
  46. option (google.api.http) = {
  47. get: "/v3beta1/{name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}"
  48. };
  49. option (google.api.method_signature) = "name";
  50. }
  51. // Creates an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] in the specified flow.
  52. //
  53. // Note: You should always train a flow prior to sending it queries. See the
  54. // [training
  55. // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
  56. rpc CreateTransitionRouteGroup(CreateTransitionRouteGroupRequest) returns (TransitionRouteGroup) {
  57. option (google.api.http) = {
  58. post: "/v3beta1/{parent=projects/*/locations/*/agents/*/flows/*}/transitionRouteGroups"
  59. body: "transition_route_group"
  60. };
  61. option (google.api.method_signature) = "parent,transition_route_group";
  62. }
  63. // Updates the specified [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
  64. //
  65. // Note: You should always train a flow prior to sending it queries. See the
  66. // [training
  67. // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
  68. rpc UpdateTransitionRouteGroup(UpdateTransitionRouteGroupRequest) returns (TransitionRouteGroup) {
  69. option (google.api.http) = {
  70. patch: "/v3beta1/{transition_route_group.name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}"
  71. body: "transition_route_group"
  72. };
  73. option (google.api.method_signature) = "transition_route_group,update_mask";
  74. }
  75. // Deletes the specified [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
  76. //
  77. // Note: You should always train a flow prior to sending it queries. See the
  78. // [training
  79. // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
  80. rpc DeleteTransitionRouteGroup(DeleteTransitionRouteGroupRequest) returns (google.protobuf.Empty) {
  81. option (google.api.http) = {
  82. delete: "/v3beta1/{name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}"
  83. };
  84. option (google.api.method_signature) = "name";
  85. }
  86. }
  87. // An TransitionRouteGroup represents a group of
  88. // [`TransitionRoutes`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute] to be used by a [Page][google.cloud.dialogflow.cx.v3beta1.Page].
  89. message TransitionRouteGroup {
  90. option (google.api.resource) = {
  91. type: "dialogflow.googleapis.com/TransitionRouteGroup"
  92. pattern: "projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}"
  93. };
  94. // The unique identifier of the transition route group.
  95. // [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroups.CreateTransitionRouteGroup] populates the name
  96. // automatically.
  97. // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
  98. // ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`.
  99. string name = 1;
  100. // Required. The human-readable name of the transition route group, unique within
  101. // the flow. The display name can be no longer than 30 characters.
  102. string display_name = 2 [(google.api.field_behavior) = REQUIRED];
  103. // Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
  104. repeated TransitionRoute transition_routes = 5;
  105. }
  106. // The request message for [TransitionRouteGroups.ListTransitionRouteGroups][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroups.ListTransitionRouteGroups].
  107. message ListTransitionRouteGroupsRequest {
  108. // Required. The flow to list all transition route groups for.
  109. // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
  110. // ID>/flows/<Flow ID>`.
  111. string parent = 1 [
  112. (google.api.field_behavior) = REQUIRED,
  113. (google.api.resource_reference) = {
  114. child_type: "dialogflow.googleapis.com/TransitionRouteGroup"
  115. }
  116. ];
  117. // The maximum number of items to return in a single page. By default 100 and
  118. // at most 1000.
  119. int32 page_size = 2;
  120. // The next_page_token value returned from a previous list request.
  121. string page_token = 3;
  122. // The language to list transition route groups for. The following fields are
  123. // language dependent:
  124. //
  125. // * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages`
  126. // *
  127. // `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases`
  128. //
  129. // If not specified, the agent's default language is used.
  130. // [Many
  131. // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
  132. // are supported.
  133. // Note: languages must be enabled in the agent before they can be used.
  134. string language_code = 4;
  135. }
  136. // The response message for [TransitionRouteGroups.ListTransitionRouteGroups][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroups.ListTransitionRouteGroups].
  137. message ListTransitionRouteGroupsResponse {
  138. // The list of transition route groups. There will be a maximum number of
  139. // items returned based on the page_size field in the request. The list may in
  140. // some cases be empty or contain fewer entries than page_size even if this
  141. // isn't the last page.
  142. repeated TransitionRouteGroup transition_route_groups = 1;
  143. // Token to retrieve the next page of results, or empty if there are no more
  144. // results in the list.
  145. string next_page_token = 2;
  146. }
  147. // The request message for [TransitionRouteGroups.GetTransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroups.GetTransitionRouteGroup].
  148. message GetTransitionRouteGroupRequest {
  149. // Required. The name of the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
  150. // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
  151. // ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`.
  152. string name = 1 [
  153. (google.api.field_behavior) = REQUIRED,
  154. (google.api.resource_reference) = {
  155. type: "dialogflow.googleapis.com/TransitionRouteGroup"
  156. }
  157. ];
  158. // The language to retrieve the transition route group for. The following
  159. // fields are language dependent:
  160. //
  161. // * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages`
  162. // *
  163. // `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases`
  164. //
  165. // If not specified, the agent's default language is used.
  166. // [Many
  167. // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
  168. // are supported.
  169. // Note: languages must be enabled in the agent before they can be used.
  170. string language_code = 2;
  171. }
  172. // The request message for [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroups.CreateTransitionRouteGroup].
  173. message CreateTransitionRouteGroupRequest {
  174. // Required. The flow to create an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] for.
  175. // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
  176. // ID>/flows/<Flow ID>`.
  177. string parent = 1 [
  178. (google.api.field_behavior) = REQUIRED,
  179. (google.api.resource_reference) = {
  180. child_type: "dialogflow.googleapis.com/TransitionRouteGroup"
  181. }
  182. ];
  183. // Required. The transition route group to create.
  184. TransitionRouteGroup transition_route_group = 2 [(google.api.field_behavior) = REQUIRED];
  185. // The language of the following fields in `TransitionRouteGroup`:
  186. //
  187. // * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages`
  188. // *
  189. // `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases`
  190. //
  191. // If not specified, the agent's default language is used.
  192. // [Many
  193. // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
  194. // are supported.
  195. // Note: languages must be enabled in the agent before they can be used.
  196. string language_code = 3;
  197. }
  198. // The request message for [TransitionRouteGroups.UpdateTransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroups.UpdateTransitionRouteGroup].
  199. message UpdateTransitionRouteGroupRequest {
  200. // Required. The transition route group to update.
  201. TransitionRouteGroup transition_route_group = 1 [(google.api.field_behavior) = REQUIRED];
  202. // The mask to control which fields get updated.
  203. google.protobuf.FieldMask update_mask = 2;
  204. // The language of the following fields in `TransitionRouteGroup`:
  205. //
  206. // * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages`
  207. // *
  208. // `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases`
  209. //
  210. // If not specified, the agent's default language is used.
  211. // [Many
  212. // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
  213. // are supported.
  214. // Note: languages must be enabled in the agent before they can be used.
  215. string language_code = 3;
  216. }
  217. // The request message for [TransitionRouteGroups.DeleteTransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroups.DeleteTransitionRouteGroup].
  218. message DeleteTransitionRouteGroupRequest {
  219. // Required. The name of the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] to delete.
  220. // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
  221. // ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`.
  222. string name = 1 [
  223. (google.api.field_behavior) = REQUIRED,
  224. (google.api.resource_reference) = {
  225. type: "dialogflow.googleapis.com/TransitionRouteGroup"
  226. }
  227. ];
  228. // This field has no effect for transition route group that no page is using.
  229. // If the transition route group is referenced by any page:
  230. //
  231. // * If `force` is set to false, an error will be returned with message
  232. // indicating pages that reference the transition route group.
  233. // * If `force` is set to true, Dialogflow will remove the transition route
  234. // group, as well as any reference to it.
  235. bool force = 2;
  236. }