blob: 7063ee53eb0ec3b3eed5cbc0aa37fdbdb442a45c [file] [log] [blame]
Dave Borowitz11f0c642018-04-21 12:04:24 -04001// Copyright (C) 2018 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package gerrit.cache;
18
19option java_package = "com.google.gerrit.server.cache.proto";
20
Han-Wen Nienhuysbcd3edf2021-02-04 15:04:45 +010021import "proto/entities.proto";
22
23// Serialized form of com.google.gerrit.server.change.ChangeKindCacheImpl.Key.
Dave Borowitz11f0c642018-04-21 12:04:24 -040024// Next ID: 4
25message ChangeKindKeyProto {
26 bytes prior = 1;
27 bytes next = 2;
28 string strategy_name = 3;
29}
Dave Borowitze62a1112018-05-01 09:27:46 -040030
31// Serialized form of
32// com.google.gerrit.server.change.MergeabilityCacheImpl.EntryKey.
33// Next ID: 5
34message MergeabilityKeyProto {
35 bytes commit = 1;
36 bytes into = 2;
37 string submit_type = 3;
38 string merge_strategy = 4;
39}
Dave Borowitze6930d72018-05-01 10:22:02 -040040
41// Serialized form of com.google.gerrit.extensions.auth.oauth.OAuthToken.
42// Next ID: 6
43message OAuthTokenProto {
44 string token = 1;
45 string secret = 2;
46 string raw = 3;
Joerg Zierend5fb7432020-03-02 13:51:04 +010047 // Epoch millis.
48 int64 expires_at_millis = 4;
Dave Borowitz12df29f2018-05-15 16:37:02 -070049 string provider_id = 5;
Dave Borowitze6930d72018-05-01 10:22:02 -040050}
Dave Borowitzbab45862018-05-01 12:31:48 -040051
52
53// Serialized form of com.google.gerrit.server.notedb.ChangeNotesCache.Key.
54// Next ID: 4
55message ChangeNotesKeyProto {
56 string project = 1;
57 int32 change_id = 2;
58 bytes id = 3;
59}
60
61// Serialized from of com.google.gerrit.server.notedb.ChangeNotesState.
62//
63// Note on embedded protos: this is just for storing in a cache, so some formats
64// were chosen ease of coding the initial implementation. In particular, where
65// there already exists another serialization mechanism in Gerrit for
66// serializing a particular field, we use that rather than defining a new proto
Alice Kober-Sotzek14db5312018-12-14 16:06:41 +010067// type. This includes types that can be serialized to proto using
68// ProtoConverters as well as NoteDb and indexed types that are serialized using
69// JSON. We can always revisit this decision later; it just requires bumping the
70// cache version.
Dave Borowitzbab45862018-05-01 12:31:48 -040071//
72// Note on nullability: there are a lot of nullable fields in ChangeNotesState
73// and its dependencies. It's likely we could make some of them non-nullable,
74// but each one of those would be a potentially significant amount of cleanup,
75// and there's no guarantee we'd be able to eliminate all of them. (For a less
76// complex class, it's likely the cleanup would be more feasible.)
77//
78// Instead, we just take the tedious yet simple approach of having a "has_foo"
79// field for each nullable field "foo", indicating whether or not foo is null.
80//
Youssef Elghareeba7ad3e02021-07-01 13:20:16 +020081// Next ID: 28
Dave Borowitzbab45862018-05-01 12:31:48 -040082message ChangeNotesStateProto {
83 // Effectively required, even though the corresponding ChangeNotesState field
84 // is optional, since the field is only absent when NoteDb is disabled, in
85 // which case attempting to use the ChangeNotesCache is programmer error.
86 bytes meta_id = 1;
87
88 int32 change_id = 2;
89
Kaushik Lingarkar4a711ed2019-11-12 13:53:29 -080090 // Next ID: 26
Dave Borowitzbab45862018-05-01 12:31:48 -040091 message ChangeColumnsProto {
92 string change_key = 1;
93
Joerg Zierend5fb7432020-03-02 13:51:04 +010094 // Epoch millis.
95 int64 created_on_millis = 2;
Dave Borowitzbab45862018-05-01 12:31:48 -040096
Joerg Zierend5fb7432020-03-02 13:51:04 +010097 // Epoch millis.
98 int64 last_updated_on_millis = 3;
Dave Borowitzbab45862018-05-01 12:31:48 -040099
100 int32 owner = 4;
101
102 string branch = 5;
103
104 int32 current_patch_set_id = 6;
105 bool has_current_patch_set_id = 7;
106
107 string subject = 8;
108
109 string topic = 9;
110 bool has_topic = 10;
111
112 string original_subject = 11;
113 bool has_original_subject = 12;
114
115 string submission_id = 13;
116 bool has_submission_id = 14;
117
Gal Paikin23457032019-10-16 15:09:56 +0200118 reserved 15; // assignee
119 reserved 16; // has_assignee
Dave Borowitzbab45862018-05-01 12:31:48 -0400120
121 string status = 17;
122 bool has_status = 18;
123
124 bool is_private = 19;
125
126 bool work_in_progress = 20;
127
128 bool review_started = 21;
129
130 int32 revert_of = 22;
131 bool has_revert_of = 23;
Kaushik Lingarkar4a711ed2019-11-12 13:53:29 -0800132
133 string cherry_pick_of = 24;
134 bool has_cherry_pick_of = 25;
Dave Borowitzbab45862018-05-01 12:31:48 -0400135 }
136 // Effectively required, even though the corresponding ChangeNotesState field
137 // is optional, since the field is only absent when NoteDb is disabled, in
138 // which case attempting to use the ChangeNotesCache is programmer error.
139 ChangeColumnsProto columns = 3;
140
Joerg Zieren361ea4b2020-02-17 16:25:43 +0100141 reserved 4; // past_assignee
Dave Borowitzbab45862018-05-01 12:31:48 -0400142
143 repeated string hashtag = 5;
144
Han-Wen Nienhuysbcd3edf2021-02-04 15:04:45 +0100145 repeated devtools.gerritcodereview.PatchSet patch_set = 6;
Dave Borowitzbab45862018-05-01 12:31:48 -0400146
Han-Wen Nienhuysbcd3edf2021-02-04 15:04:45 +0100147 repeated devtools.gerritcodereview.PatchSetApproval approval = 7;
Dave Borowitzbab45862018-05-01 12:31:48 -0400148
149 // Next ID: 4
150 message ReviewerSetEntryProto {
151 string state = 1;
152 int32 account_id = 2;
Joerg Zierend5fb7432020-03-02 13:51:04 +0100153 // Epoch millis.
154 int64 timestamp_millis = 3;
Dave Borowitzbab45862018-05-01 12:31:48 -0400155 }
156 repeated ReviewerSetEntryProto reviewer = 8;
157
158 // Next ID: 4
159 message ReviewerByEmailSetEntryProto {
160 string state = 1;
161 string address = 2;
Joerg Zierend5fb7432020-03-02 13:51:04 +0100162 // Epoch millis.
163 int64 timestamp_millis = 3;
Dave Borowitzbab45862018-05-01 12:31:48 -0400164 }
165 repeated ReviewerByEmailSetEntryProto reviewer_by_email = 9;
166
167 repeated ReviewerSetEntryProto pending_reviewer = 10;
168
169 repeated ReviewerByEmailSetEntryProto pending_reviewer_by_email = 11;
170
171 repeated int32 past_reviewer = 12;
172
173 // Next ID: 5
174 message ReviewerStatusUpdateProto {
Joerg Zieren361ea4b2020-02-17 16:25:43 +0100175 // Epoch millis.
Joerg Zierend5fb7432020-03-02 13:51:04 +0100176 int64 timestamp_millis = 1;
Dave Borowitzbab45862018-05-01 12:31:48 -0400177 int32 updated_by = 2;
178 int32 reviewer = 3;
179 string state = 4;
180 }
181 repeated ReviewerStatusUpdateProto reviewer_update = 13;
182
183 // JSON produced from
184 // com.google.gerrit.server.index.change.ChangeField.StoredSubmitRecord.
185 repeated string submit_record = 14;
186
Han-Wen Nienhuysbcd3edf2021-02-04 15:04:45 +0100187 repeated devtools.gerritcodereview.ChangeMessage change_message = 15;
Dave Borowitzbab45862018-05-01 12:31:48 -0400188
David Ostrovskyb03a6e92019-05-26 14:11:47 +0200189 // JSON produced from com.google.gerrit.entities.Comment.
Dave Borowitzbab45862018-05-01 12:31:48 -0400190 repeated string published_comment = 16;
191
Dave Borowitzfb2b3232018-12-13 14:30:48 -0800192 reserved 17; // read_only_until
193 reserved 18; // has_read_only_until
Dave Borowitz10edb7c2019-04-15 14:33:22 -0700194
195 // Number of updates to the change's meta ref.
196 int32 update_count = 19;
David Ostrovskyf8367a82019-08-03 17:05:19 +0200197
198 string server_id = 20;
199 bool has_server_id = 21;
Gal Paikin23457032019-10-16 15:09:56 +0200200
Kamil Musinfd7f8b92023-02-06 11:51:29 +0100201 reserved 22; // assignee_update;
Dave Borowitzc15b8ef2018-05-18 08:11:22 -0400202
Joerg Zierenfdbea382020-03-06 13:44:25 +0100203 // An update to the attention set of the change. See class AttentionSetUpdate
204 // for context.
205 message AttentionSetUpdateProto {
Joerg Zieren361ea4b2020-02-17 16:25:43 +0100206 // Epoch millis.
Joerg Zierend5fb7432020-03-02 13:51:04 +0100207 int64 timestamp_millis = 1;
Joerg Zieren361ea4b2020-02-17 16:25:43 +0100208 int32 account = 2;
Joerg Zierenfdbea382020-03-06 13:44:25 +0100209 // Maps to enum AttentionSetUpdate.Operation
Joerg Zieren361ea4b2020-02-17 16:25:43 +0100210 string operation = 3;
211 string reason = 4;
212 }
Gal Paikin120baca2020-09-30 21:46:45 +0300213 // Only includes the most recent attention set update for each user.
Joerg Zierenfdbea382020-03-06 13:44:25 +0100214 repeated AttentionSetUpdateProto attention_set_update = 23;
Gal Paikin120baca2020-09-30 21:46:45 +0300215
216 // Includes all attention set updates.
217 repeated AttentionSetUpdateProto all_attention_set_update = 24;
Marija Savtchoukd2b82152020-11-23 08:20:54 +0000218
219 // Epoch millis.
220 int64 merged_on_millis = 25;
221 bool has_merged_on = 26;
Youssef Elghareeba7ad3e02021-07-01 13:20:16 +0200222
223 repeated SubmitRequirementResultProto submit_requirement_result = 27;
Joerg Zieren361ea4b2020-02-17 16:25:43 +0100224}
Dave Borowitzc15b8ef2018-05-18 08:11:22 -0400225
226// Serialized form of com.google.gerrit.server.query.change.ConflictKey
227message ConflictKeyProto {
228 bytes commit = 1;
229 bytes other_commit = 2;
230 string submit_type = 3;
231 bool content_merge = 4;
232}
Dave Borowitzb30a4142018-07-23 15:28:22 -0700233
234// Serialized form of com.google.gerrit.server.query.git.TagSetHolder.
235// Next ID: 3
236message TagSetHolderProto {
237 string project_name = 1;
238
239 // Next ID: 4
240 message TagSetProto {
241 string project_name = 1;
242
243 // Next ID: 3
244 message CachedRefProto {
245 bytes id = 1;
246 int32 flag = 2;
247 }
248 map<string, CachedRefProto> ref = 2;
249
250 // Next ID: 3
251 message TagProto {
252 bytes id = 1;
253 bytes flags = 2;
254 }
255 repeated TagProto tag = 3;
256 }
257 TagSetProto tags = 2;
258}
Dave Borowitzb20d23a82018-08-21 13:43:10 -0700259
260// Serialized form of
261// com.google.gerrit.server.account.externalids.AllExternalIds.
262// Next ID: 2
263message AllExternalIdsProto {
Thomas Draebing29595cd2021-03-24 15:23:35 +0100264 // Next ID: 7
Dave Borowitzb20d23a82018-08-21 13:43:10 -0700265 message ExternalIdProto {
266 string key = 1;
267 int32 accountId = 2;
268 string email = 3;
269 string password = 4;
270 bytes blobId = 5;
Thomas Draebing29595cd2021-03-24 15:23:35 +0100271 bool isCaseInsensitive = 6;
Dave Borowitzb20d23a82018-08-21 13:43:10 -0700272 }
273 repeated ExternalIdProto external_id = 1;
274}
Patrick Hiesela57c0d62019-02-19 09:09:22 +0100275
Youssef Elghareeb25297242020-03-19 00:13:26 +0100276// Serialized form of a list of com.google.gerrit.entities.AccountGroup.UUID
277// Next ID: 2
278message AllExternalGroupsProto {
279 message ExternalGroupProto {
280 string groupUuid = 1;
281 }
282 repeated ExternalGroupProto external_group = 1;
283}
284
Gal Paikinf74ee382021-03-22 16:00:25 +0100285// Serialized key for com.google.gerrit.server.account.GroupCacheImpl.
286// Next ID: 3
287message GroupKeyProto {
288 string uuid = 1;
289 bytes revision = 2;
290}
291
292
293// Serialized form of com.google.gerrit.entities.InternalGroup.
294// Next ID: 11
295message InternalGroupProto {
296 int32 id = 1;
297 string name = 2;
298 string description = 3;
299 string owner_group_uuid = 4;
300 bool is_visible_to_all = 5;
301 string group_uuid = 6;
302 int64 created_on = 7;
303 repeated int32 members_ids = 8;
304 repeated string subgroup_uuids = 9;
305 bytes ref_state = 10;
306}
307
Patrick Hiesela57c0d62019-02-19 09:09:22 +0100308// Key for com.google.gerrit.server.git.PureRevertCache.
309// Next ID: 4
310message PureRevertKeyProto {
311 string project = 1;
312 bytes claimed_original = 2;
313 bytes claimed_revert = 3;
314}
Patrick Hiesel4836e572020-03-05 15:23:29 +0100315
Patrick Hiesele945da32020-03-26 17:22:23 +0100316// Key for com.google.gerrit.server.account.ProjectWatches.
317// Next ID: 4
318message ProjectWatchProto {
Patrick Hiesel4836e572020-03-05 15:23:29 +0100319 string project = 1;
320 string filter = 2;
Patrick Hiesele945da32020-03-26 17:22:23 +0100321 repeated string notify_type = 3;
Patrick Hiesel4836e572020-03-05 15:23:29 +0100322}
Patrick Hiesel58d51292020-03-05 16:24:07 +0100323
324// Serialized form of
325// com.google.gerrit.entities.Account.
326// Next ID: 9
327message AccountProto {
328 int32 id = 1;
329 int64 registered_on = 2;
330 string full_name = 3;
331 string display_name = 4;
332 string preferred_email = 5;
333 bool inactive = 6;
334 string status = 7;
335 string meta_id = 8;
336}
Patrick Hiesele945da32020-03-26 17:22:23 +0100337
338// Serialized form of com.google.gerrit.server.account.CachedAccountDetails.Key.
339// Next ID: 3
340message AccountKeyProto {
341 int32 account_id = 1;
342 bytes id = 2;
343}
344
345// Serialized form of com.google.gerrit.server.account.CachedAccountDetails.
346// Next ID: 4
347message AccountDetailsProto {
348 AccountProto account = 1;
349 repeated ProjectWatchProto project_watch_proto = 2;
350 string user_preferences = 3;
351}
Patrick Hieselffd88ef2020-07-07 10:30:45 +0200352
353// Serialized form of com.google.gerrit.entities.Project.
354// Next ID: 11
355message ProjectProto {
356 string name = 1;
357 string description = 2;
358 map<string, string> boolean_configs = 3;
359 string submit_type = 4; // ENUM as String
360 string state = 5; // ENUM as String
361 string parent = 6;
362 string max_object_size_limit = 7;
363 string default_dashboard = 8;
364 string local_default_dashboard = 9;
365 string config_ref_state = 10;
366}
Patrick Hieseld80bf5a2020-07-10 13:55:39 +0200367
368// Serialized form of com.google.gerrit.common.data.GroupReference.
369// Next ID: 3
370message GroupReferenceProto {
371 string uuid = 1;
372 string name = 2;
373}
Patrick Hieself5575442020-07-10 14:25:51 +0200374
375// Serialized form of com.google.gerrit.common.data.PermissionRule.
376// Next ID: 6
377message PermissionRuleProto {
378 string action = 1; // ENUM as String
379 bool force = 2;
380 int32 min = 3;
381 int32 max = 4;
382 GroupReferenceProto group = 5;
383}
Patrick Hieseld2761e12020-07-13 09:10:11 +0200384
385// Serialized form of com.google.gerrit.common.data.Permission.
386// Next ID: 4
387message PermissionProto {
388 string name = 1;
389 bool exclusive_group = 2;
390 repeated PermissionRuleProto rules = 3;
391}
Patrick Hiesel4c74f002020-07-13 09:22:34 +0200392
393// Serialized form of com.google.gerrit.common.data.AccessSection.
394// Next ID: 3
395message AccessSectionProto {
396 string name = 1;
397 repeated PermissionProto permissions = 2;
398}
Patrick Hiesel9f8e23d2020-07-13 09:35:17 +0200399
400// Serialized form of com.google.gerrit.server.git.BranchOrderSection.
401// Next ID: 2
402message BranchOrderSectionProto {
403 repeated string branches_in_order = 1;
404}
Patrick Hiesel48434b12020-07-13 10:07:49 +0200405
406// Serialized form of com.google.gerrit.common.data.ContributorAgreement.
407// Next ID: 8
408message ContributorAgreementProto {
409 string name = 1;
410 string description = 2;
411 repeated PermissionRuleProto accepted = 3;
412 GroupReferenceProto auto_verify = 4;
413 string url = 5;
414 repeated string exclude_regular_expressions = 6;
415 repeated string match_regular_expressions = 7;
416}
Patrick Hiesel27ab5bd2020-07-13 13:34:39 +0200417
418// Serialized form of com.google.gerrit.entities.Address.
419// Next ID: 3
420message AddressProto {
421 string name = 1;
422 string email = 2;
423}
Patrick Hiesel9b15b9c2020-07-13 14:23:39 +0200424
425// Serialized form of com.google.gerrit.entities.NotifyConfig.
426// Next ID: 7
427message NotifyConfigProto {
428 string name = 1;
429 repeated string type = 2; // ENUM as String
430 string filter = 3;
431 string header = 4; // ENUM as String
432 repeated GroupReferenceProto groups = 5;
433 repeated AddressProto addresses = 6;
434}
Patrick Hiesel58d03c92020-07-14 16:27:17 +0200435
436// Serialized form of com.google.gerrit.entities.LabelValue.
437// Next ID: 3
438message LabelValueProto {
439 string text = 1;
440 int32 value = 2;
441}
Patrick Hiesel4938bda2020-07-15 14:44:23 +0200442
443// Serialized form of com.google.gerrit.common.data.LabelType.
Youssef Elghareeb261691a2021-11-17 13:01:08 +0100444// Next ID: 22
Patrick Hiesel4938bda2020-07-15 14:44:23 +0200445message LabelTypeProto {
446 string name = 1;
447 string function = 2; // ENUM as String
Edwin Kempinf98c6b82022-04-05 14:11:39 +0200448 reserved 3; // copy_any_score
449 reserved 4; // copy_min_score
450 reserved 5; // copy_max_score
451 reserved 6; // copy_all_scores_on_merge_first_parent_update
452 reserved 7; // copy_all_scores_on_trivial_rebase
453 reserved 8; // copy_all_scores_if_no_code_change
454 reserved 9; // copy_all_scores_if_no_change
455 reserved 10; // copy_values
Patrick Hiesel4938bda2020-07-15 14:44:23 +0200456 bool allow_post_submit = 11;
457 bool ignore_self_approval = 12;
458 int32 default_value = 13;
459 repeated LabelValueProto values = 14;
460 int32 max_negative = 15;
461 int32 max_positive = 16;
462 bool can_override = 17;
463 repeated string ref_patterns = 18;
Edwin Kempinf98c6b82022-04-05 14:11:39 +0200464 reserved 19; // copy_all_scores_if_list_of_files_did_not_change
Patrick Hieselc429ff32021-06-01 15:56:30 +0200465 string copy_condition = 20;
Youssef Elghareeb261691a2021-11-17 13:01:08 +0100466 string description = 21;
Patrick Hiesel4938bda2020-07-15 14:44:23 +0200467}
Patrick Hiesel7e579e32020-07-16 10:17:59 +0200468
Youssef Elghareebd6879e22021-04-01 16:03:58 +0200469// Serialized form of com.google.gerrit.entities.SubmitRequirement.
470// Next ID: 7
471message SubmitRequirementProto {
472 string name = 1;
473 string description = 2;
474 string applicability_expression = 3;
Youssef Elghareeb61d8e162021-05-18 15:41:16 +0200475 string submittability_expression = 4;
Youssef Elghareebd6879e22021-04-01 16:03:58 +0200476 string override_expression = 5;
477 bool allow_override_in_child_projects = 6;
478}
479
Youssef Elghareeba7ad3e02021-07-01 13:20:16 +0200480// Serialized form of com.google.gerrit.entities.SubmitRequirementResult.
Marija Savtchoukc3affd12022-05-24 16:31:58 +0100481// Next ID: 9
Youssef Elghareeba7ad3e02021-07-01 13:20:16 +0200482message SubmitRequirementResultProto {
483 SubmitRequirementProto submit_requirement = 1;
484 SubmitRequirementExpressionResultProto applicability_expression_result = 2;
485 SubmitRequirementExpressionResultProto submittability_expression_result = 3;
486 SubmitRequirementExpressionResultProto override_expression_result = 4;
487
488 // Patchset commit ID at which the submit requirements are evaluated.
489 bytes commit = 5;
Youssef Elghareeb024103e2021-09-06 14:41:04 +0200490
491 // Whether this result was created from a legacy submit record.
492 bool legacy = 6;
Youssef Elghareebf592ed12021-11-26 15:52:06 +0100493
494 // Whether the submit requirement was bypassed during submission (i.e. by
495 // performing a push with the %submit option).
496 bool forced = 7;
Marija Savtchoukc3affd12022-05-24 16:31:58 +0100497 // Whether this submit requirement result should be filtered out when returned
498 // from REST API.
499 bool hidden = 8;
Youssef Elghareeba7ad3e02021-07-01 13:20:16 +0200500}
501
502// Serialized form of com.google.gerrit.entities.SubmitRequirementExpressionResult.
503// Next ID: 6
504message SubmitRequirementExpressionResultProto {
505 string expression = 1;
506 string status = 2; // enum as string
507 string error_message = 3;
508 repeated string passing_atoms = 4;
509 repeated string failing_atoms = 5;
510}
511
Patrick Hiesel7e579e32020-07-16 10:17:59 +0200512// Serialized form of com.google.gerrit.server.project.ConfiguredMimeTypes.
513// Next ID: 4
514message ConfiguredMimeTypeProto {
515 string type = 1;
516 string pattern = 2;
517 bool is_regular_expression = 3;
518}
Patrick Hiesel1c684052020-07-16 10:52:51 +0200519
520// Serialized form of com.google.gerrit.common.data.SubscribeSection.
521// Next ID: 4
522message SubscribeSectionProto {
523 string project_name = 1;
524 repeated string multi_match_ref_specs = 2;
525 repeated string matching_ref_specs = 3;
526}
Patrick Hiesel0a9b9db2020-07-16 12:49:49 +0200527
528// Serialized form of com.google.gerrit.entities.StoredCommentLinkInfo.
Kamil Musin9148ba62022-09-15 14:21:34 +0200529// Next ID: 10
Patrick Hiesel0a9b9db2020-07-16 12:49:49 +0200530message StoredCommentLinkInfoProto {
Kamil Musin734db9a2022-11-11 11:19:25 +0100531 reserved 4; // html
532
Patrick Hiesel0a9b9db2020-07-16 12:49:49 +0200533 string name = 1;
534 string match = 2;
Patrick Hiesel0a9b9db2020-07-16 12:49:49 +0200535 bool enabled = 5;
536 bool override_only = 6;
Kamil Musin9148ba62022-09-15 14:21:34 +0200537 string link = 3;
538 string prefix = 7;
539 string suffix = 8;
540 string text = 9;
Patrick Hiesel0a9b9db2020-07-16 12:49:49 +0200541}
Patrick Hiesel4ba64ae2020-07-16 16:48:50 +0200542
543// Serialized form of com.google.gerrit.entities.CachedProjectConfigProto.
Youssef Elghareebd6879e22021-04-01 16:03:58 +0200544// Next ID: 20
Patrick Hiesel4ba64ae2020-07-16 16:48:50 +0200545message CachedProjectConfigProto {
546 ProjectProto project = 1;
547 repeated GroupReferenceProto group_list = 2;
548 repeated PermissionRuleProto accounts_section = 3;
549 repeated AccessSectionProto access_sections = 4;
550 BranchOrderSectionProto branch_order_section = 5;
551 repeated ContributorAgreementProto contributor_agreements = 6;
552 repeated NotifyConfigProto notify_configs = 7;
553 repeated LabelTypeProto label_sections = 8;
554 repeated ConfiguredMimeTypeProto mime_types = 9;
555 repeated SubscribeSectionProto subscribe_sections = 10;
556 repeated StoredCommentLinkInfoProto comment_links = 11;
557 bytes rules_id = 12;
558 bytes revision = 13;
559 int64 max_object_size_limit = 14;
560 bool check_received_objects = 15;
561 map<string, ExtensionPanelSectionProto> extension_panels = 16;
Patrick Hieself9035cc2020-07-23 16:16:21 +0200562 map<string, string> plugin_configs = 17;
563 map<string, string> project_level_configs = 18;
Youssef Elghareebd6879e22021-04-01 16:03:58 +0200564 repeated SubmitRequirementProto submit_requirement_sections = 19;
Patrick Hiesel4ba64ae2020-07-16 16:48:50 +0200565
566 // Next ID: 2
567 message ExtensionPanelSectionProto {
568 repeated string section = 1;
569 }
570}
Patrick Hieselc2c108c2020-07-23 09:54:22 +0200571
572// Serialized key for com.google.gerrit.server.project.ProjectCacheImpl.
573// Next ID: 4
574message ProjectCacheKeyProto {
575 string project = 1;
576 bytes revision = 2;
577 bytes global_config_revision = 3; // Hash of All-Projects-projects.config. This
578 // will only be populated for All-Projects.
579}
Youssef Elghareeb3d549302020-07-15 17:08:28 +0200580
581// Serialized form of com.google.gerrit.server.comment.CommentContextCacheImpl.Key
Youssef Elghareeb87b74502021-02-05 18:53:05 +0100582// Next ID: 7
Youssef Elghareeb3d549302020-07-15 17:08:28 +0200583message CommentContextKeyProto {
584 string project = 1;
585 string change_id = 2;
586 int32 patchset = 3;
587 string commentId = 4;
588
589 // hashed with the murmur3_128 hash function
590 string path_hash = 5;
Youssef Elghareeb87b74502021-02-05 18:53:05 +0100591
592 int32 context_padding = 6;
Youssef Elghareeb3d549302020-07-15 17:08:28 +0200593}
594
595// Serialized form of a list of com.google.gerrit.extensions.common.ContextLineInfo
Youssef Elghareeb27d62012021-02-23 18:21:46 +0100596// Next ID: 3
Youssef Elghareeb3d549302020-07-15 17:08:28 +0200597message AllCommentContextProto {
598 message CommentContextProto {
599 int32 line_number = 1;
600 string context_line = 2;
601 }
602 repeated CommentContextProto context = 1;
Youssef Elghareeb27d62012021-02-23 18:21:46 +0100603 string content_type = 2;
Youssef Elghareeb3d549302020-07-15 17:08:28 +0200604}
Youssef Elghareebc5cb2f72020-10-19 13:29:59 +0200605
606// Serialized key for
Youssef Elghareeb64778c32020-10-23 16:25:50 +0200607// com.google.gerrit.server.patch.gitdiff.GitModifiedFilesCacheKey
Youssef Elghareebc5cb2f72020-10-19 13:29:59 +0200608// Next ID: 5
609message GitModifiedFilesKeyProto {
610 string project = 1;
611 bytes a_tree = 2; // SHA-1 hash of the left git tree ID in the diff
612 bytes b_tree = 3; // SHA-1 hash of the right git tree ID in the diff
613 int32 rename_score = 4;
614}
615
Youssef Elghareeb64778c32020-10-23 16:25:50 +0200616// Serialized key for
617// com.google.gerrit.server.patch.diff.ModifiedFilesCacheKey
618// Next ID: 5
619message ModifiedFilesKeyProto {
620 string project = 1;
621 bytes a_commit = 2; // SHA-1 hash of the left commit ID in the diff
622 bytes b_commit = 3; // SHA-1 hash of the right commit ID in the diff
623 int32 rename_score = 4;
624}
625
Youssef Elghareebc5cb2f72020-10-19 13:29:59 +0200626// Serialized form of com.google.gerrit.server.patch.gitdiff.ModifiedFile
627// Next ID: 4
628message ModifiedFileProto {
629 string change_type = 1; // ENUM as string
630 string old_path = 2;
631 string new_path = 3;
632}
633
634// Serialized form of a collection of
635// com.google.gerrit.server.patch.gitdiff.ModifiedFile
636// Next ID: 2
637message ModifiedFilesProto {
638 repeated ModifiedFileProto modifiedFile = 1;
639}
Youssef Elghareeb332d1712020-10-22 19:13:54 +0200640
641// Serialized form of a collection of
642// com.google.gerrit.server.patch.gitfilediff.GitFileDiffCacheImpl.Key
Youssef Elghareeb541ac102021-06-24 17:49:30 +0200643// Next ID: 9
Youssef Elghareeb332d1712020-10-22 19:13:54 +0200644message GitFileDiffKeyProto {
645 string project = 1;
646 bytes a_tree = 2;
647 bytes b_tree = 3;
648 string file_path = 4;
649 int32 rename_score = 5;
650 string diff_algorithm = 6; // ENUM as string
651 string whitepsace = 7; // ENUM as string
Youssef Elghareeb541ac102021-06-24 17:49:30 +0200652 bool useTimeout = 8;
Youssef Elghareeb332d1712020-10-22 19:13:54 +0200653}
654
655// Serialized form of com.google.gerrit.server.patch.gitfilediff.GitFileDiff
Youssef Elghareeb541ac102021-06-24 17:49:30 +0200656// Next ID: 12
Youssef Elghareeb332d1712020-10-22 19:13:54 +0200657message GitFileDiffProto {
658 message Edit {
659 int32 begin_a = 1;
660 int32 end_a = 2;
661 int32 begin_b = 3;
662 int32 end_b = 4;
663 }
664 repeated Edit edits = 1;
665 string file_header = 2;
666 string old_path = 3;
667 string new_path = 4;
668 bytes old_id = 5;
669 bytes new_id = 6;
670 string old_mode = 7; // ENUM as string
671 string new_mode = 8; // ENUM as string
672 string change_type = 9; // ENUM as string
673 string patch_type = 10; // ENUM as string
Youssef Elghareeb541ac102021-06-24 17:49:30 +0200674 bool negative = 11;
Youssef Elghareeb332d1712020-10-22 19:13:54 +0200675}
Youssef Elghareeb7a988d32020-11-19 23:43:13 +0100676
677// Serialized form of
678// com.google.gerrit.server.patch.fileDiff.FileDiffCacheKey
Youssef Elghareeb541ac102021-06-24 17:49:30 +0200679// Next ID: 9
Youssef Elghareeb7a988d32020-11-19 23:43:13 +0100680message FileDiffKeyProto {
681 string project = 1;
682 bytes old_commit = 2;
683 bytes new_commit = 3;
684 string file_path = 4;
685 int32 rename_score = 5;
686 string diff_algorithm = 6;
687 string whitespace = 7;
Youssef Elghareeb541ac102021-06-24 17:49:30 +0200688 bool useTimeout = 8;
Youssef Elghareeb7a988d32020-11-19 23:43:13 +0100689}
690
691// Serialized form of
692// com.google.gerrit.server.patch.filediff.FileDiffOutput
Youssef Elghareeb1ae12c02022-06-28 13:49:18 +0200693// Next ID: 15
Youssef Elghareeb7a988d32020-11-19 23:43:13 +0100694message FileDiffOutputProto {
695 // Next ID: 5
696 message Edit {
697 int32 begin_a = 1;
698 int32 end_a = 2;
699 int32 begin_b = 3;
700 int32 end_b = 4;
701 }
702 // Serialized form of com.google.gerrit.server.patch.filediff.TaggedEdit
703 // Next ID: 3
704 message TaggedEdit {
705 Edit edit = 1;
706 bool due_to_rebase = 2;
707 }
Youssef Elghareeb3c2e9a62021-02-18 22:00:57 +0100708 // Next ID: 3
709 message ComparisonType {
710 int32 parent_num = 1;
711 bool auto_merge = 2;
712 }
Youssef Elghareeb7a988d32020-11-19 23:43:13 +0100713 string old_path = 1;
714 string new_path = 2;
715 string change_type = 3;
716 string patch_type = 4;
717 repeated string header_lines = 5;
718 int64 size = 6;
719 int64 size_delta = 7;
720 repeated TaggedEdit edits = 8;
Youssef Elghareeb3c2e9a62021-02-18 22:00:57 +0100721 bytes old_commit = 9;
722 bytes new_commit = 10;
723 ComparisonType comparison_type = 11;
Youssef Elghareeb541ac102021-06-24 17:49:30 +0200724 bool negative = 12;
Youssef Elghareeb1ae12c02022-06-28 13:49:18 +0200725 string old_mode = 13; // ENUM as string
726 string new_mode = 14; // ENUM as string
Youssef Elghareeb7a988d32020-11-19 23:43:13 +0100727}