OSDN Git Service

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