1// Code generated by protoc-gen-go. DO NOT EDIT.
2// source: google/devtools/containeranalysis/v1beta1/source/source.proto
3
4package source // import "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/source"
5
6import proto "github.com/golang/protobuf/proto"
7import fmt "fmt"
8import math "math"
9
10// Reference imports to suppress errors if they are not otherwise used.
11var _ = proto.Marshal
12var _ = fmt.Errorf
13var _ = math.Inf
14
15// This is a compile-time assertion to ensure that this generated file
16// is compatible with the proto package it is being compiled against.
17// A compilation error at this line likely means your copy of the
18// proto package needs to be updated.
19const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20
21// The type of an alias.
22type AliasContext_Kind int32
23
24const (
25	// Unknown.
26	AliasContext_KIND_UNSPECIFIED AliasContext_Kind = 0
27	// Git tag.
28	AliasContext_FIXED AliasContext_Kind = 1
29	// Git branch.
30	AliasContext_MOVABLE AliasContext_Kind = 2
31	// Used to specify non-standard aliases. For example, if a Git repo has a
32	// ref named "refs/foo/bar".
33	AliasContext_OTHER AliasContext_Kind = 4
34)
35
36var AliasContext_Kind_name = map[int32]string{
37	0: "KIND_UNSPECIFIED",
38	1: "FIXED",
39	2: "MOVABLE",
40	4: "OTHER",
41}
42var AliasContext_Kind_value = map[string]int32{
43	"KIND_UNSPECIFIED": 0,
44	"FIXED":            1,
45	"MOVABLE":          2,
46	"OTHER":            4,
47}
48
49func (x AliasContext_Kind) String() string {
50	return proto.EnumName(AliasContext_Kind_name, int32(x))
51}
52func (AliasContext_Kind) EnumDescriptor() ([]byte, []int) {
53	return fileDescriptor_source_b7360f0d8c9ed1c8, []int{1, 0}
54}
55
56// A SourceContext is a reference to a tree of files. A SourceContext together
57// with a path point to a unique revision of a single file or directory.
58type SourceContext struct {
59	// A SourceContext can refer any one of the following types of repositories.
60	//
61	// Types that are valid to be assigned to Context:
62	//	*SourceContext_CloudRepo
63	//	*SourceContext_Gerrit
64	//	*SourceContext_Git
65	Context isSourceContext_Context `protobuf_oneof:"context"`
66	// Labels with user defined metadata.
67	Labels               map[string]string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
68	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
69	XXX_unrecognized     []byte            `json:"-"`
70	XXX_sizecache        int32             `json:"-"`
71}
72
73func (m *SourceContext) Reset()         { *m = SourceContext{} }
74func (m *SourceContext) String() string { return proto.CompactTextString(m) }
75func (*SourceContext) ProtoMessage()    {}
76func (*SourceContext) Descriptor() ([]byte, []int) {
77	return fileDescriptor_source_b7360f0d8c9ed1c8, []int{0}
78}
79func (m *SourceContext) XXX_Unmarshal(b []byte) error {
80	return xxx_messageInfo_SourceContext.Unmarshal(m, b)
81}
82func (m *SourceContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
83	return xxx_messageInfo_SourceContext.Marshal(b, m, deterministic)
84}
85func (dst *SourceContext) XXX_Merge(src proto.Message) {
86	xxx_messageInfo_SourceContext.Merge(dst, src)
87}
88func (m *SourceContext) XXX_Size() int {
89	return xxx_messageInfo_SourceContext.Size(m)
90}
91func (m *SourceContext) XXX_DiscardUnknown() {
92	xxx_messageInfo_SourceContext.DiscardUnknown(m)
93}
94
95var xxx_messageInfo_SourceContext proto.InternalMessageInfo
96
97type isSourceContext_Context interface {
98	isSourceContext_Context()
99}
100
101type SourceContext_CloudRepo struct {
102	CloudRepo *CloudRepoSourceContext `protobuf:"bytes,1,opt,name=cloud_repo,json=cloudRepo,proto3,oneof"`
103}
104
105type SourceContext_Gerrit struct {
106	Gerrit *GerritSourceContext `protobuf:"bytes,2,opt,name=gerrit,proto3,oneof"`
107}
108
109type SourceContext_Git struct {
110	Git *GitSourceContext `protobuf:"bytes,3,opt,name=git,proto3,oneof"`
111}
112
113func (*SourceContext_CloudRepo) isSourceContext_Context() {}
114
115func (*SourceContext_Gerrit) isSourceContext_Context() {}
116
117func (*SourceContext_Git) isSourceContext_Context() {}
118
119func (m *SourceContext) GetContext() isSourceContext_Context {
120	if m != nil {
121		return m.Context
122	}
123	return nil
124}
125
126func (m *SourceContext) GetCloudRepo() *CloudRepoSourceContext {
127	if x, ok := m.GetContext().(*SourceContext_CloudRepo); ok {
128		return x.CloudRepo
129	}
130	return nil
131}
132
133func (m *SourceContext) GetGerrit() *GerritSourceContext {
134	if x, ok := m.GetContext().(*SourceContext_Gerrit); ok {
135		return x.Gerrit
136	}
137	return nil
138}
139
140func (m *SourceContext) GetGit() *GitSourceContext {
141	if x, ok := m.GetContext().(*SourceContext_Git); ok {
142		return x.Git
143	}
144	return nil
145}
146
147func (m *SourceContext) GetLabels() map[string]string {
148	if m != nil {
149		return m.Labels
150	}
151	return nil
152}
153
154// XXX_OneofFuncs is for the internal use of the proto package.
155func (*SourceContext) 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{}) {
156	return _SourceContext_OneofMarshaler, _SourceContext_OneofUnmarshaler, _SourceContext_OneofSizer, []interface{}{
157		(*SourceContext_CloudRepo)(nil),
158		(*SourceContext_Gerrit)(nil),
159		(*SourceContext_Git)(nil),
160	}
161}
162
163func _SourceContext_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
164	m := msg.(*SourceContext)
165	// context
166	switch x := m.Context.(type) {
167	case *SourceContext_CloudRepo:
168		b.EncodeVarint(1<<3 | proto.WireBytes)
169		if err := b.EncodeMessage(x.CloudRepo); err != nil {
170			return err
171		}
172	case *SourceContext_Gerrit:
173		b.EncodeVarint(2<<3 | proto.WireBytes)
174		if err := b.EncodeMessage(x.Gerrit); err != nil {
175			return err
176		}
177	case *SourceContext_Git:
178		b.EncodeVarint(3<<3 | proto.WireBytes)
179		if err := b.EncodeMessage(x.Git); err != nil {
180			return err
181		}
182	case nil:
183	default:
184		return fmt.Errorf("SourceContext.Context has unexpected type %T", x)
185	}
186	return nil
187}
188
189func _SourceContext_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
190	m := msg.(*SourceContext)
191	switch tag {
192	case 1: // context.cloud_repo
193		if wire != proto.WireBytes {
194			return true, proto.ErrInternalBadWireType
195		}
196		msg := new(CloudRepoSourceContext)
197		err := b.DecodeMessage(msg)
198		m.Context = &SourceContext_CloudRepo{msg}
199		return true, err
200	case 2: // context.gerrit
201		if wire != proto.WireBytes {
202			return true, proto.ErrInternalBadWireType
203		}
204		msg := new(GerritSourceContext)
205		err := b.DecodeMessage(msg)
206		m.Context = &SourceContext_Gerrit{msg}
207		return true, err
208	case 3: // context.git
209		if wire != proto.WireBytes {
210			return true, proto.ErrInternalBadWireType
211		}
212		msg := new(GitSourceContext)
213		err := b.DecodeMessage(msg)
214		m.Context = &SourceContext_Git{msg}
215		return true, err
216	default:
217		return false, nil
218	}
219}
220
221func _SourceContext_OneofSizer(msg proto.Message) (n int) {
222	m := msg.(*SourceContext)
223	// context
224	switch x := m.Context.(type) {
225	case *SourceContext_CloudRepo:
226		s := proto.Size(x.CloudRepo)
227		n += 1 // tag and wire
228		n += proto.SizeVarint(uint64(s))
229		n += s
230	case *SourceContext_Gerrit:
231		s := proto.Size(x.Gerrit)
232		n += 1 // tag and wire
233		n += proto.SizeVarint(uint64(s))
234		n += s
235	case *SourceContext_Git:
236		s := proto.Size(x.Git)
237		n += 1 // tag and wire
238		n += proto.SizeVarint(uint64(s))
239		n += s
240	case nil:
241	default:
242		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
243	}
244	return n
245}
246
247// An alias to a repo revision.
248type AliasContext struct {
249	// The alias kind.
250	Kind AliasContext_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=grafeas.v1beta1.source.AliasContext_Kind" json:"kind,omitempty"`
251	// The alias name.
252	Name                 string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
253	XXX_NoUnkeyedLiteral struct{} `json:"-"`
254	XXX_unrecognized     []byte   `json:"-"`
255	XXX_sizecache        int32    `json:"-"`
256}
257
258func (m *AliasContext) Reset()         { *m = AliasContext{} }
259func (m *AliasContext) String() string { return proto.CompactTextString(m) }
260func (*AliasContext) ProtoMessage()    {}
261func (*AliasContext) Descriptor() ([]byte, []int) {
262	return fileDescriptor_source_b7360f0d8c9ed1c8, []int{1}
263}
264func (m *AliasContext) XXX_Unmarshal(b []byte) error {
265	return xxx_messageInfo_AliasContext.Unmarshal(m, b)
266}
267func (m *AliasContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
268	return xxx_messageInfo_AliasContext.Marshal(b, m, deterministic)
269}
270func (dst *AliasContext) XXX_Merge(src proto.Message) {
271	xxx_messageInfo_AliasContext.Merge(dst, src)
272}
273func (m *AliasContext) XXX_Size() int {
274	return xxx_messageInfo_AliasContext.Size(m)
275}
276func (m *AliasContext) XXX_DiscardUnknown() {
277	xxx_messageInfo_AliasContext.DiscardUnknown(m)
278}
279
280var xxx_messageInfo_AliasContext proto.InternalMessageInfo
281
282func (m *AliasContext) GetKind() AliasContext_Kind {
283	if m != nil {
284		return m.Kind
285	}
286	return AliasContext_KIND_UNSPECIFIED
287}
288
289func (m *AliasContext) GetName() string {
290	if m != nil {
291		return m.Name
292	}
293	return ""
294}
295
296// A CloudRepoSourceContext denotes a particular revision in a Google Cloud
297// Source Repo.
298type CloudRepoSourceContext struct {
299	// The ID of the repo.
300	RepoId *RepoId `protobuf:"bytes,1,opt,name=repo_id,json=repoId,proto3" json:"repo_id,omitempty"`
301	// A revision in a Cloud Repo can be identified by either its revision ID or
302	// its alias.
303	//
304	// Types that are valid to be assigned to Revision:
305	//	*CloudRepoSourceContext_RevisionId
306	//	*CloudRepoSourceContext_AliasContext
307	Revision             isCloudRepoSourceContext_Revision `protobuf_oneof:"revision"`
308	XXX_NoUnkeyedLiteral struct{}                          `json:"-"`
309	XXX_unrecognized     []byte                            `json:"-"`
310	XXX_sizecache        int32                             `json:"-"`
311}
312
313func (m *CloudRepoSourceContext) Reset()         { *m = CloudRepoSourceContext{} }
314func (m *CloudRepoSourceContext) String() string { return proto.CompactTextString(m) }
315func (*CloudRepoSourceContext) ProtoMessage()    {}
316func (*CloudRepoSourceContext) Descriptor() ([]byte, []int) {
317	return fileDescriptor_source_b7360f0d8c9ed1c8, []int{2}
318}
319func (m *CloudRepoSourceContext) XXX_Unmarshal(b []byte) error {
320	return xxx_messageInfo_CloudRepoSourceContext.Unmarshal(m, b)
321}
322func (m *CloudRepoSourceContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
323	return xxx_messageInfo_CloudRepoSourceContext.Marshal(b, m, deterministic)
324}
325func (dst *CloudRepoSourceContext) XXX_Merge(src proto.Message) {
326	xxx_messageInfo_CloudRepoSourceContext.Merge(dst, src)
327}
328func (m *CloudRepoSourceContext) XXX_Size() int {
329	return xxx_messageInfo_CloudRepoSourceContext.Size(m)
330}
331func (m *CloudRepoSourceContext) XXX_DiscardUnknown() {
332	xxx_messageInfo_CloudRepoSourceContext.DiscardUnknown(m)
333}
334
335var xxx_messageInfo_CloudRepoSourceContext proto.InternalMessageInfo
336
337func (m *CloudRepoSourceContext) GetRepoId() *RepoId {
338	if m != nil {
339		return m.RepoId
340	}
341	return nil
342}
343
344type isCloudRepoSourceContext_Revision interface {
345	isCloudRepoSourceContext_Revision()
346}
347
348type CloudRepoSourceContext_RevisionId struct {
349	RevisionId string `protobuf:"bytes,2,opt,name=revision_id,json=revisionId,proto3,oneof"`
350}
351
352type CloudRepoSourceContext_AliasContext struct {
353	AliasContext *AliasContext `protobuf:"bytes,3,opt,name=alias_context,json=aliasContext,proto3,oneof"`
354}
355
356func (*CloudRepoSourceContext_RevisionId) isCloudRepoSourceContext_Revision() {}
357
358func (*CloudRepoSourceContext_AliasContext) isCloudRepoSourceContext_Revision() {}
359
360func (m *CloudRepoSourceContext) GetRevision() isCloudRepoSourceContext_Revision {
361	if m != nil {
362		return m.Revision
363	}
364	return nil
365}
366
367func (m *CloudRepoSourceContext) GetRevisionId() string {
368	if x, ok := m.GetRevision().(*CloudRepoSourceContext_RevisionId); ok {
369		return x.RevisionId
370	}
371	return ""
372}
373
374func (m *CloudRepoSourceContext) GetAliasContext() *AliasContext {
375	if x, ok := m.GetRevision().(*CloudRepoSourceContext_AliasContext); ok {
376		return x.AliasContext
377	}
378	return nil
379}
380
381// XXX_OneofFuncs is for the internal use of the proto package.
382func (*CloudRepoSourceContext) 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{}) {
383	return _CloudRepoSourceContext_OneofMarshaler, _CloudRepoSourceContext_OneofUnmarshaler, _CloudRepoSourceContext_OneofSizer, []interface{}{
384		(*CloudRepoSourceContext_RevisionId)(nil),
385		(*CloudRepoSourceContext_AliasContext)(nil),
386	}
387}
388
389func _CloudRepoSourceContext_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
390	m := msg.(*CloudRepoSourceContext)
391	// revision
392	switch x := m.Revision.(type) {
393	case *CloudRepoSourceContext_RevisionId:
394		b.EncodeVarint(2<<3 | proto.WireBytes)
395		b.EncodeStringBytes(x.RevisionId)
396	case *CloudRepoSourceContext_AliasContext:
397		b.EncodeVarint(3<<3 | proto.WireBytes)
398		if err := b.EncodeMessage(x.AliasContext); err != nil {
399			return err
400		}
401	case nil:
402	default:
403		return fmt.Errorf("CloudRepoSourceContext.Revision has unexpected type %T", x)
404	}
405	return nil
406}
407
408func _CloudRepoSourceContext_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
409	m := msg.(*CloudRepoSourceContext)
410	switch tag {
411	case 2: // revision.revision_id
412		if wire != proto.WireBytes {
413			return true, proto.ErrInternalBadWireType
414		}
415		x, err := b.DecodeStringBytes()
416		m.Revision = &CloudRepoSourceContext_RevisionId{x}
417		return true, err
418	case 3: // revision.alias_context
419		if wire != proto.WireBytes {
420			return true, proto.ErrInternalBadWireType
421		}
422		msg := new(AliasContext)
423		err := b.DecodeMessage(msg)
424		m.Revision = &CloudRepoSourceContext_AliasContext{msg}
425		return true, err
426	default:
427		return false, nil
428	}
429}
430
431func _CloudRepoSourceContext_OneofSizer(msg proto.Message) (n int) {
432	m := msg.(*CloudRepoSourceContext)
433	// revision
434	switch x := m.Revision.(type) {
435	case *CloudRepoSourceContext_RevisionId:
436		n += 1 // tag and wire
437		n += proto.SizeVarint(uint64(len(x.RevisionId)))
438		n += len(x.RevisionId)
439	case *CloudRepoSourceContext_AliasContext:
440		s := proto.Size(x.AliasContext)
441		n += 1 // tag and wire
442		n += proto.SizeVarint(uint64(s))
443		n += s
444	case nil:
445	default:
446		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
447	}
448	return n
449}
450
451// A SourceContext referring to a Gerrit project.
452type GerritSourceContext struct {
453	// The URI of a running Gerrit instance.
454	HostUri string `protobuf:"bytes,1,opt,name=host_uri,json=hostUri,proto3" json:"host_uri,omitempty"`
455	// The full project name within the host. Projects may be nested, so
456	// "project/subproject" is a valid project name. The "repo name" is the
457	// hostURI/project.
458	GerritProject string `protobuf:"bytes,2,opt,name=gerrit_project,json=gerritProject,proto3" json:"gerrit_project,omitempty"`
459	// A revision in a Gerrit project can be identified by either its revision ID
460	// or its alias.
461	//
462	// Types that are valid to be assigned to Revision:
463	//	*GerritSourceContext_RevisionId
464	//	*GerritSourceContext_AliasContext
465	Revision             isGerritSourceContext_Revision `protobuf_oneof:"revision"`
466	XXX_NoUnkeyedLiteral struct{}                       `json:"-"`
467	XXX_unrecognized     []byte                         `json:"-"`
468	XXX_sizecache        int32                          `json:"-"`
469}
470
471func (m *GerritSourceContext) Reset()         { *m = GerritSourceContext{} }
472func (m *GerritSourceContext) String() string { return proto.CompactTextString(m) }
473func (*GerritSourceContext) ProtoMessage()    {}
474func (*GerritSourceContext) Descriptor() ([]byte, []int) {
475	return fileDescriptor_source_b7360f0d8c9ed1c8, []int{3}
476}
477func (m *GerritSourceContext) XXX_Unmarshal(b []byte) error {
478	return xxx_messageInfo_GerritSourceContext.Unmarshal(m, b)
479}
480func (m *GerritSourceContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
481	return xxx_messageInfo_GerritSourceContext.Marshal(b, m, deterministic)
482}
483func (dst *GerritSourceContext) XXX_Merge(src proto.Message) {
484	xxx_messageInfo_GerritSourceContext.Merge(dst, src)
485}
486func (m *GerritSourceContext) XXX_Size() int {
487	return xxx_messageInfo_GerritSourceContext.Size(m)
488}
489func (m *GerritSourceContext) XXX_DiscardUnknown() {
490	xxx_messageInfo_GerritSourceContext.DiscardUnknown(m)
491}
492
493var xxx_messageInfo_GerritSourceContext proto.InternalMessageInfo
494
495func (m *GerritSourceContext) GetHostUri() string {
496	if m != nil {
497		return m.HostUri
498	}
499	return ""
500}
501
502func (m *GerritSourceContext) GetGerritProject() string {
503	if m != nil {
504		return m.GerritProject
505	}
506	return ""
507}
508
509type isGerritSourceContext_Revision interface {
510	isGerritSourceContext_Revision()
511}
512
513type GerritSourceContext_RevisionId struct {
514	RevisionId string `protobuf:"bytes,3,opt,name=revision_id,json=revisionId,proto3,oneof"`
515}
516
517type GerritSourceContext_AliasContext struct {
518	AliasContext *AliasContext `protobuf:"bytes,4,opt,name=alias_context,json=aliasContext,proto3,oneof"`
519}
520
521func (*GerritSourceContext_RevisionId) isGerritSourceContext_Revision() {}
522
523func (*GerritSourceContext_AliasContext) isGerritSourceContext_Revision() {}
524
525func (m *GerritSourceContext) GetRevision() isGerritSourceContext_Revision {
526	if m != nil {
527		return m.Revision
528	}
529	return nil
530}
531
532func (m *GerritSourceContext) GetRevisionId() string {
533	if x, ok := m.GetRevision().(*GerritSourceContext_RevisionId); ok {
534		return x.RevisionId
535	}
536	return ""
537}
538
539func (m *GerritSourceContext) GetAliasContext() *AliasContext {
540	if x, ok := m.GetRevision().(*GerritSourceContext_AliasContext); ok {
541		return x.AliasContext
542	}
543	return nil
544}
545
546// XXX_OneofFuncs is for the internal use of the proto package.
547func (*GerritSourceContext) 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{}) {
548	return _GerritSourceContext_OneofMarshaler, _GerritSourceContext_OneofUnmarshaler, _GerritSourceContext_OneofSizer, []interface{}{
549		(*GerritSourceContext_RevisionId)(nil),
550		(*GerritSourceContext_AliasContext)(nil),
551	}
552}
553
554func _GerritSourceContext_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
555	m := msg.(*GerritSourceContext)
556	// revision
557	switch x := m.Revision.(type) {
558	case *GerritSourceContext_RevisionId:
559		b.EncodeVarint(3<<3 | proto.WireBytes)
560		b.EncodeStringBytes(x.RevisionId)
561	case *GerritSourceContext_AliasContext:
562		b.EncodeVarint(4<<3 | proto.WireBytes)
563		if err := b.EncodeMessage(x.AliasContext); err != nil {
564			return err
565		}
566	case nil:
567	default:
568		return fmt.Errorf("GerritSourceContext.Revision has unexpected type %T", x)
569	}
570	return nil
571}
572
573func _GerritSourceContext_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
574	m := msg.(*GerritSourceContext)
575	switch tag {
576	case 3: // revision.revision_id
577		if wire != proto.WireBytes {
578			return true, proto.ErrInternalBadWireType
579		}
580		x, err := b.DecodeStringBytes()
581		m.Revision = &GerritSourceContext_RevisionId{x}
582		return true, err
583	case 4: // revision.alias_context
584		if wire != proto.WireBytes {
585			return true, proto.ErrInternalBadWireType
586		}
587		msg := new(AliasContext)
588		err := b.DecodeMessage(msg)
589		m.Revision = &GerritSourceContext_AliasContext{msg}
590		return true, err
591	default:
592		return false, nil
593	}
594}
595
596func _GerritSourceContext_OneofSizer(msg proto.Message) (n int) {
597	m := msg.(*GerritSourceContext)
598	// revision
599	switch x := m.Revision.(type) {
600	case *GerritSourceContext_RevisionId:
601		n += 1 // tag and wire
602		n += proto.SizeVarint(uint64(len(x.RevisionId)))
603		n += len(x.RevisionId)
604	case *GerritSourceContext_AliasContext:
605		s := proto.Size(x.AliasContext)
606		n += 1 // tag and wire
607		n += proto.SizeVarint(uint64(s))
608		n += s
609	case nil:
610	default:
611		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
612	}
613	return n
614}
615
616// A GitSourceContext denotes a particular revision in a third party Git
617// repository (e.g., GitHub).
618type GitSourceContext struct {
619	// Git repository URL.
620	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
621	// Git commit hash.
622	RevisionId           string   `protobuf:"bytes,2,opt,name=revision_id,json=revisionId,proto3" json:"revision_id,omitempty"`
623	XXX_NoUnkeyedLiteral struct{} `json:"-"`
624	XXX_unrecognized     []byte   `json:"-"`
625	XXX_sizecache        int32    `json:"-"`
626}
627
628func (m *GitSourceContext) Reset()         { *m = GitSourceContext{} }
629func (m *GitSourceContext) String() string { return proto.CompactTextString(m) }
630func (*GitSourceContext) ProtoMessage()    {}
631func (*GitSourceContext) Descriptor() ([]byte, []int) {
632	return fileDescriptor_source_b7360f0d8c9ed1c8, []int{4}
633}
634func (m *GitSourceContext) XXX_Unmarshal(b []byte) error {
635	return xxx_messageInfo_GitSourceContext.Unmarshal(m, b)
636}
637func (m *GitSourceContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
638	return xxx_messageInfo_GitSourceContext.Marshal(b, m, deterministic)
639}
640func (dst *GitSourceContext) XXX_Merge(src proto.Message) {
641	xxx_messageInfo_GitSourceContext.Merge(dst, src)
642}
643func (m *GitSourceContext) XXX_Size() int {
644	return xxx_messageInfo_GitSourceContext.Size(m)
645}
646func (m *GitSourceContext) XXX_DiscardUnknown() {
647	xxx_messageInfo_GitSourceContext.DiscardUnknown(m)
648}
649
650var xxx_messageInfo_GitSourceContext proto.InternalMessageInfo
651
652func (m *GitSourceContext) GetUrl() string {
653	if m != nil {
654		return m.Url
655	}
656	return ""
657}
658
659func (m *GitSourceContext) GetRevisionId() string {
660	if m != nil {
661		return m.RevisionId
662	}
663	return ""
664}
665
666// A unique identifier for a Cloud Repo.
667type RepoId struct {
668	// A cloud repo can be identified by either its project ID and repository name
669	// combination, or its globally unique identifier.
670	//
671	// Types that are valid to be assigned to Id:
672	//	*RepoId_ProjectRepoId
673	//	*RepoId_Uid
674	Id                   isRepoId_Id `protobuf_oneof:"id"`
675	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
676	XXX_unrecognized     []byte      `json:"-"`
677	XXX_sizecache        int32       `json:"-"`
678}
679
680func (m *RepoId) Reset()         { *m = RepoId{} }
681func (m *RepoId) String() string { return proto.CompactTextString(m) }
682func (*RepoId) ProtoMessage()    {}
683func (*RepoId) Descriptor() ([]byte, []int) {
684	return fileDescriptor_source_b7360f0d8c9ed1c8, []int{5}
685}
686func (m *RepoId) XXX_Unmarshal(b []byte) error {
687	return xxx_messageInfo_RepoId.Unmarshal(m, b)
688}
689func (m *RepoId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
690	return xxx_messageInfo_RepoId.Marshal(b, m, deterministic)
691}
692func (dst *RepoId) XXX_Merge(src proto.Message) {
693	xxx_messageInfo_RepoId.Merge(dst, src)
694}
695func (m *RepoId) XXX_Size() int {
696	return xxx_messageInfo_RepoId.Size(m)
697}
698func (m *RepoId) XXX_DiscardUnknown() {
699	xxx_messageInfo_RepoId.DiscardUnknown(m)
700}
701
702var xxx_messageInfo_RepoId proto.InternalMessageInfo
703
704type isRepoId_Id interface {
705	isRepoId_Id()
706}
707
708type RepoId_ProjectRepoId struct {
709	ProjectRepoId *ProjectRepoId `protobuf:"bytes,1,opt,name=project_repo_id,json=projectRepoId,proto3,oneof"`
710}
711
712type RepoId_Uid struct {
713	Uid string `protobuf:"bytes,2,opt,name=uid,proto3,oneof"`
714}
715
716func (*RepoId_ProjectRepoId) isRepoId_Id() {}
717
718func (*RepoId_Uid) isRepoId_Id() {}
719
720func (m *RepoId) GetId() isRepoId_Id {
721	if m != nil {
722		return m.Id
723	}
724	return nil
725}
726
727func (m *RepoId) GetProjectRepoId() *ProjectRepoId {
728	if x, ok := m.GetId().(*RepoId_ProjectRepoId); ok {
729		return x.ProjectRepoId
730	}
731	return nil
732}
733
734func (m *RepoId) GetUid() string {
735	if x, ok := m.GetId().(*RepoId_Uid); ok {
736		return x.Uid
737	}
738	return ""
739}
740
741// XXX_OneofFuncs is for the internal use of the proto package.
742func (*RepoId) 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{}) {
743	return _RepoId_OneofMarshaler, _RepoId_OneofUnmarshaler, _RepoId_OneofSizer, []interface{}{
744		(*RepoId_ProjectRepoId)(nil),
745		(*RepoId_Uid)(nil),
746	}
747}
748
749func _RepoId_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
750	m := msg.(*RepoId)
751	// id
752	switch x := m.Id.(type) {
753	case *RepoId_ProjectRepoId:
754		b.EncodeVarint(1<<3 | proto.WireBytes)
755		if err := b.EncodeMessage(x.ProjectRepoId); err != nil {
756			return err
757		}
758	case *RepoId_Uid:
759		b.EncodeVarint(2<<3 | proto.WireBytes)
760		b.EncodeStringBytes(x.Uid)
761	case nil:
762	default:
763		return fmt.Errorf("RepoId.Id has unexpected type %T", x)
764	}
765	return nil
766}
767
768func _RepoId_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
769	m := msg.(*RepoId)
770	switch tag {
771	case 1: // id.project_repo_id
772		if wire != proto.WireBytes {
773			return true, proto.ErrInternalBadWireType
774		}
775		msg := new(ProjectRepoId)
776		err := b.DecodeMessage(msg)
777		m.Id = &RepoId_ProjectRepoId{msg}
778		return true, err
779	case 2: // id.uid
780		if wire != proto.WireBytes {
781			return true, proto.ErrInternalBadWireType
782		}
783		x, err := b.DecodeStringBytes()
784		m.Id = &RepoId_Uid{x}
785		return true, err
786	default:
787		return false, nil
788	}
789}
790
791func _RepoId_OneofSizer(msg proto.Message) (n int) {
792	m := msg.(*RepoId)
793	// id
794	switch x := m.Id.(type) {
795	case *RepoId_ProjectRepoId:
796		s := proto.Size(x.ProjectRepoId)
797		n += 1 // tag and wire
798		n += proto.SizeVarint(uint64(s))
799		n += s
800	case *RepoId_Uid:
801		n += 1 // tag and wire
802		n += proto.SizeVarint(uint64(len(x.Uid)))
803		n += len(x.Uid)
804	case nil:
805	default:
806		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
807	}
808	return n
809}
810
811// Selects a repo using a Google Cloud Platform project ID (e.g.,
812// winged-cargo-31) and a repo name within that project.
813type ProjectRepoId struct {
814	// The ID of the project.
815	ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
816	// The name of the repo. Leave empty for the default repo.
817	RepoName             string   `protobuf:"bytes,2,opt,name=repo_name,json=repoName,proto3" json:"repo_name,omitempty"`
818	XXX_NoUnkeyedLiteral struct{} `json:"-"`
819	XXX_unrecognized     []byte   `json:"-"`
820	XXX_sizecache        int32    `json:"-"`
821}
822
823func (m *ProjectRepoId) Reset()         { *m = ProjectRepoId{} }
824func (m *ProjectRepoId) String() string { return proto.CompactTextString(m) }
825func (*ProjectRepoId) ProtoMessage()    {}
826func (*ProjectRepoId) Descriptor() ([]byte, []int) {
827	return fileDescriptor_source_b7360f0d8c9ed1c8, []int{6}
828}
829func (m *ProjectRepoId) XXX_Unmarshal(b []byte) error {
830	return xxx_messageInfo_ProjectRepoId.Unmarshal(m, b)
831}
832func (m *ProjectRepoId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
833	return xxx_messageInfo_ProjectRepoId.Marshal(b, m, deterministic)
834}
835func (dst *ProjectRepoId) XXX_Merge(src proto.Message) {
836	xxx_messageInfo_ProjectRepoId.Merge(dst, src)
837}
838func (m *ProjectRepoId) XXX_Size() int {
839	return xxx_messageInfo_ProjectRepoId.Size(m)
840}
841func (m *ProjectRepoId) XXX_DiscardUnknown() {
842	xxx_messageInfo_ProjectRepoId.DiscardUnknown(m)
843}
844
845var xxx_messageInfo_ProjectRepoId proto.InternalMessageInfo
846
847func (m *ProjectRepoId) GetProjectId() string {
848	if m != nil {
849		return m.ProjectId
850	}
851	return ""
852}
853
854func (m *ProjectRepoId) GetRepoName() string {
855	if m != nil {
856		return m.RepoName
857	}
858	return ""
859}
860
861func init() {
862	proto.RegisterType((*SourceContext)(nil), "grafeas.v1beta1.source.SourceContext")
863	proto.RegisterMapType((map[string]string)(nil), "grafeas.v1beta1.source.SourceContext.LabelsEntry")
864	proto.RegisterType((*AliasContext)(nil), "grafeas.v1beta1.source.AliasContext")
865	proto.RegisterType((*CloudRepoSourceContext)(nil), "grafeas.v1beta1.source.CloudRepoSourceContext")
866	proto.RegisterType((*GerritSourceContext)(nil), "grafeas.v1beta1.source.GerritSourceContext")
867	proto.RegisterType((*GitSourceContext)(nil), "grafeas.v1beta1.source.GitSourceContext")
868	proto.RegisterType((*RepoId)(nil), "grafeas.v1beta1.source.RepoId")
869	proto.RegisterType((*ProjectRepoId)(nil), "grafeas.v1beta1.source.ProjectRepoId")
870	proto.RegisterEnum("grafeas.v1beta1.source.AliasContext_Kind", AliasContext_Kind_name, AliasContext_Kind_value)
871}
872
873func init() {
874	proto.RegisterFile("google/devtools/containeranalysis/v1beta1/source/source.proto", fileDescriptor_source_b7360f0d8c9ed1c8)
875}
876
877var fileDescriptor_source_b7360f0d8c9ed1c8 = []byte{
878	// 640 bytes of a gzipped FileDescriptorProto
879	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xdd, 0x4e, 0xdb, 0x30,
880	0x18, 0x6d, 0xda, 0xd0, 0x92, 0xaf, 0x94, 0x45, 0x1e, 0x42, 0x65, 0xd3, 0x36, 0x16, 0x0d, 0x89,
881	0x69, 0x52, 0x2a, 0xd8, 0xc5, 0x7e, 0xd1, 0x44, 0x21, 0xd0, 0xa8, 0x8c, 0xa2, 0x30, 0xd0, 0xb4,
882	0x9b, 0xc8, 0x34, 0x5e, 0xe6, 0x11, 0xe2, 0xca, 0x49, 0xaa, 0xa1, 0xbd, 0x0d, 0xef, 0xb3, 0xab,
883	0xbd, 0xcb, 0xae, 0x27, 0x3b, 0x8e, 0x94, 0xb2, 0x46, 0xe2, 0x62, 0x57, 0xb6, 0x8f, 0xbf, 0x73,
884	0xfc, 0xfd, 0x1c, 0x19, 0x76, 0x42, 0xc6, 0xc2, 0x88, 0xf4, 0x02, 0x32, 0x4d, 0x19, 0x8b, 0x92,
885	0xde, 0x98, 0xc5, 0x29, 0xa6, 0x31, 0xe1, 0x38, 0xc6, 0xd1, 0x75, 0x42, 0x93, 0xde, 0x74, 0xeb,
886	0x82, 0xa4, 0x78, 0xab, 0x97, 0xb0, 0x8c, 0x8f, 0x89, 0x5a, 0xec, 0x09, 0x67, 0x29, 0x43, 0xab,
887	0x21, 0xc7, 0x5f, 0x09, 0x4e, 0x6c, 0x15, 0x64, 0xe7, 0xb7, 0xd6, 0x9f, 0x3a, 0x74, 0x4e, 0xe5,
888	0x76, 0x8f, 0xc5, 0x29, 0xf9, 0x91, 0xa2, 0x11, 0xc0, 0x38, 0x62, 0x59, 0xe0, 0x73, 0x32, 0x61,
889	0x5d, 0x6d, 0x5d, 0xdb, 0x6c, 0x6f, 0xdb, 0xf6, 0x7c, 0xba, 0xbd, 0x27, 0x22, 0x3d, 0x32, 0x61,
890	0x33, 0x1a, 0x83, 0x9a, 0x67, 0x8c, 0x8b, 0x1b, 0xe4, 0x40, 0x33, 0x24, 0x9c, 0xd3, 0xb4, 0x5b,
891	0x97, 0x62, 0x2f, 0xaa, 0xc4, 0x0e, 0x65, 0xd4, 0x6d, 0x25, 0x45, 0x46, 0xef, 0xa1, 0x11, 0xd2,
892	0xb4, 0xdb, 0x90, 0x1a, 0x9b, 0x95, 0x1a, 0xff, 0x0a, 0x08, 0x1a, 0x72, 0xa1, 0x19, 0xe1, 0x0b,
893	0x12, 0x25, 0x5d, 0x7d, 0xbd, 0xb1, 0xd9, 0xde, 0xde, 0xaa, 0x12, 0x98, 0x61, 0xdb, 0x47, 0x92,
894	0xe3, 0xc4, 0x29, 0xbf, 0xf6, 0x94, 0xc0, 0x83, 0x37, 0xd0, 0x2e, 0xc1, 0xc8, 0x84, 0xc6, 0x25,
895	0xb9, 0x96, 0x8d, 0x32, 0x3c, 0xb1, 0x45, 0x2b, 0xb0, 0x30, 0xc5, 0x51, 0x46, 0x64, 0xbd, 0x86,
896	0x97, 0x1f, 0xde, 0xd6, 0x5f, 0x6b, 0x7d, 0x03, 0x5a, 0xe3, 0x5c, 0xd9, 0xba, 0xd1, 0x60, 0x69,
897	0x37, 0xa2, 0x38, 0x29, 0xfa, 0xbe, 0x03, 0xfa, 0x25, 0x8d, 0x03, 0x29, 0xb4, 0xbc, 0xfd, 0xbc,
898	0x2a, 0xbf, 0x32, 0xc7, 0x1e, 0xd2, 0x38, 0xf0, 0x24, 0x0d, 0x21, 0xd0, 0x63, 0x7c, 0x55, 0xbc,
899	0x29, 0xf7, 0xd6, 0x07, 0xd0, 0x45, 0x04, 0x5a, 0x01, 0x73, 0xe8, 0x1e, 0xef, 0xfb, 0x67, 0xc7,
900	0xa7, 0x27, 0xce, 0x9e, 0x7b, 0xe0, 0x3a, 0xfb, 0x66, 0x0d, 0x19, 0xb0, 0x70, 0xe0, 0x7e, 0x76,
901	0xf6, 0x4d, 0x0d, 0xb5, 0xa1, 0xf5, 0x71, 0x74, 0xbe, 0xdb, 0x3f, 0x72, 0xcc, 0xba, 0xc0, 0x47,
902	0x9f, 0x06, 0x8e, 0x67, 0xea, 0xd6, 0x2f, 0x0d, 0x56, 0xe7, 0x8f, 0x18, 0xbd, 0x82, 0x96, 0x30,
903	0x88, 0x4f, 0x03, 0xe5, 0x91, 0xc7, 0x55, 0x19, 0x0b, 0xae, 0x1b, 0x78, 0x4d, 0x2e, 0x57, 0xf4,
904	0x14, 0xda, 0x9c, 0x4c, 0x69, 0x42, 0x59, 0x2c, 0xc8, 0x32, 0xdf, 0x41, 0xcd, 0x83, 0x02, 0x74,
905	0x03, 0x34, 0x84, 0x0e, 0x16, 0x65, 0xfa, 0xaa, 0x59, 0x6a, 0xe8, 0xcf, 0xee, 0xd2, 0x93, 0x41,
906	0xcd, 0x5b, 0xc2, 0xa5, 0x73, 0x1f, 0x60, 0xb1, 0x90, 0xb6, 0x7e, 0x6b, 0x70, 0x7f, 0x8e, 0xcb,
907	0xd0, 0x1a, 0x2c, 0x7e, 0x63, 0x49, 0xea, 0x67, 0x9c, 0xaa, 0x41, 0xb6, 0xc4, 0xf9, 0x8c, 0x53,
908	0xb4, 0x01, 0xcb, 0xb9, 0x01, 0xfd, 0x09, 0x67, 0xdf, 0xc9, 0x38, 0x55, 0x1d, 0xee, 0xe4, 0xe8,
909	0x49, 0x0e, 0xde, 0xae, 0xaa, 0x71, 0x97, 0xaa, 0xf4, 0xff, 0x54, 0x95, 0x03, 0xe6, 0x6d, 0xdb,
910	0x0b, 0x57, 0x66, 0x3c, 0x2a, 0x5c, 0x99, 0xf1, 0x08, 0x3d, 0x99, 0xd3, 0xf7, 0x72, 0x7e, 0x56,
911	0x02, 0xcd, 0x7c, 0x54, 0x68, 0x04, 0xf7, 0x54, 0xb1, 0xfe, 0xec, 0x8c, 0x37, 0xaa, 0x72, 0x55,
912	0x6d, 0xc8, 0xf9, 0x83, 0x9a, 0xd7, 0x99, 0x94, 0x01, 0x84, 0xa0, 0x91, 0x95, 0x66, 0x2d, 0x0e,
913	0x7d, 0x1d, 0xea, 0x34, 0xb0, 0x86, 0xd0, 0x99, 0xe1, 0xa2, 0x47, 0x00, 0xc5, 0xdb, 0xea, 0x59,
914	0xc3, 0x33, 0x14, 0xe2, 0x06, 0xe8, 0x21, 0x18, 0x32, 0xa5, 0x92, 0xd7, 0x17, 0x05, 0x70, 0x8c,
915	0xaf, 0x48, 0xff, 0x27, 0xac, 0x51, 0x56, 0x91, 0xe2, 0x89, 0xf6, 0xe5, 0x3c, 0xff, 0x42, 0xed,
916	0x90, 0x45, 0x38, 0x0e, 0x6d, 0xc6, 0xc3, 0x5e, 0x48, 0x62, 0xf9, 0x3f, 0xf6, 0xf2, 0x2b, 0x3c,
917	0xa1, 0xc9, 0xdd, 0x7f, 0xd8, 0x77, 0xf9, 0x72, 0x53, 0x6f, 0x1c, 0x7a, 0xbb, 0x17, 0x4d, 0x29,
918	0xf4, 0xf2, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x39, 0x33, 0xb6, 0xbe, 0xa9, 0x05, 0x00, 0x00,
919}
920