You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

925 lines
32 KiB

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