File: decl.pb.go

package info (click to toggle)
golang-google-genproto 0.0~git20190111.db91494-4
  • links: PTS, VCS
  • area: main
  • in suites: buster, buster-backports, buster-backports-sloppy
  • size: 20,192 kB
  • sloc: sh: 109; makefile: 12
file content (403 lines) | stat: -rw-r--r-- 13,174 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/api/expr/v1beta1/decl.proto

package expr // import "google.golang.org/genproto/googleapis/api/expr/v1beta1"

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package

// A declaration.
type Decl struct {
	// The id of the declaration.
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// The name of the declaration.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// The documentation string for the declaration.
	Doc string `protobuf:"bytes,3,opt,name=doc,proto3" json:"doc,omitempty"`
	// The kind of declaration.
	//
	// Types that are valid to be assigned to Kind:
	//	*Decl_Ident
	//	*Decl_Function
	Kind                 isDecl_Kind `protobuf_oneof:"kind"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (m *Decl) Reset()         { *m = Decl{} }
func (m *Decl) String() string { return proto.CompactTextString(m) }
func (*Decl) ProtoMessage()    {}
func (*Decl) Descriptor() ([]byte, []int) {
	return fileDescriptor_decl_6647d3ad822811d0, []int{0}
}
func (m *Decl) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_Decl.Unmarshal(m, b)
}
func (m *Decl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_Decl.Marshal(b, m, deterministic)
}
func (dst *Decl) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Decl.Merge(dst, src)
}
func (m *Decl) XXX_Size() int {
	return xxx_messageInfo_Decl.Size(m)
}
func (m *Decl) XXX_DiscardUnknown() {
	xxx_messageInfo_Decl.DiscardUnknown(m)
}

var xxx_messageInfo_Decl proto.InternalMessageInfo

func (m *Decl) GetId() int32 {
	if m != nil {
		return m.Id
	}
	return 0
}

func (m *Decl) GetName() string {
	if m != nil {
		return m.Name
	}
	return ""
}

func (m *Decl) GetDoc() string {
	if m != nil {
		return m.Doc
	}
	return ""
}

type isDecl_Kind interface {
	isDecl_Kind()
}

type Decl_Ident struct {
	Ident *IdentDecl `protobuf:"bytes,4,opt,name=ident,proto3,oneof"`
}

type Decl_Function struct {
	Function *FunctionDecl `protobuf:"bytes,5,opt,name=function,proto3,oneof"`
}

func (*Decl_Ident) isDecl_Kind() {}

func (*Decl_Function) isDecl_Kind() {}

func (m *Decl) GetKind() isDecl_Kind {
	if m != nil {
		return m.Kind
	}
	return nil
}

func (m *Decl) GetIdent() *IdentDecl {
	if x, ok := m.GetKind().(*Decl_Ident); ok {
		return x.Ident
	}
	return nil
}

func (m *Decl) GetFunction() *FunctionDecl {
	if x, ok := m.GetKind().(*Decl_Function); ok {
		return x.Function
	}
	return nil
}

// XXX_OneofFuncs is for the internal use of the proto package.
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{}) {
	return _Decl_OneofMarshaler, _Decl_OneofUnmarshaler, _Decl_OneofSizer, []interface{}{
		(*Decl_Ident)(nil),
		(*Decl_Function)(nil),
	}
}

func _Decl_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
	m := msg.(*Decl)
	// kind
	switch x := m.Kind.(type) {
	case *Decl_Ident:
		b.EncodeVarint(4<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.Ident); err != nil {
			return err
		}
	case *Decl_Function:
		b.EncodeVarint(5<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.Function); err != nil {
			return err
		}
	case nil:
	default:
		return fmt.Errorf("Decl.Kind has unexpected type %T", x)
	}
	return nil
}

func _Decl_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
	m := msg.(*Decl)
	switch tag {
	case 4: // kind.ident
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(IdentDecl)
		err := b.DecodeMessage(msg)
		m.Kind = &Decl_Ident{msg}
		return true, err
	case 5: // kind.function
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(FunctionDecl)
		err := b.DecodeMessage(msg)
		m.Kind = &Decl_Function{msg}
		return true, err
	default:
		return false, nil
	}
}

func _Decl_OneofSizer(msg proto.Message) (n int) {
	m := msg.(*Decl)
	// kind
	switch x := m.Kind.(type) {
	case *Decl_Ident:
		s := proto.Size(x.Ident)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *Decl_Function:
		s := proto.Size(x.Function)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case nil:
	default:
		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
	}
	return n
}

// The declared type of a variable.
//
// Extends runtime type values with extra information used for type checking
// and dispatching.
type DeclType struct {
	// The expression id of the declared type, if applicable.
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// The type name, e.g. 'int', 'my.type.Type' or 'T'
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// An ordered list of type parameters, e.g. `<string, int>`.
	// Only applies to a subset of types, e.g. `map`, `list`.
	TypeParams           []*DeclType `protobuf:"bytes,4,rep,name=type_params,json=typeParams,proto3" json:"type_params,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (m *DeclType) Reset()         { *m = DeclType{} }
func (m *DeclType) String() string { return proto.CompactTextString(m) }
func (*DeclType) ProtoMessage()    {}
func (*DeclType) Descriptor() ([]byte, []int) {
	return fileDescriptor_decl_6647d3ad822811d0, []int{1}
}
func (m *DeclType) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_DeclType.Unmarshal(m, b)
}
func (m *DeclType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_DeclType.Marshal(b, m, deterministic)
}
func (dst *DeclType) XXX_Merge(src proto.Message) {
	xxx_messageInfo_DeclType.Merge(dst, src)
}
func (m *DeclType) XXX_Size() int {
	return xxx_messageInfo_DeclType.Size(m)
}
func (m *DeclType) XXX_DiscardUnknown() {
	xxx_messageInfo_DeclType.DiscardUnknown(m)
}

var xxx_messageInfo_DeclType proto.InternalMessageInfo

func (m *DeclType) GetId() int32 {
	if m != nil {
		return m.Id
	}
	return 0
}

func (m *DeclType) GetType() string {
	if m != nil {
		return m.Type
	}
	return ""
}

func (m *DeclType) GetTypeParams() []*DeclType {
	if m != nil {
		return m.TypeParams
	}
	return nil
}

// An identifier declaration.
type IdentDecl struct {
	// Optional type of the identifier.
	Type *DeclType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	// Optional value of the identifier.
	Value                *Expr    `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *IdentDecl) Reset()         { *m = IdentDecl{} }
func (m *IdentDecl) String() string { return proto.CompactTextString(m) }
func (*IdentDecl) ProtoMessage()    {}
func (*IdentDecl) Descriptor() ([]byte, []int) {
	return fileDescriptor_decl_6647d3ad822811d0, []int{2}
}
func (m *IdentDecl) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_IdentDecl.Unmarshal(m, b)
}
func (m *IdentDecl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_IdentDecl.Marshal(b, m, deterministic)
}
func (dst *IdentDecl) XXX_Merge(src proto.Message) {
	xxx_messageInfo_IdentDecl.Merge(dst, src)
}
func (m *IdentDecl) XXX_Size() int {
	return xxx_messageInfo_IdentDecl.Size(m)
}
func (m *IdentDecl) XXX_DiscardUnknown() {
	xxx_messageInfo_IdentDecl.DiscardUnknown(m)
}

var xxx_messageInfo_IdentDecl proto.InternalMessageInfo

func (m *IdentDecl) GetType() *DeclType {
	if m != nil {
		return m.Type
	}
	return nil
}

func (m *IdentDecl) GetValue() *Expr {
	if m != nil {
		return m.Value
	}
	return nil
}

// A function declaration.
type FunctionDecl struct {
	// The function arguments.
	Args []*IdentDecl `protobuf:"bytes,1,rep,name=args,proto3" json:"args,omitempty"`
	// Optional declared return type.
	ReturnType *DeclType `protobuf:"bytes,2,opt,name=return_type,json=returnType,proto3" json:"return_type,omitempty"`
	// If the first argument of the function is the receiver.
	ReceiverFunction     bool     `protobuf:"varint,3,opt,name=receiver_function,json=receiverFunction,proto3" json:"receiver_function,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *FunctionDecl) Reset()         { *m = FunctionDecl{} }
func (m *FunctionDecl) String() string { return proto.CompactTextString(m) }
func (*FunctionDecl) ProtoMessage()    {}
func (*FunctionDecl) Descriptor() ([]byte, []int) {
	return fileDescriptor_decl_6647d3ad822811d0, []int{3}
}
func (m *FunctionDecl) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_FunctionDecl.Unmarshal(m, b)
}
func (m *FunctionDecl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_FunctionDecl.Marshal(b, m, deterministic)
}
func (dst *FunctionDecl) XXX_Merge(src proto.Message) {
	xxx_messageInfo_FunctionDecl.Merge(dst, src)
}
func (m *FunctionDecl) XXX_Size() int {
	return xxx_messageInfo_FunctionDecl.Size(m)
}
func (m *FunctionDecl) XXX_DiscardUnknown() {
	xxx_messageInfo_FunctionDecl.DiscardUnknown(m)
}

var xxx_messageInfo_FunctionDecl proto.InternalMessageInfo

func (m *FunctionDecl) GetArgs() []*IdentDecl {
	if m != nil {
		return m.Args
	}
	return nil
}

func (m *FunctionDecl) GetReturnType() *DeclType {
	if m != nil {
		return m.ReturnType
	}
	return nil
}

func (m *FunctionDecl) GetReceiverFunction() bool {
	if m != nil {
		return m.ReceiverFunction
	}
	return false
}

func init() {
	proto.RegisterType((*Decl)(nil), "google.api.expr.v1beta1.Decl")
	proto.RegisterType((*DeclType)(nil), "google.api.expr.v1beta1.DeclType")
	proto.RegisterType((*IdentDecl)(nil), "google.api.expr.v1beta1.IdentDecl")
	proto.RegisterType((*FunctionDecl)(nil), "google.api.expr.v1beta1.FunctionDecl")
}

func init() {
	proto.RegisterFile("google/api/expr/v1beta1/decl.proto", fileDescriptor_decl_6647d3ad822811d0)
}

var fileDescriptor_decl_6647d3ad822811d0 = []byte{
	// 398 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcd, 0x4a, 0xeb, 0x40,
	0x14, 0xc7, 0xef, 0x34, 0x49, 0x69, 0x4f, 0x2f, 0x97, 0xde, 0xd9, 0xdc, 0x70, 0x45, 0x88, 0x01,
	0x21, 0x20, 0x24, 0xb4, 0x45, 0x17, 0x76, 0x17, 0x3f, 0xd0, 0x5d, 0x09, 0xae, 0xdc, 0x94, 0x69,
	0x32, 0x86, 0xd1, 0x74, 0x66, 0x98, 0xa6, 0xb5, 0x7d, 0x32, 0x9f, 0xc0, 0x77, 0x72, 0x29, 0x33,
	0x49, 0x83, 0xa0, 0x81, 0xae, 0x7a, 0x9a, 0xf3, 0xff, 0x9d, 0x8f, 0xff, 0x1c, 0xf0, 0x73, 0x21,
	0xf2, 0x82, 0x46, 0x44, 0xb2, 0x88, 0x6e, 0xa5, 0x8a, 0x36, 0xa3, 0x05, 0x2d, 0xc9, 0x28, 0xca,
	0x68, 0x5a, 0x84, 0x52, 0x89, 0x52, 0xe0, 0x7f, 0x95, 0x26, 0x24, 0x92, 0x85, 0x5a, 0x13, 0xd6,
	0x9a, 0xff, 0xad, 0xb0, 0x51, 0x19, 0xd8, 0x7f, 0x47, 0x60, 0x5f, 0xd3, 0xb4, 0xc0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