Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / dialogflow / protos / google / cloud / dialogflow / v2beta1 / session_entity_type.proto
1 // Copyright 2018 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
15 syntax = "proto3";
16
17 package google.cloud.dialogflow.v2beta1;
18
19 import "google/api/annotations.proto";
20 import "google/cloud/dialogflow/v2beta1/entity_type.proto";
21 import "google/protobuf/empty.proto";
22 import "google/protobuf/field_mask.proto";
23
24 option cc_enable_arenas = true;
25 option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1";
26 option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow";
27 option java_multiple_files = true;
28 option java_outer_classname = "SessionEntityTypeProto";
29 option java_package = "com.google.cloud.dialogflow.v2beta1";
30 option objc_class_prefix = "DF";
31
32 // Entities are extracted from user input and represent parameters that are
33 // meaningful to your application. For example, a date range, a proper name
34 // such as a geographic location or landmark, and so on. Entities represent
35 // actionable data for your application.
36 //
37 // Session entity types are referred to as **User** entity types and are
38 // entities that are built for an individual user such as
39 // favorites, preferences, playlists, and so on. You can redefine a session
40 // entity type at the session level.
41 //
42 // For more information about entity types, see the
43 // [Dialogflow documentation](https://dialogflow.com/docs/entities).
44 service SessionEntityTypes {
45   // Returns the list of all session entity types in the specified session.
46   rpc ListSessionEntityTypes(ListSessionEntityTypesRequest)
47       returns (ListSessionEntityTypesResponse) {
48     option (google.api.http) = {
49       get: "/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypes"
50       additional_bindings {
51         get: "/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes"
52       }
53     };
54   }
55
56   // Retrieves the specified session entity type.
57   rpc GetSessionEntityType(GetSessionEntityTypeRequest)
58       returns (SessionEntityType) {
59     option (google.api.http) = {
60       get: "/v2beta1/{name=projects/*/agent/sessions/*/entityTypes/*}"
61       additional_bindings {
62         get: "/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}"
63       }
64     };
65   }
66
67   // Creates a session entity type.
68   rpc CreateSessionEntityType(CreateSessionEntityTypeRequest)
69       returns (SessionEntityType) {
70     option (google.api.http) = {
71       post: "/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypes"
72       body: "session_entity_type"
73       additional_bindings {
74         post: "/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes"
75         body: "session_entity_type"
76       }
77     };
78   }
79
80   // Updates the specified session entity type.
81   rpc UpdateSessionEntityType(UpdateSessionEntityTypeRequest)
82       returns (SessionEntityType) {
83     option (google.api.http) = {
84       patch: "/v2beta1/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}"
85       body: "session_entity_type"
86       additional_bindings {
87         patch: "/v2beta1/{session_entity_type.name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}"
88         body: "session_entity_type"
89       }
90     };
91   }
92
93   // Deletes the specified session entity type.
94   rpc DeleteSessionEntityType(DeleteSessionEntityTypeRequest)
95       returns (google.protobuf.Empty) {
96     option (google.api.http) = {
97       delete: "/v2beta1/{name=projects/*/agent/sessions/*/entityTypes/*}"
98       additional_bindings {
99         delete: "/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}"
100       }
101     };
102   }
103 }
104
105 // Represents a session entity type.
106 //
107 // Extends or replaces a developer entity type at the user session level (we
108 // refer to the entity types defined at the agent level as "developer entity
109 // types").
110 //
111 // Note: session entity types apply to all queries, regardless of the language.
112 message SessionEntityType {
113   // The types of modifications for a session entity type.
114   enum EntityOverrideMode {
115     // Not specified. This value should be never used.
116     ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0;
117
118     // The collection of session entities overrides the collection of entities
119     // in the corresponding developer entity type.
120     ENTITY_OVERRIDE_MODE_OVERRIDE = 1;
121
122     // The collection of session entities extends the collection of entities in
123     // the corresponding developer entity type.
124     // Calls to `ListSessionEntityTypes`, `GetSessionEntityType`,
125     // `CreateSessionEntityType` and `UpdateSessionEntityType` return the full
126     // collection of entities from the developer entity type in the agent's
127     // default language and the session entity type.
128     ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2;
129   }
130
131   // Required. The unique identifier of this session entity type. Format:
132   // `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
133   // Display Name>`, or
134   // `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
135   // ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`.
136   // If `Environment ID` is not specified, we assume default 'draft'
137   // environment. If `User ID` is not specified, we assume default '-' user.
138   string name = 1;
139
140   // Required. Indicates whether the additional data should override or
141   // supplement the developer entity type definition.
142   EntityOverrideMode entity_override_mode = 2;
143
144   // Required. The collection of entities associated with this session entity
145   // type.
146   repeated EntityType.Entity entities = 3;
147 }
148
149 // The request message for
150 // [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2beta1.SessionEntityTypes.ListSessionEntityTypes].
151 message ListSessionEntityTypesRequest {
152   // Required. The session to list all session entity types from.
153   // Format: `projects/<Project ID>/agent/sessions/<Session ID>` or
154   // `projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/
155   // sessions/<Session ID>`.
156   // If `Environment ID` is not specified, we assume default 'draft'
157   // environment. If `User ID` is not specified, we assume default '-' user.
158   string parent = 1;
159
160   // Optional. The maximum number of items to return in a single page. By
161   // default 100 and at most 1000.
162   int32 page_size = 2;
163
164   // Optional. The next_page_token value returned from a previous list request.
165   string page_token = 3;
166 }
167
168 // The response message for
169 // [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2beta1.SessionEntityTypes.ListSessionEntityTypes].
170 message ListSessionEntityTypesResponse {
171   // The list of session entity types. There will be a maximum number of items
172   // returned based on the page_size field in the request.
173   repeated SessionEntityType session_entity_types = 1;
174
175   // Token to retrieve the next page of results, or empty if there are no
176   // more results in the list.
177   string next_page_token = 2;
178 }
179
180 // The request message for
181 // [SessionEntityTypes.GetSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.GetSessionEntityType].
182 message GetSessionEntityTypeRequest {
183   // Required. The name of the session entity type. Format:
184   // `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
185   // Display Name>` or `projects/<Project ID>/agent/environments/<Environment
186   // ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
187   // Name>`. If `Environment ID` is not specified, we assume default 'draft'
188   // environment. If `User ID` is not specified, we assume default '-' user.
189   string name = 1;
190 }
191
192 // The request message for
193 // [SessionEntityTypes.CreateSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.CreateSessionEntityType].
194 message CreateSessionEntityTypeRequest {
195   // Required. The session to create a session entity type for.
196   // Format: `projects/<Project ID>/agent/sessions/<Session ID>` or
197   // `projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/
198   // sessions/<Session ID>`. If `Environment ID` is not specified, we assume
199   // default 'draft' environment. If `User ID` is not specified, we assume
200   // default '-' user.
201   string parent = 1;
202
203   // Required. The session entity type to create.
204   SessionEntityType session_entity_type = 2;
205 }
206
207 // The request message for
208 // [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.UpdateSessionEntityType].
209 message UpdateSessionEntityTypeRequest {
210   // Required. The entity type to update. Format:
211   // `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
212   // Display Name>` or `projects/<Project ID>/agent/environments/<Environment
213   // ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
214   // Name>`. If `Environment ID` is not specified, we assume default 'draft'
215   // environment. If `User ID` is not specified, we assume default '-' user.
216   SessionEntityType session_entity_type = 1;
217
218   // Optional. The mask to control which fields get updated.
219   google.protobuf.FieldMask update_mask = 2;
220 }
221
222 // The request message for
223 // [SessionEntityTypes.DeleteSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.DeleteSessionEntityType].
224 message DeleteSessionEntityTypeRequest {
225   // Required. The name of the entity type to delete. Format:
226   // `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
227   // Display Name>` or `projects/<Project ID>/agent/environments/<Environment
228   // ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
229   // Name>`. If `Environment ID` is not specified, we assume default 'draft'
230   // environment. If `User ID` is not specified, we assume default '-' user.
231   string name = 1;
232 }