You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

800 rivejä
30 KiB

  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/api/expr/v1alpha1/conformance_service.proto
  3. package expr // import "google.golang.org/genproto/googleapis/api/expr/v1alpha1"
  4. import proto "github.com/golang/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. import status "google.golang.org/genproto/googleapis/rpc/status"
  8. import (
  9. context "golang.org/x/net/context"
  10. grpc "google.golang.org/grpc"
  11. )
  12. // Reference imports to suppress errors if they are not otherwise used.
  13. var _ = proto.Marshal
  14. var _ = fmt.Errorf
  15. var _ = math.Inf
  16. // This is a compile-time assertion to ensure that this generated file
  17. // is compatible with the proto package it is being compiled against.
  18. // A compilation error at this line likely means your copy of the
  19. // proto package needs to be updated.
  20. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  21. // Severities of issues.
  22. type IssueDetails_Severity int32
  23. const (
  24. // An unspecified severity.
  25. IssueDetails_SEVERITY_UNSPECIFIED IssueDetails_Severity = 0
  26. // Deprecation issue for statements and method that may no longer be
  27. // supported or maintained.
  28. IssueDetails_DEPRECATION IssueDetails_Severity = 1
  29. // Warnings such as: unused variables.
  30. IssueDetails_WARNING IssueDetails_Severity = 2
  31. // Errors such as: unmatched curly braces or variable redefinition.
  32. IssueDetails_ERROR IssueDetails_Severity = 3
  33. )
  34. var IssueDetails_Severity_name = map[int32]string{
  35. 0: "SEVERITY_UNSPECIFIED",
  36. 1: "DEPRECATION",
  37. 2: "WARNING",
  38. 3: "ERROR",
  39. }
  40. var IssueDetails_Severity_value = map[string]int32{
  41. "SEVERITY_UNSPECIFIED": 0,
  42. "DEPRECATION": 1,
  43. "WARNING": 2,
  44. "ERROR": 3,
  45. }
  46. func (x IssueDetails_Severity) String() string {
  47. return proto.EnumName(IssueDetails_Severity_name, int32(x))
  48. }
  49. func (IssueDetails_Severity) EnumDescriptor() ([]byte, []int) {
  50. return fileDescriptor_conformance_service_61e1e6f4037f9b36, []int{6, 0}
  51. }
  52. // Request message for the Parse method.
  53. type ParseRequest struct {
  54. // Required. Source text in CEL syntax.
  55. CelSource string `protobuf:"bytes,1,opt,name=cel_source,json=celSource,proto3" json:"cel_source,omitempty"`
  56. // Tag for version of CEL syntax, for future use.
  57. SyntaxVersion string `protobuf:"bytes,2,opt,name=syntax_version,json=syntaxVersion,proto3" json:"syntax_version,omitempty"`
  58. // File or resource for source text, used in
  59. // [SourceInfo][google.api.expr.v1alpha1.SourceInfo].
  60. SourceLocation string `protobuf:"bytes,3,opt,name=source_location,json=sourceLocation,proto3" json:"source_location,omitempty"`
  61. // Prevent macro expansion. See "Macros" in Language Defiinition.
  62. DisableMacros bool `protobuf:"varint,4,opt,name=disable_macros,json=disableMacros,proto3" json:"disable_macros,omitempty"`
  63. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  64. XXX_unrecognized []byte `json:"-"`
  65. XXX_sizecache int32 `json:"-"`
  66. }
  67. func (m *ParseRequest) Reset() { *m = ParseRequest{} }
  68. func (m *ParseRequest) String() string { return proto.CompactTextString(m) }
  69. func (*ParseRequest) ProtoMessage() {}
  70. func (*ParseRequest) Descriptor() ([]byte, []int) {
  71. return fileDescriptor_conformance_service_61e1e6f4037f9b36, []int{0}
  72. }
  73. func (m *ParseRequest) XXX_Unmarshal(b []byte) error {
  74. return xxx_messageInfo_ParseRequest.Unmarshal(m, b)
  75. }
  76. func (m *ParseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  77. return xxx_messageInfo_ParseRequest.Marshal(b, m, deterministic)
  78. }
  79. func (dst *ParseRequest) XXX_Merge(src proto.Message) {
  80. xxx_messageInfo_ParseRequest.Merge(dst, src)
  81. }
  82. func (m *ParseRequest) XXX_Size() int {
  83. return xxx_messageInfo_ParseRequest.Size(m)
  84. }
  85. func (m *ParseRequest) XXX_DiscardUnknown() {
  86. xxx_messageInfo_ParseRequest.DiscardUnknown(m)
  87. }
  88. var xxx_messageInfo_ParseRequest proto.InternalMessageInfo
  89. func (m *ParseRequest) GetCelSource() string {
  90. if m != nil {
  91. return m.CelSource
  92. }
  93. return ""
  94. }
  95. func (m *ParseRequest) GetSyntaxVersion() string {
  96. if m != nil {
  97. return m.SyntaxVersion
  98. }
  99. return ""
  100. }
  101. func (m *ParseRequest) GetSourceLocation() string {
  102. if m != nil {
  103. return m.SourceLocation
  104. }
  105. return ""
  106. }
  107. func (m *ParseRequest) GetDisableMacros() bool {
  108. if m != nil {
  109. return m.DisableMacros
  110. }
  111. return false
  112. }
  113. // Response message for the Parse method.
  114. type ParseResponse struct {
  115. // The parsed representation, or unset if parsing failed.
  116. ParsedExpr *ParsedExpr `protobuf:"bytes,1,opt,name=parsed_expr,json=parsedExpr,proto3" json:"parsed_expr,omitempty"`
  117. // Any number of issues with [StatusDetails][] as the details.
  118. Issues []*status.Status `protobuf:"bytes,2,rep,name=issues,proto3" json:"issues,omitempty"`
  119. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  120. XXX_unrecognized []byte `json:"-"`
  121. XXX_sizecache int32 `json:"-"`
  122. }
  123. func (m *ParseResponse) Reset() { *m = ParseResponse{} }
  124. func (m *ParseResponse) String() string { return proto.CompactTextString(m) }
  125. func (*ParseResponse) ProtoMessage() {}
  126. func (*ParseResponse) Descriptor() ([]byte, []int) {
  127. return fileDescriptor_conformance_service_61e1e6f4037f9b36, []int{1}
  128. }
  129. func (m *ParseResponse) XXX_Unmarshal(b []byte) error {
  130. return xxx_messageInfo_ParseResponse.Unmarshal(m, b)
  131. }
  132. func (m *ParseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  133. return xxx_messageInfo_ParseResponse.Marshal(b, m, deterministic)
  134. }
  135. func (dst *ParseResponse) XXX_Merge(src proto.Message) {
  136. xxx_messageInfo_ParseResponse.Merge(dst, src)
  137. }
  138. func (m *ParseResponse) XXX_Size() int {
  139. return xxx_messageInfo_ParseResponse.Size(m)
  140. }
  141. func (m *ParseResponse) XXX_DiscardUnknown() {
  142. xxx_messageInfo_ParseResponse.DiscardUnknown(m)
  143. }
  144. var xxx_messageInfo_ParseResponse proto.InternalMessageInfo
  145. func (m *ParseResponse) GetParsedExpr() *ParsedExpr {
  146. if m != nil {
  147. return m.ParsedExpr
  148. }
  149. return nil
  150. }
  151. func (m *ParseResponse) GetIssues() []*status.Status {
  152. if m != nil {
  153. return m.Issues
  154. }
  155. return nil
  156. }
  157. // Request message for the Check method.
  158. type CheckRequest struct {
  159. // Required. The parsed representation of the CEL program.
  160. ParsedExpr *ParsedExpr `protobuf:"bytes,1,opt,name=parsed_expr,json=parsedExpr,proto3" json:"parsed_expr,omitempty"`
  161. // Declarations of types for external variables and functions.
  162. // Required if program uses external variables or functions
  163. // not in the default environment.
  164. TypeEnv []*Decl `protobuf:"bytes,2,rep,name=type_env,json=typeEnv,proto3" json:"type_env,omitempty"`
  165. // The protocol buffer context. See "Name Resolution" in the
  166. // Language Definition.
  167. Container string `protobuf:"bytes,3,opt,name=container,proto3" json:"container,omitempty"`
  168. // If true, use only the declarations in
  169. // [type_env][google.api.expr.v1alpha1.CheckRequest.type_env]. If false
  170. // (default), add declarations for the standard definitions to the type
  171. // environment. See "Standard Definitions" in the Language Definition.
  172. NoStdEnv bool `protobuf:"varint,4,opt,name=no_std_env,json=noStdEnv,proto3" json:"no_std_env,omitempty"`
  173. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  174. XXX_unrecognized []byte `json:"-"`
  175. XXX_sizecache int32 `json:"-"`
  176. }
  177. func (m *CheckRequest) Reset() { *m = CheckRequest{} }
  178. func (m *CheckRequest) String() string { return proto.CompactTextString(m) }
  179. func (*CheckRequest) ProtoMessage() {}
  180. func (*CheckRequest) Descriptor() ([]byte, []int) {
  181. return fileDescriptor_conformance_service_61e1e6f4037f9b36, []int{2}
  182. }
  183. func (m *CheckRequest) XXX_Unmarshal(b []byte) error {
  184. return xxx_messageInfo_CheckRequest.Unmarshal(m, b)
  185. }
  186. func (m *CheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  187. return xxx_messageInfo_CheckRequest.Marshal(b, m, deterministic)
  188. }
  189. func (dst *CheckRequest) XXX_Merge(src proto.Message) {
  190. xxx_messageInfo_CheckRequest.Merge(dst, src)
  191. }
  192. func (m *CheckRequest) XXX_Size() int {
  193. return xxx_messageInfo_CheckRequest.Size(m)
  194. }
  195. func (m *CheckRequest) XXX_DiscardUnknown() {
  196. xxx_messageInfo_CheckRequest.DiscardUnknown(m)
  197. }
  198. var xxx_messageInfo_CheckRequest proto.InternalMessageInfo
  199. func (m *CheckRequest) GetParsedExpr() *ParsedExpr {
  200. if m != nil {
  201. return m.ParsedExpr
  202. }
  203. return nil
  204. }
  205. func (m *CheckRequest) GetTypeEnv() []*Decl {
  206. if m != nil {
  207. return m.TypeEnv
  208. }
  209. return nil
  210. }
  211. func (m *CheckRequest) GetContainer() string {
  212. if m != nil {
  213. return m.Container
  214. }
  215. return ""
  216. }
  217. func (m *CheckRequest) GetNoStdEnv() bool {
  218. if m != nil {
  219. return m.NoStdEnv
  220. }
  221. return false
  222. }
  223. // Response message for the Check method.
  224. type CheckResponse struct {
  225. // The annotated representation, or unset if checking failed.
  226. CheckedExpr *CheckedExpr `protobuf:"bytes,1,opt,name=checked_expr,json=checkedExpr,proto3" json:"checked_expr,omitempty"`
  227. // Any number of issues with [StatusDetails][] as the details.
  228. Issues []*status.Status `protobuf:"bytes,2,rep,name=issues,proto3" json:"issues,omitempty"`
  229. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  230. XXX_unrecognized []byte `json:"-"`
  231. XXX_sizecache int32 `json:"-"`
  232. }
  233. func (m *CheckResponse) Reset() { *m = CheckResponse{} }
  234. func (m *CheckResponse) String() string { return proto.CompactTextString(m) }
  235. func (*CheckResponse) ProtoMessage() {}
  236. func (*CheckResponse) Descriptor() ([]byte, []int) {
  237. return fileDescriptor_conformance_service_61e1e6f4037f9b36, []int{3}
  238. }
  239. func (m *CheckResponse) XXX_Unmarshal(b []byte) error {
  240. return xxx_messageInfo_CheckResponse.Unmarshal(m, b)
  241. }
  242. func (m *CheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  243. return xxx_messageInfo_CheckResponse.Marshal(b, m, deterministic)
  244. }
  245. func (dst *CheckResponse) XXX_Merge(src proto.Message) {
  246. xxx_messageInfo_CheckResponse.Merge(dst, src)
  247. }
  248. func (m *CheckResponse) XXX_Size() int {
  249. return xxx_messageInfo_CheckResponse.Size(m)
  250. }
  251. func (m *CheckResponse) XXX_DiscardUnknown() {
  252. xxx_messageInfo_CheckResponse.DiscardUnknown(m)
  253. }
  254. var xxx_messageInfo_CheckResponse proto.InternalMessageInfo
  255. func (m *CheckResponse) GetCheckedExpr() *CheckedExpr {
  256. if m != nil {
  257. return m.CheckedExpr
  258. }
  259. return nil
  260. }
  261. func (m *CheckResponse) GetIssues() []*status.Status {
  262. if m != nil {
  263. return m.Issues
  264. }
  265. return nil
  266. }
  267. // Request message for the Eval method.
  268. type EvalRequest struct {
  269. // Required. Either the parsed or annotated representation of the CEL program.
  270. //
  271. // Types that are valid to be assigned to ExprKind:
  272. // *EvalRequest_ParsedExpr
  273. // *EvalRequest_CheckedExpr
  274. ExprKind isEvalRequest_ExprKind `protobuf_oneof:"expr_kind"`
  275. // Bindings for the external variables. The types SHOULD be compatible
  276. // with the type environment in
  277. // [CheckRequest][google.api.expr.v1alpha1.CheckRequest], if checked.
  278. Bindings map[string]*ExprValue `protobuf:"bytes,3,rep,name=bindings,proto3" json:"bindings,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
  279. // SHOULD be the same container as used in
  280. // [CheckRequest][google.api.expr.v1alpha1.CheckRequest], if checked.
  281. Container string `protobuf:"bytes,4,opt,name=container,proto3" json:"container,omitempty"`
  282. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  283. XXX_unrecognized []byte `json:"-"`
  284. XXX_sizecache int32 `json:"-"`
  285. }
  286. func (m *EvalRequest) Reset() { *m = EvalRequest{} }
  287. func (m *EvalRequest) String() string { return proto.CompactTextString(m) }
  288. func (*EvalRequest) ProtoMessage() {}
  289. func (*EvalRequest) Descriptor() ([]byte, []int) {
  290. return fileDescriptor_conformance_service_61e1e6f4037f9b36, []int{4}
  291. }
  292. func (m *EvalRequest) XXX_Unmarshal(b []byte) error {
  293. return xxx_messageInfo_EvalRequest.Unmarshal(m, b)
  294. }
  295. func (m *EvalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  296. return xxx_messageInfo_EvalRequest.Marshal(b, m, deterministic)
  297. }
  298. func (dst *EvalRequest) XXX_Merge(src proto.Message) {
  299. xxx_messageInfo_EvalRequest.Merge(dst, src)
  300. }
  301. func (m *EvalRequest) XXX_Size() int {
  302. return xxx_messageInfo_EvalRequest.Size(m)
  303. }
  304. func (m *EvalRequest) XXX_DiscardUnknown() {
  305. xxx_messageInfo_EvalRequest.DiscardUnknown(m)
  306. }
  307. var xxx_messageInfo_EvalRequest proto.InternalMessageInfo
  308. type isEvalRequest_ExprKind interface {
  309. isEvalRequest_ExprKind()
  310. }
  311. type EvalRequest_ParsedExpr struct {
  312. ParsedExpr *ParsedExpr `protobuf:"bytes,1,opt,name=parsed_expr,json=parsedExpr,proto3,oneof"`
  313. }
  314. type EvalRequest_CheckedExpr struct {
  315. CheckedExpr *CheckedExpr `protobuf:"bytes,2,opt,name=checked_expr,json=checkedExpr,proto3,oneof"`
  316. }
  317. func (*EvalRequest_ParsedExpr) isEvalRequest_ExprKind() {}
  318. func (*EvalRequest_CheckedExpr) isEvalRequest_ExprKind() {}
  319. func (m *EvalRequest) GetExprKind() isEvalRequest_ExprKind {
  320. if m != nil {
  321. return m.ExprKind
  322. }
  323. return nil
  324. }
  325. func (m *EvalRequest) GetParsedExpr() *ParsedExpr {
  326. if x, ok := m.GetExprKind().(*EvalRequest_ParsedExpr); ok {
  327. return x.ParsedExpr
  328. }
  329. return nil
  330. }
  331. func (m *EvalRequest) GetCheckedExpr() *CheckedExpr {
  332. if x, ok := m.GetExprKind().(*EvalRequest_CheckedExpr); ok {
  333. return x.CheckedExpr
  334. }
  335. return nil
  336. }
  337. func (m *EvalRequest) GetBindings() map[string]*ExprValue {
  338. if m != nil {
  339. return m.Bindings
  340. }
  341. return nil
  342. }
  343. func (m *EvalRequest) GetContainer() string {
  344. if m != nil {
  345. return m.Container
  346. }
  347. return ""
  348. }
  349. // XXX_OneofFuncs is for the internal use of the proto package.
  350. func (*EvalRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
  351. return _EvalRequest_OneofMarshaler, _EvalRequest_OneofUnmarshaler, _EvalRequest_OneofSizer, []interface{}{
  352. (*EvalRequest_ParsedExpr)(nil),
  353. (*EvalRequest_CheckedExpr)(nil),
  354. }
  355. }
  356. func _EvalRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  357. m := msg.(*EvalRequest)
  358. // expr_kind
  359. switch x := m.ExprKind.(type) {
  360. case *EvalRequest_ParsedExpr:
  361. b.EncodeVarint(1<<3 | proto.WireBytes)
  362. if err := b.EncodeMessage(x.ParsedExpr); err != nil {
  363. return err
  364. }
  365. case *EvalRequest_CheckedExpr:
  366. b.EncodeVarint(2<<3 | proto.WireBytes)
  367. if err := b.EncodeMessage(x.CheckedExpr); err != nil {
  368. return err
  369. }
  370. case nil:
  371. default:
  372. return fmt.Errorf("EvalRequest.ExprKind has unexpected type %T", x)
  373. }
  374. return nil
  375. }
  376. func _EvalRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  377. m := msg.(*EvalRequest)
  378. switch tag {
  379. case 1: // expr_kind.parsed_expr
  380. if wire != proto.WireBytes {
  381. return true, proto.ErrInternalBadWireType
  382. }
  383. msg := new(ParsedExpr)
  384. err := b.DecodeMessage(msg)
  385. m.ExprKind = &EvalRequest_ParsedExpr{msg}
  386. return true, err
  387. case 2: // expr_kind.checked_expr
  388. if wire != proto.WireBytes {
  389. return true, proto.ErrInternalBadWireType
  390. }
  391. msg := new(CheckedExpr)
  392. err := b.DecodeMessage(msg)
  393. m.ExprKind = &EvalRequest_CheckedExpr{msg}
  394. return true, err
  395. default:
  396. return false, nil
  397. }
  398. }
  399. func _EvalRequest_OneofSizer(msg proto.Message) (n int) {
  400. m := msg.(*EvalRequest)
  401. // expr_kind
  402. switch x := m.ExprKind.(type) {
  403. case *EvalRequest_ParsedExpr:
  404. s := proto.Size(x.ParsedExpr)
  405. n += 1 // tag and wire
  406. n += proto.SizeVarint(uint64(s))
  407. n += s
  408. case *EvalRequest_CheckedExpr:
  409. s := proto.Size(x.CheckedExpr)
  410. n += 1 // tag and wire
  411. n += proto.SizeVarint(uint64(s))
  412. n += s
  413. case nil:
  414. default:
  415. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  416. }
  417. return n
  418. }
  419. // Response message for the Eval method.
  420. type EvalResponse struct {
  421. // The execution result, or unset if execution couldn't start.
  422. Result *ExprValue `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
  423. // Any number of issues with [StatusDetails][] as the details.
  424. // Note that CEL execution errors are reified into
  425. // [ExprValue][google.api.expr.v1alpha1.ExprValue]. Nevertheless, we'll allow
  426. // out-of-band issues to be raised, which also makes the replies more regular.
  427. Issues []*status.Status `protobuf:"bytes,2,rep,name=issues,proto3" json:"issues,omitempty"`
  428. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  429. XXX_unrecognized []byte `json:"-"`
  430. XXX_sizecache int32 `json:"-"`
  431. }
  432. func (m *EvalResponse) Reset() { *m = EvalResponse{} }
  433. func (m *EvalResponse) String() string { return proto.CompactTextString(m) }
  434. func (*EvalResponse) ProtoMessage() {}
  435. func (*EvalResponse) Descriptor() ([]byte, []int) {
  436. return fileDescriptor_conformance_service_61e1e6f4037f9b36, []int{5}
  437. }
  438. func (m *EvalResponse) XXX_Unmarshal(b []byte) error {
  439. return xxx_messageInfo_EvalResponse.Unmarshal(m, b)
  440. }
  441. func (m *EvalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  442. return xxx_messageInfo_EvalResponse.Marshal(b, m, deterministic)
  443. }
  444. func (dst *EvalResponse) XXX_Merge(src proto.Message) {
  445. xxx_messageInfo_EvalResponse.Merge(dst, src)
  446. }
  447. func (m *EvalResponse) XXX_Size() int {
  448. return xxx_messageInfo_EvalResponse.Size(m)
  449. }
  450. func (m *EvalResponse) XXX_DiscardUnknown() {
  451. xxx_messageInfo_EvalResponse.DiscardUnknown(m)
  452. }
  453. var xxx_messageInfo_EvalResponse proto.InternalMessageInfo
  454. func (m *EvalResponse) GetResult() *ExprValue {
  455. if m != nil {
  456. return m.Result
  457. }
  458. return nil
  459. }
  460. func (m *EvalResponse) GetIssues() []*status.Status {
  461. if m != nil {
  462. return m.Issues
  463. }
  464. return nil
  465. }
  466. // Warnings or errors in service execution are represented by
  467. // [google.rpc.Status][google.rpc.Status] messages, with the following message
  468. // in the details field.
  469. type IssueDetails struct {
  470. // The severity of the issue.
  471. Severity IssueDetails_Severity `protobuf:"varint,1,opt,name=severity,proto3,enum=google.api.expr.v1alpha1.IssueDetails_Severity" json:"severity,omitempty"`
  472. // Position in the source, if known.
  473. Position *SourcePosition `protobuf:"bytes,2,opt,name=position,proto3" json:"position,omitempty"`
  474. // Expression ID from [Expr][google.api.expr.v1alpha1.Expr], 0 if unknown.
  475. Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"`
  476. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  477. XXX_unrecognized []byte `json:"-"`
  478. XXX_sizecache int32 `json:"-"`
  479. }
  480. func (m *IssueDetails) Reset() { *m = IssueDetails{} }
  481. func (m *IssueDetails) String() string { return proto.CompactTextString(m) }
  482. func (*IssueDetails) ProtoMessage() {}
  483. func (*IssueDetails) Descriptor() ([]byte, []int) {
  484. return fileDescriptor_conformance_service_61e1e6f4037f9b36, []int{6}
  485. }
  486. func (m *IssueDetails) XXX_Unmarshal(b []byte) error {
  487. return xxx_messageInfo_IssueDetails.Unmarshal(m, b)
  488. }
  489. func (m *IssueDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  490. return xxx_messageInfo_IssueDetails.Marshal(b, m, deterministic)
  491. }
  492. func (dst *IssueDetails) XXX_Merge(src proto.Message) {
  493. xxx_messageInfo_IssueDetails.Merge(dst, src)
  494. }
  495. func (m *IssueDetails) XXX_Size() int {
  496. return xxx_messageInfo_IssueDetails.Size(m)
  497. }
  498. func (m *IssueDetails) XXX_DiscardUnknown() {
  499. xxx_messageInfo_IssueDetails.DiscardUnknown(m)
  500. }
  501. var xxx_messageInfo_IssueDetails proto.InternalMessageInfo
  502. func (m *IssueDetails) GetSeverity() IssueDetails_Severity {
  503. if m != nil {
  504. return m.Severity
  505. }
  506. return IssueDetails_SEVERITY_UNSPECIFIED
  507. }
  508. func (m *IssueDetails) GetPosition() *SourcePosition {
  509. if m != nil {
  510. return m.Position
  511. }
  512. return nil
  513. }
  514. func (m *IssueDetails) GetId() int64 {
  515. if m != nil {
  516. return m.Id
  517. }
  518. return 0
  519. }
  520. func init() {
  521. proto.RegisterType((*ParseRequest)(nil), "google.api.expr.v1alpha1.ParseRequest")
  522. proto.RegisterType((*ParseResponse)(nil), "google.api.expr.v1alpha1.ParseResponse")
  523. proto.RegisterType((*CheckRequest)(nil), "google.api.expr.v1alpha1.CheckRequest")
  524. proto.RegisterType((*CheckResponse)(nil), "google.api.expr.v1alpha1.CheckResponse")
  525. proto.RegisterType((*EvalRequest)(nil), "google.api.expr.v1alpha1.EvalRequest")
  526. proto.RegisterMapType((map[string]*ExprValue)(nil), "google.api.expr.v1alpha1.EvalRequest.BindingsEntry")
  527. proto.RegisterType((*EvalResponse)(nil), "google.api.expr.v1alpha1.EvalResponse")
  528. proto.RegisterType((*IssueDetails)(nil), "google.api.expr.v1alpha1.IssueDetails")
  529. proto.RegisterEnum("google.api.expr.v1alpha1.IssueDetails_Severity", IssueDetails_Severity_name, IssueDetails_Severity_value)
  530. }
  531. // Reference imports to suppress errors if they are not otherwise used.
  532. var _ context.Context
  533. var _ grpc.ClientConn
  534. // This is a compile-time assertion to ensure that this generated file
  535. // is compatible with the grpc package it is being compiled against.
  536. const _ = grpc.SupportPackageIsVersion4
  537. // ConformanceServiceClient is the client API for ConformanceService service.
  538. //
  539. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  540. type ConformanceServiceClient interface {
  541. // Transforms CEL source text into a parsed representation.
  542. Parse(ctx context.Context, in *ParseRequest, opts ...grpc.CallOption) (*ParseResponse, error)
  543. // Runs static checks on a parsed CEL representation and return
  544. // an annotated representation, or a set of issues.
  545. Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error)
  546. // Evaluates a parsed or annotation CEL representation given
  547. // values of external bindings.
  548. Eval(ctx context.Context, in *EvalRequest, opts ...grpc.CallOption) (*EvalResponse, error)
  549. }
  550. type conformanceServiceClient struct {
  551. cc *grpc.ClientConn
  552. }
  553. func NewConformanceServiceClient(cc *grpc.ClientConn) ConformanceServiceClient {
  554. return &conformanceServiceClient{cc}
  555. }
  556. func (c *conformanceServiceClient) Parse(ctx context.Context, in *ParseRequest, opts ...grpc.CallOption) (*ParseResponse, error) {
  557. out := new(ParseResponse)
  558. err := c.cc.Invoke(ctx, "/google.api.expr.v1alpha1.ConformanceService/Parse", in, out, opts...)
  559. if err != nil {
  560. return nil, err
  561. }
  562. return out, nil
  563. }
  564. func (c *conformanceServiceClient) Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) {
  565. out := new(CheckResponse)
  566. err := c.cc.Invoke(ctx, "/google.api.expr.v1alpha1.ConformanceService/Check", in, out, opts...)
  567. if err != nil {
  568. return nil, err
  569. }
  570. return out, nil
  571. }
  572. func (c *conformanceServiceClient) Eval(ctx context.Context, in *EvalRequest, opts ...grpc.CallOption) (*EvalResponse, error) {
  573. out := new(EvalResponse)
  574. err := c.cc.Invoke(ctx, "/google.api.expr.v1alpha1.ConformanceService/Eval", in, out, opts...)
  575. if err != nil {
  576. return nil, err
  577. }
  578. return out, nil
  579. }
  580. // ConformanceServiceServer is the server API for ConformanceService service.
  581. type ConformanceServiceServer interface {
  582. // Transforms CEL source text into a parsed representation.
  583. Parse(context.Context, *ParseRequest) (*ParseResponse, error)
  584. // Runs static checks on a parsed CEL representation and return
  585. // an annotated representation, or a set of issues.
  586. Check(context.Context, *CheckRequest) (*CheckResponse, error)
  587. // Evaluates a parsed or annotation CEL representation given
  588. // values of external bindings.
  589. Eval(context.Context, *EvalRequest) (*EvalResponse, error)
  590. }
  591. func RegisterConformanceServiceServer(s *grpc.Server, srv ConformanceServiceServer) {
  592. s.RegisterService(&_ConformanceService_serviceDesc, srv)
  593. }
  594. func _ConformanceService_Parse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  595. in := new(ParseRequest)
  596. if err := dec(in); err != nil {
  597. return nil, err
  598. }
  599. if interceptor == nil {
  600. return srv.(ConformanceServiceServer).Parse(ctx, in)
  601. }
  602. info := &grpc.UnaryServerInfo{
  603. Server: srv,
  604. FullMethod: "/google.api.expr.v1alpha1.ConformanceService/Parse",
  605. }
  606. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  607. return srv.(ConformanceServiceServer).Parse(ctx, req.(*ParseRequest))
  608. }
  609. return interceptor(ctx, in, info, handler)
  610. }
  611. func _ConformanceService_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  612. in := new(CheckRequest)
  613. if err := dec(in); err != nil {
  614. return nil, err
  615. }
  616. if interceptor == nil {
  617. return srv.(ConformanceServiceServer).Check(ctx, in)
  618. }
  619. info := &grpc.UnaryServerInfo{
  620. Server: srv,
  621. FullMethod: "/google.api.expr.v1alpha1.ConformanceService/Check",
  622. }
  623. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  624. return srv.(ConformanceServiceServer).Check(ctx, req.(*CheckRequest))
  625. }
  626. return interceptor(ctx, in, info, handler)
  627. }
  628. func _ConformanceService_Eval_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  629. in := new(EvalRequest)
  630. if err := dec(in); err != nil {
  631. return nil, err
  632. }
  633. if interceptor == nil {
  634. return srv.(ConformanceServiceServer).Eval(ctx, in)
  635. }
  636. info := &grpc.UnaryServerInfo{
  637. Server: srv,
  638. FullMethod: "/google.api.expr.v1alpha1.ConformanceService/Eval",
  639. }
  640. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  641. return srv.(ConformanceServiceServer).Eval(ctx, req.(*EvalRequest))
  642. }
  643. return interceptor(ctx, in, info, handler)
  644. }
  645. var _ConformanceService_serviceDesc = grpc.ServiceDesc{
  646. ServiceName: "google.api.expr.v1alpha1.ConformanceService",
  647. HandlerType: (*ConformanceServiceServer)(nil),
  648. Methods: []grpc.MethodDesc{
  649. {
  650. MethodName: "Parse",
  651. Handler: _ConformanceService_Parse_Handler,
  652. },
  653. {
  654. MethodName: "Check",
  655. Handler: _ConformanceService_Check_Handler,
  656. },
  657. {
  658. MethodName: "Eval",
  659. Handler: _ConformanceService_Eval_Handler,
  660. },
  661. },
  662. Streams: []grpc.StreamDesc{},
  663. Metadata: "google/api/expr/v1alpha1/conformance_service.proto",
  664. }
  665. func init() {
  666. proto.RegisterFile("google/api/expr/v1alpha1/conformance_service.proto", fileDescriptor_conformance_service_61e1e6f4037f9b36)
  667. }
  668. var fileDescriptor_conformance_service_61e1e6f4037f9b36 = []byte{
  669. // 807 bytes of a gzipped FileDescriptorProto
  670. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x41, 0x6f, 0xdb, 0x36,
  671. 0x18, 0xb5, 0xe4, 0x24, 0xb5, 0x3f, 0xd9, 0xa9, 0x41, 0x0c, 0xa8, 0x61, 0x64, 0x43, 0xa0, 0x2e,
  672. 0x69, 0xb0, 0x83, 0x84, 0xba, 0x97, 0x75, 0xdd, 0xa5, 0xb1, 0xb5, 0xc6, 0xdb, 0x9a, 0x18, 0x74,
  673. 0x97, 0x62, 0xbd, 0x68, 0x8c, 0xc4, 0xb9, 0x44, 0x14, 0x52, 0x23, 0x65, 0xcd, 0xde, 0x69, 0x18,
  674. 0xb0, 0x7f, 0xb2, 0xfd, 0x9b, 0xfd, 0xa0, 0x1d, 0x07, 0x89, 0xb4, 0x63, 0xb7, 0x50, 0xd2, 0x0c,
  675. 0xbd, 0x49, 0x9f, 0xde, 0x7b, 0xfa, 0xde, 0xe3, 0x47, 0x12, 0xfa, 0x53, 0x21, 0xa6, 0x09, 0xf5,
  676. 0x49, 0xca, 0x7c, 0x3a, 0x4f, 0xa5, 0x9f, 0x3f, 0x26, 0x49, 0xfa, 0x96, 0x3c, 0xf6, 0x23, 0xc1,
  677. 0x7f, 0x16, 0xf2, 0x8a, 0xf0, 0x88, 0x86, 0x8a, 0xca, 0x9c, 0x45, 0xd4, 0x4b, 0xa5, 0xc8, 0x04,
  678. 0xea, 0x6a, 0x8e, 0x47, 0x52, 0xe6, 0x15, 0x1c, 0x6f, 0xc9, 0xe9, 0x1d, 0x56, 0xab, 0xbd, 0xa5,
  679. 0xd1, 0x25, 0x8d, 0xb5, 0x42, 0xef, 0x61, 0x25, 0x8e, 0xe6, 0x24, 0x31, 0xa0, 0x83, 0x4a, 0x90,
  680. 0x5a, 0xf0, 0x8c, 0xcc, 0x0d, 0xec, 0x81, 0x81, 0xc9, 0x34, 0xf2, 0x55, 0x46, 0xb2, 0x99, 0xd2,
  681. 0x1f, 0xdc, 0xbf, 0x2c, 0x68, 0x8d, 0x89, 0x54, 0x14, 0xd3, 0x5f, 0x66, 0x54, 0x65, 0xe8, 0x53,
  682. 0x80, 0x88, 0x26, 0xa1, 0x12, 0x33, 0x19, 0xd1, 0xae, 0xb5, 0x6f, 0x1d, 0x35, 0x71, 0x33, 0xa2,
  683. 0xc9, 0xa4, 0x2c, 0xa0, 0x03, 0xd8, 0xd5, 0xc2, 0x61, 0x4e, 0xa5, 0x62, 0x82, 0x77, 0xed, 0x12,
  684. 0xd2, 0xd6, 0xd5, 0x73, 0x5d, 0x44, 0x8f, 0xe0, 0xbe, 0x56, 0x08, 0x13, 0x11, 0x91, 0xac, 0xc0,
  685. 0xd5, 0x4b, 0xdc, 0xae, 0x2e, 0x7f, 0x6f, 0xaa, 0x85, 0x5e, 0xcc, 0x14, 0xb9, 0x48, 0x68, 0x78,
  686. 0x45, 0x22, 0x29, 0x54, 0x77, 0x6b, 0xdf, 0x3a, 0x6a, 0xe0, 0xb6, 0xa9, 0xbe, 0x2c, 0x8b, 0xee,
  687. 0x1f, 0x16, 0xb4, 0x4d, 0x9b, 0x2a, 0x15, 0x5c, 0x51, 0x14, 0x80, 0x93, 0x16, 0x85, 0x38, 0x2c,
  688. 0x6c, 0x97, 0x8d, 0x3a, 0xfd, 0xcf, 0xbd, 0xaa, 0xd4, 0xbd, 0x92, 0x1d, 0x07, 0xf3, 0x54, 0x62,
  689. 0x48, 0x57, 0xcf, 0xe8, 0x0b, 0xd8, 0x61, 0x4a, 0xcd, 0xa8, 0xea, 0xda, 0xfb, 0xf5, 0x23, 0xa7,
  690. 0x8f, 0x96, 0x0a, 0x32, 0x8d, 0xbc, 0x49, 0x99, 0x14, 0x36, 0x08, 0xf7, 0x1f, 0x0b, 0x5a, 0x83,
  691. 0x62, 0x89, 0x96, 0x59, 0x7d, 0xa4, 0x1e, 0x9e, 0x42, 0x23, 0x5b, 0xa4, 0x34, 0xa4, 0x3c, 0x37,
  692. 0x5d, 0x7c, 0x56, 0xad, 0x31, 0xa4, 0x51, 0x82, 0xef, 0x15, 0xf8, 0x80, 0xe7, 0x68, 0x0f, 0x9a,
  693. 0x91, 0xe0, 0x19, 0x61, 0x9c, 0x4a, 0x93, 0xf0, 0x75, 0x01, 0xed, 0x01, 0x70, 0x11, 0xaa, 0x2c,
  694. 0x2e, 0xa5, 0x75, 0xb0, 0x0d, 0x2e, 0x26, 0x59, 0x1c, 0xf0, 0xdc, 0xfd, 0xd3, 0x82, 0xb6, 0xb1,
  695. 0x63, 0x32, 0x3d, 0x81, 0x96, 0x19, 0xc1, 0x75, 0x43, 0x07, 0xd5, 0xcd, 0x0c, 0x34, 0xba, 0x74,
  696. 0xe4, 0x44, 0xd7, 0x2f, 0x77, 0x8a, 0xf5, 0xf7, 0x3a, 0x38, 0x41, 0x4e, 0x92, 0x65, 0xaa, 0x2f,
  697. 0xfe, 0x77, 0xaa, 0x27, 0xb5, 0x8d, 0x5c, 0xbf, 0x7d, 0xc7, 0x8e, 0x7d, 0x07, 0x3b, 0x27, 0xb5,
  698. 0x4d, 0x43, 0x67, 0xd0, 0xb8, 0x60, 0x3c, 0x66, 0x7c, 0xaa, 0xba, 0xf5, 0xd2, 0xd2, 0x93, 0x6a,
  699. 0x9d, 0x35, 0x37, 0xde, 0xb1, 0x61, 0x05, 0x3c, 0x93, 0x0b, 0xbc, 0x12, 0xd9, 0x5c, 0xb9, 0xad,
  700. 0x77, 0x56, 0xae, 0xf7, 0x13, 0xb4, 0x37, 0x88, 0xa8, 0x03, 0xf5, 0x4b, 0xba, 0x30, 0xfb, 0xb1,
  701. 0x78, 0x44, 0x4f, 0x61, 0x3b, 0x27, 0xc9, 0x8c, 0x1a, 0x5b, 0x0f, 0x6f, 0x68, 0x67, 0x9e, 0xca,
  702. 0xf3, 0x02, 0x8a, 0x35, 0xe3, 0x2b, 0xfb, 0x4b, 0xeb, 0xd8, 0x81, 0x66, 0x81, 0x0a, 0x2f, 0x19,
  703. 0x8f, 0xdd, 0x5f, 0xa1, 0xa5, 0x7b, 0x36, 0x83, 0xf0, 0x0c, 0x76, 0x24, 0x55, 0xb3, 0x24, 0x33,
  704. 0xe9, 0x7f, 0x90, 0xb8, 0xa1, 0xdc, 0x6d, 0xed, 0x6d, 0x68, 0x8d, 0x8a, 0xc7, 0x21, 0xcd, 0x08,
  705. 0x4b, 0x14, 0xfa, 0x0e, 0x1a, 0x8a, 0xe6, 0x54, 0xb2, 0x4c, 0x9b, 0xdd, 0xed, 0xfb, 0xd5, 0xff,
  706. 0x5e, 0x67, 0x7a, 0x13, 0x43, 0xc3, 0x2b, 0x01, 0x34, 0x84, 0x46, 0x2a, 0x14, 0xcb, 0x96, 0xc7,
  707. 0x94, 0xd3, 0x3f, 0xaa, 0x16, 0xd3, 0x07, 0xdc, 0xd8, 0xe0, 0xf1, 0x8a, 0x89, 0x76, 0xc1, 0x66,
  708. 0x71, 0xb9, 0xb9, 0xea, 0xd8, 0x66, 0xb1, 0xfb, 0x12, 0x1a, 0xcb, 0x7f, 0xa1, 0x2e, 0x7c, 0x32,
  709. 0x09, 0xce, 0x03, 0x3c, 0x7a, 0xf5, 0x63, 0xf8, 0xc3, 0xe9, 0x64, 0x1c, 0x0c, 0x46, 0xdf, 0x8c,
  710. 0x82, 0x61, 0xa7, 0x86, 0xee, 0x83, 0x33, 0x0c, 0xc6, 0x38, 0x18, 0x3c, 0x7f, 0x35, 0x3a, 0x3b,
  711. 0xed, 0x58, 0xc8, 0x81, 0x7b, 0xaf, 0x9f, 0xe3, 0xd3, 0xd1, 0xe9, 0x8b, 0x8e, 0x8d, 0x9a, 0xb0,
  712. 0x1d, 0x60, 0x7c, 0x86, 0x3b, 0xf5, 0xfe, 0xdf, 0x36, 0xa0, 0xc1, 0xf5, 0x35, 0x32, 0xd1, 0xb7,
  713. 0x08, 0x7a, 0x03, 0xdb, 0xe5, 0x60, 0xa3, 0xc3, 0x5b, 0x26, 0xdf, 0x0c, 0x5a, 0xef, 0xd1, 0xad,
  714. 0x38, 0xbd, 0xb8, 0x6e, 0xad, 0xd0, 0x2e, 0x47, 0xfd, 0x26, 0xed, 0xf5, 0x83, 0xee, 0x26, 0xed,
  715. 0x8d, 0x13, 0xc4, 0xad, 0xa1, 0xd7, 0xb0, 0x55, 0x8c, 0x12, 0x3a, 0xf8, 0xa0, 0xed, 0xd1, 0x3b,
  716. 0xbc, 0x0d, 0xb6, 0x14, 0x3e, 0xfe, 0x0d, 0xf6, 0x22, 0x71, 0x55, 0x09, 0x3f, 0x7e, 0xf0, 0x7e,
  717. 0x88, 0xe3, 0xe2, 0x8a, 0x1b, 0x5b, 0x6f, 0xbe, 0x36, 0xa4, 0xa9, 0x48, 0x08, 0x9f, 0x7a, 0x42,
  718. 0x4e, 0xfd, 0x29, 0xe5, 0xe5, 0x05, 0xe8, 0xeb, 0x4f, 0x24, 0x65, 0xea, 0xfd, 0x3b, 0xf4, 0x59,
  719. 0xf1, 0xf6, 0xaf, 0x65, 0x5d, 0xec, 0x94, 0xd8, 0x27, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xf9,
  720. 0x66, 0xbb, 0xae, 0x09, 0x08, 0x00, 0x00,
  721. }