• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.v3;
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/v3/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.V3";
29option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb";
30option java_multiple_files = true;
31option java_outer_classname = "TransitionRouteGroupProto";
32option java_package = "com.google.cloud.dialogflow.cx.v3";
33option objc_class_prefix = "DF";
34option ruby_package = "Google::Cloud::Dialogflow::CX::V3";
35
36// Service for managing
37// [TransitionRouteGroups][google.cloud.dialogflow.cx.v3.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: "/v3/{parent=projects/*/locations/*/agents/*/flows/*}/transitionRouteGroups"
49      additional_bindings {
50        get: "/v3/{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.v3.TransitionRouteGroup].
58  rpc GetTransitionRouteGroup(GetTransitionRouteGroupRequest)
59      returns (TransitionRouteGroup) {
60    option (google.api.http) = {
61      get: "/v3/{name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}"
62      additional_bindings {
63        get: "/v3/{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.v3.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: "/v3/{parent=projects/*/locations/*/agents/*/flows/*}/transitionRouteGroups"
80      body: "transition_route_group"
81      additional_bindings {
82        post: "/v3/{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.v3.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: "/v3/{transition_route_group.name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}"
99      body: "transition_route_group"
100      additional_bindings {
101        patch: "/v3/{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.v3.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: "/v3/{name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}"
118      additional_bindings {
119        delete: "/v3/{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.v3.TransitionRoute] to be
128// used by a [Page][google.cloud.dialogflow.cx.v3.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.v3.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>`
143  // .
144  string name = 1;
145
146  // Required. The human-readable name of the transition route group, unique
147  // within the flow. The display name can be no longer than 30 characters.
148  string display_name = 2 [(google.api.field_behavior) = REQUIRED];
149
150  // Transition routes associated with the
151  // [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
152  repeated TransitionRoute transition_routes = 5;
153}
154
155// The request message for
156// [TransitionRouteGroups.ListTransitionRouteGroups][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.ListTransitionRouteGroups].
157message ListTransitionRouteGroupsRequest {
158  // Required. The flow to list all transition route groups for.
159  // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
160  // ID>/flows/<Flow ID>`
161  // or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
162  string parent = 1 [
163    (google.api.field_behavior) = REQUIRED,
164    (google.api.resource_reference) = {
165      child_type: "dialogflow.googleapis.com/TransitionRouteGroup"
166    }
167  ];
168
169  // The maximum number of items to return in a single page. By default 100 and
170  // at most 1000.
171  int32 page_size = 2;
172
173  // The next_page_token value returned from a previous list request.
174  string page_token = 3;
175
176  // The language to list transition route groups for. The following fields are
177  // language dependent:
178  //
179  // *  `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages`
180  // *
181  // `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases`
182  //
183  //
184  // If not specified, the agent's default language is used.
185  // [Many
186  // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
187  // are supported.
188  // Note: languages must be enabled in the agent before they can be used.
189  string language_code = 4;
190}
191
192// The response message for
193// [TransitionRouteGroups.ListTransitionRouteGroups][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.ListTransitionRouteGroups].
194message ListTransitionRouteGroupsResponse {
195  // The list of transition route groups. There will be a maximum number of
196  // items returned based on the page_size field in the request. The list may in
197  // some cases be empty or contain fewer entries than page_size even if this
198  // isn't the last page.
199  repeated TransitionRouteGroup transition_route_groups = 1;
200
201  // Token to retrieve the next page of results, or empty if there are no more
202  // results in the list.
203  string next_page_token = 2;
204}
205
206// The request message for
207// [TransitionRouteGroups.GetTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.GetTransitionRouteGroup].
208message GetTransitionRouteGroupRequest {
209  // Required. The name of the
210  // [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
211  // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
212  // ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`
213  // or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
214  // ID>/transitionRouteGroups/<Transition Route Group ID>`.
215  string name = 1 [
216    (google.api.field_behavior) = REQUIRED,
217    (google.api.resource_reference) = {
218      type: "dialogflow.googleapis.com/TransitionRouteGroup"
219    }
220  ];
221
222  // The language to retrieve the transition route group for. The following
223  // fields are language dependent:
224  //
225  // *  `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages`
226  // *
227  // `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases`
228  //
229  // If not specified, the agent's default language is used.
230  // [Many
231  // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
232  // are supported.
233  // Note: languages must be enabled in the agent before they can be used.
234  string language_code = 2;
235}
236
237// The request message for
238// [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroup].
239message CreateTransitionRouteGroupRequest {
240  // Required. The flow to create an
241  // [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]
242  // for. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
243  // ID>/flows/<Flow ID>`
244  // or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`
245  // for agent-level groups.
246  string parent = 1 [
247    (google.api.field_behavior) = REQUIRED,
248    (google.api.resource_reference) = {
249      child_type: "dialogflow.googleapis.com/TransitionRouteGroup"
250    }
251  ];
252
253  // Required. The transition route group to create.
254  TransitionRouteGroup transition_route_group = 2
255      [(google.api.field_behavior) = REQUIRED];
256
257  // The language of the following fields in `TransitionRouteGroup`:
258  //
259  // *  `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages`
260  // *
261  // `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases`
262  //
263  // If not specified, the agent's default language is used.
264  // [Many
265  // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
266  // are supported.
267  // Note: languages must be enabled in the agent before they can be used.
268  string language_code = 3;
269}
270
271// The request message for
272// [TransitionRouteGroups.UpdateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.UpdateTransitionRouteGroup].
273message UpdateTransitionRouteGroupRequest {
274  // Required. The transition route group to update.
275  TransitionRouteGroup transition_route_group = 1
276      [(google.api.field_behavior) = REQUIRED];
277
278  // The mask to control which fields get updated.
279  google.protobuf.FieldMask update_mask = 2;
280
281  // The language of the following fields in `TransitionRouteGroup`:
282  //
283  // *  `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages`
284  // *
285  // `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases`
286  //
287  // If not specified, the agent's default language is used.
288  // [Many
289  // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
290  // are supported.
291  // Note: languages must be enabled in the agent before they can be used.
292  string language_code = 3;
293}
294
295// The request message for
296// [TransitionRouteGroups.DeleteTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.DeleteTransitionRouteGroup].
297message DeleteTransitionRouteGroupRequest {
298  // Required. The name of the
299  // [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]
300  // to delete. Format: `projects/<Project ID>/locations/<Location
301  // ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<Transition
302  // Route Group ID>` or `projects/<Project ID>/locations/<Location
303  // ID>/agents/<Agent ID>/transitionRouteGroups/<Transition Route Group ID>`.
304  string name = 1 [
305    (google.api.field_behavior) = REQUIRED,
306    (google.api.resource_reference) = {
307      type: "dialogflow.googleapis.com/TransitionRouteGroup"
308    }
309  ];
310
311  // This field has no effect for transition route group that no page is using.
312  // If the transition route group is referenced by any page:
313  //
314  // *  If `force` is set to false, an error will be returned with message
315  //    indicating pages that reference the transition route group.
316  // *  If `force` is set to true, Dialogflow will remove the transition route
317  //    group, as well as any reference to it.
318  bool force = 2;
319}
320