/
environment.proto
376 lines (324 loc) · 15.4 KB
/
environment.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.cloud.dialogflow.cx.v3beta1;
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/dialogflow/cx/v3beta1/test_case.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1";
option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1;cx";
option java_multiple_files = true;
option java_outer_classname = "EnvironmentProto";
option java_package = "com.google.cloud.dialogflow.cx.v3beta1";
option objc_class_prefix = "DF";
// Service for managing [Environments][google.cloud.dialogflow.cx.v3beta1.Environment].
service Environments {
option (google.api.default_host) = "dialogflow.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform,"
"https://www.googleapis.com/auth/dialogflow";
// Returns the list of all environments in the specified [Agent][google.cloud.dialogflow.cx.v3beta1.Agent].
rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse) {
option (google.api.http) = {
get: "/v3beta1/{parent=projects/*/locations/*/agents/*}/environments"
};
option (google.api.method_signature) = "parent";
}
// Retrieves the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
rpc GetEnvironment(GetEnvironmentRequest) returns (Environment) {
option (google.api.http) = {
get: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*}"
};
option (google.api.method_signature) = "name";
}
// Creates an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] in the specified [Agent][google.cloud.dialogflow.cx.v3beta1.Agent].
rpc CreateEnvironment(CreateEnvironmentRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v3beta1/{parent=projects/*/locations/*/agents/*}/environments"
body: "environment"
};
option (google.api.method_signature) = "parent,environment";
option (google.longrunning.operation_info) = {
response_type: "Environment"
metadata_type: "google.protobuf.Struct"
};
}
// Updates the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
rpc UpdateEnvironment(UpdateEnvironmentRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
patch: "/v3beta1/{environment.name=projects/*/locations/*/agents/*/environments/*}"
body: "environment"
};
option (google.api.method_signature) = "environment,update_mask";
option (google.longrunning.operation_info) = {
response_type: "Environment"
metadata_type: "google.protobuf.Struct"
};
}
// Deletes the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
rpc DeleteEnvironment(DeleteEnvironmentRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*}"
};
option (google.api.method_signature) = "name";
}
// Looks up the history of the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
rpc LookupEnvironmentHistory(LookupEnvironmentHistoryRequest) returns (LookupEnvironmentHistoryResponse) {
option (google.api.http) = {
get: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*}:lookupEnvironmentHistory"
};
option (google.api.method_signature) = "name";
}
// Kicks off a continuous test under the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
rpc RunContinuousTest(RunContinuousTestRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v3beta1/{environment=projects/*/locations/*/agents/*/environments/*}:runContinuousTest"
body: "*"
};
option (google.longrunning.operation_info) = {
response_type: "RunContinuousTestResponse"
metadata_type: "RunContinuousTestMetadata"
};
}
// Fetches a list of continuous test results for a given environment.
rpc ListContinuousTestResults(ListContinuousTestResultsRequest) returns (ListContinuousTestResultsResponse) {
option (google.api.http) = {
get: "/v3beta1/{parent=projects/*/locations/*/agents/*/environments/*}/continuousTestResults"
};
option (google.api.method_signature) = "parent";
}
}
// Represents an environment for an agent. You can create multiple versions
// of your agent and publish them to separate environments. When you edit an
// agent, you are editing the draft agent. At any point, you can save the draft
// agent as an agent version, which is an immutable snapshot of your agent. When
// you save the draft agent, it is published to the default environment. When
// you create agent versions, you can publish them to custom environments. You
// can create a variety of custom environments for testing, development,
// production, etc.
message Environment {
option (google.api.resource) = {
type: "dialogflow.googleapis.com/Environment"
pattern: "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}"
};
// Configuration for the version.
message VersionConfig {
// Required. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/flows/<Flow ID>/versions/<Version ID>.
string version = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Version"
}
];
}
// The name of the environment.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/environments/<Environment ID>`.
string name = 1;
// Required. The human-readable name of the environment (unique in an agent). Limit of
// 64 characters.
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
// The human-readable description of the environment. The maximum length is
// 500 characters. If exceeded, the request is rejected.
string description = 3;
// Required. A list of configurations for flow versions. You should include version
// configs for all flows that are reachable from [`Start
// Flow`][Agent.start_flow] in the agent. Otherwise, an error will be
// returned.
repeated VersionConfig version_configs = 6 [(google.api.field_behavior) = REQUIRED];
// Output only. Update time of this environment.
google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// The request message for [Environments.ListEnvironments][google.cloud.dialogflow.cx.v3beta1.Environments.ListEnvironments].
message ListEnvironmentsRequest {
// Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to list all environments for.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "dialogflow.googleapis.com/Environment"
}
];
// The maximum number of items to return in a single page. By default 20 and
// at most 100.
int32 page_size = 2;
// The next_page_token value returned from a previous list request.
string page_token = 3;
}
// The response message for [Environments.ListEnvironments][google.cloud.dialogflow.cx.v3beta1.Environments.ListEnvironments].
message ListEnvironmentsResponse {
// The list of environments. There will be a maximum number of items
// returned based on the page_size field in the request. The list may in some
// cases be empty or contain fewer entries than page_size even if this isn't
// the last page.
repeated Environment environments = 1;
// Token to retrieve the next page of results, or empty if there are no more
// results in the list.
string next_page_token = 2;
}
// The request message for [Environments.GetEnvironment][google.cloud.dialogflow.cx.v3beta1.Environments.GetEnvironment].
message GetEnvironmentRequest {
// Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/environments/<Environment ID>`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Environment"
}
];
}
// The request message for [Environments.CreateEnvironment][google.cloud.dialogflow.cx.v3beta1.Environments.CreateEnvironment].
message CreateEnvironmentRequest {
// Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "dialogflow.googleapis.com/Environment"
}
];
// Required. The environment to create.
Environment environment = 2 [(google.api.field_behavior) = REQUIRED];
}
// The request message for [Environments.UpdateEnvironment][google.cloud.dialogflow.cx.v3beta1.Environments.UpdateEnvironment].
message UpdateEnvironmentRequest {
// Required. The environment to update.
Environment environment = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The mask to control which fields get updated.
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
}
// The request message for [Environments.DeleteEnvironment][google.cloud.dialogflow.cx.v3beta1.Environments.DeleteEnvironment].
message DeleteEnvironmentRequest {
// Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/environments/<Environment ID>`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Environment"
}
];
}
// The request message for [Environments.LookupEnvironmentHistory][google.cloud.dialogflow.cx.v3beta1.Environments.LookupEnvironmentHistory].
message LookupEnvironmentHistoryRequest {
// Required. Resource name of the environment to look up the history for.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/environments/<Environment ID>`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Environment"
}
];
// The maximum number of items to return in a single page. By default 100 and
// at most 1000.
int32 page_size = 2;
// The next_page_token value returned from a previous list request.
string page_token = 3;
}
// The response message for [Environments.LookupEnvironmentHistory][google.cloud.dialogflow.cx.v3beta1.Environments.LookupEnvironmentHistory].
message LookupEnvironmentHistoryResponse {
// Represents a list of snapshots for an environment. Time of the snapshots is
// stored in [`update_time`][google.cloud.dialogflow.cx.v3beta1.Environment.update_time].
repeated Environment environments = 1;
// Token to retrieve the next page of results, or empty if there are no more
// results in the list.
string next_page_token = 2;
}
// Represents a result from running a test case in an agent environment.
message ContinuousTestResult {
option (google.api.resource) = {
type: "dialogflow.googleapis.com/ContinuousTestResult"
pattern: "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/continuousTestResults/{continuous_test_result}"
};
// The overall result for a continuous test run in an agent environment.
enum AggregatedTestResult {
// Not specified. Should never be used.
AGGREGATED_TEST_RESULT_UNSPECIFIED = 0;
// All the tests passed.
PASSED = 1;
// At least one test did not pass.
FAILED = 2;
}
// The resource name for the continuous test result. Format:
// `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/environments/<Environment
// ID>/continuousTestResults/<ContinuousTestResult ID>`.
string name = 1;
// The result of this continuous test run, i.e. whether all the tests in this
// continuous test run pass or not.
AggregatedTestResult result = 2;
// A list of individual test case results names in this continuous test run.
repeated string test_case_results = 3 [(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/TestCaseResult"
}];
// Time when the continuous testing run starts.
google.protobuf.Timestamp run_time = 4;
}
// The request message for [Environments.RunContinuousTest][google.cloud.dialogflow.cx.v3beta1.Environments.RunContinuousTest].
message RunContinuousTestRequest {
// Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/environments/<Environment ID>`.
string environment = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Environment"
}
];
}
// The response message for [Environments.RunContinuousTest][google.cloud.dialogflow.cx.v3beta1.Environments.RunContinuousTest].
message RunContinuousTestResponse {
// The result for a continuous test run.
ContinuousTestResult continuous_test_result = 1;
}
// Metadata returned for the [Environments.RunContinuousTest][google.cloud.dialogflow.cx.v3beta1.Environments.RunContinuousTest] long running
// operation.
message RunContinuousTestMetadata {
// The test errors.
repeated TestError errors = 1;
}
// The request message for [Environments.ListContinuousTestResults][google.cloud.dialogflow.cx.v3beta1.Environments.ListContinuousTestResults].
message ListContinuousTestResultsRequest {
// Required. The environment to list results for.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
// environments/<Environment ID>`.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "dialogflow.googleapis.com/ContinuousTestResult"
}
];
// The maximum number of items to return in a single page. By default 100 and
// at most 1000.
int32 page_size = 2;
// The next_page_token value returned from a previous list request.
string page_token = 3;
}
// The response message for [Environments.ListTestCaseResults][].
message ListContinuousTestResultsResponse {
// The list of continuous test results.
repeated ContinuousTestResult continuous_test_results = 1;
// Token to retrieve the next page of results, or empty if there are no more
// results in the list.
string next_page_token = 2;
}