| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
package v3 |
| 8 |
|
| 9 |
import ( |
| 10 |
expr "cel.dev/expr" |
| 11 |
_ "github.com/cncf/xds/go/xds/annotations/v3" |
| 12 |
_ "github.com/envoyproxy/protoc-gen-validate/validate" |
| 13 |
v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1" |
| 14 |
protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
| 15 |
protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| 16 |
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" |
| 17 |
reflect "reflect" |
| 18 |
sync "sync" |
| 19 |
unsafe "unsafe" |
| 20 |
) |
| 21 |
|
| 22 |
const ( |
| 23 |
|
| 24 |
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) |
| 25 |
|
| 26 |
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) |
| 27 |
) |
| 28 |
|
| 29 |
type CelExpression struct { |
| 30 |
state protoimpl.MessageState `protogen:"open.v1"` |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
ExprSpecifier isCelExpression_ExprSpecifier `protobuf_oneof:"expr_specifier"` |
| 36 |
CelExprParsed *expr.ParsedExpr `protobuf:"bytes,3,opt,name=cel_expr_parsed,json=celExprParsed,proto3" json:"cel_expr_parsed,omitempty"` |
| 37 |
CelExprChecked *expr.CheckedExpr `protobuf:"bytes,4,opt,name=cel_expr_checked,json=celExprChecked,proto3" json:"cel_expr_checked,omitempty"` |
| 38 |
CelExprString string `protobuf:"bytes,5,opt,name=cel_expr_string,json=celExprString,proto3" json:"cel_expr_string,omitempty"` |
| 39 |
unknownFields protoimpl.UnknownFields |
| 40 |
sizeCache protoimpl.SizeCache |
| 41 |
} |
| 42 |
|
| 43 |
func (x *CelExpression) Reset() { |
| 44 |
*x = CelExpression{} |
| 45 |
mi := &file_xds_type_v3_cel_proto_msgTypes[0] |
| 46 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 47 |
ms.StoreMessageInfo(mi) |
| 48 |
} |
| 49 |
|
| 50 |
func (x *CelExpression) String() string { |
| 51 |
return protoimpl.X.MessageStringOf(x) |
| 52 |
} |
| 53 |
|
| 54 |
func (*CelExpression) ProtoMessage() {} |
| 55 |
|
| 56 |
func (x *CelExpression) ProtoReflect() protoreflect.Message { |
| 57 |
mi := &file_xds_type_v3_cel_proto_msgTypes[0] |
| 58 |
if x != nil { |
| 59 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 60 |
if ms.LoadMessageInfo() == nil { |
| 61 |
ms.StoreMessageInfo(mi) |
| 62 |
} |
| 63 |
return ms |
| 64 |
} |
| 65 |
return mi.MessageOf(x) |
| 66 |
} |
| 67 |
|
| 68 |
|
| 69 |
func (*CelExpression) Descriptor() ([]byte, []int) { |
| 70 |
return file_xds_type_v3_cel_proto_rawDescGZIP(), []int{0} |
| 71 |
} |
| 72 |
|
| 73 |
func (x *CelExpression) GetExprSpecifier() isCelExpression_ExprSpecifier { |
| 74 |
if x != nil { |
| 75 |
return x.ExprSpecifier |
| 76 |
} |
| 77 |
return nil |
| 78 |
} |
| 79 |
|
| 80 |
|
| 81 |
func (x *CelExpression) GetParsedExpr() *v1alpha1.ParsedExpr { |
| 82 |
if x != nil { |
| 83 |
if x, ok := x.ExprSpecifier.(*CelExpression_ParsedExpr); ok { |
| 84 |
return x.ParsedExpr |
| 85 |
} |
| 86 |
} |
| 87 |
return nil |
| 88 |
} |
| 89 |
|
| 90 |
|
| 91 |
func (x *CelExpression) GetCheckedExpr() *v1alpha1.CheckedExpr { |
| 92 |
if x != nil { |
| 93 |
if x, ok := x.ExprSpecifier.(*CelExpression_CheckedExpr); ok { |
| 94 |
return x.CheckedExpr |
| 95 |
} |
| 96 |
} |
| 97 |
return nil |
| 98 |
} |
| 99 |
|
| 100 |
func (x *CelExpression) GetCelExprParsed() *expr.ParsedExpr { |
| 101 |
if x != nil { |
| 102 |
return x.CelExprParsed |
| 103 |
} |
| 104 |
return nil |
| 105 |
} |
| 106 |
|
| 107 |
func (x *CelExpression) GetCelExprChecked() *expr.CheckedExpr { |
| 108 |
if x != nil { |
| 109 |
return x.CelExprChecked |
| 110 |
} |
| 111 |
return nil |
| 112 |
} |
| 113 |
|
| 114 |
func (x *CelExpression) GetCelExprString() string { |
| 115 |
if x != nil { |
| 116 |
return x.CelExprString |
| 117 |
} |
| 118 |
return "" |
| 119 |
} |
| 120 |
|
| 121 |
type isCelExpression_ExprSpecifier interface { |
| 122 |
isCelExpression_ExprSpecifier() |
| 123 |
} |
| 124 |
|
| 125 |
type CelExpression_ParsedExpr struct { |
| 126 |
|
| 127 |
ParsedExpr *v1alpha1.ParsedExpr `protobuf:"bytes,1,opt,name=parsed_expr,json=parsedExpr,proto3,oneof"` |
| 128 |
} |
| 129 |
|
| 130 |
type CelExpression_CheckedExpr struct { |
| 131 |
|
| 132 |
CheckedExpr *v1alpha1.CheckedExpr `protobuf:"bytes,2,opt,name=checked_expr,json=checkedExpr,proto3,oneof"` |
| 133 |
} |
| 134 |
|
| 135 |
func (*CelExpression_ParsedExpr) isCelExpression_ExprSpecifier() {} |
| 136 |
|
| 137 |
func (*CelExpression_CheckedExpr) isCelExpression_ExprSpecifier() {} |
| 138 |
|
| 139 |
type CelExtractString struct { |
| 140 |
state protoimpl.MessageState `protogen:"open.v1"` |
| 141 |
ExprExtract *CelExpression `protobuf:"bytes,1,opt,name=expr_extract,json=exprExtract,proto3" json:"expr_extract,omitempty"` |
| 142 |
DefaultValue *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` |
| 143 |
unknownFields protoimpl.UnknownFields |
| 144 |
sizeCache protoimpl.SizeCache |
| 145 |
} |
| 146 |
|
| 147 |
func (x *CelExtractString) Reset() { |
| 148 |
*x = CelExtractString{} |
| 149 |
mi := &file_xds_type_v3_cel_proto_msgTypes[1] |
| 150 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 151 |
ms.StoreMessageInfo(mi) |
| 152 |
} |
| 153 |
|
| 154 |
func (x *CelExtractString) String() string { |
| 155 |
return protoimpl.X.MessageStringOf(x) |
| 156 |
} |
| 157 |
|
| 158 |
func (*CelExtractString) ProtoMessage() {} |
| 159 |
|
| 160 |
func (x *CelExtractString) ProtoReflect() protoreflect.Message { |
| 161 |
mi := &file_xds_type_v3_cel_proto_msgTypes[1] |
| 162 |
if x != nil { |
| 163 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 164 |
if ms.LoadMessageInfo() == nil { |
| 165 |
ms.StoreMessageInfo(mi) |
| 166 |
} |
| 167 |
return ms |
| 168 |
} |
| 169 |
return mi.MessageOf(x) |
| 170 |
} |
| 171 |
|
| 172 |
|
| 173 |
func (*CelExtractString) Descriptor() ([]byte, []int) { |
| 174 |
return file_xds_type_v3_cel_proto_rawDescGZIP(), []int{1} |
| 175 |
} |
| 176 |
|
| 177 |
func (x *CelExtractString) GetExprExtract() *CelExpression { |
| 178 |
if x != nil { |
| 179 |
return x.ExprExtract |
| 180 |
} |
| 181 |
return nil |
| 182 |
} |
| 183 |
|
| 184 |
func (x *CelExtractString) GetDefaultValue() *wrapperspb.StringValue { |
| 185 |
if x != nil { |
| 186 |
return x.DefaultValue |
| 187 |
} |
| 188 |
return nil |
| 189 |
} |
| 190 |
|
| 191 |
var File_xds_type_v3_cel_proto protoreflect.FileDescriptor |
| 192 |
|
| 193 |
const file_xds_type_v3_cel_proto_rawDesc = "" + |
| 194 |
"\n" + |
| 195 |
"\x15xds/type/v3/cel.proto\x12\vxds.type.v3\x1a&google/api/expr/v1alpha1/checked.proto\x1a%google/api/expr/v1alpha1/syntax.proto\x1a\x16cel/expr/checked.proto\x1a\x15cel/expr/syntax.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1fxds/annotations/v3/status.proto\x1a\x17validate/validate.proto\"\xe5\x02\n" + |
| 196 |
"\rCelExpression\x12K\n" + |
| 197 |
"\vparsed_expr\x18\x01 \x01(\v2$.google.api.expr.v1alpha1.ParsedExprB\x02\x18\x01H\x00R\n" + |
| 198 |
"parsedExpr\x12N\n" + |
| 199 |
"\fchecked_expr\x18\x02 \x01(\v2%.google.api.expr.v1alpha1.CheckedExprB\x02\x18\x01H\x00R\vcheckedExpr\x12<\n" + |
| 200 |
"\x0fcel_expr_parsed\x18\x03 \x01(\v2\x14.cel.expr.ParsedExprR\rcelExprParsed\x12?\n" + |
| 201 |
"\x10cel_expr_checked\x18\x04 \x01(\v2\x15.cel.expr.CheckedExprR\x0ecelExprChecked\x12&\n" + |
| 202 |
"\x0fcel_expr_string\x18\x05 \x01(\tR\rcelExprStringB\x10\n" + |
| 203 |
"\x0eexpr_specifier\"\x9e\x01\n" + |
| 204 |
"\x10CelExtractString\x12G\n" + |
| 205 |
"\fexpr_extract\x18\x01 \x01(\v2\x1a.xds.type.v3.CelExpressionB\b\xfaB\x05\x8a\x01\x02\x10\x01R\vexprExtract\x12A\n" + |
| 206 |
"\rdefault_value\x18\x02 \x01(\v2\x1c.google.protobuf.StringValueR\fdefaultValueBP\xd2Ƥ\xe1\x06\x02\b\x01\n" + |
| 207 |
"\x16com.github.xds.type.v3B\bCelProtoP\x01Z\"github.com/cncf/xds/go/xds/type/v3b\x06proto3" |
| 208 |
|
| 209 |
var ( |
| 210 |
file_xds_type_v3_cel_proto_rawDescOnce sync.Once |
| 211 |
file_xds_type_v3_cel_proto_rawDescData []byte |
| 212 |
) |
| 213 |
|
| 214 |
func file_xds_type_v3_cel_proto_rawDescGZIP() []byte { |
| 215 |
file_xds_type_v3_cel_proto_rawDescOnce.Do(func() { |
| 216 |
file_xds_type_v3_cel_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_xds_type_v3_cel_proto_rawDesc), len(file_xds_type_v3_cel_proto_rawDesc))) |
| 217 |
}) |
| 218 |
return file_xds_type_v3_cel_proto_rawDescData |
| 219 |
} |
| 220 |
|
| 221 |
var file_xds_type_v3_cel_proto_msgTypes = make([]protoimpl.MessageInfo, 2) |
| 222 |
var file_xds_type_v3_cel_proto_goTypes = []any{ |
| 223 |
(*CelExpression)(nil), |
| 224 |
(*CelExtractString)(nil), |
| 225 |
(*v1alpha1.ParsedExpr)(nil), |
| 226 |
(*v1alpha1.CheckedExpr)(nil), |
| 227 |
(*expr.ParsedExpr)(nil), |
| 228 |
(*expr.CheckedExpr)(nil), |
| 229 |
(*wrapperspb.StringValue)(nil), |
| 230 |
} |
| 231 |
var file_xds_type_v3_cel_proto_depIdxs = []int32{ |
| 232 |
2, |
| 233 |
3, |
| 234 |
4, |
| 235 |
5, |
| 236 |
0, |
| 237 |
6, |
| 238 |
6, |
| 239 |
6, |
| 240 |
6, |
| 241 |
6, |
| 242 |
0, |
| 243 |
} |
| 244 |
|
| 245 |
func init() { file_xds_type_v3_cel_proto_init() } |
| 246 |
func file_xds_type_v3_cel_proto_init() { |
| 247 |
if File_xds_type_v3_cel_proto != nil { |
| 248 |
return |
| 249 |
} |
| 250 |
file_xds_type_v3_cel_proto_msgTypes[0].OneofWrappers = []any{ |
| 251 |
(*CelExpression_ParsedExpr)(nil), |
| 252 |
(*CelExpression_CheckedExpr)(nil), |
| 253 |
} |
| 254 |
type x struct{} |
| 255 |
out := protoimpl.TypeBuilder{ |
| 256 |
File: protoimpl.DescBuilder{ |
| 257 |
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| 258 |
RawDescriptor: unsafe.Slice(unsafe.StringData(file_xds_type_v3_cel_proto_rawDesc), len(file_xds_type_v3_cel_proto_rawDesc)), |
| 259 |
NumEnums: 0, |
| 260 |
NumMessages: 2, |
| 261 |
NumExtensions: 0, |
| 262 |
NumServices: 0, |
| 263 |
}, |
| 264 |
GoTypes: file_xds_type_v3_cel_proto_goTypes, |
| 265 |
DependencyIndexes: file_xds_type_v3_cel_proto_depIdxs, |
| 266 |
MessageInfos: file_xds_type_v3_cel_proto_msgTypes, |
| 267 |
}.Build() |
| 268 |
File_xds_type_v3_cel_proto = out.File |
| 269 |
file_xds_type_v3_cel_proto_goTypes = nil |
| 270 |
file_xds_type_v3_cel_proto_depIdxs = nil |
| 271 |
} |