blob: 16e5e95dfc398df49fb19bb37a2a0dad2d8f4b71 [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
201 message AssigneeStatusUpdateProto {
Joerg Zieren361ea4b2020-02-17 16:25:43 +0100202 // Epoch millis.
Joerg Zierend5fb7432020-03-02 13:51:04 +0100203 int64 timestamp_millis = 1;
Gal Paikin23457032019-10-16 15:09:56 +0200204 int32 updated_by = 2;
205 int32 current_assignee = 3;
206 bool has_current_assignee = 4;
207 }
208 repeated AssigneeStatusUpdateProto assignee_update = 22;
Dave Borowitzc15b8ef2018-05-18 08:11:22 -0400209
Joerg Zierenfdbea382020-03-06 13:44:25 +0100210 // An update to the attention set of the change. See class AttentionSetUpdate
211 // for context.
212 message AttentionSetUpdateProto {
Joerg Zieren361ea4b2020-02-17 16:25:43 +0100213 // Epoch millis.
Joerg Zierend5fb7432020-03-02 13:51:04 +0100214 int64 timestamp_millis = 1;
Joerg Zieren361ea4b2020-02-17 16:25:43 +0100215 int32 account = 2;
Joerg Zierenfdbea382020-03-06 13:44:25 +0100216 // Maps to enum AttentionSetUpdate.Operation
Joerg Zieren361ea4b2020-02-17 16:25:43 +0100217 string operation = 3;
218 string reason = 4;
219 }
Gal Paikin120baca2020-09-30 21:46:45 +0300220 // Only includes the most recent attention set update for each user.
Joerg Zierenfdbea382020-03-06 13:44:25 +0100221 repeated AttentionSetUpdateProto attention_set_update = 23;
Gal Paikin120baca2020-09-30 21:46:45 +0300222
223 // Includes all attention set updates.
224 repeated AttentionSetUpdateProto all_attention_set_update = 24;
Marija Savtchoukd2b82152020-11-23 08:20:54 +0000225
226 // Epoch millis.
227 int64 merged_on_millis = 25;
228 bool has_merged_on = 26;
Youssef Elghareeba7ad3e02021-07-01 13:20:16 +0200229
230 repeated SubmitRequirementResultProto submit_requirement_result = 27;
Joerg Zieren361ea4b2020-02-17 16:25:43 +0100231}
Dave Borowitzc15b8ef2018-05-18 08:11:22 -0400232
233// Serialized form of com.google.gerrit.server.query.change.ConflictKey
234message ConflictKeyProto {
235 bytes commit = 1;
236 bytes other_commit = 2;
237 string submit_type = 3;
238 bool content_merge = 4;
239}
Dave Borowitzb30a4142018-07-23 15:28:22 -0700240
241// Serialized form of com.google.gerrit.server.query.git.TagSetHolder.
242// Next ID: 3
243message TagSetHolderProto {
244 string project_name = 1;
245
246 // Next ID: 4
247 message TagSetProto {
248 string project_name = 1;
249
250 // Next ID: 3
251 message CachedRefProto {
252 bytes id = 1;
253 int32 flag = 2;
254 }
255 map<string, CachedRefProto> ref = 2;
256
257 // Next ID: 3
258 message TagProto {
259 bytes id = 1;
260 bytes flags = 2;
261 }
262 repeated TagProto tag = 3;
263 }
264 TagSetProto tags = 2;
265}
Dave Borowitzb20d23a82018-08-21 13:43:10 -0700266
267// Serialized form of
268// com.google.gerrit.server.account.externalids.AllExternalIds.
269// Next ID: 2
270message AllExternalIdsProto {
Thomas Draebing29595cd2021-03-24 15:23:35 +0100271 // Next ID: 7
Dave Borowitzb20d23a82018-08-21 13:43:10 -0700272 message ExternalIdProto {
273 string key = 1;
274 int32 accountId = 2;
275 string email = 3;
276 string password = 4;
277 bytes blobId = 5;
Thomas Draebing29595cd2021-03-24 15:23:35 +0100278 bool isCaseInsensitive = 6;
Dave Borowitzb20d23a82018-08-21 13:43:10 -0700279 }
280 repeated ExternalIdProto external_id = 1;
281}
Patrick Hiesela57c0d62019-02-19 09:09:22 +0100282
Youssef Elghareeb25297242020-03-19 00:13:26 +0100283// Serialized form of a list of com.google.gerrit.entities.AccountGroup.UUID
284// Next ID: 2
285message AllExternalGroupsProto {
286 message ExternalGroupProto {
287 string groupUuid = 1;
288 }
289 repeated ExternalGroupProto external_group = 1;
290}
291
Gal Paikinf74ee382021-03-22 16:00:25 +0100292// Serialized key for com.google.gerrit.server.account.GroupCacheImpl.
293// Next ID: 3
294message GroupKeyProto {
295 string uuid = 1;
296 bytes revision = 2;
297}
298
299
300// Serialized form of com.google.gerrit.entities.InternalGroup.
301// Next ID: 11
302message InternalGroupProto {
303 int32 id = 1;
304 string name = 2;
305 string description = 3;
306 string owner_group_uuid = 4;
307 bool is_visible_to_all = 5;
308 string group_uuid = 6;
309 int64 created_on = 7;
310 repeated int32 members_ids = 8;
311 repeated string subgroup_uuids = 9;
312 bytes ref_state = 10;
313}
314
Patrick Hiesela57c0d62019-02-19 09:09:22 +0100315// Key for com.google.gerrit.server.git.PureRevertCache.
316// Next ID: 4
317message PureRevertKeyProto {
318 string project = 1;
319 bytes claimed_original = 2;
320 bytes claimed_revert = 3;
321}
Patrick Hiesel4836e572020-03-05 15:23:29 +0100322
Patrick Hiesele945da32020-03-26 17:22:23 +0100323// Key for com.google.gerrit.server.account.ProjectWatches.
324// Next ID: 4
325message ProjectWatchProto {
Patrick Hiesel4836e572020-03-05 15:23:29 +0100326 string project = 1;
327 string filter = 2;
Patrick Hiesele945da32020-03-26 17:22:23 +0100328 repeated string notify_type = 3;
Patrick Hiesel4836e572020-03-05 15:23:29 +0100329}
Patrick Hiesel58d51292020-03-05 16:24:07 +0100330
331// Serialized form of
332// com.google.gerrit.entities.Account.
333// Next ID: 9
334message AccountProto {
335 int32 id = 1;
336 int64 registered_on = 2;
337 string full_name = 3;
338 string display_name = 4;
339 string preferred_email = 5;
340 bool inactive = 6;
341 string status = 7;
342 string meta_id = 8;
343}
Patrick Hiesele945da32020-03-26 17:22:23 +0100344
345// Serialized form of com.google.gerrit.server.account.CachedAccountDetails.Key.
346// Next ID: 3
347message AccountKeyProto {
348 int32 account_id = 1;
349 bytes id = 2;
350}
351
352// Serialized form of com.google.gerrit.server.account.CachedAccountDetails.
353// Next ID: 4
354message AccountDetailsProto {
355 AccountProto account = 1;
356 repeated ProjectWatchProto project_watch_proto = 2;
357 string user_preferences = 3;
358}
Patrick Hieselffd88ef2020-07-07 10:30:45 +0200359
360// Serialized form of com.google.gerrit.entities.Project.
361// Next ID: 11
362message ProjectProto {
363 string name = 1;
364 string description = 2;
365 map<string, string> boolean_configs = 3;
366 string submit_type = 4; // ENUM as String
367 string state = 5; // ENUM as String
368 string parent = 6;
369 string max_object_size_limit = 7;
370 string default_dashboard = 8;
371 string local_default_dashboard = 9;
372 string config_ref_state = 10;
373}
Patrick Hieseld80bf5a2020-07-10 13:55:39 +0200374
375// Serialized form of com.google.gerrit.common.data.GroupReference.
376// Next ID: 3
377message GroupReferenceProto {
378 string uuid = 1;
379 string name = 2;
380}
Patrick Hieself5575442020-07-10 14:25:51 +0200381
382// Serialized form of com.google.gerrit.common.data.PermissionRule.
383// Next ID: 6
384message PermissionRuleProto {
385 string action = 1; // ENUM as String
386 bool force = 2;
387 int32 min = 3;
388 int32 max = 4;
389 GroupReferenceProto group = 5;
390}
Patrick Hieseld2761e12020-07-13 09:10:11 +0200391
392// Serialized form of com.google.gerrit.common.data.Permission.
393// Next ID: 4
394message PermissionProto {
395 string name = 1;
396 bool exclusive_group = 2;
397 repeated PermissionRuleProto rules = 3;
398}
Patrick Hiesel4c74f002020-07-13 09:22:34 +0200399
400// Serialized form of com.google.gerrit.common.data.AccessSection.
401// Next ID: 3
402message AccessSectionProto {
403 string name = 1;
404 repeated PermissionProto permissions = 2;
405}
Patrick Hiesel9f8e23d2020-07-13 09:35:17 +0200406
407// Serialized form of com.google.gerrit.server.git.BranchOrderSection.
408// Next ID: 2
409message BranchOrderSectionProto {
410 repeated string branches_in_order = 1;
411}
Patrick Hiesel48434b12020-07-13 10:07:49 +0200412
413// Serialized form of com.google.gerrit.common.data.ContributorAgreement.
414// Next ID: 8
415message ContributorAgreementProto {
416 string name = 1;
417 string description = 2;
418 repeated PermissionRuleProto accepted = 3;
419 GroupReferenceProto auto_verify = 4;
420 string url = 5;
421 repeated string exclude_regular_expressions = 6;
422 repeated string match_regular_expressions = 7;
423}
Patrick Hiesel27ab5bd2020-07-13 13:34:39 +0200424
425// Serialized form of com.google.gerrit.entities.Address.
426// Next ID: 3
427message AddressProto {
428 string name = 1;
429 string email = 2;
430}
Patrick Hiesel9b15b9c2020-07-13 14:23:39 +0200431
432// Serialized form of com.google.gerrit.entities.NotifyConfig.
433// Next ID: 7
434message NotifyConfigProto {
435 string name = 1;
436 repeated string type = 2; // ENUM as String
437 string filter = 3;
438 string header = 4; // ENUM as String
439 repeated GroupReferenceProto groups = 5;
440 repeated AddressProto addresses = 6;
441}
Patrick Hiesel58d03c92020-07-14 16:27:17 +0200442
443// Serialized form of com.google.gerrit.entities.LabelValue.
444// Next ID: 3
445message LabelValueProto {
446 string text = 1;
447 int32 value = 2;
448}
Patrick Hiesel4938bda2020-07-15 14:44:23 +0200449
450// Serialized form of com.google.gerrit.common.data.LabelType.
Patrick Hieselc429ff32021-06-01 15:56:30 +0200451// Next ID: 21
Patrick Hiesel4938bda2020-07-15 14:44:23 +0200452message LabelTypeProto {
453 string name = 1;
454 string function = 2; // ENUM as String
455 bool copy_any_score = 3;
456 bool copy_min_score = 4;
457 bool copy_max_score = 5;
458 bool copy_all_scores_on_merge_first_parent_update = 6;
459 bool copy_all_scores_on_trivial_rebase = 7;
460 bool copy_all_scores_if_no_code_change = 8;
461 bool copy_all_scores_if_no_change = 9;
462 repeated int32 copy_values = 10;
463 bool allow_post_submit = 11;
464 bool ignore_self_approval = 12;
465 int32 default_value = 13;
466 repeated LabelValueProto values = 14;
467 int32 max_negative = 15;
468 int32 max_positive = 16;
469 bool can_override = 17;
470 repeated string ref_patterns = 18;
Gal Paikinbef260ec2021-01-19 11:55:19 +0100471 bool copy_all_scores_if_list_of_files_did_not_change = 19;
Patrick Hieselc429ff32021-06-01 15:56:30 +0200472 string copy_condition = 20;
Patrick Hiesel4938bda2020-07-15 14:44:23 +0200473}
Patrick Hiesel7e579e32020-07-16 10:17:59 +0200474
Youssef Elghareebd6879e22021-04-01 16:03:58 +0200475// Serialized form of com.google.gerrit.entities.SubmitRequirement.
476// Next ID: 7
477message SubmitRequirementProto {
478 string name = 1;
479 string description = 2;
480 string applicability_expression = 3;
Youssef Elghareeb61d8e162021-05-18 15:41:16 +0200481 string submittability_expression = 4;
Youssef Elghareebd6879e22021-04-01 16:03:58 +0200482 string override_expression = 5;
483 bool allow_override_in_child_projects = 6;
484}
485
Youssef Elghareeba7ad3e02021-07-01 13:20:16 +0200486// Serialized form of com.google.gerrit.entities.SubmitRequirementResult.
Youssef Elghareeb024103e2021-09-06 14:41:04 +0200487// Next ID: 7
Youssef Elghareeba7ad3e02021-07-01 13:20:16 +0200488message SubmitRequirementResultProto {
489 SubmitRequirementProto submit_requirement = 1;
490 SubmitRequirementExpressionResultProto applicability_expression_result = 2;
491 SubmitRequirementExpressionResultProto submittability_expression_result = 3;
492 SubmitRequirementExpressionResultProto override_expression_result = 4;
493
494 // Patchset commit ID at which the submit requirements are evaluated.
495 bytes commit = 5;
Youssef Elghareeb024103e2021-09-06 14:41:04 +0200496
497 // Whether this result was created from a legacy submit record.
498 bool legacy = 6;
Youssef Elghareeba7ad3e02021-07-01 13:20:16 +0200499}
500
501// Serialized form of com.google.gerrit.entities.SubmitRequirementExpressionResult.
502// Next ID: 6
503message SubmitRequirementExpressionResultProto {
504 string expression = 1;
505 string status = 2; // enum as string
506 string error_message = 3;
507 repeated string passing_atoms = 4;
508 repeated string failing_atoms = 5;
509}
510
Patrick Hiesel7e579e32020-07-16 10:17:59 +0200511// Serialized form of com.google.gerrit.server.project.ConfiguredMimeTypes.
512// Next ID: 4
513message ConfiguredMimeTypeProto {
514 string type = 1;
515 string pattern = 2;
516 bool is_regular_expression = 3;
517}
Patrick Hiesel1c684052020-07-16 10:52:51 +0200518
519// Serialized form of com.google.gerrit.common.data.SubscribeSection.
520// Next ID: 4
521message SubscribeSectionProto {
522 string project_name = 1;
523 repeated string multi_match_ref_specs = 2;
524 repeated string matching_ref_specs = 3;
525}
Patrick Hiesel0a9b9db2020-07-16 12:49:49 +0200526
527// Serialized form of com.google.gerrit.entities.StoredCommentLinkInfo.
528// Next ID: 7
529message StoredCommentLinkInfoProto {
530 string name = 1;
531 string match = 2;
532 string link = 3;
533 string html = 4;
534 bool enabled = 5;
535 bool override_only = 6;
536}
Patrick Hiesel4ba64ae2020-07-16 16:48:50 +0200537
538// Serialized form of com.google.gerrit.entities.CachedProjectConfigProto.
Youssef Elghareebd6879e22021-04-01 16:03:58 +0200539// Next ID: 20
Patrick Hiesel4ba64ae2020-07-16 16:48:50 +0200540message CachedProjectConfigProto {
541 ProjectProto project = 1;
542 repeated GroupReferenceProto group_list = 2;
543 repeated PermissionRuleProto accounts_section = 3;
544 repeated AccessSectionProto access_sections = 4;
545 BranchOrderSectionProto branch_order_section = 5;
546 repeated ContributorAgreementProto contributor_agreements = 6;
547 repeated NotifyConfigProto notify_configs = 7;
548 repeated LabelTypeProto label_sections = 8;
549 repeated ConfiguredMimeTypeProto mime_types = 9;
550 repeated SubscribeSectionProto subscribe_sections = 10;
551 repeated StoredCommentLinkInfoProto comment_links = 11;
552 bytes rules_id = 12;
553 bytes revision = 13;
554 int64 max_object_size_limit = 14;
555 bool check_received_objects = 15;
556 map<string, ExtensionPanelSectionProto> extension_panels = 16;
Patrick Hieself9035cc2020-07-23 16:16:21 +0200557 map<string, string> plugin_configs = 17;
558 map<string, string> project_level_configs = 18;
Youssef Elghareebd6879e22021-04-01 16:03:58 +0200559 repeated SubmitRequirementProto submit_requirement_sections = 19;
Patrick Hiesel4ba64ae2020-07-16 16:48:50 +0200560
561 // Next ID: 2
562 message ExtensionPanelSectionProto {
563 repeated string section = 1;
564 }
565}
Patrick Hieselc2c108c2020-07-23 09:54:22 +0200566
567// Serialized key for com.google.gerrit.server.project.ProjectCacheImpl.
568// Next ID: 4
569message ProjectCacheKeyProto {
570 string project = 1;
571 bytes revision = 2;
572 bytes global_config_revision = 3; // Hash of All-Projects-projects.config. This
573 // will only be populated for All-Projects.
574}
Youssef Elghareeb3d549302020-07-15 17:08:28 +0200575
576// Serialized form of com.google.gerrit.server.comment.CommentContextCacheImpl.Key
Youssef Elghareeb87b74502021-02-05 18:53:05 +0100577// Next ID: 7
Youssef Elghareeb3d549302020-07-15 17:08:28 +0200578message CommentContextKeyProto {
579 string project = 1;
580 string change_id = 2;
581 int32 patchset = 3;
582 string commentId = 4;
583
584 // hashed with the murmur3_128 hash function
585 string path_hash = 5;
Youssef Elghareeb87b74502021-02-05 18:53:05 +0100586
587 int32 context_padding = 6;
Youssef Elghareeb3d549302020-07-15 17:08:28 +0200588}
589
590// Serialized form of a list of com.google.gerrit.extensions.common.ContextLineInfo
Youssef Elghareeb27d62012021-02-23 18:21:46 +0100591// Next ID: 3
Youssef Elghareeb3d549302020-07-15 17:08:28 +0200592message AllCommentContextProto {
593 message CommentContextProto {
594 int32 line_number = 1;
595 string context_line = 2;
596 }
597 repeated CommentContextProto context = 1;
Youssef Elghareeb27d62012021-02-23 18:21:46 +0100598 string content_type = 2;
Youssef Elghareeb3d549302020-07-15 17:08:28 +0200599}
Youssef Elghareebc5cb2f72020-10-19 13:29:59 +0200600
601// Serialized key for
Youssef Elghareeb64778c32020-10-23 16:25:50 +0200602// com.google.gerrit.server.patch.gitdiff.GitModifiedFilesCacheKey
Youssef Elghareebc5cb2f72020-10-19 13:29:59 +0200603// Next ID: 5
604message GitModifiedFilesKeyProto {
605 string project = 1;
606 bytes a_tree = 2; // SHA-1 hash of the left git tree ID in the diff
607 bytes b_tree = 3; // SHA-1 hash of the right git tree ID in the diff
608 int32 rename_score = 4;
609}
610
Youssef Elghareeb64778c32020-10-23 16:25:50 +0200611// Serialized key for
612// com.google.gerrit.server.patch.diff.ModifiedFilesCacheKey
613// Next ID: 5
614message ModifiedFilesKeyProto {
615 string project = 1;
616 bytes a_commit = 2; // SHA-1 hash of the left commit ID in the diff
617 bytes b_commit = 3; // SHA-1 hash of the right commit ID in the diff
618 int32 rename_score = 4;
619}
620
Youssef Elghareebc5cb2f72020-10-19 13:29:59 +0200621// Serialized form of com.google.gerrit.server.patch.gitdiff.ModifiedFile
622// Next ID: 4
623message ModifiedFileProto {
624 string change_type = 1; // ENUM as string
625 string old_path = 2;
626 string new_path = 3;
627}
628
629// Serialized form of a collection of
630// com.google.gerrit.server.patch.gitdiff.ModifiedFile
631// Next ID: 2
632message ModifiedFilesProto {
633 repeated ModifiedFileProto modifiedFile = 1;
634}
Youssef Elghareeb332d1712020-10-22 19:13:54 +0200635
636// Serialized form of a collection of
637// com.google.gerrit.server.patch.gitfilediff.GitFileDiffCacheImpl.Key
Youssef Elghareeb541ac102021-06-24 17:49:30 +0200638// Next ID: 9
Youssef Elghareeb332d1712020-10-22 19:13:54 +0200639message GitFileDiffKeyProto {
640 string project = 1;
641 bytes a_tree = 2;
642 bytes b_tree = 3;
643 string file_path = 4;
644 int32 rename_score = 5;
645 string diff_algorithm = 6; // ENUM as string
646 string whitepsace = 7; // ENUM as string
Youssef Elghareeb541ac102021-06-24 17:49:30 +0200647 bool useTimeout = 8;
Youssef Elghareeb332d1712020-10-22 19:13:54 +0200648}
649
650// Serialized form of com.google.gerrit.server.patch.gitfilediff.GitFileDiff
Youssef Elghareeb541ac102021-06-24 17:49:30 +0200651// Next ID: 12
Youssef Elghareeb332d1712020-10-22 19:13:54 +0200652message GitFileDiffProto {
653 message Edit {
654 int32 begin_a = 1;
655 int32 end_a = 2;
656 int32 begin_b = 3;
657 int32 end_b = 4;
658 }
659 repeated Edit edits = 1;
660 string file_header = 2;
661 string old_path = 3;
662 string new_path = 4;
663 bytes old_id = 5;
664 bytes new_id = 6;
665 string old_mode = 7; // ENUM as string
666 string new_mode = 8; // ENUM as string
667 string change_type = 9; // ENUM as string
668 string patch_type = 10; // ENUM as string
Youssef Elghareeb541ac102021-06-24 17:49:30 +0200669 bool negative = 11;
Youssef Elghareeb332d1712020-10-22 19:13:54 +0200670}
Youssef Elghareeb7a988d32020-11-19 23:43:13 +0100671
672// Serialized form of
673// com.google.gerrit.server.patch.fileDiff.FileDiffCacheKey
Youssef Elghareeb541ac102021-06-24 17:49:30 +0200674// Next ID: 9
Youssef Elghareeb7a988d32020-11-19 23:43:13 +0100675message FileDiffKeyProto {
676 string project = 1;
677 bytes old_commit = 2;
678 bytes new_commit = 3;
679 string file_path = 4;
680 int32 rename_score = 5;
681 string diff_algorithm = 6;
682 string whitespace = 7;
Youssef Elghareeb541ac102021-06-24 17:49:30 +0200683 bool useTimeout = 8;
Youssef Elghareeb7a988d32020-11-19 23:43:13 +0100684}
685
686// Serialized form of
687// com.google.gerrit.server.patch.filediff.FileDiffOutput
Youssef Elghareeb541ac102021-06-24 17:49:30 +0200688// Next ID: 13
Youssef Elghareeb7a988d32020-11-19 23:43:13 +0100689message FileDiffOutputProto {
690 // Next ID: 5
691 message Edit {
692 int32 begin_a = 1;
693 int32 end_a = 2;
694 int32 begin_b = 3;
695 int32 end_b = 4;
696 }
697 // Serialized form of com.google.gerrit.server.patch.filediff.TaggedEdit
698 // Next ID: 3
699 message TaggedEdit {
700 Edit edit = 1;
701 bool due_to_rebase = 2;
702 }
Youssef Elghareeb3c2e9a62021-02-18 22:00:57 +0100703 // Next ID: 3
704 message ComparisonType {
705 int32 parent_num = 1;
706 bool auto_merge = 2;
707 }
Youssef Elghareeb7a988d32020-11-19 23:43:13 +0100708 string old_path = 1;
709 string new_path = 2;
710 string change_type = 3;
711 string patch_type = 4;
712 repeated string header_lines = 5;
713 int64 size = 6;
714 int64 size_delta = 7;
715 repeated TaggedEdit edits = 8;
Youssef Elghareeb3c2e9a62021-02-18 22:00:57 +0100716 bytes old_commit = 9;
717 bytes new_commit = 10;
718 ComparisonType comparison_type = 11;
Youssef Elghareeb541ac102021-06-24 17:49:30 +0200719 bool negative = 12;
Youssef Elghareeb7a988d32020-11-19 23:43:13 +0100720}
Patrick Hiesel1af89f52021-06-01 17:29:22 +0200721
722// Serialized form of com.google.gerrit.server.approval.ApprovalCacheImpl.Key.
723// Next ID: 5
724message PatchSetApprovalsKeyProto {
725 string project = 1;
726 int32 change_id = 2;
727 int32 patch_set_id = 3;
728 bytes id = 4;
729}
730
731// Repeated version of PatchSetApprovalProto
732// Next ID: 2
733message AllPatchSetApprovalsProto {
734 repeated devtools.gerritcodereview.PatchSetApproval approval = 1;
735}