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.
 
 
 

471 lines
16 KiB

  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/api/expr/v1beta1/eval.proto
  3. package expr // import "google.golang.org/genproto/googleapis/api/expr/v1beta1"
  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. // Reference imports to suppress errors if they are not otherwise used.
  9. var _ = proto.Marshal
  10. var _ = fmt.Errorf
  11. var _ = math.Inf
  12. // This is a compile-time assertion to ensure that this generated file
  13. // is compatible with the proto package it is being compiled against.
  14. // A compilation error at this line likely means your copy of the
  15. // proto package needs to be updated.
  16. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  17. // The state of an evaluation.
  18. //
  19. // Can represent an initial, partial, or completed state of evaluation.
  20. type EvalState struct {
  21. // The unique values referenced in this message.
  22. Values []*ExprValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
  23. // An ordered list of results.
  24. //
  25. // Tracks the flow of evaluation through the expression.
  26. // May be sparse.
  27. Results []*EvalState_Result `protobuf:"bytes,3,rep,name=results,proto3" json:"results,omitempty"`
  28. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  29. XXX_unrecognized []byte `json:"-"`
  30. XXX_sizecache int32 `json:"-"`
  31. }
  32. func (m *EvalState) Reset() { *m = EvalState{} }
  33. func (m *EvalState) String() string { return proto.CompactTextString(m) }
  34. func (*EvalState) ProtoMessage() {}
  35. func (*EvalState) Descriptor() ([]byte, []int) {
  36. return fileDescriptor_eval_44fab2c26f9c103a, []int{0}
  37. }
  38. func (m *EvalState) XXX_Unmarshal(b []byte) error {
  39. return xxx_messageInfo_EvalState.Unmarshal(m, b)
  40. }
  41. func (m *EvalState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  42. return xxx_messageInfo_EvalState.Marshal(b, m, deterministic)
  43. }
  44. func (dst *EvalState) XXX_Merge(src proto.Message) {
  45. xxx_messageInfo_EvalState.Merge(dst, src)
  46. }
  47. func (m *EvalState) XXX_Size() int {
  48. return xxx_messageInfo_EvalState.Size(m)
  49. }
  50. func (m *EvalState) XXX_DiscardUnknown() {
  51. xxx_messageInfo_EvalState.DiscardUnknown(m)
  52. }
  53. var xxx_messageInfo_EvalState proto.InternalMessageInfo
  54. func (m *EvalState) GetValues() []*ExprValue {
  55. if m != nil {
  56. return m.Values
  57. }
  58. return nil
  59. }
  60. func (m *EvalState) GetResults() []*EvalState_Result {
  61. if m != nil {
  62. return m.Results
  63. }
  64. return nil
  65. }
  66. // A single evaluation result.
  67. type EvalState_Result struct {
  68. // The expression this result is for.
  69. Expr *IdRef `protobuf:"bytes,1,opt,name=expr,proto3" json:"expr,omitempty"`
  70. // The index in `values` of the resulting value.
  71. Value int32 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
  72. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  73. XXX_unrecognized []byte `json:"-"`
  74. XXX_sizecache int32 `json:"-"`
  75. }
  76. func (m *EvalState_Result) Reset() { *m = EvalState_Result{} }
  77. func (m *EvalState_Result) String() string { return proto.CompactTextString(m) }
  78. func (*EvalState_Result) ProtoMessage() {}
  79. func (*EvalState_Result) Descriptor() ([]byte, []int) {
  80. return fileDescriptor_eval_44fab2c26f9c103a, []int{0, 0}
  81. }
  82. func (m *EvalState_Result) XXX_Unmarshal(b []byte) error {
  83. return xxx_messageInfo_EvalState_Result.Unmarshal(m, b)
  84. }
  85. func (m *EvalState_Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  86. return xxx_messageInfo_EvalState_Result.Marshal(b, m, deterministic)
  87. }
  88. func (dst *EvalState_Result) XXX_Merge(src proto.Message) {
  89. xxx_messageInfo_EvalState_Result.Merge(dst, src)
  90. }
  91. func (m *EvalState_Result) XXX_Size() int {
  92. return xxx_messageInfo_EvalState_Result.Size(m)
  93. }
  94. func (m *EvalState_Result) XXX_DiscardUnknown() {
  95. xxx_messageInfo_EvalState_Result.DiscardUnknown(m)
  96. }
  97. var xxx_messageInfo_EvalState_Result proto.InternalMessageInfo
  98. func (m *EvalState_Result) GetExpr() *IdRef {
  99. if m != nil {
  100. return m.Expr
  101. }
  102. return nil
  103. }
  104. func (m *EvalState_Result) GetValue() int32 {
  105. if m != nil {
  106. return m.Value
  107. }
  108. return 0
  109. }
  110. // The value of an evaluated expression.
  111. type ExprValue struct {
  112. // An expression can resolve to a value, error or unknown.
  113. //
  114. // Types that are valid to be assigned to Kind:
  115. // *ExprValue_Value
  116. // *ExprValue_Error
  117. // *ExprValue_Unknown
  118. Kind isExprValue_Kind `protobuf_oneof:"kind"`
  119. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  120. XXX_unrecognized []byte `json:"-"`
  121. XXX_sizecache int32 `json:"-"`
  122. }
  123. func (m *ExprValue) Reset() { *m = ExprValue{} }
  124. func (m *ExprValue) String() string { return proto.CompactTextString(m) }
  125. func (*ExprValue) ProtoMessage() {}
  126. func (*ExprValue) Descriptor() ([]byte, []int) {
  127. return fileDescriptor_eval_44fab2c26f9c103a, []int{1}
  128. }
  129. func (m *ExprValue) XXX_Unmarshal(b []byte) error {
  130. return xxx_messageInfo_ExprValue.Unmarshal(m, b)
  131. }
  132. func (m *ExprValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  133. return xxx_messageInfo_ExprValue.Marshal(b, m, deterministic)
  134. }
  135. func (dst *ExprValue) XXX_Merge(src proto.Message) {
  136. xxx_messageInfo_ExprValue.Merge(dst, src)
  137. }
  138. func (m *ExprValue) XXX_Size() int {
  139. return xxx_messageInfo_ExprValue.Size(m)
  140. }
  141. func (m *ExprValue) XXX_DiscardUnknown() {
  142. xxx_messageInfo_ExprValue.DiscardUnknown(m)
  143. }
  144. var xxx_messageInfo_ExprValue proto.InternalMessageInfo
  145. type isExprValue_Kind interface {
  146. isExprValue_Kind()
  147. }
  148. type ExprValue_Value struct {
  149. Value *Value `protobuf:"bytes,1,opt,name=value,proto3,oneof"`
  150. }
  151. type ExprValue_Error struct {
  152. Error *ErrorSet `protobuf:"bytes,2,opt,name=error,proto3,oneof"`
  153. }
  154. type ExprValue_Unknown struct {
  155. Unknown *UnknownSet `protobuf:"bytes,3,opt,name=unknown,proto3,oneof"`
  156. }
  157. func (*ExprValue_Value) isExprValue_Kind() {}
  158. func (*ExprValue_Error) isExprValue_Kind() {}
  159. func (*ExprValue_Unknown) isExprValue_Kind() {}
  160. func (m *ExprValue) GetKind() isExprValue_Kind {
  161. if m != nil {
  162. return m.Kind
  163. }
  164. return nil
  165. }
  166. func (m *ExprValue) GetValue() *Value {
  167. if x, ok := m.GetKind().(*ExprValue_Value); ok {
  168. return x.Value
  169. }
  170. return nil
  171. }
  172. func (m *ExprValue) GetError() *ErrorSet {
  173. if x, ok := m.GetKind().(*ExprValue_Error); ok {
  174. return x.Error
  175. }
  176. return nil
  177. }
  178. func (m *ExprValue) GetUnknown() *UnknownSet {
  179. if x, ok := m.GetKind().(*ExprValue_Unknown); ok {
  180. return x.Unknown
  181. }
  182. return nil
  183. }
  184. // XXX_OneofFuncs is for the internal use of the proto package.
  185. func (*ExprValue) 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{}) {
  186. return _ExprValue_OneofMarshaler, _ExprValue_OneofUnmarshaler, _ExprValue_OneofSizer, []interface{}{
  187. (*ExprValue_Value)(nil),
  188. (*ExprValue_Error)(nil),
  189. (*ExprValue_Unknown)(nil),
  190. }
  191. }
  192. func _ExprValue_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  193. m := msg.(*ExprValue)
  194. // kind
  195. switch x := m.Kind.(type) {
  196. case *ExprValue_Value:
  197. b.EncodeVarint(1<<3 | proto.WireBytes)
  198. if err := b.EncodeMessage(x.Value); err != nil {
  199. return err
  200. }
  201. case *ExprValue_Error:
  202. b.EncodeVarint(2<<3 | proto.WireBytes)
  203. if err := b.EncodeMessage(x.Error); err != nil {
  204. return err
  205. }
  206. case *ExprValue_Unknown:
  207. b.EncodeVarint(3<<3 | proto.WireBytes)
  208. if err := b.EncodeMessage(x.Unknown); err != nil {
  209. return err
  210. }
  211. case nil:
  212. default:
  213. return fmt.Errorf("ExprValue.Kind has unexpected type %T", x)
  214. }
  215. return nil
  216. }
  217. func _ExprValue_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  218. m := msg.(*ExprValue)
  219. switch tag {
  220. case 1: // kind.value
  221. if wire != proto.WireBytes {
  222. return true, proto.ErrInternalBadWireType
  223. }
  224. msg := new(Value)
  225. err := b.DecodeMessage(msg)
  226. m.Kind = &ExprValue_Value{msg}
  227. return true, err
  228. case 2: // kind.error
  229. if wire != proto.WireBytes {
  230. return true, proto.ErrInternalBadWireType
  231. }
  232. msg := new(ErrorSet)
  233. err := b.DecodeMessage(msg)
  234. m.Kind = &ExprValue_Error{msg}
  235. return true, err
  236. case 3: // kind.unknown
  237. if wire != proto.WireBytes {
  238. return true, proto.ErrInternalBadWireType
  239. }
  240. msg := new(UnknownSet)
  241. err := b.DecodeMessage(msg)
  242. m.Kind = &ExprValue_Unknown{msg}
  243. return true, err
  244. default:
  245. return false, nil
  246. }
  247. }
  248. func _ExprValue_OneofSizer(msg proto.Message) (n int) {
  249. m := msg.(*ExprValue)
  250. // kind
  251. switch x := m.Kind.(type) {
  252. case *ExprValue_Value:
  253. s := proto.Size(x.Value)
  254. n += 1 // tag and wire
  255. n += proto.SizeVarint(uint64(s))
  256. n += s
  257. case *ExprValue_Error:
  258. s := proto.Size(x.Error)
  259. n += 1 // tag and wire
  260. n += proto.SizeVarint(uint64(s))
  261. n += s
  262. case *ExprValue_Unknown:
  263. s := proto.Size(x.Unknown)
  264. n += 1 // tag and wire
  265. n += proto.SizeVarint(uint64(s))
  266. n += s
  267. case nil:
  268. default:
  269. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  270. }
  271. return n
  272. }
  273. // A set of errors.
  274. //
  275. // The errors included depend on the context. See `ExprValue.error`.
  276. type ErrorSet struct {
  277. // The errors in the set.
  278. Errors []*status.Status `protobuf:"bytes,1,rep,name=errors,proto3" json:"errors,omitempty"`
  279. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  280. XXX_unrecognized []byte `json:"-"`
  281. XXX_sizecache int32 `json:"-"`
  282. }
  283. func (m *ErrorSet) Reset() { *m = ErrorSet{} }
  284. func (m *ErrorSet) String() string { return proto.CompactTextString(m) }
  285. func (*ErrorSet) ProtoMessage() {}
  286. func (*ErrorSet) Descriptor() ([]byte, []int) {
  287. return fileDescriptor_eval_44fab2c26f9c103a, []int{2}
  288. }
  289. func (m *ErrorSet) XXX_Unmarshal(b []byte) error {
  290. return xxx_messageInfo_ErrorSet.Unmarshal(m, b)
  291. }
  292. func (m *ErrorSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  293. return xxx_messageInfo_ErrorSet.Marshal(b, m, deterministic)
  294. }
  295. func (dst *ErrorSet) XXX_Merge(src proto.Message) {
  296. xxx_messageInfo_ErrorSet.Merge(dst, src)
  297. }
  298. func (m *ErrorSet) XXX_Size() int {
  299. return xxx_messageInfo_ErrorSet.Size(m)
  300. }
  301. func (m *ErrorSet) XXX_DiscardUnknown() {
  302. xxx_messageInfo_ErrorSet.DiscardUnknown(m)
  303. }
  304. var xxx_messageInfo_ErrorSet proto.InternalMessageInfo
  305. func (m *ErrorSet) GetErrors() []*status.Status {
  306. if m != nil {
  307. return m.Errors
  308. }
  309. return nil
  310. }
  311. // A set of expressions for which the value is unknown.
  312. //
  313. // The unknowns included depend on the context. See `ExprValue.unknown`.
  314. type UnknownSet struct {
  315. // The ids of the expressions with unknown values.
  316. Exprs []*IdRef `protobuf:"bytes,1,rep,name=exprs,proto3" json:"exprs,omitempty"`
  317. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  318. XXX_unrecognized []byte `json:"-"`
  319. XXX_sizecache int32 `json:"-"`
  320. }
  321. func (m *UnknownSet) Reset() { *m = UnknownSet{} }
  322. func (m *UnknownSet) String() string { return proto.CompactTextString(m) }
  323. func (*UnknownSet) ProtoMessage() {}
  324. func (*UnknownSet) Descriptor() ([]byte, []int) {
  325. return fileDescriptor_eval_44fab2c26f9c103a, []int{3}
  326. }
  327. func (m *UnknownSet) XXX_Unmarshal(b []byte) error {
  328. return xxx_messageInfo_UnknownSet.Unmarshal(m, b)
  329. }
  330. func (m *UnknownSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  331. return xxx_messageInfo_UnknownSet.Marshal(b, m, deterministic)
  332. }
  333. func (dst *UnknownSet) XXX_Merge(src proto.Message) {
  334. xxx_messageInfo_UnknownSet.Merge(dst, src)
  335. }
  336. func (m *UnknownSet) XXX_Size() int {
  337. return xxx_messageInfo_UnknownSet.Size(m)
  338. }
  339. func (m *UnknownSet) XXX_DiscardUnknown() {
  340. xxx_messageInfo_UnknownSet.DiscardUnknown(m)
  341. }
  342. var xxx_messageInfo_UnknownSet proto.InternalMessageInfo
  343. func (m *UnknownSet) GetExprs() []*IdRef {
  344. if m != nil {
  345. return m.Exprs
  346. }
  347. return nil
  348. }
  349. // A reference to an expression id.
  350. type IdRef struct {
  351. // The expression id.
  352. Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
  353. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  354. XXX_unrecognized []byte `json:"-"`
  355. XXX_sizecache int32 `json:"-"`
  356. }
  357. func (m *IdRef) Reset() { *m = IdRef{} }
  358. func (m *IdRef) String() string { return proto.CompactTextString(m) }
  359. func (*IdRef) ProtoMessage() {}
  360. func (*IdRef) Descriptor() ([]byte, []int) {
  361. return fileDescriptor_eval_44fab2c26f9c103a, []int{4}
  362. }
  363. func (m *IdRef) XXX_Unmarshal(b []byte) error {
  364. return xxx_messageInfo_IdRef.Unmarshal(m, b)
  365. }
  366. func (m *IdRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  367. return xxx_messageInfo_IdRef.Marshal(b, m, deterministic)
  368. }
  369. func (dst *IdRef) XXX_Merge(src proto.Message) {
  370. xxx_messageInfo_IdRef.Merge(dst, src)
  371. }
  372. func (m *IdRef) XXX_Size() int {
  373. return xxx_messageInfo_IdRef.Size(m)
  374. }
  375. func (m *IdRef) XXX_DiscardUnknown() {
  376. xxx_messageInfo_IdRef.DiscardUnknown(m)
  377. }
  378. var xxx_messageInfo_IdRef proto.InternalMessageInfo
  379. func (m *IdRef) GetId() int32 {
  380. if m != nil {
  381. return m.Id
  382. }
  383. return 0
  384. }
  385. func init() {
  386. proto.RegisterType((*EvalState)(nil), "google.api.expr.v1beta1.EvalState")
  387. proto.RegisterType((*EvalState_Result)(nil), "google.api.expr.v1beta1.EvalState.Result")
  388. proto.RegisterType((*ExprValue)(nil), "google.api.expr.v1beta1.ExprValue")
  389. proto.RegisterType((*ErrorSet)(nil), "google.api.expr.v1beta1.ErrorSet")
  390. proto.RegisterType((*UnknownSet)(nil), "google.api.expr.v1beta1.UnknownSet")
  391. proto.RegisterType((*IdRef)(nil), "google.api.expr.v1beta1.IdRef")
  392. }
  393. func init() {
  394. proto.RegisterFile("google/api/expr/v1beta1/eval.proto", fileDescriptor_eval_44fab2c26f9c103a)
  395. }
  396. var fileDescriptor_eval_44fab2c26f9c103a = []byte{
  397. // 392 bytes of a gzipped FileDescriptorProto
  398. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xcf, 0x8b, 0xd4, 0x30,
  399. 0x14, 0xc7, 0xcd, 0xcc, 0xb6, 0xab, 0x6f, 0xc0, 0x43, 0x10, 0xb6, 0x8c, 0x20, 0x63, 0xf7, 0x32,
  400. 0x7a, 0x48, 0xd8, 0x2a, 0x0b, 0xba, 0x07, 0xa1, 0xb2, 0xa0, 0xb7, 0x25, 0x83, 0x1e, 0xbc, 0x65,
  401. 0xa7, 0xb1, 0xd4, 0xa9, 0x4d, 0x48, 0xd3, 0x3a, 0xff, 0xa1, 0xff, 0x86, 0x7f, 0x86, 0x47, 0xc9,
  402. 0x4b, 0x83, 0x87, 0xa5, 0xcc, 0xf1, 0x25, 0x9f, 0xcf, 0xf7, 0xe5, 0xc7, 0x83, 0xbc, 0xd6, 0xba,
  403. 0x6e, 0x15, 0x97, 0xa6, 0xe1, 0xea, 0x68, 0x2c, 0x1f, 0xaf, 0xee, 0x95, 0x93, 0x57, 0x5c, 0x8d,
  404. 0xb2, 0x65, 0xc6, 0x6a, 0xa7, 0xe9, 0x45, 0x60, 0x98, 0x34, 0x0d, 0xf3, 0x0c, 0x9b, 0x98, 0xf5,
  405. 0xe5, 0x9c, 0x3c, 0xca, 0x76, 0x50, 0xc1, 0x5e, 0x4f, 0x36, 0xb7, 0x66, 0xcf, 0x7b, 0x27, 0xdd,
  406. 0xd0, 0x87, 0x8d, 0xfc, 0x0f, 0x81, 0x27, 0xb7, 0xa3, 0x6c, 0x77, 0x4e, 0x3a, 0x45, 0xdf, 0x43,
  407. 0x8a, 0x56, 0x9f, 0x91, 0xcd, 0x72, 0xbb, 0x2a, 0x72, 0x36, 0xd3, 0x95, 0xdd, 0x1e, 0x8d, 0xfd,
  408. 0xea, 0x51, 0x31, 0x19, 0xf4, 0x23, 0x9c, 0x5b, 0xd5, 0x0f, 0xad, 0xeb, 0xb3, 0x25, 0xca, 0xaf,
  409. 0xe6, 0xe5, 0xd8, 0x90, 0x09, 0x34, 0x44, 0x34, 0xd7, 0x02, 0xd2, 0xb0, 0x44, 0x0b, 0x38, 0xf3,
  410. 0x4e, 0x46, 0x36, 0x64, 0xbb, 0x2a, 0x5e, 0xcc, 0x66, 0x7d, 0xae, 0x84, 0xfa, 0x2e, 0x90, 0xa5,
  411. 0xcf, 0x20, 0xc1, 0xc3, 0x64, 0x8b, 0x0d, 0xd9, 0x26, 0x22, 0x14, 0xf9, 0x6f, 0x7f, 0xc5, 0x78,
  412. 0x5c, 0x7a, 0x1d, 0x99, 0x53, 0xc1, 0x88, 0x7f, 0x7a, 0x34, 0xa5, 0xd0, 0x77, 0x90, 0x28, 0x6b,
  413. 0xb5, 0xc5, 0xec, 0x55, 0xf1, 0x72, 0xfe, 0x72, 0x9e, 0xda, 0x29, 0xe7, 0x55, 0x34, 0xe8, 0x07,
  414. 0x38, 0x1f, 0xba, 0x43, 0xa7, 0x7f, 0x75, 0xd9, 0x12, 0xe5, 0xcb, 0x59, 0xf9, 0x4b, 0xe0, 0x82,
  415. 0x1e, 0xad, 0x32, 0x85, 0xb3, 0x43, 0xd3, 0x55, 0xf9, 0x35, 0x3c, 0x8e, 0xe9, 0xf4, 0x35, 0xa4,
  416. 0x98, 0x1e, 0xbf, 0x8a, 0xc6, 0x4c, 0x6b, 0xf6, 0x6c, 0x87, 0x5f, 0x2c, 0x26, 0x22, 0x2f, 0x01,
  417. 0xfe, 0x07, 0xd3, 0xb7, 0x90, 0xf8, 0x9e, 0x51, 0x3c, 0xf5, 0xb4, 0x01, 0xce, 0x2f, 0x20, 0xc1,
  418. 0x9a, 0x3e, 0x85, 0x45, 0x53, 0xe1, 0xeb, 0x25, 0x62, 0xd1, 0x54, 0xe5, 0x0f, 0x78, 0xbe, 0xd7,
  419. 0x3f, 0xe7, 0x42, 0x4a, 0x9c, 0xae, 0x3b, 0x3f, 0x6b, 0x77, 0xe4, 0xdb, 0xcd, 0x44, 0xd5, 0xba,
  420. 0x95, 0x5d, 0xcd, 0xb4, 0xad, 0x79, 0xad, 0x3a, 0x9c, 0x44, 0x1e, 0xb6, 0xa4, 0x69, 0xfa, 0x07,
  421. 0xa3, 0x7c, 0xe3, 0x8b, 0xbf, 0x84, 0xdc, 0xa7, 0x88, 0xbe, 0xf9, 0x17, 0x00, 0x00, 0xff, 0xff,
  422. 0x33, 0xb5, 0xd5, 0x2b, 0x31, 0x03, 0x00, 0x00,
  423. }