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