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.
 
 
 

404 lines
13 KiB

  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/api/expr/v1beta1/decl.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. // Reference imports to suppress errors if they are not otherwise used.
  8. var _ = proto.Marshal
  9. var _ = fmt.Errorf
  10. var _ = math.Inf
  11. // This is a compile-time assertion to ensure that this generated file
  12. // is compatible with the proto package it is being compiled against.
  13. // A compilation error at this line likely means your copy of the
  14. // proto package needs to be updated.
  15. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  16. // A declaration.
  17. type Decl struct {
  18. // The id of the declaration.
  19. Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
  20. // The name of the declaration.
  21. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
  22. // The documentation string for the declaration.
  23. Doc string `protobuf:"bytes,3,opt,name=doc,proto3" json:"doc,omitempty"`
  24. // The kind of declaration.
  25. //
  26. // Types that are valid to be assigned to Kind:
  27. // *Decl_Ident
  28. // *Decl_Function
  29. Kind isDecl_Kind `protobuf_oneof:"kind"`
  30. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  31. XXX_unrecognized []byte `json:"-"`
  32. XXX_sizecache int32 `json:"-"`
  33. }
  34. func (m *Decl) Reset() { *m = Decl{} }
  35. func (m *Decl) String() string { return proto.CompactTextString(m) }
  36. func (*Decl) ProtoMessage() {}
  37. func (*Decl) Descriptor() ([]byte, []int) {
  38. return fileDescriptor_decl_6647d3ad822811d0, []int{0}
  39. }
  40. func (m *Decl) XXX_Unmarshal(b []byte) error {
  41. return xxx_messageInfo_Decl.Unmarshal(m, b)
  42. }
  43. func (m *Decl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  44. return xxx_messageInfo_Decl.Marshal(b, m, deterministic)
  45. }
  46. func (dst *Decl) XXX_Merge(src proto.Message) {
  47. xxx_messageInfo_Decl.Merge(dst, src)
  48. }
  49. func (m *Decl) XXX_Size() int {
  50. return xxx_messageInfo_Decl.Size(m)
  51. }
  52. func (m *Decl) XXX_DiscardUnknown() {
  53. xxx_messageInfo_Decl.DiscardUnknown(m)
  54. }
  55. var xxx_messageInfo_Decl proto.InternalMessageInfo
  56. func (m *Decl) GetId() int32 {
  57. if m != nil {
  58. return m.Id
  59. }
  60. return 0
  61. }
  62. func (m *Decl) GetName() string {
  63. if m != nil {
  64. return m.Name
  65. }
  66. return ""
  67. }
  68. func (m *Decl) GetDoc() string {
  69. if m != nil {
  70. return m.Doc
  71. }
  72. return ""
  73. }
  74. type isDecl_Kind interface {
  75. isDecl_Kind()
  76. }
  77. type Decl_Ident struct {
  78. Ident *IdentDecl `protobuf:"bytes,4,opt,name=ident,proto3,oneof"`
  79. }
  80. type Decl_Function struct {
  81. Function *FunctionDecl `protobuf:"bytes,5,opt,name=function,proto3,oneof"`
  82. }
  83. func (*Decl_Ident) isDecl_Kind() {}
  84. func (*Decl_Function) isDecl_Kind() {}
  85. func (m *Decl) GetKind() isDecl_Kind {
  86. if m != nil {
  87. return m.Kind
  88. }
  89. return nil
  90. }
  91. func (m *Decl) GetIdent() *IdentDecl {
  92. if x, ok := m.GetKind().(*Decl_Ident); ok {
  93. return x.Ident
  94. }
  95. return nil
  96. }
  97. func (m *Decl) GetFunction() *FunctionDecl {
  98. if x, ok := m.GetKind().(*Decl_Function); ok {
  99. return x.Function
  100. }
  101. return nil
  102. }
  103. // XXX_OneofFuncs is for the internal use of the proto package.
  104. func (*Decl) 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{}) {
  105. return _Decl_OneofMarshaler, _Decl_OneofUnmarshaler, _Decl_OneofSizer, []interface{}{
  106. (*Decl_Ident)(nil),
  107. (*Decl_Function)(nil),
  108. }
  109. }
  110. func _Decl_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  111. m := msg.(*Decl)
  112. // kind
  113. switch x := m.Kind.(type) {
  114. case *Decl_Ident:
  115. b.EncodeVarint(4<<3 | proto.WireBytes)
  116. if err := b.EncodeMessage(x.Ident); err != nil {
  117. return err
  118. }
  119. case *Decl_Function:
  120. b.EncodeVarint(5<<3 | proto.WireBytes)
  121. if err := b.EncodeMessage(x.Function); err != nil {
  122. return err
  123. }
  124. case nil:
  125. default:
  126. return fmt.Errorf("Decl.Kind has unexpected type %T", x)
  127. }
  128. return nil
  129. }
  130. func _Decl_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  131. m := msg.(*Decl)
  132. switch tag {
  133. case 4: // kind.ident
  134. if wire != proto.WireBytes {
  135. return true, proto.ErrInternalBadWireType
  136. }
  137. msg := new(IdentDecl)
  138. err := b.DecodeMessage(msg)
  139. m.Kind = &Decl_Ident{msg}
  140. return true, err
  141. case 5: // kind.function
  142. if wire != proto.WireBytes {
  143. return true, proto.ErrInternalBadWireType
  144. }
  145. msg := new(FunctionDecl)
  146. err := b.DecodeMessage(msg)
  147. m.Kind = &Decl_Function{msg}
  148. return true, err
  149. default:
  150. return false, nil
  151. }
  152. }
  153. func _Decl_OneofSizer(msg proto.Message) (n int) {
  154. m := msg.(*Decl)
  155. // kind
  156. switch x := m.Kind.(type) {
  157. case *Decl_Ident:
  158. s := proto.Size(x.Ident)
  159. n += 1 // tag and wire
  160. n += proto.SizeVarint(uint64(s))
  161. n += s
  162. case *Decl_Function:
  163. s := proto.Size(x.Function)
  164. n += 1 // tag and wire
  165. n += proto.SizeVarint(uint64(s))
  166. n += s
  167. case nil:
  168. default:
  169. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  170. }
  171. return n
  172. }
  173. // The declared type of a variable.
  174. //
  175. // Extends runtime type values with extra information used for type checking
  176. // and dispatching.
  177. type DeclType struct {
  178. // The expression id of the declared type, if applicable.
  179. Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
  180. // The type name, e.g. 'int', 'my.type.Type' or 'T'
  181. Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
  182. // An ordered list of type parameters, e.g. `<string, int>`.
  183. // Only applies to a subset of types, e.g. `map`, `list`.
  184. TypeParams []*DeclType `protobuf:"bytes,4,rep,name=type_params,json=typeParams,proto3" json:"type_params,omitempty"`
  185. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  186. XXX_unrecognized []byte `json:"-"`
  187. XXX_sizecache int32 `json:"-"`
  188. }
  189. func (m *DeclType) Reset() { *m = DeclType{} }
  190. func (m *DeclType) String() string { return proto.CompactTextString(m) }
  191. func (*DeclType) ProtoMessage() {}
  192. func (*DeclType) Descriptor() ([]byte, []int) {
  193. return fileDescriptor_decl_6647d3ad822811d0, []int{1}
  194. }
  195. func (m *DeclType) XXX_Unmarshal(b []byte) error {
  196. return xxx_messageInfo_DeclType.Unmarshal(m, b)
  197. }
  198. func (m *DeclType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  199. return xxx_messageInfo_DeclType.Marshal(b, m, deterministic)
  200. }
  201. func (dst *DeclType) XXX_Merge(src proto.Message) {
  202. xxx_messageInfo_DeclType.Merge(dst, src)
  203. }
  204. func (m *DeclType) XXX_Size() int {
  205. return xxx_messageInfo_DeclType.Size(m)
  206. }
  207. func (m *DeclType) XXX_DiscardUnknown() {
  208. xxx_messageInfo_DeclType.DiscardUnknown(m)
  209. }
  210. var xxx_messageInfo_DeclType proto.InternalMessageInfo
  211. func (m *DeclType) GetId() int32 {
  212. if m != nil {
  213. return m.Id
  214. }
  215. return 0
  216. }
  217. func (m *DeclType) GetType() string {
  218. if m != nil {
  219. return m.Type
  220. }
  221. return ""
  222. }
  223. func (m *DeclType) GetTypeParams() []*DeclType {
  224. if m != nil {
  225. return m.TypeParams
  226. }
  227. return nil
  228. }
  229. // An identifier declaration.
  230. type IdentDecl struct {
  231. // Optional type of the identifier.
  232. Type *DeclType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
  233. // Optional value of the identifier.
  234. Value *Expr `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
  235. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  236. XXX_unrecognized []byte `json:"-"`
  237. XXX_sizecache int32 `json:"-"`
  238. }
  239. func (m *IdentDecl) Reset() { *m = IdentDecl{} }
  240. func (m *IdentDecl) String() string { return proto.CompactTextString(m) }
  241. func (*IdentDecl) ProtoMessage() {}
  242. func (*IdentDecl) Descriptor() ([]byte, []int) {
  243. return fileDescriptor_decl_6647d3ad822811d0, []int{2}
  244. }
  245. func (m *IdentDecl) XXX_Unmarshal(b []byte) error {
  246. return xxx_messageInfo_IdentDecl.Unmarshal(m, b)
  247. }
  248. func (m *IdentDecl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  249. return xxx_messageInfo_IdentDecl.Marshal(b, m, deterministic)
  250. }
  251. func (dst *IdentDecl) XXX_Merge(src proto.Message) {
  252. xxx_messageInfo_IdentDecl.Merge(dst, src)
  253. }
  254. func (m *IdentDecl) XXX_Size() int {
  255. return xxx_messageInfo_IdentDecl.Size(m)
  256. }
  257. func (m *IdentDecl) XXX_DiscardUnknown() {
  258. xxx_messageInfo_IdentDecl.DiscardUnknown(m)
  259. }
  260. var xxx_messageInfo_IdentDecl proto.InternalMessageInfo
  261. func (m *IdentDecl) GetType() *DeclType {
  262. if m != nil {
  263. return m.Type
  264. }
  265. return nil
  266. }
  267. func (m *IdentDecl) GetValue() *Expr {
  268. if m != nil {
  269. return m.Value
  270. }
  271. return nil
  272. }
  273. // A function declaration.
  274. type FunctionDecl struct {
  275. // The function arguments.
  276. Args []*IdentDecl `protobuf:"bytes,1,rep,name=args,proto3" json:"args,omitempty"`
  277. // Optional declared return type.
  278. ReturnType *DeclType `protobuf:"bytes,2,opt,name=return_type,json=returnType,proto3" json:"return_type,omitempty"`
  279. // If the first argument of the function is the receiver.
  280. ReceiverFunction bool `protobuf:"varint,3,opt,name=receiver_function,json=receiverFunction,proto3" json:"receiver_function,omitempty"`
  281. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  282. XXX_unrecognized []byte `json:"-"`
  283. XXX_sizecache int32 `json:"-"`
  284. }
  285. func (m *FunctionDecl) Reset() { *m = FunctionDecl{} }
  286. func (m *FunctionDecl) String() string { return proto.CompactTextString(m) }
  287. func (*FunctionDecl) ProtoMessage() {}
  288. func (*FunctionDecl) Descriptor() ([]byte, []int) {
  289. return fileDescriptor_decl_6647d3ad822811d0, []int{3}
  290. }
  291. func (m *FunctionDecl) XXX_Unmarshal(b []byte) error {
  292. return xxx_messageInfo_FunctionDecl.Unmarshal(m, b)
  293. }
  294. func (m *FunctionDecl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  295. return xxx_messageInfo_FunctionDecl.Marshal(b, m, deterministic)
  296. }
  297. func (dst *FunctionDecl) XXX_Merge(src proto.Message) {
  298. xxx_messageInfo_FunctionDecl.Merge(dst, src)
  299. }
  300. func (m *FunctionDecl) XXX_Size() int {
  301. return xxx_messageInfo_FunctionDecl.Size(m)
  302. }
  303. func (m *FunctionDecl) XXX_DiscardUnknown() {
  304. xxx_messageInfo_FunctionDecl.DiscardUnknown(m)
  305. }
  306. var xxx_messageInfo_FunctionDecl proto.InternalMessageInfo
  307. func (m *FunctionDecl) GetArgs() []*IdentDecl {
  308. if m != nil {
  309. return m.Args
  310. }
  311. return nil
  312. }
  313. func (m *FunctionDecl) GetReturnType() *DeclType {
  314. if m != nil {
  315. return m.ReturnType
  316. }
  317. return nil
  318. }
  319. func (m *FunctionDecl) GetReceiverFunction() bool {
  320. if m != nil {
  321. return m.ReceiverFunction
  322. }
  323. return false
  324. }
  325. func init() {
  326. proto.RegisterType((*Decl)(nil), "google.api.expr.v1beta1.Decl")
  327. proto.RegisterType((*DeclType)(nil), "google.api.expr.v1beta1.DeclType")
  328. proto.RegisterType((*IdentDecl)(nil), "google.api.expr.v1beta1.IdentDecl")
  329. proto.RegisterType((*FunctionDecl)(nil), "google.api.expr.v1beta1.FunctionDecl")
  330. }
  331. func init() {
  332. proto.RegisterFile("google/api/expr/v1beta1/decl.proto", fileDescriptor_decl_6647d3ad822811d0)
  333. }
  334. var fileDescriptor_decl_6647d3ad822811d0 = []byte{
  335. // 398 bytes of a gzipped FileDescriptorProto
  336. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcd, 0x4a, 0xeb, 0x40,
  337. 0x14, 0xc7, 0xef, 0x34, 0x49, 0x69, 0x4f, 0x2f, 0x97, 0xde, 0xd9, 0xdc, 0x70, 0x45, 0x88, 0x01,
  338. 0x21, 0x20, 0x24, 0xb4, 0x45, 0x17, 0x76, 0x17, 0x3f, 0xd0, 0x5d, 0x09, 0xae, 0xdc, 0x94, 0x69,
  339. 0x32, 0x86, 0xd1, 0x74, 0x66, 0x98, 0xa6, 0xb5, 0x7d, 0x32, 0x9f, 0xc0, 0x77, 0x72, 0x29, 0x33,
  340. 0x49, 0x83, 0xa0, 0x81, 0xae, 0x7a, 0x9a, 0xf3, 0xff, 0x9d, 0x8f, 0xff, 0x1c, 0xf0, 0x73, 0x21,
  341. 0xf2, 0x82, 0x46, 0x44, 0xb2, 0x88, 0x6e, 0xa5, 0x8a, 0x36, 0xa3, 0x05, 0x2d, 0xc9, 0x28, 0xca,
  342. 0x68, 0x5a, 0x84, 0x52, 0x89, 0x52, 0xe0, 0x7f, 0x95, 0x26, 0x24, 0x92, 0x85, 0x5a, 0x13, 0xd6,
  343. 0x9a, 0xff, 0xad, 0xb0, 0x51, 0x19, 0xd8, 0x7f, 0x47, 0x60, 0x5f, 0xd3, 0xb4, 0xc0, 0x7f, 0xa0,
  344. 0xc3, 0x32, 0x17, 0x79, 0x28, 0x70, 0x92, 0x0e, 0xcb, 0x30, 0x06, 0x9b, 0x93, 0x25, 0x75, 0x3b,
  345. 0x1e, 0x0a, 0xfa, 0x89, 0x89, 0xf1, 0x10, 0xac, 0x4c, 0xa4, 0xae, 0x65, 0x3e, 0xe9, 0x10, 0x5f,
  346. 0x82, 0xc3, 0x32, 0xca, 0x4b, 0xd7, 0xf6, 0x50, 0x30, 0x18, 0xfb, 0x61, 0xcb, 0x2c, 0xe1, 0xbd,
  347. 0x56, 0xe9, 0x46, 0x77, 0xbf, 0x92, 0x0a, 0xc1, 0x57, 0xd0, 0x7b, 0x5a, 0xf3, 0xb4, 0x64, 0x82,
  348. 0xbb, 0x8e, 0xc1, 0x4f, 0x5b, 0xf1, 0xdb, 0x5a, 0x58, 0x57, 0x68, 0xc0, 0xb8, 0x0b, 0xf6, 0x0b,
  349. 0xe3, 0x99, 0xaf, 0xa0, 0xa7, 0x73, 0x0f, 0x3b, 0x49, 0x7f, 0x5a, 0xa5, 0xdc, 0xc9, 0x66, 0x15,
  350. 0x1d, 0xe3, 0x18, 0x06, 0xfa, 0x77, 0x2e, 0x89, 0x22, 0xcb, 0x95, 0x6b, 0x7b, 0x56, 0x30, 0x18,
  351. 0x9f, 0xb4, 0xf6, 0xdf, 0xd7, 0x4e, 0x40, 0x53, 0x33, 0x03, 0xf9, 0xaf, 0xd0, 0x6f, 0xd6, 0xc2,
  352. 0xe7, 0x75, 0x13, 0xcb, 0x6c, 0x72, 0x40, 0xa5, 0x6a, 0x8e, 0x09, 0x38, 0x1b, 0x52, 0xac, 0x69,
  353. 0x6d, 0xe0, 0x71, 0x2b, 0x77, 0xb3, 0x95, 0x2a, 0xa9, 0xb4, 0xfe, 0x1b, 0x82, 0xdf, 0x5f, 0x1d,
  354. 0xc1, 0x17, 0x60, 0x13, 0x95, 0xaf, 0x5c, 0x64, 0xd6, 0x38, 0xe0, 0x15, 0x12, 0xa3, 0xd7, 0x2e,
  355. 0x28, 0x5a, 0xae, 0x15, 0x9f, 0x37, 0x06, 0x1d, 0xe6, 0x42, 0x45, 0x19, 0xb7, 0xcf, 0xe0, 0xaf,
  356. 0xa2, 0x29, 0x65, 0x1b, 0xaa, 0xe6, 0xcd, 0x7b, 0x6a, 0x17, 0x7a, 0xc9, 0x70, 0x9f, 0xd8, 0x0f,
  357. 0x1b, 0x3f, 0xc3, 0x51, 0x2a, 0x96, 0x6d, 0x0d, 0xe2, 0xbe, 0xee, 0x30, 0xd3, 0x87, 0x39, 0x43,
  358. 0x8f, 0xd3, 0x5a, 0x95, 0x8b, 0x82, 0xf0, 0x3c, 0x14, 0x2a, 0x8f, 0x72, 0xca, 0xcd, 0xd9, 0x46,
  359. 0x55, 0x8a, 0x48, 0xb6, 0xfa, 0x76, 0xdd, 0x53, 0xfd, 0xe7, 0x03, 0xa1, 0x45, 0xd7, 0x48, 0x27,
  360. 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x10, 0x20, 0xb6, 0xbc, 0x44, 0x03, 0x00, 0x00,
  361. }