grafeas-v1 0.10.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: grafeas/v1/grafeas.proto
3
4
 
@@ -23,133 +24,45 @@ require 'grafeas/v1/upgrade_pb'
23
24
  require 'grafeas/v1/vex_pb'
24
25
  require 'grafeas/v1/vulnerability_pb'
25
26
 
26
- Google::Protobuf::DescriptorPool.generated_pool.build do
27
- add_file("grafeas/v1/grafeas.proto", :syntax => :proto3) do
28
- add_message "grafeas.v1.Occurrence" do
29
- optional :name, :string, 1
30
- optional :resource_uri, :string, 2
31
- optional :note_name, :string, 3
32
- optional :kind, :enum, 4, "grafeas.v1.NoteKind"
33
- optional :remediation, :string, 5
34
- optional :create_time, :message, 6, "google.protobuf.Timestamp"
35
- optional :update_time, :message, 7, "google.protobuf.Timestamp"
36
- optional :envelope, :message, 18, "grafeas.v1.Envelope"
37
- oneof :details do
38
- optional :vulnerability, :message, 8, "grafeas.v1.VulnerabilityOccurrence"
39
- optional :build, :message, 9, "grafeas.v1.BuildOccurrence"
40
- optional :image, :message, 10, "grafeas.v1.ImageOccurrence"
41
- optional :package, :message, 11, "grafeas.v1.PackageOccurrence"
42
- optional :deployment, :message, 12, "grafeas.v1.DeploymentOccurrence"
43
- optional :discovery, :message, 13, "grafeas.v1.DiscoveryOccurrence"
44
- optional :attestation, :message, 14, "grafeas.v1.AttestationOccurrence"
45
- optional :upgrade, :message, 15, "grafeas.v1.UpgradeOccurrence"
46
- optional :compliance, :message, 16, "grafeas.v1.ComplianceOccurrence"
47
- optional :dsse_attestation, :message, 17, "grafeas.v1.DSSEAttestationOccurrence"
48
- end
49
- end
50
- add_message "grafeas.v1.Note" do
51
- optional :name, :string, 1
52
- optional :short_description, :string, 2
53
- optional :long_description, :string, 3
54
- optional :kind, :enum, 4, "grafeas.v1.NoteKind"
55
- repeated :related_url, :message, 5, "grafeas.v1.RelatedUrl"
56
- optional :expiration_time, :message, 6, "google.protobuf.Timestamp"
57
- optional :create_time, :message, 7, "google.protobuf.Timestamp"
58
- optional :update_time, :message, 8, "google.protobuf.Timestamp"
59
- repeated :related_note_names, :string, 9
60
- oneof :type do
61
- optional :vulnerability, :message, 10, "grafeas.v1.VulnerabilityNote"
62
- optional :build, :message, 11, "grafeas.v1.BuildNote"
63
- optional :image, :message, 12, "grafeas.v1.ImageNote"
64
- optional :package, :message, 13, "grafeas.v1.PackageNote"
65
- optional :deployment, :message, 14, "grafeas.v1.DeploymentNote"
66
- optional :discovery, :message, 15, "grafeas.v1.DiscoveryNote"
67
- optional :attestation, :message, 16, "grafeas.v1.AttestationNote"
68
- optional :upgrade, :message, 17, "grafeas.v1.UpgradeNote"
69
- optional :compliance, :message, 18, "grafeas.v1.ComplianceNote"
70
- optional :dsse_attestation, :message, 19, "grafeas.v1.DSSEAttestationNote"
71
- optional :vulnerability_assessment, :message, 20, "grafeas.v1.VulnerabilityAssessmentNote"
72
- end
73
- end
74
- add_message "grafeas.v1.GetOccurrenceRequest" do
75
- optional :name, :string, 1
76
- end
77
- add_message "grafeas.v1.ListOccurrencesRequest" do
78
- optional :parent, :string, 1
79
- optional :filter, :string, 2
80
- optional :page_size, :int32, 3
81
- optional :page_token, :string, 4
82
- end
83
- add_message "grafeas.v1.ListOccurrencesResponse" do
84
- repeated :occurrences, :message, 1, "grafeas.v1.Occurrence"
85
- optional :next_page_token, :string, 2
86
- end
87
- add_message "grafeas.v1.DeleteOccurrenceRequest" do
88
- optional :name, :string, 1
89
- end
90
- add_message "grafeas.v1.CreateOccurrenceRequest" do
91
- optional :parent, :string, 1
92
- optional :occurrence, :message, 2, "grafeas.v1.Occurrence"
93
- end
94
- add_message "grafeas.v1.UpdateOccurrenceRequest" do
95
- optional :name, :string, 1
96
- optional :occurrence, :message, 2, "grafeas.v1.Occurrence"
97
- optional :update_mask, :message, 3, "google.protobuf.FieldMask"
98
- end
99
- add_message "grafeas.v1.GetNoteRequest" do
100
- optional :name, :string, 1
101
- end
102
- add_message "grafeas.v1.GetOccurrenceNoteRequest" do
103
- optional :name, :string, 1
104
- end
105
- add_message "grafeas.v1.ListNotesRequest" do
106
- optional :parent, :string, 1
107
- optional :filter, :string, 2
108
- optional :page_size, :int32, 3
109
- optional :page_token, :string, 4
110
- end
111
- add_message "grafeas.v1.ListNotesResponse" do
112
- repeated :notes, :message, 1, "grafeas.v1.Note"
113
- optional :next_page_token, :string, 2
114
- end
115
- add_message "grafeas.v1.DeleteNoteRequest" do
116
- optional :name, :string, 1
117
- end
118
- add_message "grafeas.v1.CreateNoteRequest" do
119
- optional :parent, :string, 1
120
- optional :note_id, :string, 2
121
- optional :note, :message, 3, "grafeas.v1.Note"
122
- end
123
- add_message "grafeas.v1.UpdateNoteRequest" do
124
- optional :name, :string, 1
125
- optional :note, :message, 2, "grafeas.v1.Note"
126
- optional :update_mask, :message, 3, "google.protobuf.FieldMask"
127
- end
128
- add_message "grafeas.v1.ListNoteOccurrencesRequest" do
129
- optional :name, :string, 1
130
- optional :filter, :string, 2
131
- optional :page_size, :int32, 3
132
- optional :page_token, :string, 4
133
- end
134
- add_message "grafeas.v1.ListNoteOccurrencesResponse" do
135
- repeated :occurrences, :message, 1, "grafeas.v1.Occurrence"
136
- optional :next_page_token, :string, 2
137
- end
138
- add_message "grafeas.v1.BatchCreateNotesRequest" do
139
- optional :parent, :string, 1
140
- map :notes, :string, :message, 2, "grafeas.v1.Note"
141
- end
142
- add_message "grafeas.v1.BatchCreateNotesResponse" do
143
- repeated :notes, :message, 1, "grafeas.v1.Note"
144
- end
145
- add_message "grafeas.v1.BatchCreateOccurrencesRequest" do
146
- optional :parent, :string, 1
147
- repeated :occurrences, :message, 2, "grafeas.v1.Occurrence"
148
- end
149
- add_message "grafeas.v1.BatchCreateOccurrencesResponse" do
150
- repeated :occurrences, :message, 1, "grafeas.v1.Occurrence"
27
+
28
+ descriptor_data = "\n\x18grafeas/v1/grafeas.proto\x12\ngrafeas.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgrafeas/v1/attestation.proto\x1a\x16grafeas/v1/build.proto\x1a\x17grafeas/v1/common.proto\x1a\x1bgrafeas/v1/compliance.proto\x1a\x1bgrafeas/v1/deployment.proto\x1a\x1agrafeas/v1/discovery.proto\x1a!grafeas/v1/dsse_attestation.proto\x1a\x16grafeas/v1/image.proto\x1a\x18grafeas/v1/package.proto\x1a\x18grafeas/v1/upgrade.proto\x1a\x14grafeas/v1/vex.proto\x1a\x1egrafeas/v1/vulnerability.proto\"\xfb\x06\n\nOccurrence\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cresource_uri\x18\x02 \x01(\t\x12\x11\n\tnote_name\x18\x03 \x01(\t\x12\"\n\x04kind\x18\x04 \x01(\x0e\x32\x14.grafeas.v1.NoteKind\x12\x13\n\x0bremediation\x18\x05 \x01(\t\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\rvulnerability\x18\x08 \x01(\x0b\x32#.grafeas.v1.VulnerabilityOccurrenceH\x00\x12,\n\x05\x62uild\x18\t \x01(\x0b\x32\x1b.grafeas.v1.BuildOccurrenceH\x00\x12,\n\x05image\x18\n \x01(\x0b\x32\x1b.grafeas.v1.ImageOccurrenceH\x00\x12\x30\n\x07package\x18\x0b \x01(\x0b\x32\x1d.grafeas.v1.PackageOccurrenceH\x00\x12\x36\n\ndeployment\x18\x0c \x01(\x0b\x32 .grafeas.v1.DeploymentOccurrenceH\x00\x12\x34\n\tdiscovery\x18\r \x01(\x0b\x32\x1f.grafeas.v1.DiscoveryOccurrenceH\x00\x12\x38\n\x0b\x61ttestation\x18\x0e \x01(\x0b\x32!.grafeas.v1.AttestationOccurrenceH\x00\x12\x30\n\x07upgrade\x18\x0f \x01(\x0b\x32\x1d.grafeas.v1.UpgradeOccurrenceH\x00\x12\x36\n\ncompliance\x18\x10 \x01(\x0b\x32 .grafeas.v1.ComplianceOccurrenceH\x00\x12\x41\n\x10\x64sse_attestation\x18\x11 \x01(\x0b\x32%.grafeas.v1.DSSEAttestationOccurrenceH\x00\x12&\n\x08\x65nvelope\x18\x12 \x01(\x0b\x32\x14.grafeas.v1.Envelope:G\xea\x41\x44\n\x15grafeas.io/Occurrence\x12+projects/{project}/occurrences/{occurrence}B\t\n\x07\x64\x65tails\"\xbe\x07\n\x04Note\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x11short_description\x18\x02 \x01(\t\x12\x18\n\x10long_description\x18\x03 \x01(\t\x12\"\n\x04kind\x18\x04 \x01(\x0e\x32\x14.grafeas.v1.NoteKind\x12+\n\x0brelated_url\x18\x05 \x03(\x0b\x32\x16.grafeas.v1.RelatedUrl\x12\x33\n\x0f\x65xpiration_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x12related_note_names\x18\t \x03(\t\x12\x36\n\rvulnerability\x18\n \x01(\x0b\x32\x1d.grafeas.v1.VulnerabilityNoteH\x00\x12&\n\x05\x62uild\x18\x0b \x01(\x0b\x32\x15.grafeas.v1.BuildNoteH\x00\x12&\n\x05image\x18\x0c \x01(\x0b\x32\x15.grafeas.v1.ImageNoteH\x00\x12*\n\x07package\x18\r \x01(\x0b\x32\x17.grafeas.v1.PackageNoteH\x00\x12\x30\n\ndeployment\x18\x0e \x01(\x0b\x32\x1a.grafeas.v1.DeploymentNoteH\x00\x12.\n\tdiscovery\x18\x0f \x01(\x0b\x32\x19.grafeas.v1.DiscoveryNoteH\x00\x12\x32\n\x0b\x61ttestation\x18\x10 \x01(\x0b\x32\x1b.grafeas.v1.AttestationNoteH\x00\x12*\n\x07upgrade\x18\x11 \x01(\x0b\x32\x17.grafeas.v1.UpgradeNoteH\x00\x12\x30\n\ncompliance\x18\x12 \x01(\x0b\x32\x1a.grafeas.v1.ComplianceNoteH\x00\x12;\n\x10\x64sse_attestation\x18\x13 \x01(\x0b\x32\x1f.grafeas.v1.DSSEAttestationNoteH\x00\x12K\n\x18vulnerability_assessment\x18\x14 \x01(\x0b\x32\'.grafeas.v1.VulnerabilityAssessmentNoteH\x00:5\xea\x41\x32\n\x0fgrafeas.io/Note\x12\x1fprojects/{project}/notes/{note}B\x06\n\x04type\"C\n\x14GetOccurrenceRequest\x12+\n\x04name\x18\x01 \x01(\tB\x1d\xe0\x41\x02\xfa\x41\x17\n\x15grafeas.io/Occurrence\"{\n\x16ListOccurrencesRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12grafeas.io/Project\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"_\n\x17ListOccurrencesResponse\x12+\n\x0boccurrences\x18\x01 \x03(\x0b\x32\x16.grafeas.v1.Occurrence\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"F\n\x17\x44\x65leteOccurrenceRequest\x12+\n\x04name\x18\x01 \x01(\tB\x1d\xe0\x41\x02\xfa\x41\x17\n\x15grafeas.io/Occurrence\"v\n\x17\x43reateOccurrenceRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12grafeas.io/Project\x12/\n\noccurrence\x18\x02 \x01(\x0b\x32\x16.grafeas.v1.OccurrenceB\x03\xe0\x41\x02\"\xa8\x01\n\x17UpdateOccurrenceRequest\x12+\n\x04name\x18\x01 \x01(\tB\x1d\xe0\x41\x02\xfa\x41\x17\n\x15grafeas.io/Occurrence\x12/\n\noccurrence\x18\x02 \x01(\x0b\x32\x16.grafeas.v1.OccurrenceB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"7\n\x0eGetNoteRequest\x12%\n\x04name\x18\x01 \x01(\tB\x17\xe0\x41\x02\xfa\x41\x11\n\x0fgrafeas.io/Note\"G\n\x18GetOccurrenceNoteRequest\x12+\n\x04name\x18\x01 \x01(\tB\x1d\xe0\x41\x02\xfa\x41\x17\n\x15grafeas.io/Occurrence\"u\n\x10ListNotesRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12grafeas.io/Project\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"M\n\x11ListNotesResponse\x12\x1f\n\x05notes\x18\x01 \x03(\x0b\x32\x10.grafeas.v1.Note\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\":\n\x11\x44\x65leteNoteRequest\x12%\n\x04name\x18\x01 \x01(\tB\x17\xe0\x41\x02\xfa\x41\x11\n\x0fgrafeas.io/Note\"z\n\x11\x43reateNoteRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12grafeas.io/Project\x12\x14\n\x07note_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12#\n\x04note\x18\x03 \x01(\x0b\x32\x10.grafeas.v1.NoteB\x03\xe0\x41\x02\"\x90\x01\n\x11UpdateNoteRequest\x12%\n\x04name\x18\x01 \x01(\tB\x17\xe0\x41\x02\xfa\x41\x11\n\x0fgrafeas.io/Note\x12#\n\x04note\x18\x02 \x01(\x0b\x32\x10.grafeas.v1.NoteB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"z\n\x1aListNoteOccurrencesRequest\x12%\n\x04name\x18\x01 \x01(\tB\x17\xe0\x41\x02\xfa\x41\x11\n\x0fgrafeas.io/Note\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"c\n\x1bListNoteOccurrencesResponse\x12+\n\x0boccurrences\x18\x01 \x03(\x0b\x32\x16.grafeas.v1.Occurrence\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc9\x01\n\x17\x42\x61tchCreateNotesRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12grafeas.io/Project\x12\x42\n\x05notes\x18\x02 \x03(\x0b\x32..grafeas.v1.BatchCreateNotesRequest.NotesEntryB\x03\xe0\x41\x02\x1a>\n\nNotesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1f\n\x05value\x18\x02 \x01(\x0b\x32\x10.grafeas.v1.Note:\x02\x38\x01\";\n\x18\x42\x61tchCreateNotesResponse\x12\x1f\n\x05notes\x18\x01 \x03(\x0b\x32\x10.grafeas.v1.Note\"}\n\x1d\x42\x61tchCreateOccurrencesRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12grafeas.io/Project\x12\x30\n\x0boccurrences\x18\x02 \x03(\x0b\x32\x16.grafeas.v1.OccurrenceB\x03\xe0\x41\x02\"M\n\x1e\x42\x61tchCreateOccurrencesResponse\x12+\n\x0boccurrences\x18\x01 \x03(\x0b\x32\x16.grafeas.v1.Occurrence2\x92\x10\n\x07Grafeas\x12}\n\rGetOccurrence\x12 .grafeas.v1.GetOccurrenceRequest\x1a\x16.grafeas.v1.Occurrence\"2\x82\xd3\xe4\x93\x02%\x12#/v1/{name=projects/*/occurrences/*}\xda\x41\x04name\x12\x97\x01\n\x0fListOccurrences\x12\".grafeas.v1.ListOccurrencesRequest\x1a#.grafeas.v1.ListOccurrencesResponse\";\x82\xd3\xe4\x93\x02%\x12#/v1/{parent=projects/*}/occurrences\xda\x41\rparent,filter\x12\x83\x01\n\x10\x44\x65leteOccurrence\x12#.grafeas.v1.DeleteOccurrenceRequest\x1a\x16.google.protobuf.Empty\"2\x82\xd3\xe4\x93\x02%*#/v1/{name=projects/*/occurrences/*}\xda\x41\x04name\x12\x9c\x01\n\x10\x43reateOccurrence\x12#.grafeas.v1.CreateOccurrenceRequest\x1a\x16.grafeas.v1.Occurrence\"K\x82\xd3\xe4\x93\x02\x31\"#/v1/{parent=projects/*}/occurrences:\noccurrence\xda\x41\x11parent,occurrence\x12\xc0\x01\n\x16\x42\x61tchCreateOccurrences\x12).grafeas.v1.BatchCreateOccurrencesRequest\x1a*.grafeas.v1.BatchCreateOccurrencesResponse\"O\x82\xd3\xe4\x93\x02\x34\"//v1/{parent=projects/*}/occurrences:batchCreate:\x01*\xda\x41\x12parent,occurrences\x12\xa6\x01\n\x10UpdateOccurrence\x12#.grafeas.v1.UpdateOccurrenceRequest\x1a\x16.grafeas.v1.Occurrence\"U\x82\xd3\xe4\x93\x02\x31\x32#/v1/{name=projects/*/occurrences/*}:\noccurrence\xda\x41\x1bname,occurrence,update_mask\x12\x85\x01\n\x11GetOccurrenceNote\x12$.grafeas.v1.GetOccurrenceNoteRequest\x1a\x10.grafeas.v1.Note\"8\x82\xd3\xe4\x93\x02+\x12)/v1/{name=projects/*/occurrences/*}/notes\xda\x41\x04name\x12\x65\n\x07GetNote\x12\x1a.grafeas.v1.GetNoteRequest\x1a\x10.grafeas.v1.Note\",\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{name=projects/*/notes/*}\xda\x41\x04name\x12\x7f\n\tListNotes\x12\x1c.grafeas.v1.ListNotesRequest\x1a\x1d.grafeas.v1.ListNotesResponse\"5\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{parent=projects/*}/notes\xda\x41\rparent,filter\x12q\n\nDeleteNote\x12\x1d.grafeas.v1.DeleteNoteRequest\x1a\x16.google.protobuf.Empty\",\x82\xd3\xe4\x93\x02\x1f*\x1d/v1/{name=projects/*/notes/*}\xda\x41\x04name\x12\x80\x01\n\nCreateNote\x12\x1d.grafeas.v1.CreateNoteRequest\x1a\x10.grafeas.v1.Note\"A\x82\xd3\xe4\x93\x02%\"\x1d/v1/{parent=projects/*}/notes:\x04note\xda\x41\x13parent,note_id,note\x12\xa2\x01\n\x10\x42\x61tchCreateNotes\x12#.grafeas.v1.BatchCreateNotesRequest\x1a$.grafeas.v1.BatchCreateNotesResponse\"C\x82\xd3\xe4\x93\x02.\")/v1/{parent=projects/*}/notes:batchCreate:\x01*\xda\x41\x0cparent,notes\x12\x82\x01\n\nUpdateNote\x12\x1d.grafeas.v1.UpdateNoteRequest\x1a\x10.grafeas.v1.Note\"C\x82\xd3\xe4\x93\x02%2\x1d/v1/{name=projects/*/notes/*}:\x04note\xda\x41\x15name,note,update_mask\x12\xa7\x01\n\x13ListNoteOccurrences\x12&.grafeas.v1.ListNoteOccurrencesRequest\x1a\'.grafeas.v1.ListNoteOccurrencesResponse\"?\x82\xd3\xe4\x93\x02+\x12)/v1/{name=projects/*/notes/*}/occurrences\xda\x41\x0bname,filter\x1a#\xca\x41 containeranalysis.googleapis.comB|\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRA\xea\x41(\n\x12grafeas.io/Project\x12\x12projects/{project}b\x06proto3"
29
+
30
+ pool = Google::Protobuf::DescriptorPool.generated_pool
31
+
32
+ begin
33
+ pool.add_serialized_file(descriptor_data)
34
+ rescue TypeError => e
35
+ # Compatibility code: will be removed in the next major version.
36
+ require 'google/protobuf/descriptor_pb'
37
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
38
+ parsed.clear_dependency
39
+ serialized = parsed.class.encode(parsed)
40
+ file = pool.add_serialized_file(serialized)
41
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
42
+ imports = [
43
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
44
+ ["grafeas.v1.VulnerabilityOccurrence", "grafeas/v1/vulnerability.proto"],
45
+ ["grafeas.v1.BuildOccurrence", "grafeas/v1/build.proto"],
46
+ ["grafeas.v1.ImageOccurrence", "grafeas/v1/image.proto"],
47
+ ["grafeas.v1.PackageOccurrence", "grafeas/v1/package.proto"],
48
+ ["grafeas.v1.DeploymentOccurrence", "grafeas/v1/deployment.proto"],
49
+ ["grafeas.v1.DiscoveryOccurrence", "grafeas/v1/discovery.proto"],
50
+ ["grafeas.v1.AttestationOccurrence", "grafeas/v1/attestation.proto"],
51
+ ["grafeas.v1.UpgradeOccurrence", "grafeas/v1/upgrade.proto"],
52
+ ["grafeas.v1.ComplianceOccurrence", "grafeas/v1/compliance.proto"],
53
+ ["grafeas.v1.DSSEAttestationOccurrence", "grafeas/v1/dsse_attestation.proto"],
54
+ ["grafeas.v1.Envelope", "grafeas/v1/common.proto"],
55
+ ["grafeas.v1.VulnerabilityAssessmentNote", "grafeas/v1/vex.proto"],
56
+ ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
57
+ ]
58
+ imports.each do |type_name, expected_filename|
59
+ import_file = pool.lookup(type_name).file_descriptor
60
+ if import_file.name != expected_filename
61
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
151
62
  end
152
63
  end
64
+ warn "Each proto file must use a consistent fully-qualified name."
65
+ warn "This will become an error in the next major version."
153
66
  end
154
67
 
155
68
  module Grafeas
@@ -1,30 +1,34 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: grafeas/v1/image.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("grafeas/v1/image.proto", :syntax => :proto3) do
8
- add_message "grafeas.v1.Layer" do
9
- optional :directive, :string, 1
10
- optional :arguments, :string, 2
11
- end
12
- add_message "grafeas.v1.Fingerprint" do
13
- optional :v1_name, :string, 1
14
- repeated :v2_blob, :string, 2
15
- optional :v2_name, :string, 3
16
- end
17
- add_message "grafeas.v1.ImageNote" do
18
- optional :resource_url, :string, 1
19
- optional :fingerprint, :message, 2, "grafeas.v1.Fingerprint"
20
- end
21
- add_message "grafeas.v1.ImageOccurrence" do
22
- optional :fingerprint, :message, 1, "grafeas.v1.Fingerprint"
23
- optional :distance, :int32, 2
24
- repeated :layer_info, :message, 3, "grafeas.v1.Layer"
25
- optional :base_resource_url, :string, 4
7
+
8
+ descriptor_data = "\n\x16grafeas/v1/image.proto\x12\ngrafeas.v1\"-\n\x05Layer\x12\x11\n\tdirective\x18\x01 \x01(\t\x12\x11\n\targuments\x18\x02 \x01(\t\"@\n\x0b\x46ingerprint\x12\x0f\n\x07v1_name\x18\x01 \x01(\t\x12\x0f\n\x07v2_blob\x18\x02 \x03(\t\x12\x0f\n\x07v2_name\x18\x03 \x01(\t\"O\n\tImageNote\x12\x14\n\x0cresource_url\x18\x01 \x01(\t\x12,\n\x0b\x66ingerprint\x18\x02 \x01(\x0b\x32\x17.grafeas.v1.Fingerprint\"\x93\x01\n\x0fImageOccurrence\x12,\n\x0b\x66ingerprint\x18\x01 \x01(\x0b\x32\x17.grafeas.v1.Fingerprint\x12\x10\n\x08\x64istance\x18\x02 \x01(\x05\x12%\n\nlayer_info\x18\x03 \x03(\x0b\x32\x11.grafeas.v1.Layer\x12\x19\n\x11\x62\x61se_resource_url\x18\x04 \x01(\tBQ\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError => e
15
+ # Compatibility code: will be removed in the next major version.
16
+ require 'google/protobuf/descriptor_pb'
17
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
+ parsed.clear_dependency
19
+ serialized = parsed.class.encode(parsed)
20
+ file = pool.add_serialized_file(serialized)
21
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
+ imports = [
23
+ ]
24
+ imports.each do |type_name, expected_filename|
25
+ import_file = pool.lookup(type_name).file_descriptor
26
+ if import_file.name != expected_filename
27
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
26
28
  end
27
29
  end
30
+ warn "Each proto file must use a consistent fully-qualified name."
31
+ warn "This will become an error in the next major version."
28
32
  end
29
33
 
30
34
  module Grafeas
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: grafeas/v1/intoto_provenance.proto
3
4
 
@@ -6,37 +7,33 @@ require 'google/protobuf'
6
7
  require 'google/protobuf/any_pb'
7
8
  require 'google/protobuf/timestamp_pb'
8
9
 
9
- Google::Protobuf::DescriptorPool.generated_pool.build do
10
- add_file("grafeas/v1/intoto_provenance.proto", :syntax => :proto3) do
11
- add_message "grafeas.v1.Recipe" do
12
- optional :type, :string, 1
13
- optional :defined_in_material, :int64, 2
14
- optional :entry_point, :string, 3
15
- repeated :arguments, :message, 4, "google.protobuf.Any"
16
- repeated :environment, :message, 5, "google.protobuf.Any"
17
- end
18
- add_message "grafeas.v1.Completeness" do
19
- optional :arguments, :bool, 1
20
- optional :environment, :bool, 2
21
- optional :materials, :bool, 3
22
- end
23
- add_message "grafeas.v1.Metadata" do
24
- optional :build_invocation_id, :string, 1
25
- optional :build_started_on, :message, 2, "google.protobuf.Timestamp"
26
- optional :build_finished_on, :message, 3, "google.protobuf.Timestamp"
27
- optional :completeness, :message, 4, "grafeas.v1.Completeness"
28
- optional :reproducible, :bool, 5
29
- end
30
- add_message "grafeas.v1.BuilderConfig" do
31
- optional :id, :string, 1
32
- end
33
- add_message "grafeas.v1.InTotoProvenance" do
34
- optional :builder_config, :message, 1, "grafeas.v1.BuilderConfig"
35
- optional :recipe, :message, 2, "grafeas.v1.Recipe"
36
- optional :metadata, :message, 3, "grafeas.v1.Metadata"
37
- repeated :materials, :string, 4
10
+
11
+ descriptor_data = "\n\"grafeas/v1/intoto_provenance.proto\x12\ngrafeas.v1\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9c\x01\n\x06Recipe\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x1b\n\x13\x64\x65\x66ined_in_material\x18\x02 \x01(\x03\x12\x13\n\x0b\x65ntry_point\x18\x03 \x01(\t\x12\'\n\targuments\x18\x04 \x03(\x0b\x32\x14.google.protobuf.Any\x12)\n\x0b\x65nvironment\x18\x05 \x03(\x0b\x32\x14.google.protobuf.Any\"I\n\x0c\x43ompleteness\x12\x11\n\targuments\x18\x01 \x01(\x08\x12\x13\n\x0b\x65nvironment\x18\x02 \x01(\x08\x12\x11\n\tmaterials\x18\x03 \x01(\x08\"\xda\x01\n\x08Metadata\x12\x1b\n\x13\x62uild_invocation_id\x18\x01 \x01(\t\x12\x34\n\x10\x62uild_started_on\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11\x62uild_finished_on\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\x0c\x63ompleteness\x18\x04 \x01(\x0b\x32\x18.grafeas.v1.Completeness\x12\x14\n\x0creproducible\x18\x05 \x01(\x08\"\x1b\n\rBuilderConfig\x12\n\n\x02id\x18\x01 \x01(\t\"\xa4\x01\n\x10InTotoProvenance\x12\x31\n\x0e\x62uilder_config\x18\x01 \x01(\x0b\x32\x19.grafeas.v1.BuilderConfig\x12\"\n\x06recipe\x18\x02 \x01(\x0b\x32\x12.grafeas.v1.Recipe\x12&\n\x08metadata\x18\x03 \x01(\x0b\x32\x14.grafeas.v1.Metadata\x12\x11\n\tmaterials\x18\x04 \x03(\tBh\n\rio.grafeas.v1B\x15InTotoProvenanceProtoP\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3"
12
+
13
+ pool = Google::Protobuf::DescriptorPool.generated_pool
14
+
15
+ begin
16
+ pool.add_serialized_file(descriptor_data)
17
+ rescue TypeError => e
18
+ # Compatibility code: will be removed in the next major version.
19
+ require 'google/protobuf/descriptor_pb'
20
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
21
+ parsed.clear_dependency
22
+ serialized = parsed.class.encode(parsed)
23
+ file = pool.add_serialized_file(serialized)
24
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
25
+ imports = [
26
+ ["google.protobuf.Any", "google/protobuf/any.proto"],
27
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
28
+ ]
29
+ imports.each do |type_name, expected_filename|
30
+ import_file = pool.lookup(type_name).file_descriptor
31
+ if import_file.name != expected_filename
32
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
38
33
  end
39
34
  end
35
+ warn "Each proto file must use a consistent fully-qualified name."
36
+ warn "This will become an error in the next major version."
40
37
  end
41
38
 
42
39
  module Grafeas
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: grafeas/v1/intoto_statement.proto
3
4
 
@@ -7,23 +8,34 @@ require 'grafeas/v1/intoto_provenance_pb'
7
8
  require 'grafeas/v1/slsa_provenance_pb'
8
9
  require 'grafeas/v1/slsa_provenance_zero_two_pb'
9
10
 
10
- Google::Protobuf::DescriptorPool.generated_pool.build do
11
- add_file("grafeas/v1/intoto_statement.proto", :syntax => :proto3) do
12
- add_message "grafeas.v1.InTotoStatement" do
13
- optional :type, :string, 1, json_name: "_type"
14
- repeated :subject, :message, 2, "grafeas.v1.Subject"
15
- optional :predicate_type, :string, 3
16
- oneof :predicate do
17
- optional :provenance, :message, 4, "grafeas.v1.InTotoProvenance"
18
- optional :slsa_provenance, :message, 5, "grafeas.v1.SlsaProvenance"
19
- optional :slsa_provenance_zero_two, :message, 6, "grafeas.v1.SlsaProvenanceZeroTwo"
20
- end
21
- end
22
- add_message "grafeas.v1.Subject" do
23
- optional :name, :string, 1
24
- map :digest, :string, :string, 2
11
+
12
+ descriptor_data = "\n!grafeas/v1/intoto_statement.proto\x12\ngrafeas.v1\x1a\"grafeas/v1/intoto_provenance.proto\x1a grafeas/v1/slsa_provenance.proto\x1a)grafeas/v1/slsa_provenance_zero_two.proto\"\xa3\x02\n\x0fInTotoStatement\x12\x13\n\x04type\x18\x01 \x01(\tR\x05_type\x12$\n\x07subject\x18\x02 \x03(\x0b\x32\x13.grafeas.v1.Subject\x12\x16\n\x0epredicate_type\x18\x03 \x01(\t\x12\x32\n\nprovenance\x18\x04 \x01(\x0b\x32\x1c.grafeas.v1.InTotoProvenanceH\x00\x12\x35\n\x0fslsa_provenance\x18\x05 \x01(\x0b\x32\x1a.grafeas.v1.SlsaProvenanceH\x00\x12\x45\n\x18slsa_provenance_zero_two\x18\x06 \x01(\x0b\x32!.grafeas.v1.SlsaProvenanceZeroTwoH\x00\x42\x0b\n\tpredicate\"w\n\x07Subject\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x06\x64igest\x18\x02 \x03(\x0b\x32\x1f.grafeas.v1.Subject.DigestEntry\x1a-\n\x0b\x44igestEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42g\n\rio.grafeas.v1B\x14InTotoStatementProtoP\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3"
13
+
14
+ pool = Google::Protobuf::DescriptorPool.generated_pool
15
+
16
+ begin
17
+ pool.add_serialized_file(descriptor_data)
18
+ rescue TypeError => e
19
+ # Compatibility code: will be removed in the next major version.
20
+ require 'google/protobuf/descriptor_pb'
21
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
22
+ parsed.clear_dependency
23
+ serialized = parsed.class.encode(parsed)
24
+ file = pool.add_serialized_file(serialized)
25
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
26
+ imports = [
27
+ ["grafeas.v1.InTotoProvenance", "grafeas/v1/intoto_provenance.proto"],
28
+ ["grafeas.v1.SlsaProvenance", "grafeas/v1/slsa_provenance.proto"],
29
+ ["grafeas.v1.SlsaProvenanceZeroTwo", "grafeas/v1/slsa_provenance_zero_two.proto"],
30
+ ]
31
+ imports.each do |type_name, expected_filename|
32
+ import_file = pool.lookup(type_name).file_descriptor
33
+ if import_file.name != expected_filename
34
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
25
35
  end
26
36
  end
37
+ warn "Each proto file must use a consistent fully-qualified name."
38
+ warn "This will become an error in the next major version."
27
39
  end
28
40
 
29
41
  module Grafeas
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: grafeas/v1/package.proto
3
4
 
@@ -6,63 +7,32 @@ require 'google/protobuf'
6
7
  require 'google/api/field_behavior_pb'
7
8
  require 'grafeas/v1/common_pb'
8
9
 
9
- Google::Protobuf::DescriptorPool.generated_pool.build do
10
- add_file("grafeas/v1/package.proto", :syntax => :proto3) do
11
- add_message "grafeas.v1.Distribution" do
12
- optional :cpe_uri, :string, 1
13
- optional :architecture, :enum, 2, "grafeas.v1.Architecture"
14
- optional :latest_version, :message, 3, "grafeas.v1.Version"
15
- optional :maintainer, :string, 4
16
- optional :url, :string, 5
17
- optional :description, :string, 6
18
- end
19
- add_message "grafeas.v1.Location" do
20
- optional :cpe_uri, :string, 1
21
- optional :version, :message, 2, "grafeas.v1.Version"
22
- optional :path, :string, 3
23
- end
24
- add_message "grafeas.v1.PackageNote" do
25
- optional :name, :string, 1
26
- repeated :distribution, :message, 10, "grafeas.v1.Distribution"
27
- optional :package_type, :string, 11
28
- optional :cpe_uri, :string, 12
29
- optional :architecture, :enum, 13, "grafeas.v1.Architecture"
30
- optional :version, :message, 14, "grafeas.v1.Version"
31
- optional :maintainer, :string, 15
32
- optional :url, :string, 16
33
- optional :description, :string, 17
34
- optional :license, :message, 18, "grafeas.v1.License"
35
- repeated :digest, :message, 19, "grafeas.v1.Digest"
36
- end
37
- add_message "grafeas.v1.PackageOccurrence" do
38
- optional :name, :string, 1
39
- repeated :location, :message, 2, "grafeas.v1.Location"
40
- optional :package_type, :string, 3
41
- optional :cpe_uri, :string, 4
42
- optional :architecture, :enum, 5, "grafeas.v1.Architecture"
43
- optional :license, :message, 6, "grafeas.v1.License"
44
- optional :version, :message, 7, "grafeas.v1.Version"
45
- end
46
- add_message "grafeas.v1.Version" do
47
- optional :epoch, :int32, 1
48
- optional :name, :string, 2
49
- optional :revision, :string, 3
50
- optional :inclusive, :bool, 6
51
- optional :kind, :enum, 4, "grafeas.v1.Version.VersionKind"
52
- optional :full_name, :string, 5
53
- end
54
- add_enum "grafeas.v1.Version.VersionKind" do
55
- value :VERSION_KIND_UNSPECIFIED, 0
56
- value :NORMAL, 1
57
- value :MINIMUM, 2
58
- value :MAXIMUM, 3
59
- end
60
- add_enum "grafeas.v1.Architecture" do
61
- value :ARCHITECTURE_UNSPECIFIED, 0
62
- value :X86, 1
63
- value :X64, 2
10
+
11
+ descriptor_data = "\n\x18grafeas/v1/package.proto\x12\ngrafeas.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x17grafeas/v1/common.proto\"\xb7\x01\n\x0c\x44istribution\x12\x14\n\x07\x63pe_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12.\n\x0c\x61rchitecture\x18\x02 \x01(\x0e\x32\x18.grafeas.v1.Architecture\x12+\n\x0elatest_version\x18\x03 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x12\n\nmaintainer\x18\x04 \x01(\t\x12\x0b\n\x03url\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\"O\n\x08Location\x12\x0f\n\x07\x63pe_uri\x18\x01 \x01(\t\x12$\n\x07version\x18\x02 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x0c\n\x04path\x18\x03 \x01(\t\"\xd0\x02\n\x0bPackageNote\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12.\n\x0c\x64istribution\x18\n \x03(\x0b\x32\x18.grafeas.v1.Distribution\x12\x14\n\x0cpackage_type\x18\x0b \x01(\t\x12\x0f\n\x07\x63pe_uri\x18\x0c \x01(\t\x12.\n\x0c\x61rchitecture\x18\r \x01(\x0e\x32\x18.grafeas.v1.Architecture\x12$\n\x07version\x18\x0e \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x12\n\nmaintainer\x18\x0f \x01(\t\x12\x0b\n\x03url\x18\x10 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x11 \x01(\t\x12$\n\x07license\x18\x12 \x01(\x0b\x32\x13.grafeas.v1.License\x12\"\n\x06\x64igest\x18\x13 \x03(\x0b\x32\x12.grafeas.v1.Digest\"\x88\x02\n\x11PackageOccurrence\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x03\x12&\n\x08location\x18\x02 \x03(\x0b\x32\x14.grafeas.v1.Location\x12\x19\n\x0cpackage_type\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x63pe_uri\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\x0c\x61rchitecture\x18\x05 \x01(\x0e\x32\x18.grafeas.v1.ArchitectureB\x03\xe0\x41\x03\x12$\n\x07license\x18\x06 \x01(\x0b\x32\x13.grafeas.v1.License\x12)\n\x07version\x18\x07 \x01(\x0b\x32\x13.grafeas.v1.VersionB\x03\xe0\x41\x03\"\xe0\x01\n\x07Version\x12\r\n\x05\x65poch\x18\x01 \x01(\x05\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08revision\x18\x03 \x01(\t\x12\x11\n\tinclusive\x18\x06 \x01(\x08\x12-\n\x04kind\x18\x04 \x01(\x0e\x32\x1f.grafeas.v1.Version.VersionKind\x12\x11\n\tfull_name\x18\x05 \x01(\t\"Q\n\x0bVersionKind\x12\x1c\n\x18VERSION_KIND_UNSPECIFIED\x10\x00\x12\n\n\x06NORMAL\x10\x01\x12\x0b\n\x07MINIMUM\x10\x02\x12\x0b\n\x07MAXIMUM\x10\x03*>\n\x0c\x41rchitecture\x12\x1c\n\x18\x41RCHITECTURE_UNSPECIFIED\x10\x00\x12\x07\n\x03X86\x10\x01\x12\x07\n\x03X64\x10\x02\x42Q\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3"
12
+
13
+ pool = Google::Protobuf::DescriptorPool.generated_pool
14
+
15
+ begin
16
+ pool.add_serialized_file(descriptor_data)
17
+ rescue TypeError => e
18
+ # Compatibility code: will be removed in the next major version.
19
+ require 'google/protobuf/descriptor_pb'
20
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
21
+ parsed.clear_dependency
22
+ serialized = parsed.class.encode(parsed)
23
+ file = pool.add_serialized_file(serialized)
24
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
25
+ imports = [
26
+ ["grafeas.v1.License", "grafeas/v1/common.proto"],
27
+ ]
28
+ imports.each do |type_name, expected_filename|
29
+ import_file = pool.lookup(type_name).file_descriptor
30
+ if import_file.name != expected_filename
31
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
64
32
  end
65
33
  end
34
+ warn "Each proto file must use a consistent fully-qualified name."
35
+ warn "This will become an error in the next major version."
66
36
  end
67
37
 
68
38
  module Grafeas
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: grafeas/v1/provenance.proto
3
4
 
@@ -5,97 +6,32 @@ require 'google/protobuf'
5
6
 
6
7
  require 'google/protobuf/timestamp_pb'
7
8
 
8
- Google::Protobuf::DescriptorPool.generated_pool.build do
9
- add_file("grafeas/v1/provenance.proto", :syntax => :proto3) do
10
- add_message "grafeas.v1.BuildProvenance" do
11
- optional :id, :string, 1
12
- optional :project_id, :string, 2
13
- repeated :commands, :message, 3, "grafeas.v1.Command"
14
- repeated :built_artifacts, :message, 4, "grafeas.v1.Artifact"
15
- optional :create_time, :message, 5, "google.protobuf.Timestamp"
16
- optional :start_time, :message, 6, "google.protobuf.Timestamp"
17
- optional :end_time, :message, 7, "google.protobuf.Timestamp"
18
- optional :creator, :string, 8
19
- optional :logs_uri, :string, 9
20
- optional :source_provenance, :message, 10, "grafeas.v1.Source"
21
- optional :trigger_id, :string, 11
22
- map :build_options, :string, :string, 12
23
- optional :builder_version, :string, 13
24
- end
25
- add_message "grafeas.v1.Source" do
26
- optional :artifact_storage_source_uri, :string, 1
27
- map :file_hashes, :string, :message, 2, "grafeas.v1.FileHashes"
28
- optional :context, :message, 3, "grafeas.v1.SourceContext"
29
- repeated :additional_contexts, :message, 4, "grafeas.v1.SourceContext"
30
- end
31
- add_message "grafeas.v1.FileHashes" do
32
- repeated :file_hash, :message, 1, "grafeas.v1.Hash"
33
- end
34
- add_message "grafeas.v1.Hash" do
35
- optional :type, :string, 1
36
- optional :value, :bytes, 2
37
- end
38
- add_message "grafeas.v1.Command" do
39
- optional :name, :string, 1
40
- repeated :env, :string, 2
41
- repeated :args, :string, 3
42
- optional :dir, :string, 4
43
- optional :id, :string, 5
44
- repeated :wait_for, :string, 6
45
- end
46
- add_message "grafeas.v1.Artifact" do
47
- optional :checksum, :string, 1
48
- optional :id, :string, 2
49
- repeated :names, :string, 3
50
- end
51
- add_message "grafeas.v1.SourceContext" do
52
- map :labels, :string, :string, 4
53
- oneof :context do
54
- optional :cloud_repo, :message, 1, "grafeas.v1.CloudRepoSourceContext"
55
- optional :gerrit, :message, 2, "grafeas.v1.GerritSourceContext"
56
- optional :git, :message, 3, "grafeas.v1.GitSourceContext"
57
- end
58
- end
59
- add_message "grafeas.v1.AliasContext" do
60
- optional :kind, :enum, 1, "grafeas.v1.AliasContext.Kind"
61
- optional :name, :string, 2
62
- end
63
- add_enum "grafeas.v1.AliasContext.Kind" do
64
- value :KIND_UNSPECIFIED, 0
65
- value :FIXED, 1
66
- value :MOVABLE, 2
67
- value :OTHER, 4
68
- end
69
- add_message "grafeas.v1.CloudRepoSourceContext" do
70
- optional :repo_id, :message, 1, "grafeas.v1.RepoId"
71
- oneof :revision do
72
- optional :revision_id, :string, 2
73
- optional :alias_context, :message, 3, "grafeas.v1.AliasContext"
74
- end
75
- end
76
- add_message "grafeas.v1.GerritSourceContext" do
77
- optional :host_uri, :string, 1
78
- optional :gerrit_project, :string, 2
79
- oneof :revision do
80
- optional :revision_id, :string, 3
81
- optional :alias_context, :message, 4, "grafeas.v1.AliasContext"
82
- end
83
- end
84
- add_message "grafeas.v1.GitSourceContext" do
85
- optional :url, :string, 1
86
- optional :revision_id, :string, 2
87
- end
88
- add_message "grafeas.v1.RepoId" do
89
- oneof :id do
90
- optional :project_repo_id, :message, 1, "grafeas.v1.ProjectRepoId"
91
- optional :uid, :string, 2
92
- end
93
- end
94
- add_message "grafeas.v1.ProjectRepoId" do
95
- optional :project_id, :string, 1
96
- optional :repo_name, :string, 2
9
+
10
+ descriptor_data = "\n\x1bgrafeas/v1/provenance.proto\x12\ngrafeas.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x90\x04\n\x0f\x42uildProvenance\x12\n\n\x02id\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12%\n\x08\x63ommands\x18\x03 \x03(\x0b\x32\x13.grafeas.v1.Command\x12-\n\x0f\x62uilt_artifacts\x18\x04 \x03(\x0b\x32\x14.grafeas.v1.Artifact\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07\x63reator\x18\x08 \x01(\t\x12\x10\n\x08logs_uri\x18\t \x01(\t\x12-\n\x11source_provenance\x18\n \x01(\x0b\x32\x12.grafeas.v1.Source\x12\x12\n\ntrigger_id\x18\x0b \x01(\t\x12\x44\n\rbuild_options\x18\x0c \x03(\x0b\x32-.grafeas.v1.BuildProvenance.BuildOptionsEntry\x12\x17\n\x0f\x62uilder_version\x18\r \x01(\t\x1a\x33\n\x11\x42uildOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x95\x02\n\x06Source\x12#\n\x1b\x61rtifact_storage_source_uri\x18\x01 \x01(\t\x12\x37\n\x0b\x66ile_hashes\x18\x02 \x03(\x0b\x32\".grafeas.v1.Source.FileHashesEntry\x12*\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x19.grafeas.v1.SourceContext\x12\x36\n\x13\x61\x64\x64itional_contexts\x18\x04 \x03(\x0b\x32\x19.grafeas.v1.SourceContext\x1aI\n\x0f\x46ileHashesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.grafeas.v1.FileHashes:\x02\x38\x01\"1\n\nFileHashes\x12#\n\tfile_hash\x18\x01 \x03(\x0b\x32\x10.grafeas.v1.Hash\"#\n\x04Hash\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"]\n\x07\x43ommand\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03\x65nv\x18\x02 \x03(\t\x12\x0c\n\x04\x61rgs\x18\x03 \x03(\t\x12\x0b\n\x03\x64ir\x18\x04 \x01(\t\x12\n\n\x02id\x18\x05 \x01(\t\x12\x10\n\x08wait_for\x18\x06 \x03(\t\"7\n\x08\x41rtifact\x12\x10\n\x08\x63hecksum\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\r\n\x05names\x18\x03 \x03(\t\"\x9a\x02\n\rSourceContext\x12\x38\n\ncloud_repo\x18\x01 \x01(\x0b\x32\".grafeas.v1.CloudRepoSourceContextH\x00\x12\x31\n\x06gerrit\x18\x02 \x01(\x0b\x32\x1f.grafeas.v1.GerritSourceContextH\x00\x12+\n\x03git\x18\x03 \x01(\x0b\x32\x1c.grafeas.v1.GitSourceContextH\x00\x12\x35\n\x06labels\x18\x04 \x03(\x0b\x32%.grafeas.v1.SourceContext.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07\x63ontext\"\x8a\x01\n\x0c\x41liasContext\x12+\n\x04kind\x18\x01 \x01(\x0e\x32\x1d.grafeas.v1.AliasContext.Kind\x12\x0c\n\x04name\x18\x02 \x01(\t\"?\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\t\n\x05\x46IXED\x10\x01\x12\x0b\n\x07MOVABLE\x10\x02\x12\t\n\x05OTHER\x10\x04\"\x93\x01\n\x16\x43loudRepoSourceContext\x12#\n\x07repo_id\x18\x01 \x01(\x0b\x32\x12.grafeas.v1.RepoId\x12\x15\n\x0brevision_id\x18\x02 \x01(\tH\x00\x12\x31\n\ralias_context\x18\x03 \x01(\x0b\x32\x18.grafeas.v1.AliasContextH\x00\x42\n\n\x08revision\"\x95\x01\n\x13GerritSourceContext\x12\x10\n\x08host_uri\x18\x01 \x01(\t\x12\x16\n\x0egerrit_project\x18\x02 \x01(\t\x12\x15\n\x0brevision_id\x18\x03 \x01(\tH\x00\x12\x31\n\ralias_context\x18\x04 \x01(\x0b\x32\x18.grafeas.v1.AliasContextH\x00\x42\n\n\x08revision\"4\n\x10GitSourceContext\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x13\n\x0brevision_id\x18\x02 \x01(\t\"S\n\x06RepoId\x12\x34\n\x0fproject_repo_id\x18\x01 \x01(\x0b\x32\x19.grafeas.v1.ProjectRepoIdH\x00\x12\r\n\x03uid\x18\x02 \x01(\tH\x00\x42\x04\n\x02id\"6\n\rProjectRepoId\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x11\n\trepo_name\x18\x02 \x01(\tBQ\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3"
11
+
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError => e
17
+ # Compatibility code: will be removed in the next major version.
18
+ require 'google/protobuf/descriptor_pb'
19
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
+ parsed.clear_dependency
21
+ serialized = parsed.class.encode(parsed)
22
+ file = pool.add_serialized_file(serialized)
23
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
+ imports = [
25
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
26
+ ]
27
+ imports.each do |type_name, expected_filename|
28
+ import_file = pool.lookup(type_name).file_descriptor
29
+ if import_file.name != expected_filename
30
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
97
31
  end
98
32
  end
33
+ warn "Each proto file must use a consistent fully-qualified name."
34
+ warn "This will become an error in the next major version."
99
35
  end
100
36
 
101
37
  module Grafeas