1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: google/devtools/source/v1/source_context.proto
5 Package source is a generated protocol buffer package.
7 It is generated from these files:
8 google/devtools/source/v1/source_context.proto
10 It has these top-level messages:
14 CloudRepoSourceContext
15 CloudWorkspaceSourceContext
24 import proto "github.com/golang/protobuf/proto"
27 import _ "google.golang.org/genproto/googleapis/api/annotations"
29 // Reference imports to suppress errors if they are not otherwise used.
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
40 // The type of an Alias.
41 type AliasContext_Kind int32
45 AliasContext_ANY AliasContext_Kind = 0
47 AliasContext_FIXED AliasContext_Kind = 1
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
56 var AliasContext_Kind_name = map[int32]string{
62 var AliasContext_Kind_value = map[string]int32{
69 func (x AliasContext_Kind) String() string {
70 return proto.EnumName(AliasContext_Kind_name, int32(x))
72 func (AliasContext_Kind) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
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.
79 // Types that are valid to be assigned to Context:
80 // *SourceContext_CloudRepo
81 // *SourceContext_CloudWorkspace
82 // *SourceContext_Gerrit
84 Context isSourceContext_Context `protobuf_oneof:"context"`
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} }
92 type isSourceContext_Context interface {
93 isSourceContext_Context()
96 type SourceContext_CloudRepo struct {
97 CloudRepo *CloudRepoSourceContext `protobuf:"bytes,1,opt,name=cloud_repo,json=cloudRepo,oneof"`
99 type SourceContext_CloudWorkspace struct {
100 CloudWorkspace *CloudWorkspaceSourceContext `protobuf:"bytes,2,opt,name=cloud_workspace,json=cloudWorkspace,oneof"`
102 type SourceContext_Gerrit struct {
103 Gerrit *GerritSourceContext `protobuf:"bytes,3,opt,name=gerrit,oneof"`
105 type SourceContext_Git struct {
106 Git *GitSourceContext `protobuf:"bytes,6,opt,name=git,oneof"`
109 func (*SourceContext_CloudRepo) isSourceContext_Context() {}
110 func (*SourceContext_CloudWorkspace) isSourceContext_Context() {}
111 func (*SourceContext_Gerrit) isSourceContext_Context() {}
112 func (*SourceContext_Git) isSourceContext_Context() {}
114 func (m *SourceContext) GetContext() isSourceContext_Context {
121 func (m *SourceContext) GetCloudRepo() *CloudRepoSourceContext {
122 if x, ok := m.GetContext().(*SourceContext_CloudRepo); ok {
128 func (m *SourceContext) GetCloudWorkspace() *CloudWorkspaceSourceContext {
129 if x, ok := m.GetContext().(*SourceContext_CloudWorkspace); ok {
130 return x.CloudWorkspace
135 func (m *SourceContext) GetGerrit() *GerritSourceContext {
136 if x, ok := m.GetContext().(*SourceContext_Gerrit); ok {
142 func (m *SourceContext) GetGit() *GitSourceContext {
143 if x, ok := m.GetContext().(*SourceContext_Git); ok {
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),
159 func _SourceContext_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
160 m := msg.(*SourceContext)
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 {
168 case *SourceContext_CloudWorkspace:
169 b.EncodeVarint(2<<3 | proto.WireBytes)
170 if err := b.EncodeMessage(x.CloudWorkspace); err != nil {
173 case *SourceContext_Gerrit:
174 b.EncodeVarint(3<<3 | proto.WireBytes)
175 if err := b.EncodeMessage(x.Gerrit); err != nil {
178 case *SourceContext_Git:
179 b.EncodeVarint(6<<3 | proto.WireBytes)
180 if err := b.EncodeMessage(x.Git); err != nil {
185 return fmt.Errorf("SourceContext.Context has unexpected type %T", x)
190 func _SourceContext_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
191 m := msg.(*SourceContext)
193 case 1: // context.cloud_repo
194 if wire != proto.WireBytes {
195 return true, proto.ErrInternalBadWireType
197 msg := new(CloudRepoSourceContext)
198 err := b.DecodeMessage(msg)
199 m.Context = &SourceContext_CloudRepo{msg}
201 case 2: // context.cloud_workspace
202 if wire != proto.WireBytes {
203 return true, proto.ErrInternalBadWireType
205 msg := new(CloudWorkspaceSourceContext)
206 err := b.DecodeMessage(msg)
207 m.Context = &SourceContext_CloudWorkspace{msg}
209 case 3: // context.gerrit
210 if wire != proto.WireBytes {
211 return true, proto.ErrInternalBadWireType
213 msg := new(GerritSourceContext)
214 err := b.DecodeMessage(msg)
215 m.Context = &SourceContext_Gerrit{msg}
217 case 6: // context.git
218 if wire != proto.WireBytes {
219 return true, proto.ErrInternalBadWireType
221 msg := new(GitSourceContext)
222 err := b.DecodeMessage(msg)
223 m.Context = &SourceContext_Git{msg}
230 func _SourceContext_OneofSizer(msg proto.Message) (n int) {
231 m := msg.(*SourceContext)
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))
239 case *SourceContext_CloudWorkspace:
240 s := proto.Size(x.CloudWorkspace)
241 n += proto.SizeVarint(2<<3 | proto.WireBytes)
242 n += proto.SizeVarint(uint64(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))
249 case *SourceContext_Git:
250 s := proto.Size(x.Git)
251 n += proto.SizeVarint(6<<3 | proto.WireBytes)
252 n += proto.SizeVarint(uint64(s))
256 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
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"`
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} }
275 func (m *ExtendedSourceContext) GetContext() *SourceContext {
282 func (m *ExtendedSourceContext) GetLabels() map[string]string {
289 // An alias to a repo revision.
290 type AliasContext struct {
292 Kind AliasContext_Kind `protobuf:"varint,1,opt,name=kind,enum=google.devtools.source.v1.AliasContext_Kind" json:"kind,omitempty"`
294 Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
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} }
302 func (m *AliasContext) GetKind() AliasContext_Kind {
306 return AliasContext_ANY
309 func (m *AliasContext) GetName() string {
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
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"`
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} }
336 type isCloudRepoSourceContext_Revision interface {
337 isCloudRepoSourceContext_Revision()
340 type CloudRepoSourceContext_RevisionId struct {
341 RevisionId string `protobuf:"bytes,2,opt,name=revision_id,json=revisionId,oneof"`
343 type CloudRepoSourceContext_AliasName struct {
344 AliasName string `protobuf:"bytes,3,opt,name=alias_name,json=aliasName,oneof"`
346 type CloudRepoSourceContext_AliasContext struct {
347 AliasContext *AliasContext `protobuf:"bytes,4,opt,name=alias_context,json=aliasContext,oneof"`
350 func (*CloudRepoSourceContext_RevisionId) isCloudRepoSourceContext_Revision() {}
351 func (*CloudRepoSourceContext_AliasName) isCloudRepoSourceContext_Revision() {}
352 func (*CloudRepoSourceContext_AliasContext) isCloudRepoSourceContext_Revision() {}
354 func (m *CloudRepoSourceContext) GetRevision() isCloudRepoSourceContext_Revision {
361 func (m *CloudRepoSourceContext) GetRepoId() *RepoId {
368 func (m *CloudRepoSourceContext) GetRevisionId() string {
369 if x, ok := m.GetRevision().(*CloudRepoSourceContext_RevisionId); ok {
375 func (m *CloudRepoSourceContext) GetAliasName() string {
376 if x, ok := m.GetRevision().(*CloudRepoSourceContext_AliasName); ok {
382 func (m *CloudRepoSourceContext) GetAliasContext() *AliasContext {
383 if x, ok := m.GetRevision().(*CloudRepoSourceContext_AliasContext); ok {
384 return x.AliasContext
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),
398 func _CloudRepoSourceContext_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
399 m := msg.(*CloudRepoSourceContext)
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 {
415 return fmt.Errorf("CloudRepoSourceContext.Revision has unexpected type %T", x)
420 func _CloudRepoSourceContext_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
421 m := msg.(*CloudRepoSourceContext)
423 case 2: // revision.revision_id
424 if wire != proto.WireBytes {
425 return true, proto.ErrInternalBadWireType
427 x, err := b.DecodeStringBytes()
428 m.Revision = &CloudRepoSourceContext_RevisionId{x}
430 case 3: // revision.alias_name
431 if wire != proto.WireBytes {
432 return true, proto.ErrInternalBadWireType
434 x, err := b.DecodeStringBytes()
435 m.Revision = &CloudRepoSourceContext_AliasName{x}
437 case 4: // revision.alias_context
438 if wire != proto.WireBytes {
439 return true, proto.ErrInternalBadWireType
441 msg := new(AliasContext)
442 err := b.DecodeMessage(msg)
443 m.Revision = &CloudRepoSourceContext_AliasContext{msg}
450 func _CloudRepoSourceContext_OneofSizer(msg proto.Message) (n int) {
451 m := msg.(*CloudRepoSourceContext)
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))
469 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
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"`
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} }
488 func (m *CloudWorkspaceSourceContext) GetWorkspaceId() *CloudWorkspaceId {
495 func (m *CloudWorkspaceSourceContext) GetSnapshotId() string {
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
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"`
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} }
525 type isGerritSourceContext_Revision interface {
526 isGerritSourceContext_Revision()
529 type GerritSourceContext_RevisionId struct {
530 RevisionId string `protobuf:"bytes,3,opt,name=revision_id,json=revisionId,oneof"`
532 type GerritSourceContext_AliasName struct {
533 AliasName string `protobuf:"bytes,4,opt,name=alias_name,json=aliasName,oneof"`
535 type GerritSourceContext_AliasContext struct {
536 AliasContext *AliasContext `protobuf:"bytes,5,opt,name=alias_context,json=aliasContext,oneof"`
539 func (*GerritSourceContext_RevisionId) isGerritSourceContext_Revision() {}
540 func (*GerritSourceContext_AliasName) isGerritSourceContext_Revision() {}
541 func (*GerritSourceContext_AliasContext) isGerritSourceContext_Revision() {}
543 func (m *GerritSourceContext) GetRevision() isGerritSourceContext_Revision {
550 func (m *GerritSourceContext) GetHostUri() string {
557 func (m *GerritSourceContext) GetGerritProject() string {
559 return m.GerritProject
564 func (m *GerritSourceContext) GetRevisionId() string {
565 if x, ok := m.GetRevision().(*GerritSourceContext_RevisionId); ok {
571 func (m *GerritSourceContext) GetAliasName() string {
572 if x, ok := m.GetRevision().(*GerritSourceContext_AliasName); ok {
578 func (m *GerritSourceContext) GetAliasContext() *AliasContext {
579 if x, ok := m.GetRevision().(*GerritSourceContext_AliasContext); ok {
580 return x.AliasContext
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),
594 func _GerritSourceContext_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
595 m := msg.(*GerritSourceContext)
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 {
611 return fmt.Errorf("GerritSourceContext.Revision has unexpected type %T", x)
616 func _GerritSourceContext_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
617 m := msg.(*GerritSourceContext)
619 case 3: // revision.revision_id
620 if wire != proto.WireBytes {
621 return true, proto.ErrInternalBadWireType
623 x, err := b.DecodeStringBytes()
624 m.Revision = &GerritSourceContext_RevisionId{x}
626 case 4: // revision.alias_name
627 if wire != proto.WireBytes {
628 return true, proto.ErrInternalBadWireType
630 x, err := b.DecodeStringBytes()
631 m.Revision = &GerritSourceContext_AliasName{x}
633 case 5: // revision.alias_context
634 if wire != proto.WireBytes {
635 return true, proto.ErrInternalBadWireType
637 msg := new(AliasContext)
638 err := b.DecodeMessage(msg)
639 m.Revision = &GerritSourceContext_AliasContext{msg}
646 func _GerritSourceContext_OneofSizer(msg proto.Message) (n int) {
647 m := msg.(*GerritSourceContext)
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))
665 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
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"`
677 RevisionId string `protobuf:"bytes,2,opt,name=revision_id,json=revisionId" json:"revision_id,omitempty"`
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} }
685 func (m *GitSourceContext) GetUrl() string {
692 func (m *GitSourceContext) GetRevisionId() string {
699 // A unique identifier for a cloud repo.
701 // A cloud repository can be identified by either its project ID and
702 // repository name combination, or its globally unique identifier.
704 // Types that are valid to be assigned to Id:
705 // *RepoId_ProjectRepoId
707 Id isRepoId_Id `protobuf_oneof:"id"`
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} }
715 type isRepoId_Id interface {
719 type RepoId_ProjectRepoId struct {
720 ProjectRepoId *ProjectRepoId `protobuf:"bytes,1,opt,name=project_repo_id,json=projectRepoId,oneof"`
722 type RepoId_Uid struct {
723 Uid string `protobuf:"bytes,2,opt,name=uid,oneof"`
726 func (*RepoId_ProjectRepoId) isRepoId_Id() {}
727 func (*RepoId_Uid) isRepoId_Id() {}
729 func (m *RepoId) GetId() isRepoId_Id {
736 func (m *RepoId) GetProjectRepoId() *ProjectRepoId {
737 if x, ok := m.GetId().(*RepoId_ProjectRepoId); ok {
738 return x.ProjectRepoId
743 func (m *RepoId) GetUid() string {
744 if x, ok := m.GetId().(*RepoId_Uid); ok {
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),
758 func _RepoId_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
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 {
768 b.EncodeVarint(2<<3 | proto.WireBytes)
769 b.EncodeStringBytes(x.Uid)
772 return fmt.Errorf("RepoId.Id has unexpected type %T", x)
777 func _RepoId_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
780 case 1: // id.project_repo_id
781 if wire != proto.WireBytes {
782 return true, proto.ErrInternalBadWireType
784 msg := new(ProjectRepoId)
785 err := b.DecodeMessage(msg)
786 m.Id = &RepoId_ProjectRepoId{msg}
789 if wire != proto.WireBytes {
790 return true, proto.ErrInternalBadWireType
792 x, err := b.DecodeStringBytes()
793 m.Id = &RepoId_Uid{x}
800 func _RepoId_OneofSizer(msg proto.Message) (n int) {
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))
810 n += proto.SizeVarint(2<<3 | proto.WireBytes)
811 n += proto.SizeVarint(uint64(len(x.Uid)))
815 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
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"`
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} }
834 func (m *ProjectRepoId) GetProjectId() string {
841 func (m *ProjectRepoId) GetRepoName() string {
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"`
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} }
864 func (m *CloudWorkspaceId) GetRepoId() *RepoId {
871 func (m *CloudWorkspaceId) GetName() string {
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)
892 func init() { proto.RegisterFile("google/devtools/source/v1/source_context.proto", fileDescriptor0) }
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,