xref: /aosp_15_r20/external/googleapis/google/api/expr/v1alpha1/explain.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.api.expr.v1alpha1;
18
19import "google/api/expr/v1alpha1/value.proto";
20
21option cc_enable_arenas = true;
22option go_package = "google.golang.org/genproto/googleapis/api/expr/v1alpha1;expr";
23option java_multiple_files = true;
24option java_outer_classname = "ExplainProto";
25option java_package = "com.google.api.expr.v1alpha1";
26
27// Values of intermediate expressions produced when evaluating expression.
28// Deprecated, use `EvalState` instead.
29message Explain {
30  option deprecated = true;
31
32  // ID and value index of one step.
33  message ExprStep {
34    // ID of corresponding Expr node.
35    int64 id = 1;
36
37    // Index of the value in the values list.
38    int32 value_index = 2;
39  }
40
41  // All of the observed values.
42  //
43  // The field value_index is an index in the values list.
44  // Separating values from steps is needed to remove redundant values.
45  repeated Value values = 1;
46
47  // List of steps.
48  //
49  // Repeated evaluations of the same expression generate new ExprStep
50  // instances. The order of such ExprStep instances matches the order of
51  // elements returned by Comprehension.iter_range.
52  repeated ExprStep expr_steps = 2;
53}
54