xref: /aosp_15_r20/external/googleapis/google/cloud/dialogflow/v2/validation_result.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
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.v2;
18
19option cc_enable_arenas = true;
20option csharp_namespace = "Google.Cloud.Dialogflow.V2";
21option go_package = "cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpb";
22option java_multiple_files = true;
23option java_outer_classname = "ValidationResultProto";
24option java_package = "com.google.cloud.dialogflow.v2";
25option objc_class_prefix = "DF";
26
27// Represents a single validation error.
28message ValidationError {
29  // Represents a level of severity.
30  enum Severity {
31    // Not specified. This value should never be used.
32    SEVERITY_UNSPECIFIED = 0;
33
34    // The agent doesn't follow Dialogflow best practices.
35    INFO = 1;
36
37    // The agent may not behave as expected.
38    WARNING = 2;
39
40    // The agent may experience partial failures.
41    ERROR = 3;
42
43    // The agent may completely fail.
44    CRITICAL = 4;
45  }
46
47  // The severity of the error.
48  Severity severity = 1;
49
50  // The names of the entries that the error is associated with.
51  // Format:
52  //
53  // - `projects/<Project ID>/agent`, if the error is associated with the entire
54  // agent.
55  // - `projects/<Project ID>/agent/intents/<Intent ID>`, if the error is
56  // associated with certain intents.
57  // - `projects/<Project ID>/agent/intents/<Intent
58  // Id>/trainingPhrases/<Training Phrase ID>`, if the error is associated with
59  // certain intent training phrases.
60  // - `projects/<Project ID>/agent/intents/<Intent Id>/parameters/<Parameter
61  // ID>`, if the error is associated with certain intent parameters.
62  // - `projects/<Project ID>/agent/entities/<Entity ID>`, if the error is
63  // associated with certain entities.
64  repeated string entries = 3;
65
66  // The detailed error message.
67  string error_message = 4;
68}
69
70// Represents the output of agent validation.
71message ValidationResult {
72  // Contains all validation errors.
73  repeated ValidationError validation_errors = 1;
74}
75