transition_route_group.proto 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  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.v3;
  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/v3/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.V3";
  25. option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx";
  26. option java_multiple_files = true;
  27. option java_outer_classname = "TransitionRouteGroupProto";
  28. option java_package = "com.google.cloud.dialogflow.cx.v3";
  29. option objc_class_prefix = "DF";
  30. option ruby_package = "Google::Cloud::Dialogflow::CX::V3";
  31. // Service for managing [TransitionRouteGroups][google.cloud.dialogflow.cx.v3.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: "/v3/{parent=projects/*/locations/*/agents/*/flows/*}/transitionRouteGroups"
  41. };
  42. option (google.api.method_signature) = "parent";
  43. }
  44. // Retrieves the specified [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
  45. rpc GetTransitionRouteGroup(GetTransitionRouteGroupRequest) returns (TransitionRouteGroup) {
  46. option (google.api.http) = {
  47. get: "/v3/{name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}"
  48. };
  49. option (google.api.method_signature) = "name";
  50. }
  51. // Creates an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.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: "/v3/{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.v3.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: "/v3/{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.v3.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: "/v3/{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.v3.TransitionRoute] to be used by a [Page][google.cloud.dialogflow.cx.v3.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.v3.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.v3.TransitionRouteGroup].
  104. repeated TransitionRoute transition_routes = 5;
  105. }
  106. // The request message for [TransitionRouteGroups.ListTransitionRouteGroups][google.cloud.dialogflow.cx.v3.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. //
  130. // If not specified, the agent's default language is used.
  131. // [Many
  132. // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
  133. // are supported.
  134. // Note: languages must be enabled in the agent before they can be used.
  135. string language_code = 4;
  136. }
  137. // The response message for [TransitionRouteGroups.ListTransitionRouteGroups][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.ListTransitionRouteGroups].
  138. message ListTransitionRouteGroupsResponse {
  139. // The list of transition route groups. There will be a maximum number of
  140. // items returned based on the page_size field in the request. The list may in
  141. // some cases be empty or contain fewer entries than page_size even if this
  142. // isn't the last page.
  143. repeated TransitionRouteGroup transition_route_groups = 1;
  144. // Token to retrieve the next page of results, or empty if there are no more
  145. // results in the list.
  146. string next_page_token = 2;
  147. }
  148. // The request message for [TransitionRouteGroups.GetTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.GetTransitionRouteGroup].
  149. message GetTransitionRouteGroupRequest {
  150. // Required. The name of the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
  151. // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
  152. // ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`.
  153. string name = 1 [
  154. (google.api.field_behavior) = REQUIRED,
  155. (google.api.resource_reference) = {
  156. type: "dialogflow.googleapis.com/TransitionRouteGroup"
  157. }
  158. ];
  159. // The language to retrieve the transition route group for. The following
  160. // fields are language dependent:
  161. //
  162. // * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages`
  163. // *
  164. // `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases`
  165. //
  166. // If not specified, the agent's default language is used.
  167. // [Many
  168. // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
  169. // are supported.
  170. // Note: languages must be enabled in the agent before they can be used.
  171. string language_code = 2;
  172. }
  173. // The request message for [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroup].
  174. message CreateTransitionRouteGroupRequest {
  175. // Required. The flow to create an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] for.
  176. // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
  177. // ID>/flows/<Flow ID>`.
  178. string parent = 1 [
  179. (google.api.field_behavior) = REQUIRED,
  180. (google.api.resource_reference) = {
  181. child_type: "dialogflow.googleapis.com/TransitionRouteGroup"
  182. }
  183. ];
  184. // Required. The transition route group to create.
  185. TransitionRouteGroup transition_route_group = 2 [(google.api.field_behavior) = REQUIRED];
  186. // The language of the following fields in `TransitionRouteGroup`:
  187. //
  188. // * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages`
  189. // *
  190. // `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases`
  191. //
  192. // If not specified, the agent's default language is used.
  193. // [Many
  194. // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
  195. // are supported.
  196. // Note: languages must be enabled in the agent before they can be used.
  197. string language_code = 3;
  198. }
  199. // The request message for [TransitionRouteGroups.UpdateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.UpdateTransitionRouteGroup].
  200. message UpdateTransitionRouteGroupRequest {
  201. // Required. The transition route group to update.
  202. TransitionRouteGroup transition_route_group = 1 [(google.api.field_behavior) = REQUIRED];
  203. // The mask to control which fields get updated.
  204. google.protobuf.FieldMask update_mask = 2;
  205. // The language of the following fields in `TransitionRouteGroup`:
  206. //
  207. // * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages`
  208. // *
  209. // `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases`
  210. //
  211. // If not specified, the agent's default language is used.
  212. // [Many
  213. // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
  214. // are supported.
  215. // Note: languages must be enabled in the agent before they can be used.
  216. string language_code = 3;
  217. }
  218. // The request message for [TransitionRouteGroups.DeleteTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.DeleteTransitionRouteGroup].
  219. message DeleteTransitionRouteGroupRequest {
  220. // Required. The name of the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] to delete.
  221. // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
  222. // ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`.
  223. string name = 1 [
  224. (google.api.field_behavior) = REQUIRED,
  225. (google.api.resource_reference) = {
  226. type: "dialogflow.googleapis.com/TransitionRouteGroup"
  227. }
  228. ];
  229. // This field has no effect for transition route group that no page is using.
  230. // If the transition route group is referenced by any page:
  231. //
  232. // * If `force` is set to false, an error will be returned with message
  233. // indicating pages that reference the transition route group.
  234. // * If `force` is set to true, Dialogflow will remove the transition route
  235. // group, as well as any reference to it.
  236. bool force = 2;
  237. }