1- // Copyright 2020 Google LLC
1+ // Copyright 2021 Google LLC
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
1414
1515syntax = "proto3" ;
1616
17- package google.api.expr.v1alpha1 ;
17+ package google.api.expr.conformance. v1alpha1 ;
1818
1919import "google/api/expr/v1alpha1/checked.proto" ;
2020import "google/api/expr/v1alpha1/eval.proto" ;
2121import "google/api/expr/v1alpha1/syntax.proto" ;
2222import "google/rpc/status.proto" ;
23+ import "google/api/client.proto" ;
2324
2425option cc_enable_arenas = true ;
2526option go_package = "google.golang.org/genproto/googleapis/api/expr/conformance/v1alpha1;confpb" ;
2627option java_multiple_files = true ;
2728option java_outer_classname = "ConformanceServiceProto" ;
28- option java_package = "com.google.api.expr.v1alpha1" ;
29+ option java_package = "com.google.api.expr.conformance. v1alpha1" ;
2930
3031// Access a CEL implementation from another process or machine.
3132// A CEL implementation is decomposed as a parser, a static checker,
3233// and an evaluator. Every CEL implementation is expected to provide
3334// a server for this API. The API will be used for conformance testing
3435// and other utilities.
3536service ConformanceService {
37+ option (google.api.default_host ) = "cel.googleapis.com" ;
3638
3739 // Transforms CEL source text into a parsed representation.
3840 rpc Parse (ParseRequest ) returns (ParseResponse ) {
@@ -57,7 +59,7 @@ message ParseRequest {
5759 // Tag for version of CEL syntax, for future use.
5860 string syntax_version = 2 ;
5961
60- // File or resource for source text, used in [SourceInfo][google.api.expr.v1alpha1. SourceInfo].
62+ // File or resource for source text, used in [SourceInfo][google.api.SourceInfo].
6163 string source_location = 3 ;
6264
6365 // Prevent macro expansion. See "Macros" in Language Defiinition.
@@ -67,7 +69,7 @@ message ParseRequest {
6769// Response message for the Parse method.
6870message ParseResponse {
6971 // The parsed representation, or unset if parsing failed.
70- ParsedExpr parsed_expr = 1 ;
72+ google.api.expr.v1alpha1. ParsedExpr parsed_expr = 1 ;
7173
7274 // Any number of issues with [StatusDetails][] as the details.
7375 repeated google.rpc.Status issues = 2 ;
@@ -76,18 +78,18 @@ message ParseResponse {
7678// Request message for the Check method.
7779message CheckRequest {
7880 // Required. The parsed representation of the CEL program.
79- ParsedExpr parsed_expr = 1 ;
81+ google.api.expr.v1alpha1. ParsedExpr parsed_expr = 1 ;
8082
8183 // Declarations of types for external variables and functions.
8284 // Required if program uses external variables or functions
8385 // not in the default environment.
84- repeated Decl type_env = 2 ;
86+ repeated google.api.expr.v1alpha1. Decl type_env = 2 ;
8587
8688 // The protocol buffer context. See "Name Resolution" in the
8789 // Language Definition.
8890 string container = 3 ;
8991
90- // If true, use only the declarations in [type_env][google.api.expr.v1alpha1.CheckRequest.type_env]. If false (default),
92+ // If true, use only the declarations in [type_env][google.api.expr.conformance. v1alpha1.CheckRequest.type_env]. If false (default),
9193 // add declarations for the standard definitions to the type environment. See
9294 // "Standard Definitions" in the Language Definition.
9395 bool no_std_env = 4 ;
@@ -96,7 +98,7 @@ message CheckRequest {
9698// Response message for the Check method.
9799message CheckResponse {
98100 // The annotated representation, or unset if checking failed.
99- CheckedExpr checked_expr = 1 ;
101+ google.api.expr.v1alpha1. CheckedExpr checked_expr = 1 ;
100102
101103 // Any number of issues with [StatusDetails][] as the details.
102104 repeated google.rpc.Status issues = 2 ;
@@ -107,27 +109,27 @@ message EvalRequest {
107109 // Required. Either the parsed or annotated representation of the CEL program.
108110 oneof expr_kind {
109111 // Evaluate based on the parsed representation.
110- ParsedExpr parsed_expr = 1 ;
112+ google.api.expr.v1alpha1. ParsedExpr parsed_expr = 1 ;
111113
112114 // Evaluate based on the checked representation.
113- CheckedExpr checked_expr = 2 ;
115+ google.api.expr.v1alpha1. CheckedExpr checked_expr = 2 ;
114116 }
115117
116118 // Bindings for the external variables. The types SHOULD be compatible
117- // with the type environment in [CheckRequest][google.api.expr.v1alpha1.CheckRequest], if checked.
118- map <string , ExprValue > bindings = 3 ;
119+ // with the type environment in [CheckRequest][google.api.expr.conformance. v1alpha1.CheckRequest], if checked.
120+ map <string , google.api.expr.v1alpha1. ExprValue > bindings = 3 ;
119121
120- // SHOULD be the same container as used in [CheckRequest][google.api.expr.v1alpha1.CheckRequest], if checked.
122+ // SHOULD be the same container as used in [CheckRequest][google.api.expr.conformance. v1alpha1.CheckRequest], if checked.
121123 string container = 4 ;
122124}
123125
124126// Response message for the Eval method.
125127message EvalResponse {
126128 // The execution result, or unset if execution couldn't start.
127- ExprValue result = 1 ;
129+ google.api.expr.v1alpha1. ExprValue result = 1 ;
128130
129131 // Any number of issues with [StatusDetails][] as the details.
130- // Note that CEL execution errors are reified into [ExprValue][google.api.expr.v1alpha1.ExprValue ].
132+ // Note that CEL execution errors are reified into [ExprValue][].
131133 // Nevertheless, we'll allow out-of-band issues to be raised,
132134 // which also makes the replies more regular.
133135 repeated google.rpc.Status issues = 2 ;
@@ -157,8 +159,8 @@ message IssueDetails {
157159 Severity severity = 1 ;
158160
159161 // Position in the source, if known.
160- SourcePosition position = 2 ;
162+ google.api.expr.v1alpha1. SourcePosition position = 2 ;
161163
162- // Expression ID from [Expr][google.api.expr.v1alpha1.Expr ], 0 if unknown.
164+ // Expression ID from [Expr][], 0 if unknown.
163165 int64 id = 3 ;
164166}
0 commit comments